Release 5

Publish-box (todo)

Deviceassociation.shex

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

Raw ShEx

ShEx statement for deviceassociation

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 <Group.shex>
IMPORT <Device.shex>
IMPORT <Period.shex>
IMPORT <Patient.shex>
IMPORT <Reference.shex>
IMPORT <Identifier.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <BodyStructure.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>


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

# A record of association or dissociation of a device with a patient
<DeviceAssociation> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Instance identifier
    fhir:device @<Reference> AND {fhir:link 
    			@<Device> ? };  # Reference to the devices 
                                            # associated with the patient or 
                                            # group 
    fhir:category @<OneOrMore_CodeableConcept>?;  # Describes the relationship between 
                                            # the device and subject 
    fhir:status @<CodeableConcept>;         # implanted | explanted | attached | 
                                            # entered-in-error | unknown 
    fhir:statusReason @<OneOrMore_CodeableConcept>?;  # The reasons given for the current 
                                            # association status 
    fhir:subject @<Reference> AND {fhir:link 
    			@<Device> OR 
    			@<Group> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<RelatedPerson> ? }?;  # The individual, group of 
                                            # individuals or device that the 
                                            # device is on or associated with 
    fhir:bodyStructure @<Reference> AND {fhir:link 
    			@<BodyStructure> ? }?;  # Current anatomical location of the 
                                            # device in/on subject 
    fhir:period @<Period>?;                 # Begin and end dates and times for 
                                            # the device association 
    fhir:operation @<OneOrMore_DeviceAssociation.operation>?;  # The details about the device when 
                                            # it is in use to describe its 
                                            # operation 
}  

# The details about the device when it is in use to describe its operation
<DeviceAssociation.operation> EXTENDS @<BackboneElement> CLOSED {   
    fhir:status @<CodeableConcept>;         # Device operational condition
    fhir:operator @<OneOrMore_Reference_Patient_OR_Practitioner_OR_RelatedPerson>?;  # The individual performing the 
                                            # action enabled by the device 
    fhir:period @<Period>?;                 # Begin and end dates and times for 
                                            # the device's operation 
}  

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

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

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

<OneOrMore_DeviceAssociation.operation> CLOSED {
    rdf:first @<DeviceAssociation.operation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_DeviceAssociation.operation> 
}

<OneOrMore_Reference_Patient_OR_Practitioner_OR_RelatedPerson> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Patient> OR 
			@<Practitioner> OR 
			@<RelatedPerson> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Patient_OR_Practitioner_OR_RelatedPerson> 
}


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.