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

Deviceusage.shex

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

Raw ShEx

ShEx statement for deviceusage

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 <code.shex>
IMPORT <Claim.shex>
IMPORT <Timing.shex>
IMPORT <Period.shex>
IMPORT <Patient.shex>
IMPORT <dateTime.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Procedure.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Observation.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <EpisodeOfCare.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DomainResource.shex>
IMPORT <ServiceRequest.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <CodeableReference.shex>
IMPORT <DocumentReference.shex>
IMPORT <QuestionnaireResponse.shex>


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

# Record of use of a device
<DeviceUsage> EXTENDS @<DomainResource> CLOSED {   

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

    fhir:identifier @<OneOrMore_Identifier>?;  # External identifier for this record
    fhir:basedOn @<OneOrMore_Reference_ServiceRequest>?;  # Fulfills plan, proposal or order
    fhir:status @<code> AND
    	{fhir:v @fhirvs:deviceusage-status};  # active | completed | not-done | 
                                            # entered-in-error + 
    fhir:category @<OneOrMore_CodeableConcept>?;  # The category of the statement - 
                                            # classifying how the statement is 
                                            # made 
    fhir:patient @<Reference> AND {fhir:link 
    			@<Patient> ? };  # Patient using device
    fhir:derivedFrom @<OneOrMore_Reference_Claim_OR_DocumentReference_OR_Observation_OR_Procedure_OR_QuestionnaireResponse_OR_ServiceRequest>?;  # Supporting information
    fhir:context @<Reference> AND {fhir:link 
    			@<Encounter> OR 
    			@<EpisodeOfCare> ? }?;  # The encounter or episode of care 
                                            # that establishes the context for 
                                            # this device use statement 
    fhir:timing @<Timing>  OR 
    			@<Period>  OR 
    			@<dateTime>  ?;  # How often  the device was used
    fhir:dateAsserted @<dateTime>?;         # When the statement was made (and 
                                            # recorded) 
    fhir:usageStatus @<CodeableConcept>?;   # The status of the device usage, 
                                            # for example always, sometimes, 
                                            # never. This is not the same as the 
                                            # status of the statement 
    fhir:usageReason @<OneOrMore_CodeableConcept>?;  # The reason for asserting the usage 
                                            # status - for example forgot, lost, 
                                            # stolen, broken 
    fhir:adherence @<DeviceUsage.adherence>?;  # How device is being used
    fhir:informationSource @<Reference> AND {fhir:link 
    			@<Organization> OR 
    			@<Patient> OR 
    			@<Practitioner> OR 
    			@<PractitionerRole> OR 
    			@<RelatedPerson> ? }?;  # Who made the statement
    fhir:device @<CodeableReference>;       # Code or Reference to device used
    fhir:reason @<OneOrMore_CodeableReference>?;  # Why device was used
    fhir:bodySite @<CodeableReference>?;    # Target body site
    fhir:note @<OneOrMore_Annotation>?;     # Addition details (comments, 
                                            # instructions) 
}  

# How device is being used
<DeviceUsage.adherence> EXTENDS @<BackboneElement> CLOSED {   
    fhir:code @<CodeableConcept>;           # always | never | sometimes
    fhir:reason @<OneOrMore_CodeableConcept>;  # lost | stolen | prescribed | 
                                            # broken | burned | forgot 
}  

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

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

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

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

<OneOrMore_Reference_Claim_OR_DocumentReference_OR_Observation_OR_Procedure_OR_QuestionnaireResponse_OR_ServiceRequest> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<Claim> OR 
			@<DocumentReference> OR 
			@<Observation> OR 
			@<Procedure> OR 
			@<QuestionnaireResponse> OR 
			@<ServiceRequest> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Claim_OR_DocumentReference_OR_Observation_OR_Procedure_OR_QuestionnaireResponse_OR_ServiceRequest> 
}

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

<OneOrMore_Annotation> CLOSED {
    rdf:first @<Annotation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> 
}

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

# A coded concept indicating the current status of the Device Usage.
fhirvs:deviceusage-status ["active" "completed" "not-done" "entered-in-error" "intended" "stopped" "on-hold"]


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.