Release 5 FHIR CI-Build

This page is part of the Continuous Integration Build of FHIR Specification (v5.0.0: R5 - STU ). This is the current published version in it's permanent home (it will always (will be available incorrect/inconsistent at this URL). For a full list of available versions, see times).
See the Directory of published versions . Page versions: R5 R4B R4 R3

Visionprescription.shex

Maturity Level : N/A
Responsible Owner: Orders and Observations Work Group Standards Status : Informative Compartments : 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>

# ShEx Version 2.2
IMPORT <Code.shex>
IMPORT <String.shex>

IMPORT <Patient.shex>
IMPORT <decimal.shex>
IMPORT <integer.shex>
IMPORT <dateTime.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]?;

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

    fhir:identifier @<OneOrMore_Identifier>?;  # Business Identifier for vision 
                                            # prescription 
    fhir:status @<code> AND

    fhir:basedOn @<OneOrMore_Reference_CarePlan_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest>?;  # What prescription fulfills
    fhir:groupIdentifier @<Identifier>?;    # Composite request identifier
    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 

    fhir:priority @<Code> AND
    	{fhir:v @fhirvs:request-priority}?;  # routine | urgent | asap | stat
    fhir:created @<DateTime>;               # Response creation date
    fhir:patient @<Reference> AND {fhir:l 

    			@<Patient> ? };  # Who prescription is for
    fhir:encounter @<Reference> AND {fhir:link 

    fhir:encounter @<Reference> AND {fhir:l 

    			@<Encounter> ? }?;  # Created during encounter / 
                                            # admission / stay 
    fhir:dateWritten @<dateTime>;           # When prescription was authorized
    fhir:prescriber @<Reference> AND {fhir:link 

    fhir:dateWritten @<DateTime>;           # When prescription was authorized
    fhir:prescriber @<Reference> AND {fhir:l 

    			@<Practitioner> OR 
    			@<PractitionerRole> ? };  # Who authorized the vision 
                                            # prescription 
    fhir:lensSpecification @<OneOrMore_VisionPrescription.lensSpecification>;  # Vision lens authorization
}  
# 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
}  

# Vision lens authorization
<VisionPrescription.lensSpecification> EXTENDS @<BackboneElement> CLOSED {   
    fhir:product @<CodeableConcept>;        # Product to be supplied
    fhir:eye @<code> AND

    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 

    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: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:color @<String>?;                  # Color required
    fhir:brand @<String>?;                  # Brand required

    fhir:note @<OneOrMore_Annotation>?;     # Notes for coatings
}  
#---------------------- Cardinality Types (OneOrMore) -------------------

# 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:l 
			@<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"]
# Identifies the level of importance to be assigned to actioning the request.
fhirvs:request-priority ["routine" "urgent" "asap" "stat"]

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