FHIR CI-Build

This is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions

Deviceassociation.shex

Responsible Owner: Orders and Observations Work GroupStandards Status: InformativeCompartments: Device, Group, Patient, Practitioner, RelatedPerson

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#> 

# ShEx Version 2.2
IMPORT <Code.shex>
IMPORT <Group.shex>
IMPORT <Device.shex>
IMPORT <Period.shex>
IMPORT <Patient.shex>
IMPORT <CareTeam.shex>
IMPORT <Location.shex>
IMPORT <Specimen.shex>
IMPORT <Reference.shex>
IMPORT <Substance.shex>
IMPORT <Identifier.shex>
IMPORT <Medication.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <BodyStructure.shex>
IMPORT <DomainResource.shex>
IMPORT <CodeableConcept.shex>
IMPORT <NutritionProduct.shex>
IMPORT <PractitionerRole.shex>
IMPORT <BiologicallyDerivedProduct.shex>

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

# A record of association or dissociation of a device with a subject (e.g. patient) and/or operator
<DeviceAssociation> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:DeviceAssociation]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # Instance identifier
    fhir:device @<Reference> AND {fhir:l 
    			@<Device> ? };  # Reference to the device that is 
                                            # being associated 
    fhir:relationship @<OneOrMore_CodeableConcept>?;  # Describes the relationship between 
                                            # the device and subject 
    fhir:status @<Code> AND
    	{fhir:v @fhirvs:deviceassociation-status};  # active | inactive | 
                                            # entered-in-error | unknown 
    fhir:statusReason @<OneOrMore_CodeableConcept>?;  # The reasons given for the current 
                                            # association status 
    fhir:associationStatus @<CodeableConcept>?;  # State of the device’s association
    fhir:subject @<Reference> AND {fhir:l 
    			@<BiologicallyDerivedProduct> OR 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Group> OR 
    			@<Location> OR 
    			@<Medication> OR 
    			@<NutritionProduct> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> OR 
    			@<Specimen> OR 
    			@<Substance> ? }?;  # The entity(ies) that the device is 
                                            # on or associated with 
    fhir:focus @<Reference> AND {fhir:l 
    			@<BiologicallyDerivedProduct> OR 
    			@<CareTeam> OR 
    			@<Device> OR 
    			@<Group> OR 
    			@<Location> OR 
    			@<Medication> OR 
    			@<NutritionProduct> OR 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> OR 
    			@<Specimen> OR 
    			@<Substance> ? }?;  # The target of the association
    fhir:bodyStructure @<Reference> AND {fhir:l 
    			@<BodyStructure> ? }?;  # Current anatomical location of the 
                                            # device in/on subject 
    fhir:period @<Period>?;                 # Begin and end dates and times for 
                                            # the device association 
}  

#---------------------- 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> 
}

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

# DeviceAssociation Status Codes
fhirvs:deviceassociation-status ["active" "inactive" "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.