FoundationThis is the Continuous Integration Build of FHIR (will be incorrect/inconsistent at times).
See the Directory of published versions
| Responsible Owner: Orders and Observations Work Group | Standards Status: Informative | Compartments: Device, Encounter, Group, Patient, Practitioner, RelatedPerson |
ShEx statement for servicerequest
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 <Ratio.shex>
IMPORT <Range.shex>
IMPORT <Group.shex>
IMPORT <Device.shex>
IMPORT <Period.shex>
IMPORT <Timing.shex>
IMPORT <String.shex>
IMPORT <Boolean.shex>
IMPORT <Patient.shex>
IMPORT <Quantity.shex>
IMPORT <Location.shex>
IMPORT <DateTime.shex>
IMPORT <Markdown.shex>
IMPORT <CarePlan.shex>
IMPORT <Resource.shex>
IMPORT <CareTeam.shex>
IMPORT <Coverage.shex>
IMPORT <Specimen.shex>
IMPORT <Reference.shex>
IMPORT <Encounter.shex>
IMPORT <Canonical.shex>
IMPORT <Substance.shex>
IMPORT <Identifier.shex>
IMPORT <Annotation.shex>
IMPORT <Medication.shex>
IMPORT <Provenance.shex>
IMPORT <Organization.shex>
IMPORT <Practitioner.shex>
IMPORT <RelatedPerson.shex>
IMPORT <DeviceRequest.shex>
IMPORT <SupplyRequest.shex>
IMPORT <ClaimResponse.shex>
IMPORT <DomainResource.shex>
IMPORT <NutritionOrder.shex>
IMPORT <CodeableConcept.shex>
IMPORT <BackboneElement.shex>
IMPORT <PractitionerRole.shex>
IMPORT <DeviceDefinition.shex>
IMPORT <CodeableReference.shex>
IMPORT <DocumentReference.shex>
IMPORT <MedicationRequest.shex>
IMPORT <HealthcareService.shex>
IMPORT <VisionPrescription.shex>
IMPORT <SubstanceDefinition.shex>
IMPORT <RequestOrchestration.shex>
IMPORT <CommunicationRequest.shex>
IMPORT <BiologicallyDerivedProduct.shex>
IMPORT <MedicinalProductDefinition.shex>
start=@<ServiceRequest> AND {fhir:nodeRole [fhir:treeRoot]}
# A request for a service to be performed
<ServiceRequest> EXTENDS @<DomainResource> CLOSED {
a [fhir:ServiceRequest]?;fhir:nodeRole [fhir:treeRoot]?;
fhir:identifier @<OneOrMore_Identifier>?; # Identifiers assigned to this order
fhir:basedOn @<OneOrMore_Reference_CarePlan_OR_DocumentReference_OR_DocumentReference_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest>?; # What request fulfills
fhir:replaces @<OneOrMore_Reference_CarePlan_OR_CommunicationRequest_OR_DeviceRequest_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest_OR_SupplyRequest_OR_VisionPrescription>?; # What request replaces
fhir:requisition @<Identifier>?; # Composite Request ID
fhir:status @<Code> AND
{fhir:v @fhirvs:request-status}; # draft | active | on-hold |
# entered-in-error | ended |
# completed | revoked | unknown
fhir:statusReason @<OneOrMore_CodeableConcept>?; # Reason for current status
fhir:intent @<Code> AND
{fhir:v @fhirvs:request-intent}; # proposal | solicit-offer |
# offer-response | plan | directive
# | order | original-order |
# reflex-order | filler-order |
# instance-order | option
fhir:category @<OneOrMore_CodeableConcept>?; # Classification of service
fhir:priority @<Code> AND
{fhir:v @fhirvs:request-priority}?; # routine | urgent | asap | stat
fhir:doNotPerform @<Boolean>?; # True if service/procedure should
# not be performed
fhir:code @<CodeableReference>?; # What is being requested/ordered
fhir:orderDetail @<OneOrMore_ServiceRequest.orderDetail>?; # Additional information about the
# request
fhir:quantity @<Quantity> OR
@<Ratio> OR
@<Range> ?; # Service amount
fhir:subject @<Reference> AND {fhir:l
@<Device> OR
@<Group> OR
@<Location> OR
@<Patient> ? }; # Individual or Entity the service
# is ordered for
fhir:focus @<OneOrMore_Reference_Resource>?; # What the service request is about,
# when it is not about the subject
# of record
fhir:encounter @<Reference> AND {fhir:l
@<Encounter> ? }?; # Encounter in which the request was
# created
fhir:occurrence @<DateTime> OR
@<Period> OR
@<Timing> ?; # When service should occur
fhir:asNeeded @<Boolean>?; # Perform the service "as needed"
fhir:asNeededFor @<OneOrMore_CodeableConcept>?; # Specified criteria for the service
fhir:authoredOn @<DateTime>?; # Date request signed
fhir:requester @<Reference> AND {fhir:l
@<Device> OR
@<Group> OR
@<Organization> OR
@<Patient> OR
@<Practitioner> OR
@<PractitionerRole> OR
@<RelatedPerson> ? }?; # Who/what is requesting service
fhir:performerType @<CodeableConcept>?; # Performer role
fhir:performer @<OneOrMore_Reference_CareTeam_OR_Device_OR_Group_OR_HealthcareService_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson>?; # Requested performer
fhir:location @<OneOrMore_CodeableReference>?; # Requested location
fhir:reason @<OneOrMore_CodeableReference>?; # Reason or indication for
# requesting the service
fhir:insurance @<OneOrMore_Reference_ClaimResponse_OR_Coverage>?; # Associated insurance coverage
fhir:supportingInfo @<OneOrMore_CodeableReference>?; # Additional clinical information
fhir:specimen @<OneOrMore_Reference_Specimen>?; # Procedure Samples
fhir:bodyStructure @<CodeableReference>?; # BodyStructure-based location on
# the body
fhir:note @<OneOrMore_Annotation>?; # Comments
fhir:patientInstruction @<OneOrMore_ServiceRequest.patientInstruction>?; # Patient or consumer-oriented
# instructions
fhir:relevantHistory @<OneOrMore_Reference_Provenance>?; # Request provenance
}
# Patient or consumer-oriented instructions
<ServiceRequest.patientInstruction> EXTENDS @<BackboneElement> CLOSED {
fhir:instruction @<Markdown> OR
(@<Reference> AND {fhir:l @<DocumentReference> }) ?; # Patient or consumer-oriented
# instructions
}
# The parameter details for the service being requested
<ServiceRequest.orderDetail.parameter> EXTENDS @<BackboneElement> CLOSED {
fhir:code @<CodeableConcept>; # The detail of the order being
# requested
fhir:value @<Quantity> OR
@<Ratio> OR
@<Range> OR
@<Boolean> OR
@<CodeableConcept> OR
@<String> OR
@<Period> ; # The value for the order detail
}
# Additional information about the request
<ServiceRequest.orderDetail> EXTENDS @<BackboneElement> CLOSED {
fhir:parameterFocus @<CodeableConcept> OR
(@<Reference> AND {fhir:l @<Device> OR
@<DeviceRequest> OR
@<Medication> OR
@<MedicationRequest> OR
@<BiologicallyDerivedProduct> OR
@<Substance> OR
@<SubstanceDefinition> OR
@<SupplyRequest> OR
@<MedicinalProductDefinition> }) OR
(@<Canonical> AND {fhir:l @<DeviceDefinition> }) ?; # The context of the order details
# by reference
fhir:parameter @<OneOrMore_ServiceRequest.orderDetail.parameter>; # The parameter details for the
# service being requested
}
#---------------------- Cardinality Types (OneOrMore) -------------------
<OneOrMore_Identifier> CLOSED {
rdf:first @<Identifier> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Identifier>
}
<OneOrMore_Reference_CarePlan_OR_DocumentReference_OR_DocumentReference_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<CarePlan> OR
@<DocumentReference> OR
@<DocumentReference> OR
@<MedicationRequest> OR
@<NutritionOrder> OR
@<RequestOrchestration> OR
@<ServiceRequest> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CarePlan_OR_DocumentReference_OR_DocumentReference_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest>
}
<OneOrMore_Reference_CarePlan_OR_CommunicationRequest_OR_DeviceRequest_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest_OR_SupplyRequest_OR_VisionPrescription> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<CarePlan> OR
@<CommunicationRequest> OR
@<DeviceRequest> OR
@<MedicationRequest> OR
@<NutritionOrder> OR
@<RequestOrchestration> OR
@<ServiceRequest> OR
@<SupplyRequest> OR
@<VisionPrescription> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CarePlan_OR_CommunicationRequest_OR_DeviceRequest_OR_MedicationRequest_OR_NutritionOrder_OR_RequestOrchestration_OR_ServiceRequest_OR_SupplyRequest_OR_VisionPrescription>
}
<OneOrMore_CodeableConcept> CLOSED {
rdf:first @<CodeableConcept> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept>
}
<OneOrMore_ServiceRequest.orderDetail> CLOSED {
rdf:first @<ServiceRequest.orderDetail> ;
rdf:rest [rdf:nil] OR @<OneOrMore_ServiceRequest.orderDetail>
}
<OneOrMore_Reference_Resource> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<Resource> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Resource>
}
<OneOrMore_Reference_CareTeam_OR_Device_OR_Group_OR_HealthcareService_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<CareTeam> OR
@<Device> OR
@<Group> OR
@<HealthcareService> OR
@<Organization> OR
@<Patient> OR
@<Practitioner> OR
@<PractitionerRole> OR
@<RelatedPerson> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CareTeam_OR_Device_OR_Group_OR_HealthcareService_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson>
}
<OneOrMore_CodeableReference> CLOSED {
rdf:first @<CodeableReference> ;
rdf:rest [rdf:nil] OR @<OneOrMore_CodeableReference>
}
<OneOrMore_Reference_ClaimResponse_OR_Coverage> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<ClaimResponse> OR
@<Coverage> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_ClaimResponse_OR_Coverage>
}
<OneOrMore_Reference_Specimen> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<Specimen> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Specimen>
}
<OneOrMore_Annotation> CLOSED {
rdf:first @<Annotation> ;
rdf:rest [rdf:nil] OR @<OneOrMore_Annotation>
}
<OneOrMore_ServiceRequest.patientInstruction> CLOSED {
rdf:first @<ServiceRequest.patientInstruction> ;
rdf:rest [rdf:nil] OR @<OneOrMore_ServiceRequest.patientInstruction>
}
<OneOrMore_Reference_Provenance> CLOSED {
rdf:first @<Reference> AND {fhir:l
@<Provenance> } ;
rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Provenance>
}
<OneOrMore_ServiceRequest.orderDetail.parameter> CLOSED {
rdf:first @<ServiceRequest.orderDetail.parameter> ;
rdf:rest [rdf:nil] OR @<OneOrMore_ServiceRequest.orderDetail.parameter>
}
#---------------------- Value Sets ------------------------
# Codes indicating the degree of authority/intentionality associated with a request.
fhirvs:request-intent ["proposal" "solicit-offer" "offer-response" "plan" "directive" "order" "original-order" "reflex-order" "filler-order" "instance-order" "option"]
# Identifies the level of importance to be assigned to actioning the request.
fhirvs:request-priority ["routine" "urgent" "asap" "stat"]
# Codes identifying the lifecycle stage of a request.
fhirvs:request-status ["draft" "active" "on-hold" "entered-in-error" "ended" "completed" "revoked" "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.
FHIR ®© HL7.org 2011+. FHIR R6 hl7.fhir.core#6.0.0-ballot3 generated on Sun, Nov 2, 2025 23:54+0000.
Links: Search |
Version History |
Contents |
Glossary |
QA |
Compare to R5 |
|
Propose a change