Release 5

Publish-box (todo)

Imagingselection.shex

Imaging Integration Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Patient

Raw ShEx

ShEx statement for imagingselection

PREFIX fhir: <http://hl7.org/fhir/> 
PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 

IMPORT <id.shex>
IMPORT <code.shex>
IMPORT <Task.shex>
IMPORT <Group.shex>
IMPORT <Device.shex>
IMPORT <Coding.shex>
IMPORT <string.shex>
IMPORT <Patient.shex>
IMPORT <instant.shex>
IMPORT <decimal.shex>
IMPORT <Location.shex>
IMPORT <Specimen.shex>
IMPORT <CareTeam.shex>
IMPORT <CarePlan.shex>
IMPORT <Endpoint.shex>
IMPORT <Reference.shex>
IMPORT <Procedure.shex>
IMPORT <Substance.shex>
IMPORT <Identifier.shex>
IMPORT <Medication.shex>
IMPORT <unsignedInt.shex>
IMPORT <Appointment.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <ImagingStudy.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DomainResource.shex>
IMPORT <ServiceRequest.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <CodeableReference.shex>
IMPORT <HealthcareService.shex>
IMPORT <DocumentReference.shex>
IMPORT <AppointmentResponse.shex>


start=@<ImagingSelection> AND {fhir:nodeRole [fhir:treeRoot]}

# A selection of DICOM SOP instances and/or frames
<ImagingSelection> EXTENDS @<DomainResource> CLOSED {   

    a [fhir:ImagingSelection]?;
    fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # Business Identifier for Imaging 
                                            # Selection 
    fhir:status @<code> AND
    	{fhir:v @fhirvs:imagingselection-status};  # available | entered-in-error | 
                                            # unknown 
    fhir:subject @<Reference> AND {fhir:link 
    			@<Device> OR 
    			@<Group> OR 
    			@<Location> OR 
    			@<Medication> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<Procedure> OR 
    			@<Specimen> OR 
    			@<Substance> ? }?;  # Subject of the selected instances
    fhir:issued @<instant>?;                # Date / Time when this imaging 
                                            # selection was created 
    fhir:performer @<OneOrMore_ImagingSelection.performer>?;  # Selector of the instances (human 
                                            # or machine) 
    fhir:basedOn @<OneOrMore_Reference_Appointment_OR_AppointmentResponse_OR_CarePlan_OR_ServiceRequest_OR_Task>?;  # Associated request
    fhir:category @<OneOrMore_CodeableConcept>?;  # Classifies the imaging selection
    fhir:code @<CodeableConcept>;           # Imaging Selection purpose text or 
                                            # code 
    fhir:studyUid @<id>?;                   # DICOM Study Instance UID
    fhir:derivedFrom @<OneOrMore_Reference_DocumentReference_OR_ImagingStudy>?;  # The imaging study from which the 
                                            # imaging selection is derived 
    fhir:endpoint @<OneOrMore_Reference_Endpoint>?;  # The network service providing 
                                            # retrieval for the images 
                                            # referenced in the imaging 
                                            # selection 
    fhir:seriesUid @<id>?;                  # DICOM Series Instance UID
    fhir:seriesNumber @<unsignedInt>?;      # DICOM Series Number
    fhir:frameOfReferenceUid @<id>?;        # The Frame of Reference UID for the 
                                            # selected images 
    fhir:bodySite @<CodeableReference>?;    # Body part examined
    fhir:focus @<OneOrMore_Reference_ImagingSelection>?;  # Related resource that is the focus 
                                            # for the imaging selection 
    fhir:instance @<OneOrMore_ImagingSelection.instance>?;  # The selected instances
}  

# The selected instances
<ImagingSelection.instance> EXTENDS @<BackboneElement> CLOSED {   
    fhir:uid @<id>;                         # DICOM SOP Instance UID
    fhir:number @<unsignedInt>?;            # DICOM Instance Number
    fhir:sopClass @<Coding>?;               # DICOM SOP Class UID
    fhir:subset @<OneOrMore_string>?;       # The selected subset of the SOP 
                                            # Instance 
    fhir:imageRegion2D @<OneOrMore_ImagingSelection.instance.imageRegion2D>?;  # A specific 2D region in a DICOM 
                                            # image / frame 
    fhir:imageRegion3D @<OneOrMore_ImagingSelection.instance.imageRegion3D>?;  # A specific 3D region in a DICOM 
                                            # frame of reference 
}  

# A specific 2D region in a DICOM image / frame
<ImagingSelection.instance.imageRegion2D> EXTENDS @<BackboneElement> CLOSED {   
    fhir:regionType @<code> AND
    	{fhir:v @fhirvs:imagingselection-2dgraphictype};  # point | polyline | interpolated | 
                                            # circle | ellipse 
    fhir:coordinate @<OneOrMore_decimal>;   # Specifies the coordinates that 
                                            # define the image region 
}  

# Selector of the instances (human or machine)
<ImagingSelection.performer> EXTENDS @<BackboneElement> CLOSED {   
    fhir:function @<CodeableConcept>?;      # Type of performer
    fhir:actor @<Reference> AND {fhir:link 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<HealthcareService> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Author (human or machine)
}  

# A specific 3D region in a DICOM frame of reference
<ImagingSelection.instance.imageRegion3D> EXTENDS @<BackboneElement> CLOSED {   
    fhir:regionType @<code> AND
    	{fhir:v @fhirvs:imagingselection-3dgraphictype};  # point | multipoint | polyline | 
                                            # polygon | ellipse | ellipsoid 
    fhir:coordinate @<OneOrMore_decimal>;   # Specifies the coordinates that 
                                            # define the image region 
}  

#---------------------- Cardinality Types (OneOrMore) -------------------

<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}

<OneOrMore_ImagingSelection.performer> CLOSED {
    rdf:first @<ImagingSelection.performer>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ImagingSelection.performer> 
}

<OneOrMore_Reference_Appointment_OR_AppointmentResponse_OR_CarePlan_OR_ServiceRequest_OR_Task> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Appointment> OR 
			@<AppointmentResponse> OR 
			@<CarePlan> OR 
			@<ServiceRequest> OR 
			@<Task> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Appointment_OR_AppointmentResponse_OR_CarePlan_OR_ServiceRequest_OR_Task> 
}

<OneOrMore_CodeableConcept> CLOSED {
    rdf:first @<CodeableConcept>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> 
}

<OneOrMore_Reference_DocumentReference_OR_ImagingStudy> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<DocumentReference> OR 
			@<ImagingStudy> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_DocumentReference_OR_ImagingStudy> 
}

<OneOrMore_Reference_Endpoint> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Endpoint> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Endpoint> 
}

<OneOrMore_Reference_ImagingSelection> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<ImagingSelection> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_ImagingSelection> 
}

<OneOrMore_ImagingSelection.instance> CLOSED {
    rdf:first @<ImagingSelection.instance>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ImagingSelection.instance> 
}

<OneOrMore_string> CLOSED {
    rdf:first @<string>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_string> 
}

<OneOrMore_ImagingSelection.instance.imageRegion2D> CLOSED {
    rdf:first @<ImagingSelection.instance.imageRegion2D>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ImagingSelection.instance.imageRegion2D> 
}

<OneOrMore_ImagingSelection.instance.imageRegion3D> CLOSED {
    rdf:first @<ImagingSelection.instance.imageRegion3D>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_ImagingSelection.instance.imageRegion3D> 
}

<OneOrMore_decimal> CLOSED {
    rdf:first @<decimal>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_decimal> 
}

#---------------------- Value Sets ------------------------

# The type of 2D coordinates describing a 2D image region.
fhirvs:imagingselection-2dgraphictype ["point" "polyline" "interpolated" "circle" "ellipse"]

# The type of coordinates describing a 3D image region.
fhirvs:imagingselection-3dgraphictype ["point" "multipoint" "polyline" "polygon" "ellipse" "ellipsoid"]

# The status of the ImagingSelection.
fhirvs:imagingselection-status ["available" "entered-in-error" "unknown"]


Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.