TRxHub IG
0.1.0 - ci-build

TRxHub IG - Local Development build (v0.1.0) built by the FHIR (HL7® FHIR® Standard) Build Tools. See the Directory of published versions

Resource Profile: TRxHub ServiceRequest

Official URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-service-request Version: 0.1.0
Draft as of 2026-05-29 Computable Name: TRxHubServiceRequest

ServiceRequest for TRxHub

Overview

The ServiceRequest resource is a central part of the TRxHub and is used to specify the intent of a request.

Usage

Depending on the category, the request represents either:

  • A prescription registration from a selected source defined in the code
  • A medication order from an already registered prescription

Substitution Preference

If the patient's substitution preference is known at the time of the request, it should be conveyed via the substitutionPreference extension. If omitted, no preference is assumed.

The substitution can also be set in the MedicationRequest for each medication separately. The value substitution.allowedBoolean in a MedicationRequests will override the value set in the service request.

Identifiers

The identifier element must carry an identifier of the external service making the request.

BasedOn

basedOn must only be present when ordering medication and must reference the register-prescription ServiceRequest as well as the MedicationRequests that should be ordered.

Register Prescription Flow

Mental Model based on a traditional prescription

When registering a prescription the ServiceRequest is the main entity defining references, like practitioner and patient, similar to a prescription header.

The MedicationRequests represent the medications listed on the prescription. For each medication on the prescription a MedicationRequest must be created. This process only registers the prescriptions and its contents in TRxHub. It does not yet represent or execute an order. To order medications from a prescription a separate ServiceRequest of the category order-medication must be created.

Status

When creating a ServiceRequest to register prescriptions the status can be one of draft or active.

The status draft represents a draft state and does not yet allow the registration of MedicationRequests.

The status active indicates that the ServiceRequest is actively registering MedicationRequests. Only in this state MedicationRequests can be created for a ServiceRequest.

Once all MedicationRequests are registered the status must be changed to completed implying the registration of the prescription is completed. Once the status is completed it cannot be changed anymore and no more MedicationRequests can be registered.

To update a ServiceRequest status, see the TRxHub ServiceRequest update status OperationDefinition.

Meaning of the status for different codes for category register-prescription:

Code/Status draft active completed
register-normal Does not yet allow the registration of MedicationRequests Actively registering MedicationRequests Registering of MedicationRequests completed, ready for order
register-eprescription Does not allow the registration of an EPrescriptionDocumentReference Ready to register an EPrescriptionDocumentReference Registering of Prescription via EPrescriptionDocument completed. Changes automatically after creating an EPrescriptionDocumentReference
register-envelope (TBD) Request created but not yet sent to the ERP When changed to this status the ServiceRequest is sent to the ERP waiting to be processed Once ERP received the Envelope with the prescription and the contents are registered in TRxHub. Changed automatically once TRxHub gets the prescription details from the ERP
register-from-practitioner (TBD) Request created but not yet sent to the ERP When changed to this status the ServiceRequest is sent to the ERP waiting to be processed Once ERP received the prescription from the practitioner and the contents are registered in TRxHub. Changes automatically once TRxHub gets the prescription details from the ERP

TBD: codes marked with (TBD) are not available yet, and the definition might still change with the final implementation

Order Medication Flow

Important: The described flow is currently only correct for register-normal and register-eprescription registration flows. The ordering for register-envelope and register-practitioner might differ a bit since an automatic ordering might be implemented for these resources. The documentation will be updated once the flow for these two codes is defined.

After finishing the registration of a prescription (the registration is finished when the corresponding ServiceRequest has the status completed) an order for MedicationRequests can be placed by creating a ServiceRequest with category order-medication.

Example Scenario

The following examples illustrate a complete registration and ordering flow.

Note: In production, external clients register prescriptions via register-eprescription or register-envelope. In those flows, MedicationRequests are created automatically by TRxHub after parsing the prescription — clients do not post them directly. The examples below use register-normal (an ERP-internal flow) to keep the scenario self-contained and show all three steps explicitly.

Step 1 — Register the prescription

Create a register-prescription ServiceRequest. This acts as the prescription header, referencing the patient and the coverage.

See TRxHubServiceRequestExampleRegisterNormal.

Once all medications are registered, update the status to completed using the update status operation.

Step 2 — Register the medications

For each medication on the prescription, create a MedicationRequest referencing the ServiceRequest from step 1 via basedOn.

See TRxHubMedicationRequestExample.

Step 3 — Place the order

Create an order-medication ServiceRequest. Use basedOn to reference both the register-prescription ServiceRequest from step 1 and the specific MedicationRequests to order from step 2.

See TRxHubServiceRequestExampleOrderMedication.

Usages:

You can also check for usages in the FHIR IG Statistics

Formal Views of Profile Content

Description of Profiles, Differentials, Snapshots and how the different presentations work.

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. ServiceRequest C 0..* ServiceRequest A request for a service to be performed
Constraints: prr-1, trxhub-sr-1, trxhub-sr-2, trxhub-sr-3, trxhub-sr-4, trxhub-sr-5, trxhub-sr-6
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:substitutionPreference S 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... Slices for basedOn SΣ 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by type:resolve()
.... basedOn:serviceRequest SΣC 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
.... basedOn:medicationRequest SΣC 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
... status ?!SΣ 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: RequestStatus (required): The status of a service order.
... intent ?!SΣ 1..1 code proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
Binding: RequestIntent (required): The kind of service request.
Required Pattern: order
... category SΣ 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
..... code SΣ 1..1 code Symbol in syntax defined by the system
... doNotPerform ?!Σ 0..1 boolean True if service/procedure should not be performed
... code SΣ 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
..... code SΣ 1..1 code Symbol in syntax defined by the system
... subject SΣC 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
... authoredOn SΣ 1..1 dateTime Date request signed
... insurance SC 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
ServiceRequest.status Base required RequestStatus 📍4.0.1 FHIR Std.
ServiceRequest.intent Base required RequestIntent 📍4.0.1 FHIR Std.
ServiceRequest.category Base required TRxHub ServiceRequest Category ValueSet 📦0.1.0 This IG
ServiceRequest.code Base required TRxHub ServiceRequest Code ValueSet 📦0.1.0 This IG

Constraints

Id Grade Path(s) Description Expression
dom-2 error ServiceRequest If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error ServiceRequest If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice ServiceRequest A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
prr-1 error ServiceRequest orderDetail SHALL only be present if code is present orderDetail.empty() or code.exists()
trxhub-inv-coverage-ref-only error ServiceRequest.insurance Reference must point to a Coverage resource reference.exists() implies reference.startsWith('Coverage/')
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies reference.startsWith('MedicationRequest/')
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies reference.startsWith('Patient/')
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies reference.startsWith('ServiceRequest/')
trxhub-sr-1 error ServiceRequest insurance is required when category is register-prescription category.coding.where(code='register-prescription').exists() implies insurance.count() = 1
trxhub-sr-2 error ServiceRequest insurance must not be present when category is order-medication category.coding.where(code='order-medication').exists() implies insurance.count() = 0
trxhub-sr-3 error ServiceRequest basedOn must reference exactly one ServiceRequest and at least one MedicationRequest when category is order-medication category.coding.where(code='order-medication').exists() implies (basedOn.where(resolve() is ServiceRequest).count() = 1 and basedOn.where(resolve() is MedicationRequest).count() >= 1)
trxhub-sr-4 error ServiceRequest basedOn must not be present when category is register-prescription category.coding.where(code='register-prescription').exists() implies basedOn.count() = 0
trxhub-sr-5 error ServiceRequest only register-* codes are allowed for category register-prescription category.coding.where(code='register-prescription').exists() implies code.coding.code.all($this in 'register-normal' | 'register-eprescription' | 'register-envelope' | 'register-from-practitioner')
trxhub-sr-6 error ServiceRequest only order-medication code is allowed for category order-medication category.coding.where(code='order-medication').exists() implies code.coding.code.all($this = 'order-medication')

This structure is derived from ServiceRequest

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. ServiceRequest C 0..* ServiceRequest A request for a service to be performed
Constraints: trxhub-sr-1, trxhub-sr-2, trxhub-sr-3, trxhub-sr-4, trxhub-sr-5, trxhub-sr-6
... Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:substitutionPreference S 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
... identifier S 1..1 Identifier Identifiers assigned to this order
... Slices for basedOn S 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by type:resolve()
.... basedOn:serviceRequest SC 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
.... basedOn:medicationRequest SC 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
... intent S 1..1 code proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
Required Pattern: order
... category S 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
.... coding S 1..1 Coding Code defined by a terminology system
..... system S 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
..... code S 1..1 code Symbol in syntax defined by the system
... code S 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
.... coding S 1..1 Coding Code defined by a terminology system
..... system S 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
..... code S 1..1 code Symbol in syntax defined by the system
... subject SC 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
... authoredOn S 1..1 dateTime Date request signed
... insurance SC 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only

doco Documentation for this format

Terminology Bindings (Differential)

Path Status Usage ValueSet Version Source
ServiceRequest.category Base required TRxHub ServiceRequest Category ValueSet 📦0.1.0 This IG
ServiceRequest.code Base required TRxHub ServiceRequest Code ValueSet 📦0.1.0 This IG

Constraints

Id Grade Path(s) Description Expression
trxhub-inv-coverage-ref-only error ServiceRequest.insurance Reference must point to a Coverage resource reference.exists() implies reference.startsWith('Coverage/')
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies reference.startsWith('MedicationRequest/')
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies reference.startsWith('Patient/')
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies reference.startsWith('ServiceRequest/')
trxhub-sr-1 error ServiceRequest insurance is required when category is register-prescription category.coding.where(code='register-prescription').exists() implies insurance.count() = 1
trxhub-sr-2 error ServiceRequest insurance must not be present when category is order-medication category.coding.where(code='order-medication').exists() implies insurance.count() = 0
trxhub-sr-3 error ServiceRequest basedOn must reference exactly one ServiceRequest and at least one MedicationRequest when category is order-medication category.coding.where(code='order-medication').exists() implies (basedOn.where(resolve() is ServiceRequest).count() = 1 and basedOn.where(resolve() is MedicationRequest).count() >= 1)
trxhub-sr-4 error ServiceRequest basedOn must not be present when category is register-prescription category.coding.where(code='register-prescription').exists() implies basedOn.count() = 0
trxhub-sr-5 error ServiceRequest only register-* codes are allowed for category register-prescription category.coding.where(code='register-prescription').exists() implies code.coding.code.all($this in 'register-normal' | 'register-eprescription' | 'register-envelope' | 'register-from-practitioner')
trxhub-sr-6 error ServiceRequest only order-medication code is allowed for category order-medication category.coding.where(code='order-medication').exists() implies code.coding.code.all($this = 'order-medication')
NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. ServiceRequest C 0..* ServiceRequest A request for a service to be performed
Constraints: prr-1, trxhub-sr-1, trxhub-sr-2, trxhub-sr-3, trxhub-sr-4, trxhub-sr-5, trxhub-sr-6
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:substitutionPreference S 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier SΣ 1..1 Identifier Identifiers assigned to this order
... instantiatesCanonical Σ 0..* canonical(ActivityDefinition | PlanDefinition) Instantiates FHIR protocol or definition
... instantiatesUri Σ 0..* uri Instantiates external protocol or definition
... Slices for basedOn SΣ 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by type:resolve()
.... basedOn:serviceRequest SΣC 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
.... basedOn:medicationRequest SΣC 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
... replaces Σ 0..* Reference(ServiceRequest) What request replaces
... requisition Σ 0..1 Identifier Composite Request ID
... status ?!SΣ 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: RequestStatus (required): The status of a service order.
... intent ?!SΣ 1..1 code proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
Binding: RequestIntent (required): The kind of service request.
Required Pattern: order
... category SΣ 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
..... version Σ 0..1 string Version of the system - if relevant
..... code SΣ 1..1 code Symbol in syntax defined by the system
..... display Σ 0..1 string Representation defined by the system
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
... priority Σ 0..1 code routine | urgent | asap | stat
Binding: RequestPriority (required): Identifies the level of importance to be assigned to actioning the request.
... doNotPerform ?!Σ 0..1 boolean True if service/procedure should not be performed
... code SΣ 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
..... version Σ 0..1 string Version of the system - if relevant
..... code SΣ 1..1 code Symbol in syntax defined by the system
..... display Σ 0..1 string Representation defined by the system
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
... orderDetail ΣC 0..* CodeableConcept Additional order information
Binding: ServiceRequestOrderDetailsCodes (example): Codified order entry details which are based on order context.
... quantity[x] Σ 0..1 Service amount
.... quantityQuantity Quantity
.... quantityRatio Ratio
.... quantityRange Range
... subject SΣC 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
... encounter Σ 0..1 Reference(Encounter) Encounter in which the request was created
... occurrence[x] Σ 0..1 When service should occur
.... occurrenceDateTime dateTime
.... occurrencePeriod Period
.... occurrenceTiming Timing
... asNeeded[x] Σ 0..1 Preconditions for service
Binding: SNOMEDCTMedicationAsNeededReasonCodes (example): A coded concept identifying the pre-condition that should hold prior to performing a procedure. For example "pain", "on flare-up", etc.
.... asNeededBoolean boolean
.... asNeededCodeableConcept CodeableConcept
... authoredOn SΣ 1..1 dateTime Date request signed
... requester Σ 0..1 Reference(Practitioner | PractitionerRole | Organization | Patient | RelatedPerson | Device) Who/what is requesting service
... performerType Σ 0..1 CodeableConcept Performer role
Binding: ParticipantRoles (example): Indicates specific responsibility of an individual within the care team, such as "Primary physician", "Team coordinator", "Caregiver", etc.
... performer Σ 0..* Reference(Practitioner | PractitionerRole | Organization | CareTeam | HealthcareService | Patient | Device | RelatedPerson) Requested performer
... locationCode Σ 0..* CodeableConcept Requested location
Binding: V3 Value SetServiceDeliveryLocationRoleType (example): A location type where services are delivered.
... locationReference Σ 0..* Reference(Location) Requested location
... reasonCode Σ 0..* CodeableConcept Explanation/Justification for procedure or service
Binding: ProcedureReasonCodes (example): Diagnosis or problem codes justifying the reason for requesting the service investigation.
... reasonReference Σ 0..* Reference(Condition | Observation | DiagnosticReport | DocumentReference) Explanation/Justification for service or service
... insurance SC 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only
... supportingInfo 0..* Reference(Resource) Additional clinical information
... specimen Σ 0..* Reference(Specimen) Procedure Samples
... bodySite Σ 0..* CodeableConcept Location on Body
Binding: SNOMEDCTBodyStructures (example): Codes describing anatomical locations. May include laterality.
... note 0..* Annotation Comments
... patientInstruction Σ 0..1 string Patient or consumer-oriented instructions
... relevantHistory 0..* Reference(Provenance) Request provenance

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
ServiceRequest.language Base preferred Common Languages 📍4.0.1 FHIR Std.
ServiceRequest.status Base required RequestStatus 📍4.0.1 FHIR Std.
ServiceRequest.intent Base required RequestIntent 📍4.0.1 FHIR Std.
ServiceRequest.category Base required TRxHub ServiceRequest Category ValueSet 📦0.1.0 This IG
ServiceRequest.priority Base required Request priority 📍4.0.1 FHIR Std.
ServiceRequest.code Base required TRxHub ServiceRequest Code ValueSet 📦0.1.0 This IG
ServiceRequest.orderDetail Base example Service Request Order Details Codes 📍4.0.1 FHIR Std.
ServiceRequest.asNeeded[x] Base example SNOMED CT Medication As Needed Reason Codes 📍4.0.1 FHIR Std.
ServiceRequest.performerType Base example Participant Roles 📍4.0.1 FHIR Std.
ServiceRequest.locationCode Base example V3 Value SetServiceDeliveryLocationRoleType 📦2014-03-26 FHIR Std.
ServiceRequest.reasonCode Base example Procedure Reason Codes 📍4.0.1 FHIR Std.
ServiceRequest.bodySite Base example SNOMED CT Body Structures 📍4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error ServiceRequest If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error ServiceRequest If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice ServiceRequest A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
prr-1 error ServiceRequest orderDetail SHALL only be present if code is present orderDetail.empty() or code.exists()
trxhub-inv-coverage-ref-only error ServiceRequest.insurance Reference must point to a Coverage resource reference.exists() implies reference.startsWith('Coverage/')
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies reference.startsWith('MedicationRequest/')
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies reference.startsWith('Patient/')
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies reference.startsWith('ServiceRequest/')
trxhub-sr-1 error ServiceRequest insurance is required when category is register-prescription category.coding.where(code='register-prescription').exists() implies insurance.count() = 1
trxhub-sr-2 error ServiceRequest insurance must not be present when category is order-medication category.coding.where(code='order-medication').exists() implies insurance.count() = 0
trxhub-sr-3 error ServiceRequest basedOn must reference exactly one ServiceRequest and at least one MedicationRequest when category is order-medication category.coding.where(code='order-medication').exists() implies (basedOn.where(resolve() is ServiceRequest).count() = 1 and basedOn.where(resolve() is MedicationRequest).count() >= 1)
trxhub-sr-4 error ServiceRequest basedOn must not be present when category is register-prescription category.coding.where(code='register-prescription').exists() implies basedOn.count() = 0
trxhub-sr-5 error ServiceRequest only register-* codes are allowed for category register-prescription category.coding.where(code='register-prescription').exists() implies code.coding.code.all($this in 'register-normal' | 'register-eprescription' | 'register-envelope' | 'register-from-practitioner')
trxhub-sr-6 error ServiceRequest only order-medication code is allowed for category order-medication category.coding.where(code='order-medication').exists() implies code.coding.code.all($this = 'order-medication')

This structure is derived from ServiceRequest

Summary

Mandatory: 10 elements
Must-Support: 18 elements

Extensions

This structure refers to these extensions:

Slices

This structure defines the following Slices:

  • The element 1 is sliced based on the value of ServiceRequest.basedOn (Closed)

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. ServiceRequest C 0..* ServiceRequest A request for a service to be performed
Constraints: prr-1, trxhub-sr-1, trxhub-sr-2, trxhub-sr-3, trxhub-sr-4, trxhub-sr-5, trxhub-sr-6
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:substitutionPreference S 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... Slices for basedOn SΣ 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by type:resolve()
.... basedOn:serviceRequest SΣC 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
.... basedOn:medicationRequest SΣC 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
... status ?!SΣ 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: RequestStatus (required): The status of a service order.
... intent ?!SΣ 1..1 code proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
Binding: RequestIntent (required): The kind of service request.
Required Pattern: order
... category SΣ 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
..... code SΣ 1..1 code Symbol in syntax defined by the system
... doNotPerform ?!Σ 0..1 boolean True if service/procedure should not be performed
... code SΣ 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
..... code SΣ 1..1 code Symbol in syntax defined by the system
... subject SΣC 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
... authoredOn SΣ 1..1 dateTime Date request signed
... insurance SC 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
ServiceRequest.status Base required RequestStatus 📍4.0.1 FHIR Std.
ServiceRequest.intent Base required RequestIntent 📍4.0.1 FHIR Std.
ServiceRequest.category Base required TRxHub ServiceRequest Category ValueSet 📦0.1.0 This IG
ServiceRequest.code Base required TRxHub ServiceRequest Code ValueSet 📦0.1.0 This IG

Constraints

Id Grade Path(s) Description Expression
dom-2 error ServiceRequest If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error ServiceRequest If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice ServiceRequest A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
prr-1 error ServiceRequest orderDetail SHALL only be present if code is present orderDetail.empty() or code.exists()
trxhub-inv-coverage-ref-only error ServiceRequest.insurance Reference must point to a Coverage resource reference.exists() implies reference.startsWith('Coverage/')
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies reference.startsWith('MedicationRequest/')
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies reference.startsWith('Patient/')
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies reference.startsWith('ServiceRequest/')
trxhub-sr-1 error ServiceRequest insurance is required when category is register-prescription category.coding.where(code='register-prescription').exists() implies insurance.count() = 1
trxhub-sr-2 error ServiceRequest insurance must not be present when category is order-medication category.coding.where(code='order-medication').exists() implies insurance.count() = 0
trxhub-sr-3 error ServiceRequest basedOn must reference exactly one ServiceRequest and at least one MedicationRequest when category is order-medication category.coding.where(code='order-medication').exists() implies (basedOn.where(resolve() is ServiceRequest).count() = 1 and basedOn.where(resolve() is MedicationRequest).count() >= 1)
trxhub-sr-4 error ServiceRequest basedOn must not be present when category is register-prescription category.coding.where(code='register-prescription').exists() implies basedOn.count() = 0
trxhub-sr-5 error ServiceRequest only register-* codes are allowed for category register-prescription category.coding.where(code='register-prescription').exists() implies code.coding.code.all($this in 'register-normal' | 'register-eprescription' | 'register-envelope' | 'register-from-practitioner')
trxhub-sr-6 error ServiceRequest only order-medication code is allowed for category order-medication category.coding.where(code='order-medication').exists() implies code.coding.code.all($this = 'order-medication')

Differential View

This structure is derived from ServiceRequest

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. ServiceRequest C 0..* ServiceRequest A request for a service to be performed
Constraints: trxhub-sr-1, trxhub-sr-2, trxhub-sr-3, trxhub-sr-4, trxhub-sr-5, trxhub-sr-6
... Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:substitutionPreference S 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
... identifier S 1..1 Identifier Identifiers assigned to this order
... Slices for basedOn S 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by type:resolve()
.... basedOn:serviceRequest SC 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
.... basedOn:medicationRequest SC 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
... intent S 1..1 code proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
Required Pattern: order
... category S 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
.... coding S 1..1 Coding Code defined by a terminology system
..... system S 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
..... code S 1..1 code Symbol in syntax defined by the system
... code S 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
.... coding S 1..1 Coding Code defined by a terminology system
..... system S 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
..... code S 1..1 code Symbol in syntax defined by the system
... subject SC 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
... authoredOn S 1..1 dateTime Date request signed
... insurance SC 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only

doco Documentation for this format

Terminology Bindings (Differential)

Path Status Usage ValueSet Version Source
ServiceRequest.category Base required TRxHub ServiceRequest Category ValueSet 📦0.1.0 This IG
ServiceRequest.code Base required TRxHub ServiceRequest Code ValueSet 📦0.1.0 This IG

Constraints

Id Grade Path(s) Description Expression
trxhub-inv-coverage-ref-only error ServiceRequest.insurance Reference must point to a Coverage resource reference.exists() implies reference.startsWith('Coverage/')
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies reference.startsWith('MedicationRequest/')
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies reference.startsWith('Patient/')
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies reference.startsWith('ServiceRequest/')
trxhub-sr-1 error ServiceRequest insurance is required when category is register-prescription category.coding.where(code='register-prescription').exists() implies insurance.count() = 1
trxhub-sr-2 error ServiceRequest insurance must not be present when category is order-medication category.coding.where(code='order-medication').exists() implies insurance.count() = 0
trxhub-sr-3 error ServiceRequest basedOn must reference exactly one ServiceRequest and at least one MedicationRequest when category is order-medication category.coding.where(code='order-medication').exists() implies (basedOn.where(resolve() is ServiceRequest).count() = 1 and basedOn.where(resolve() is MedicationRequest).count() >= 1)
trxhub-sr-4 error ServiceRequest basedOn must not be present when category is register-prescription category.coding.where(code='register-prescription').exists() implies basedOn.count() = 0
trxhub-sr-5 error ServiceRequest only register-* codes are allowed for category register-prescription category.coding.where(code='register-prescription').exists() implies code.coding.code.all($this in 'register-normal' | 'register-eprescription' | 'register-envelope' | 'register-from-practitioner')
trxhub-sr-6 error ServiceRequest only order-medication code is allowed for category order-medication category.coding.where(code='order-medication').exists() implies code.coding.code.all($this = 'order-medication')

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: Filtersdoco
.. ServiceRequest C 0..* ServiceRequest A request for a service to be performed
Constraints: prr-1, trxhub-sr-1, trxhub-sr-2, trxhub-sr-3, trxhub-sr-4, trxhub-sr-5, trxhub-sr-6
... id Σ 0..1 id Logical id of this artifact
... meta Σ 0..1 Meta Metadata about the resource
... implicitRules ?!Σ 0..1 uri A set of rules under which this content was created
... language 0..1 code Language of the resource content
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding
... text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
... contained 0..* Resource Contained, inline Resources
... Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
.... extension:substitutionPreference S 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
... modifierExtension ?! 0..* Extension Extensions that cannot be ignored
... identifier SΣ 1..1 Identifier Identifiers assigned to this order
... instantiatesCanonical Σ 0..* canonical(ActivityDefinition | PlanDefinition) Instantiates FHIR protocol or definition
... instantiatesUri Σ 0..* uri Instantiates external protocol or definition
... Slices for basedOn SΣ 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by type:resolve()
.... basedOn:serviceRequest SΣC 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
.... basedOn:medicationRequest SΣC 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
... replaces Σ 0..* Reference(ServiceRequest) What request replaces
... requisition Σ 0..1 Identifier Composite Request ID
... status ?!SΣ 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: RequestStatus (required): The status of a service order.
... intent ?!SΣ 1..1 code proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
Binding: RequestIntent (required): The kind of service request.
Required Pattern: order
... category SΣ 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
..... version Σ 0..1 string Version of the system - if relevant
..... code SΣ 1..1 code Symbol in syntax defined by the system
..... display Σ 0..1 string Representation defined by the system
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
... priority Σ 0..1 code routine | urgent | asap | stat
Binding: RequestPriority (required): Identifies the level of importance to be assigned to actioning the request.
... doNotPerform ?!Σ 0..1 boolean True if service/procedure should not be performed
... code SΣ 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
.... id 0..1 string Unique id for inter-element referencing
.... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
.... coding SΣ 1..1 Coding Code defined by a terminology system
..... id 0..1 string Unique id for inter-element referencing
..... extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
..... system SΣ 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
..... version Σ 0..1 string Version of the system - if relevant
..... code SΣ 1..1 code Symbol in syntax defined by the system
..... display Σ 0..1 string Representation defined by the system
..... userSelected Σ 0..1 boolean If this coding was chosen directly by the user
.... text Σ 0..1 string Plain text representation of the concept
... orderDetail ΣC 0..* CodeableConcept Additional order information
Binding: ServiceRequestOrderDetailsCodes (example): Codified order entry details which are based on order context.
... quantity[x] Σ 0..1 Service amount
.... quantityQuantity Quantity
.... quantityRatio Ratio
.... quantityRange Range
... subject SΣC 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
... encounter Σ 0..1 Reference(Encounter) Encounter in which the request was created
... occurrence[x] Σ 0..1 When service should occur
.... occurrenceDateTime dateTime
.... occurrencePeriod Period
.... occurrenceTiming Timing
... asNeeded[x] Σ 0..1 Preconditions for service
Binding: SNOMEDCTMedicationAsNeededReasonCodes (example): A coded concept identifying the pre-condition that should hold prior to performing a procedure. For example "pain", "on flare-up", etc.
.... asNeededBoolean boolean
.... asNeededCodeableConcept CodeableConcept
... authoredOn SΣ 1..1 dateTime Date request signed
... requester Σ 0..1 Reference(Practitioner | PractitionerRole | Organization | Patient | RelatedPerson | Device) Who/what is requesting service
... performerType Σ 0..1 CodeableConcept Performer role
Binding: ParticipantRoles (example): Indicates specific responsibility of an individual within the care team, such as "Primary physician", "Team coordinator", "Caregiver", etc.
... performer Σ 0..* Reference(Practitioner | PractitionerRole | Organization | CareTeam | HealthcareService | Patient | Device | RelatedPerson) Requested performer
... locationCode Σ 0..* CodeableConcept Requested location
Binding: V3 Value SetServiceDeliveryLocationRoleType (example): A location type where services are delivered.
... locationReference Σ 0..* Reference(Location) Requested location
... reasonCode Σ 0..* CodeableConcept Explanation/Justification for procedure or service
Binding: ProcedureReasonCodes (example): Diagnosis or problem codes justifying the reason for requesting the service investigation.
... reasonReference Σ 0..* Reference(Condition | Observation | DiagnosticReport | DocumentReference) Explanation/Justification for service or service
... insurance SC 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only
... supportingInfo 0..* Reference(Resource) Additional clinical information
... specimen Σ 0..* Reference(Specimen) Procedure Samples
... bodySite Σ 0..* CodeableConcept Location on Body
Binding: SNOMEDCTBodyStructures (example): Codes describing anatomical locations. May include laterality.
... note 0..* Annotation Comments
... patientInstruction Σ 0..1 string Patient or consumer-oriented instructions
... relevantHistory 0..* Reference(Provenance) Request provenance

doco Documentation for this format

Terminology Bindings

Path Status Usage ValueSet Version Source
ServiceRequest.language Base preferred Common Languages 📍4.0.1 FHIR Std.
ServiceRequest.status Base required RequestStatus 📍4.0.1 FHIR Std.
ServiceRequest.intent Base required RequestIntent 📍4.0.1 FHIR Std.
ServiceRequest.category Base required TRxHub ServiceRequest Category ValueSet 📦0.1.0 This IG
ServiceRequest.priority Base required Request priority 📍4.0.1 FHIR Std.
ServiceRequest.code Base required TRxHub ServiceRequest Code ValueSet 📦0.1.0 This IG
ServiceRequest.orderDetail Base example Service Request Order Details Codes 📍4.0.1 FHIR Std.
ServiceRequest.asNeeded[x] Base example SNOMED CT Medication As Needed Reason Codes 📍4.0.1 FHIR Std.
ServiceRequest.performerType Base example Participant Roles 📍4.0.1 FHIR Std.
ServiceRequest.locationCode Base example V3 Value SetServiceDeliveryLocationRoleType 📦2014-03-26 FHIR Std.
ServiceRequest.reasonCode Base example Procedure Reason Codes 📍4.0.1 FHIR Std.
ServiceRequest.bodySite Base example SNOMED CT Body Structures 📍4.0.1 FHIR Std.

Constraints

Id Grade Path(s) Description Expression
dom-2 error ServiceRequest If the resource is contained in another resource, it SHALL NOT contain nested Resources contained.contained.empty()
dom-3 error ServiceRequest If the resource is contained in another resource, it SHALL be referred to from elsewhere in the resource or SHALL refer to the containing resource contained.where((('#'+id in (%resource.descendants().reference | %resource.descendants().as(canonical) | %resource.descendants().as(uri) | %resource.descendants().as(url))) or descendants().where(reference = '#').exists() or descendants().where(as(canonical) = '#').exists() or descendants().where(as(canonical) = '#').exists()).not()).trace('unmatched', id).empty()
dom-4 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a meta.versionId or a meta.lastUpdated contained.meta.versionId.empty() and contained.meta.lastUpdated.empty()
dom-5 error ServiceRequest If a resource is contained in another resource, it SHALL NOT have a security label contained.meta.security.empty()
dom-6 best practice ServiceRequest A resource should have narrative for robust management text.`div`.exists()
ele-1 error **ALL** elements All FHIR elements must have a @value or children hasValue() or (children().count() > id.count())
ext-1 error **ALL** extensions Must have either extensions or value[x], not both extension.exists() != value.exists()
prr-1 error ServiceRequest orderDetail SHALL only be present if code is present orderDetail.empty() or code.exists()
trxhub-inv-coverage-ref-only error ServiceRequest.insurance Reference must point to a Coverage resource reference.exists() implies reference.startsWith('Coverage/')
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies reference.startsWith('MedicationRequest/')
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies reference.startsWith('Patient/')
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies reference.startsWith('ServiceRequest/')
trxhub-sr-1 error ServiceRequest insurance is required when category is register-prescription category.coding.where(code='register-prescription').exists() implies insurance.count() = 1
trxhub-sr-2 error ServiceRequest insurance must not be present when category is order-medication category.coding.where(code='order-medication').exists() implies insurance.count() = 0
trxhub-sr-3 error ServiceRequest basedOn must reference exactly one ServiceRequest and at least one MedicationRequest when category is order-medication category.coding.where(code='order-medication').exists() implies (basedOn.where(resolve() is ServiceRequest).count() = 1 and basedOn.where(resolve() is MedicationRequest).count() >= 1)
trxhub-sr-4 error ServiceRequest basedOn must not be present when category is register-prescription category.coding.where(code='register-prescription').exists() implies basedOn.count() = 0
trxhub-sr-5 error ServiceRequest only register-* codes are allowed for category register-prescription category.coding.where(code='register-prescription').exists() implies code.coding.code.all($this in 'register-normal' | 'register-eprescription' | 'register-envelope' | 'register-from-practitioner')
trxhub-sr-6 error ServiceRequest only order-medication code is allowed for category order-medication category.coding.where(code='order-medication').exists() implies code.coding.code.all($this = 'order-medication')

This structure is derived from ServiceRequest

Summary

Mandatory: 10 elements
Must-Support: 18 elements

Extensions

This structure refers to these extensions:

Slices

This structure defines the following Slices:

  • The element 1 is sliced based on the value of ServiceRequest.basedOn (Closed)

 

Other representations of profile: CSV, Excel, Schematron