R6 Ballot (1st Draft)

This page is part of the FHIR Specification v6.0.0-ballot1: Release 6 Ballot (1st Draft) (see Ballot Notes). The current version is 5.0.0. For a full list of available versions, see the Directory of published versions

Bodystructure.shex

Orders and Observations Work GroupMaturity Level: N/AStandards Status: InformativeCompartments: Patient

Raw ShEx

ShEx statement for bodystructure

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 <boolean.shex>
IMPORT <Patient.shex>
IMPORT <markdown.shex>
IMPORT <Quantity.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <Attachment.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <ImagingSelection.shex>
IMPORT <CodeableReference.shex>


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

# Specific and identified anatomical structure
<BodyStructure> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Bodystructure identifier
    fhir:active @<boolean>?;                # Whether this record is in active 
                                            # use 
    fhir:morphology @<CodeableConcept>?;    # Kind of Structure
    fhir:includedStructure @<OneOrMore_BodyStructure.includedStructure>;  # Included anatomic location(s)
    fhir:excludedStructure @<OneOrMore_BodyStructure.includedStructure>?;  # Excluded anatomic locations(s)
    fhir:description @<markdown>?;          # Text description
    fhir:image @<OneOrMore_Attachment>?;    # Attached images
    fhir:patient @<Reference> AND {fhir:link 
    			@<Patient> ? };  # Who this is about
}  

# Landmark relative location
<BodyStructure.includedStructure.bodyLandmarkOrientation> EXTENDS @<BackboneElement> CLOSED {   
    fhir:landmarkDescription @<OneOrMore_CodeableConcept>?;  # Body ]andmark description
    fhir:clockFacePosition @<OneOrMore_CodeableConcept>?;  # Clockface orientation
    fhir:distanceFromLandmark @<OneOrMore_BodyStructure.includedStructure.bodyLandmarkOrientation.distanceFromLandmark>?;  # Landmark relative location
    fhir:surfaceOrientation @<OneOrMore_CodeableConcept>?;  # Relative landmark surface 
                                            # orientation 
}  

# Landmark relative location
<BodyStructure.includedStructure.bodyLandmarkOrientation.distanceFromLandmark> EXTENDS @<BackboneElement> CLOSED {   
    fhir:device @<OneOrMore_CodeableReference>?;  # Measurement device
    fhir:value @<OneOrMore_Quantity>?;      # Measured distance from body 
                                            # landmark 
}  

# Included anatomic location(s)
<BodyStructure.includedStructure> EXTENDS @<BackboneElement> CLOSED {   
    fhir:structure @<CodeableConcept>;      # Code that represents the included 
                                            # structure 
    fhir:laterality @<CodeableConcept>?;    # Code that represents the included 
                                            # structure laterality 
    fhir:bodyLandmarkOrientation @<OneOrMore_BodyStructure.includedStructure.bodyLandmarkOrientation>?;  # Landmark relative location
    fhir:spatialReference @<OneOrMore_Reference_ImagingSelection>?;  # Cartesian reference for structure
    fhir:qualifier @<OneOrMore_CodeableConcept>?;  # Code that represents the included 
                                            # structure qualifier 
}  

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

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

<OneOrMore_BodyStructure.includedStructure> CLOSED {
    rdf:first @<BodyStructure.includedStructure>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_BodyStructure.includedStructure> 
}

<OneOrMore_Attachment> CLOSED {
    rdf:first @<Attachment>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Attachment> 
}

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

<OneOrMore_BodyStructure.includedStructure.bodyLandmarkOrientation.distanceFromLandmark> CLOSED {
    rdf:first @<BodyStructure.includedStructure.bodyLandmarkOrientation.distanceFromLandmark>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_BodyStructure.includedStructure.bodyLandmarkOrientation.distanceFromLandmark> 
}

<OneOrMore_CodeableReference> CLOSED {
    rdf:first @<CodeableReference>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_CodeableReference> 
}

<OneOrMore_Quantity> CLOSED {
    rdf:first @<Quantity>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Quantity> 
}

<OneOrMore_BodyStructure.includedStructure.bodyLandmarkOrientation> CLOSED {
    rdf:first @<BodyStructure.includedStructure.bodyLandmarkOrientation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_BodyStructure.includedStructure.bodyLandmarkOrientation> 
}

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


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.