FHIR CI-Build

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

Visionprescription.shex

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

Raw ShEx

ShEx statement for visionprescription

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 <string.shex>
IMPORT <Patient.shex>
IMPORT <decimal.shex>
IMPORT <integer.shex>
IMPORT <dateTime.shex>
IMPORT <Quantity.shex>
IMPORT <CarePlan.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Practitioner.shex>
IMPORT <DomainResource.shex>
IMPORT <NutritionOrder.shex>
IMPORT <ServiceRequest.shex>
IMPORT <BackboneElement.shex>
IMPORT <CodeableConcept.shex>
IMPORT <PractitionerRole.shex>
IMPORT <RequestOrchestration.shex>

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

# Prescription for vision correction products for a patient
<VisionPrescription> EXTENDS @<DomainResource> CLOSED {   
    a [fhir:VisionPrescription]?;fhir:nodeRole [fhir:treeRoot]?;

    fhir:identifier @<OneOrMore_Identifier>?;  # Business Identifier for vision 
                                            # prescription 
    fhir:basedOn @<OneOrMore_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest>?;  # What prescription fulfills
    fhir:status @<code> AND
    	{fhir:v @fhirvs:fm-status};  # active | cancelled | draft | 
                                            # entered-in-error 
    fhir:created @<dateTime>;               # Response creation date
    fhir:patient @<Reference> AND {fhir:link 
    			@<Patient> ? };  # Who prescription is for
    fhir:encounter @<Reference> AND {fhir:link 
    			@<Encounter> ? }?;  # Created during encounter / 
                                            # admission / stay 
    fhir:dateWritten @<dateTime>;           # When prescription was authorized
    fhir:prescriber @<Reference> AND {fhir:link 
    			@<Practitioner> OR 
    			@<PractitionerRole> ? };  # Who authorized the vision 
                                            # prescription 
    fhir:lensSpecification @<OneOrMore_VisionPrescription.lensSpecification>;  # Vision lens authorization
}  

# Vision lens authorization
<VisionPrescription.lensSpecification> EXTENDS @<BackboneElement> CLOSED {   
    fhir:product @<CodeableConcept>;        # Product to be supplied
    fhir:eye @<code> AND
    	{fhir:v @fhirvs:vision-eye-codes};  # right | left
    fhir:sphere @<decimal>?;                # Power of the lens
    fhir:cylinder @<decimal>?;              # Lens power for astigmatism
    fhir:axis @<integer>?;                  # Lens meridian which contain no 
                                            # power for astigmatism 
    fhir:prism @<OneOrMore_VisionPrescription.lensSpecification.prism>?;  # Eye alignment compensation
    fhir:add @<decimal>?;                   # Added power for multifocal levels
    fhir:power @<decimal>?;                 # Contact lens power
    fhir:backCurve @<decimal>?;             # Contact lens back curvature
    fhir:diameter @<decimal>?;              # Contact lens diameter
    fhir:duration @<Quantity>?;             # Lens wear duration
    fhir:color @<string>?;                  # Color required
    fhir:brand @<string>?;                  # Brand required
    fhir:note @<OneOrMore_Annotation>?;     # Notes for coatings
}  

# Eye alignment compensation
<VisionPrescription.lensSpecification.prism> EXTENDS @<BackboneElement> CLOSED {   
    fhir:amount @<decimal>;                 # Amount of adjustment
    fhir:base @<code> AND
    	{fhir:v @fhirvs:vision-base-codes};  # up | down | in | out
}  

#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
    rdf:first @<Identifier>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> 
}
<OneOrMore_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest> CLOSED {
    rdf:first @<Reference> AND {fhir:link 
			@<CarePlan> OR 
			@<NutritionOrder> OR 
			@<RequestOrchestration> OR 
			@<ServiceRequest> } ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest> 
}
<OneOrMore_VisionPrescription.lensSpecification> CLOSED {
    rdf:first @<VisionPrescription.lensSpecification>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_VisionPrescription.lensSpecification> 
}
<OneOrMore_VisionPrescription.lensSpecification.prism> CLOSED {
    rdf:first @<VisionPrescription.lensSpecification.prism>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_VisionPrescription.lensSpecification.prism> 
}
<OneOrMore_Annotation> CLOSED {
    rdf:first @<Annotation>  ;
    rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> 
}

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

# This value set includes Status codes.
fhirvs:fm-status ["active" "cancelled" "draft" "entered-in-error"]

# A coded concept listing the base codes.
fhirvs:vision-base-codes ["up" "down" "in" "out"]

# A coded concept listing the eye codes.
fhirvs:vision-eye-codes ["right" "left"]


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.