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-10-08 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.

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.

Performer

performer is required for the register-from-practitioner code and references the practitioner the prescription should be requested from. It must not be present for any other code.

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 Set manually once all MedicationRequests have been registed. Sent to the Mediservice ERP when changed to this status.
register-eprescription Does not allow the registration of an EPrescriptionDocumentReference Ready to register an EPrescriptionDocumentReference Changes automatically after EPrescriptionDocumentReference is submitted. Sent to the Mediservice ERP when changed to this status. No manual updated allowed.
register-envelope Request created in TRxHub but not sent to the Mediservice ERP yet. When changed or created in this status the ServiceRequest is sent to the Mediservice ERP Changes automatically once Mediservice received the prescription and registered it's contents in the TRxHub. No manual updated allowed.
register-from-practitioner Request created in TRxHub but not sent to the Mediservice ERP yet. When changed or created in this status the ServiceRequest is sent to the Mediservice ERP Changes automatically once Mediservice received the prescription and registered it's contents in the TRxHub. No manual updated allowed.

Order Medication Flow

Important: The described order medication flow is currently only correct for register-normal and register-eprescription registration flows.

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.

Status

When creating a ServiceRequest to order medications the status can be one of draft or active

The status draft represents a draft state and is registers the order in TRxHub only. The order will not be sent to MediService.

The status active indicates that the order should be executed and is therefore sent to MediService. If created with status active the order is sent to MediService immediatelly. If created with status draft the order is sent to MediService when changing the status from draft to active.

Once MediService processed and shipped the order the status will change to completed automatically indicating the order has been completed. A manual update to completed via the update endpoint is not allowed.

Example Scenario

The following examples illustrate a complete registration and ordering flow.

Note: In production, external clients register prescriptions via register-eprescription, register-envelope or register-from-practitioner. 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: doco
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, trxhub-sr-7, trxhub-sr-8, trxhub-sr-9, trxhub-sr-10
ServiceRequest.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
ServiceRequest.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for extension.extension:substitutionPreference This element must be supported. 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
ServiceRequest.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
ServiceRequest.Slices for basedOn This element must be supported. This element is included in summaries. 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by value:type

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for basedOn.basedOn:serviceRequest This element must be supported. This element is included in summaries. C 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: ServiceRequest
ServiceRequest.Slices for basedOn.basedOn:medicationRequest This element must be supported. This element is included in summaries. C 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: MedicationRequest
ServiceRequest.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: TRxHub ServiceRequest Status ValueSet (required)
ServiceRequest.intent This element is a modifier element. This element must be supported. This element is included in summaries. 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
ServiceRequest.category This element must be supported. This element is included in summaries. 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
ServiceRequest.category.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.category.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
ServiceRequest.category.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.doNotPerform This element is a modifier element. This element is included in summaries. 0..1 boolean True if service/procedure should not be performed
ServiceRequest.code This element must be supported. This element is included in summaries. 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
ServiceRequest.code.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.code.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
ServiceRequest.code.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
ServiceRequest.occurrence[x] This element must be supported. This element is included in summaries. 0..1 dateTime Requested delivery date
ServiceRequest.authoredOn This element must be supported. This element is included in summaries. 1..1 dateTime Date request signed
ServiceRequest.performer This element must be supported. This element is included in summaries. C 0..1 Reference(Practitioner) Practitioner to order the prescription from (required for code register-from-practitioner)
Constraints: trxhub-inv-practitioner-ref-only
ServiceRequest.insurance This element must be supported. C 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.basedOn:serviceRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.basedOn:medicationRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.status Base required TRxHub ServiceRequest Status ValueSet 📦0.1.0 This IG
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/') or reference.startsWith('urn:uuid:'))
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
trxhub-inv-practitioner-ref-only error ServiceRequest.performer Reference must point to a Practitioner resource reference.exists() implies (reference.startsWith('Practitioner/') or reference.startsWith('urn:uuid:'))
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
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(type='ServiceRequest').count() = 1 and basedOn.where(type='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')
trxhub-sr-7 error ServiceRequest occurrence is not allowed on category register-prescription category.coding.where(code='register-prescription').exists() implies occurrence.empty()
trxhub-sr-8 error ServiceRequest occurrence must be a full date without time component (YYYY-MM-DD) occurrence.exists() implies occurrence.ofType(dateTime).toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')
trxhub-sr-9 error ServiceRequest performer is required when code is register-from-practitioner code.coding.where(code='register-from-practitioner').exists() implies performer.exists()
trxhub-sr-10 error ServiceRequest performer must not be present when code is not register-from-practitioner performer.exists() implies code.coding.where(code='register-from-practitioner').exists()

This structure is derived from ServiceRequest

NameFlagsCard.TypeDescription & Constraints    Filter: doco
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, trxhub-sr-7, trxhub-sr-8, trxhub-sr-9, trxhub-sr-10
ServiceRequest.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for extension.extension:substitutionPreference This element must be supported. 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
ServiceRequest.Slices for basedOn This element must be supported. 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by value:type
Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for basedOn.basedOn:serviceRequest This element must be supported. C 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.type 1..1 uri Type the reference refers to (e.g. "Patient")
Required Pattern: ServiceRequest
ServiceRequest.Slices for basedOn.basedOn:medicationRequest This element must be supported. C 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.type 1..1 uri Type the reference refers to (e.g. "Patient")
Required Pattern: MedicationRequest
ServiceRequest.status This element must be supported. 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: TRxHub ServiceRequest Status ValueSet (required)
ServiceRequest.category This element must be supported. 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
ServiceRequest.category.coding This element must be supported. 1..1 Coding Code defined by a terminology system
ServiceRequest.category.coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
ServiceRequest.category.coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
ServiceRequest.code This element must be supported. 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
ServiceRequest.code.coding This element must be supported. 1..1 Coding Code defined by a terminology system
ServiceRequest.code.coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
ServiceRequest.code.coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
ServiceRequest.subject This element must be supported. C 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
ServiceRequest.occurrence[x] This element must be supported. 0..1 dateTime Requested delivery date
ServiceRequest.authoredOn This element must be supported. 1..1 dateTime Date request signed
ServiceRequest.performer This element must be supported. C 0..1 Reference(Practitioner) Practitioner to order the prescription from (required for code register-from-practitioner)
Constraints: trxhub-inv-practitioner-ref-only
ServiceRequest.insurance This element must be supported. C 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.status Base required TRxHub ServiceRequest Status ValueSet 📦0.1.0 This IG
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/') or reference.startsWith('urn:uuid:'))
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
trxhub-inv-practitioner-ref-only error ServiceRequest.performer Reference must point to a Practitioner resource reference.exists() implies (reference.startsWith('Practitioner/') or reference.startsWith('urn:uuid:'))
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
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(type='ServiceRequest').count() = 1 and basedOn.where(type='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')
trxhub-sr-7 error ServiceRequest occurrence is not allowed on category register-prescription category.coding.where(code='register-prescription').exists() implies occurrence.empty()
trxhub-sr-8 error ServiceRequest occurrence must be a full date without time component (YYYY-MM-DD) occurrence.exists() implies occurrence.ofType(dateTime).toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')
trxhub-sr-9 error ServiceRequest performer is required when code is register-from-practitioner code.coding.where(code='register-from-practitioner').exists() implies performer.exists()
trxhub-sr-10 error ServiceRequest performer must not be present when code is not register-from-practitioner performer.exists() implies code.coding.where(code='register-from-practitioner').exists()
NameFlagsCard.TypeDescription & Constraints    Filter: doco
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, trxhub-sr-7, trxhub-sr-8, trxhub-sr-9, trxhub-sr-10
ServiceRequest.id This element is included in summaries. 0..1 id Logical id of this artifact
ServiceRequest.meta This element is included in summaries. 0..1 Meta Metadata about the resource
ServiceRequest.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
ServiceRequest.language 0..1 code Language of the resource content
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding
ServiceRequest.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
ServiceRequest.contained 0..* Resource Contained, inline Resources
ServiceRequest.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for extension.extension:substitutionPreference This element must be supported. 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
ServiceRequest.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
ServiceRequest.identifier This element is included in summaries. 0..* Identifier Identifiers assigned to this order
ServiceRequest.instantiatesCanonical This element is included in summaries. 0..* canonical(ActivityDefinition | PlanDefinition) Instantiates FHIR protocol or definition
ServiceRequest.instantiatesUri This element is included in summaries. 0..* uri Instantiates external protocol or definition
ServiceRequest.Slices for basedOn This element must be supported. This element is included in summaries. 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by value:type

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for basedOn.basedOn:serviceRequest This element must be supported. This element is included in summaries. C 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.id 0..1 string Unique id for inter-element referencing
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.reference This element is included in summaries. C 0..1 string Literal reference, Relative, internal or absolute URL
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: ServiceRequest
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.identifier This element is included in summaries. 0..1 Identifier Logical reference, when literal reference is not known
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.display This element is included in summaries. 0..1 string Text alternative for the resource
ServiceRequest.Slices for basedOn.basedOn:medicationRequest This element must be supported. This element is included in summaries. C 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.id 0..1 string Unique id for inter-element referencing
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.reference This element is included in summaries. C 0..1 string Literal reference, Relative, internal or absolute URL
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: MedicationRequest
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.identifier This element is included in summaries. 0..1 Identifier Logical reference, when literal reference is not known
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.display This element is included in summaries. 0..1 string Text alternative for the resource
ServiceRequest.replaces This element is included in summaries. 0..* Reference(ServiceRequest) What request replaces
ServiceRequest.requisition This element is included in summaries. 0..1 Identifier Composite Request ID
ServiceRequest.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: TRxHub ServiceRequest Status ValueSet (required)
ServiceRequest.intent This element is a modifier element. This element must be supported. This element is included in summaries. 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
ServiceRequest.category This element must be supported. This element is included in summaries. 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
ServiceRequest.category.id 0..1 string Unique id for inter-element referencing
ServiceRequest.category.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.category.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.category.coding.id 0..1 string Unique id for inter-element referencing
ServiceRequest.category.coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.category.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
ServiceRequest.category.coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
ServiceRequest.category.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.category.coding.display This element is included in summaries. 0..1 string Representation defined by the system
ServiceRequest.category.coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
ServiceRequest.category.text This element is included in summaries. 0..1 string Plain text representation of the concept
ServiceRequest.priority This element is included in summaries. 0..1 code routine | urgent | asap | stat
Binding: RequestPriority (required): Identifies the level of importance to be assigned to actioning the request.
ServiceRequest.doNotPerform This element is a modifier element. This element is included in summaries. 0..1 boolean True if service/procedure should not be performed
ServiceRequest.code This element must be supported. This element is included in summaries. 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
ServiceRequest.code.id 0..1 string Unique id for inter-element referencing
ServiceRequest.code.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.code.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.code.coding.id 0..1 string Unique id for inter-element referencing
ServiceRequest.code.coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.code.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
ServiceRequest.code.coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
ServiceRequest.code.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.code.coding.display This element is included in summaries. 0..1 string Representation defined by the system
ServiceRequest.code.coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
ServiceRequest.code.text This element is included in summaries. 0..1 string Plain text representation of the concept
ServiceRequest.orderDetail This element is included in summaries. C 0..* CodeableConcept Additional order information
Binding: ServiceRequestOrderDetailsCodes (example): Codified order entry details which are based on order context.
ServiceRequest.quantity[x] This element is included in summaries. 0..1 Service amount
ServiceRequest.quantity[x].quantityQuantity Quantity
ServiceRequest.quantity[x].quantityRatio Ratio
ServiceRequest.quantity[x].quantityRange Range
ServiceRequest.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
ServiceRequest.encounter This element is included in summaries. 0..1 Reference(Encounter) Encounter in which the request was created
ServiceRequest.occurrence[x] This element must be supported. This element is included in summaries. 0..1 dateTime Requested delivery date
ServiceRequest.asNeeded[x] This element is included in summaries. 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.
ServiceRequest.asNeeded[x].asNeededBoolean boolean
ServiceRequest.asNeeded[x].asNeededCodeableConcept CodeableConcept
ServiceRequest.authoredOn This element must be supported. This element is included in summaries. 1..1 dateTime Date request signed
ServiceRequest.requester This element is included in summaries. 0..1 Reference(Practitioner | PractitionerRole | Organization | Patient | RelatedPerson | Device) Who/what is requesting service
ServiceRequest.performerType This element is included in summaries. 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.
ServiceRequest.performer This element must be supported. This element is included in summaries. C 0..1 Reference(Practitioner) Practitioner to order the prescription from (required for code register-from-practitioner)
Constraints: trxhub-inv-practitioner-ref-only
ServiceRequest.locationCode This element is included in summaries. 0..* CodeableConcept Requested location
Binding: ServiceDeliveryLocationRoleType (example): A location type where services are delivered.
ServiceRequest.locationReference This element is included in summaries. 0..* Reference(Location) Requested location
ServiceRequest.reasonCode This element is included in summaries. 0..* CodeableConcept Explanation/Justification for procedure or service
Binding: ProcedureReasonCodes (example): Diagnosis or problem codes justifying the reason for requesting the service investigation.
ServiceRequest.reasonReference This element is included in summaries. 0..* Reference(Condition | Observation | DiagnosticReport | DocumentReference) Explanation/Justification for service or service
ServiceRequest.insurance This element must be supported. C 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only
ServiceRequest.supportingInfo 0..* Reference(Resource) Additional clinical information
ServiceRequest.specimen This element is included in summaries. 0..* Reference(Specimen) Procedure Samples
ServiceRequest.bodySite This element is included in summaries. 0..* CodeableConcept Location on Body
Binding: SNOMEDCTBodyStructures (example): Codes describing anatomical locations. May include laterality.
ServiceRequest.note 0..* Annotation Comments
ServiceRequest.patientInstruction This element is included in summaries. 0..1 string Patient or consumer-oriented instructions
ServiceRequest.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.basedOn:serviceRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.basedOn:medicationRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.status Base required TRxHub ServiceRequest Status ValueSet 📦0.1.0 This IG
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 ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
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/') or reference.startsWith('urn:uuid:'))
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
trxhub-inv-practitioner-ref-only error ServiceRequest.performer Reference must point to a Practitioner resource reference.exists() implies (reference.startsWith('Practitioner/') or reference.startsWith('urn:uuid:'))
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
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(type='ServiceRequest').count() = 1 and basedOn.where(type='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')
trxhub-sr-7 error ServiceRequest occurrence is not allowed on category register-prescription category.coding.where(code='register-prescription').exists() implies occurrence.empty()
trxhub-sr-8 error ServiceRequest occurrence must be a full date without time component (YYYY-MM-DD) occurrence.exists() implies occurrence.ofType(dateTime).toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')
trxhub-sr-9 error ServiceRequest performer is required when code is register-from-practitioner code.coding.where(code='register-from-practitioner').exists() implies performer.exists()
trxhub-sr-10 error ServiceRequest performer must not be present when code is not register-from-practitioner performer.exists() implies code.coding.where(code='register-from-practitioner').exists()

This structure is derived from ServiceRequest

Summary

Mandatory: 9 elements(2 nested mandatory elements)
Must-Support: 19 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: doco
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, trxhub-sr-7, trxhub-sr-8, trxhub-sr-9, trxhub-sr-10
ServiceRequest.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
ServiceRequest.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for extension.extension:substitutionPreference This element must be supported. 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
ServiceRequest.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
ServiceRequest.Slices for basedOn This element must be supported. This element is included in summaries. 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by value:type

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for basedOn.basedOn:serviceRequest This element must be supported. This element is included in summaries. C 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: ServiceRequest
ServiceRequest.Slices for basedOn.basedOn:medicationRequest This element must be supported. This element is included in summaries. C 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: MedicationRequest
ServiceRequest.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: TRxHub ServiceRequest Status ValueSet (required)
ServiceRequest.intent This element is a modifier element. This element must be supported. This element is included in summaries. 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
ServiceRequest.category This element must be supported. This element is included in summaries. 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
ServiceRequest.category.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.category.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
ServiceRequest.category.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.doNotPerform This element is a modifier element. This element is included in summaries. 0..1 boolean True if service/procedure should not be performed
ServiceRequest.code This element must be supported. This element is included in summaries. 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
ServiceRequest.code.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.code.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
ServiceRequest.code.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
ServiceRequest.occurrence[x] This element must be supported. This element is included in summaries. 0..1 dateTime Requested delivery date
ServiceRequest.authoredOn This element must be supported. This element is included in summaries. 1..1 dateTime Date request signed
ServiceRequest.performer This element must be supported. This element is included in summaries. C 0..1 Reference(Practitioner) Practitioner to order the prescription from (required for code register-from-practitioner)
Constraints: trxhub-inv-practitioner-ref-only
ServiceRequest.insurance This element must be supported. C 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.basedOn:serviceRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.basedOn:medicationRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.status Base required TRxHub ServiceRequest Status ValueSet 📦0.1.0 This IG
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/') or reference.startsWith('urn:uuid:'))
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
trxhub-inv-practitioner-ref-only error ServiceRequest.performer Reference must point to a Practitioner resource reference.exists() implies (reference.startsWith('Practitioner/') or reference.startsWith('urn:uuid:'))
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
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(type='ServiceRequest').count() = 1 and basedOn.where(type='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')
trxhub-sr-7 error ServiceRequest occurrence is not allowed on category register-prescription category.coding.where(code='register-prescription').exists() implies occurrence.empty()
trxhub-sr-8 error ServiceRequest occurrence must be a full date without time component (YYYY-MM-DD) occurrence.exists() implies occurrence.ofType(dateTime).toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')
trxhub-sr-9 error ServiceRequest performer is required when code is register-from-practitioner code.coding.where(code='register-from-practitioner').exists() implies performer.exists()
trxhub-sr-10 error ServiceRequest performer must not be present when code is not register-from-practitioner performer.exists() implies code.coding.where(code='register-from-practitioner').exists()

Differential View

This structure is derived from ServiceRequest

NameFlagsCard.TypeDescription & Constraints    Filter: doco
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, trxhub-sr-7, trxhub-sr-8, trxhub-sr-9, trxhub-sr-10
ServiceRequest.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for extension.extension:substitutionPreference This element must be supported. 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
ServiceRequest.Slices for basedOn This element must be supported. 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by value:type
Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for basedOn.basedOn:serviceRequest This element must be supported. C 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.type 1..1 uri Type the reference refers to (e.g. "Patient")
Required Pattern: ServiceRequest
ServiceRequest.Slices for basedOn.basedOn:medicationRequest This element must be supported. C 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.type 1..1 uri Type the reference refers to (e.g. "Patient")
Required Pattern: MedicationRequest
ServiceRequest.status This element must be supported. 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: TRxHub ServiceRequest Status ValueSet (required)
ServiceRequest.intent This element must be supported. 1..1 code proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option
Required Pattern: order
ServiceRequest.category This element must be supported. 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
ServiceRequest.category.coding This element must be supported. 1..1 Coding Code defined by a terminology system
ServiceRequest.category.coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
ServiceRequest.category.coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
ServiceRequest.code This element must be supported. 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
ServiceRequest.code.coding This element must be supported. 1..1 Coding Code defined by a terminology system
ServiceRequest.code.coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
ServiceRequest.code.coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
ServiceRequest.subject This element must be supported. C 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
ServiceRequest.occurrence[x] This element must be supported. 0..1 dateTime Requested delivery date
ServiceRequest.authoredOn This element must be supported. 1..1 dateTime Date request signed
ServiceRequest.performer This element must be supported. C 0..1 Reference(Practitioner) Practitioner to order the prescription from (required for code register-from-practitioner)
Constraints: trxhub-inv-practitioner-ref-only
ServiceRequest.insurance This element must be supported. C 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.status Base required TRxHub ServiceRequest Status ValueSet 📦0.1.0 This IG
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/') or reference.startsWith('urn:uuid:'))
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
trxhub-inv-practitioner-ref-only error ServiceRequest.performer Reference must point to a Practitioner resource reference.exists() implies (reference.startsWith('Practitioner/') or reference.startsWith('urn:uuid:'))
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
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(type='ServiceRequest').count() = 1 and basedOn.where(type='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')
trxhub-sr-7 error ServiceRequest occurrence is not allowed on category register-prescription category.coding.where(code='register-prescription').exists() implies occurrence.empty()
trxhub-sr-8 error ServiceRequest occurrence must be a full date without time component (YYYY-MM-DD) occurrence.exists() implies occurrence.ofType(dateTime).toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')
trxhub-sr-9 error ServiceRequest performer is required when code is register-from-practitioner code.coding.where(code='register-from-practitioner').exists() implies performer.exists()
trxhub-sr-10 error ServiceRequest performer must not be present when code is not register-from-practitioner performer.exists() implies code.coding.where(code='register-from-practitioner').exists()

Snapshot View

NameFlagsCard.TypeDescription & Constraints    Filter: doco
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, trxhub-sr-7, trxhub-sr-8, trxhub-sr-9, trxhub-sr-10
ServiceRequest.id This element is included in summaries. 0..1 id Logical id of this artifact
ServiceRequest.meta This element is included in summaries. 0..1 Meta Metadata about the resource
ServiceRequest.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
ServiceRequest.language 0..1 code Language of the resource content
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding
ServiceRequest.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
ServiceRequest.contained 0..* Resource Contained, inline Resources
ServiceRequest.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for extension.extension:substitutionPreference This element must be supported. 0..1 boolean Medication Substitution Preference
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference
ServiceRequest.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
ServiceRequest.identifier This element is included in summaries. 0..* Identifier Identifiers assigned to this order
ServiceRequest.instantiatesCanonical This element is included in summaries. 0..* canonical(ActivityDefinition | PlanDefinition) Instantiates FHIR protocol or definition
ServiceRequest.instantiatesUri This element is included in summaries. 0..* uri Instantiates external protocol or definition
ServiceRequest.Slices for basedOn This element must be supported. This element is included in summaries. 0..* Reference(CarePlan | ServiceRequest | MedicationRequest) What request fulfills
Slice: Unordered, Closed by value:type

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
ServiceRequest.Slices for basedOn.basedOn:serviceRequest This element must be supported. This element is included in summaries. C 0..1 Reference(ServiceRequest) Reference to the register-prescription ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.id 0..1 string Unique id for inter-element referencing
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.reference This element is included in summaries. C 0..1 string Literal reference, Relative, internal or absolute URL
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: ServiceRequest
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.identifier This element is included in summaries. 0..1 Identifier Logical reference, when literal reference is not known
ServiceRequest.Slices for basedOn.basedOn:serviceRequest.display This element is included in summaries. 0..1 string Text alternative for the resource
ServiceRequest.Slices for basedOn.basedOn:medicationRequest This element must be supported. This element is included in summaries. C 0..* Reference(MedicationRequest) MedicationRequests that should be ordered
Constraints: trxhub-inv-medication-request-ref-only
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.id 0..1 string Unique id for inter-element referencing
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.reference This element is included in summaries. C 0..1 string Literal reference, Relative, internal or absolute URL
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.type This element is included in summaries. 1..1 uri Type the reference refers to (e.g. "Patient")
Binding: ResourceType (extensible): Aa resource (or, for logical models, the URI of the logical model).
Required Pattern: MedicationRequest
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.identifier This element is included in summaries. 0..1 Identifier Logical reference, when literal reference is not known
ServiceRequest.Slices for basedOn.basedOn:medicationRequest.display This element is included in summaries. 0..1 string Text alternative for the resource
ServiceRequest.replaces This element is included in summaries. 0..* Reference(ServiceRequest) What request replaces
ServiceRequest.requisition This element is included in summaries. 0..1 Identifier Composite Request ID
ServiceRequest.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code draft | active | on-hold | revoked | completed | entered-in-error | unknown
Binding: TRxHub ServiceRequest Status ValueSet (required)
ServiceRequest.intent This element is a modifier element. This element must be supported. This element is included in summaries. 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
ServiceRequest.category This element must be supported. This element is included in summaries. 1..1 CodeableConcept Classification of service
Binding: TRxHub ServiceRequest Category ValueSet (required)
ServiceRequest.category.id 0..1 string Unique id for inter-element referencing
ServiceRequest.category.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.category.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.category.coding.id 0..1 string Unique id for inter-element referencing
ServiceRequest.category.coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.category.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category
ServiceRequest.category.coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
ServiceRequest.category.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.category.coding.display This element is included in summaries. 0..1 string Representation defined by the system
ServiceRequest.category.coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
ServiceRequest.category.text This element is included in summaries. 0..1 string Plain text representation of the concept
ServiceRequest.priority This element is included in summaries. 0..1 code routine | urgent | asap | stat
Binding: RequestPriority (required): Identifies the level of importance to be assigned to actioning the request.
ServiceRequest.doNotPerform This element is a modifier element. This element is included in summaries. 0..1 boolean True if service/procedure should not be performed
ServiceRequest.code This element must be supported. This element is included in summaries. 1..1 CodeableConcept What is being requested/ordered
Binding: TRxHub ServiceRequest Code ValueSet (required)
ServiceRequest.code.id 0..1 string Unique id for inter-element referencing
ServiceRequest.code.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.code.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
ServiceRequest.code.coding.id 0..1 string Unique id for inter-element referencing
ServiceRequest.code.coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
ServiceRequest.code.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code
ServiceRequest.code.coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
ServiceRequest.code.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
ServiceRequest.code.coding.display This element is included in summaries. 0..1 string Representation defined by the system
ServiceRequest.code.coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
ServiceRequest.code.text This element is included in summaries. 0..1 string Plain text representation of the concept
ServiceRequest.orderDetail This element is included in summaries. C 0..* CodeableConcept Additional order information
Binding: ServiceRequestOrderDetailsCodes (example): Codified order entry details which are based on order context.
ServiceRequest.quantity[x] This element is included in summaries. 0..1 Service amount
ServiceRequest.quantity[x].quantityQuantity Quantity
ServiceRequest.quantity[x].quantityRatio Ratio
ServiceRequest.quantity[x].quantityRange Range
ServiceRequest.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Individual or Entity the service is ordered for
Constraints: trxhub-inv-patient-ref-only
ServiceRequest.encounter This element is included in summaries. 0..1 Reference(Encounter) Encounter in which the request was created
ServiceRequest.occurrence[x] This element must be supported. This element is included in summaries. 0..1 dateTime Requested delivery date
ServiceRequest.asNeeded[x] This element is included in summaries. 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.
ServiceRequest.asNeeded[x].asNeededBoolean boolean
ServiceRequest.asNeeded[x].asNeededCodeableConcept CodeableConcept
ServiceRequest.authoredOn This element must be supported. This element is included in summaries. 1..1 dateTime Date request signed
ServiceRequest.requester This element is included in summaries. 0..1 Reference(Practitioner | PractitionerRole | Organization | Patient | RelatedPerson | Device) Who/what is requesting service
ServiceRequest.performerType This element is included in summaries. 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.
ServiceRequest.performer This element must be supported. This element is included in summaries. C 0..1 Reference(Practitioner) Practitioner to order the prescription from (required for code register-from-practitioner)
Constraints: trxhub-inv-practitioner-ref-only
ServiceRequest.locationCode This element is included in summaries. 0..* CodeableConcept Requested location
Binding: ServiceDeliveryLocationRoleType (example): A location type where services are delivered.
ServiceRequest.locationReference This element is included in summaries. 0..* Reference(Location) Requested location
ServiceRequest.reasonCode This element is included in summaries. 0..* CodeableConcept Explanation/Justification for procedure or service
Binding: ProcedureReasonCodes (example): Diagnosis or problem codes justifying the reason for requesting the service investigation.
ServiceRequest.reasonReference This element is included in summaries. 0..* Reference(Condition | Observation | DiagnosticReport | DocumentReference) Explanation/Justification for service or service
ServiceRequest.insurance This element must be supported. C 0..1 Reference(Coverage) Associated insurance coverage
Constraints: trxhub-inv-coverage-ref-only
ServiceRequest.supportingInfo 0..* Reference(Resource) Additional clinical information
ServiceRequest.specimen This element is included in summaries. 0..* Reference(Specimen) Procedure Samples
ServiceRequest.bodySite This element is included in summaries. 0..* CodeableConcept Location on Body
Binding: SNOMEDCTBodyStructures (example): Codes describing anatomical locations. May include laterality.
ServiceRequest.note 0..* Annotation Comments
ServiceRequest.patientInstruction This element is included in summaries. 0..1 string Patient or consumer-oriented instructions
ServiceRequest.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.basedOn:serviceRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.basedOn:medicationRequest.​type Base extensible ResourceType 📍4.0.1 FHIR Std.
ServiceRequest.status Base required TRxHub ServiceRequest Status ValueSet 📦0.1.0 This IG
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 ServiceDeliveryLocationRoleType 📦3.0.0 THO v7.4
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/') or reference.startsWith('urn:uuid:'))
trxhub-inv-medication-request-ref-only error ServiceRequest.basedOn:medicationRequest Reference must point to a MedicationRequest resource reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
trxhub-inv-patient-ref-only error ServiceRequest.subject Reference must point to a Patient resource reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
trxhub-inv-practitioner-ref-only error ServiceRequest.performer Reference must point to a Practitioner resource reference.exists() implies (reference.startsWith('Practitioner/') or reference.startsWith('urn:uuid:'))
trxhub-inv-service-request-ref-only error ServiceRequest.basedOn:serviceRequest Reference must point to a ServiceRequest resource reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
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(type='ServiceRequest').count() = 1 and basedOn.where(type='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')
trxhub-sr-7 error ServiceRequest occurrence is not allowed on category register-prescription category.coding.where(code='register-prescription').exists() implies occurrence.empty()
trxhub-sr-8 error ServiceRequest occurrence must be a full date without time component (YYYY-MM-DD) occurrence.exists() implies occurrence.ofType(dateTime).toString().matches('^[0-9]{4}-[0-9]{2}-[0-9]{2}$')
trxhub-sr-9 error ServiceRequest performer is required when code is register-from-practitioner code.coding.where(code='register-from-practitioner').exists() implies performer.exists()
trxhub-sr-10 error ServiceRequest performer must not be present when code is not register-from-practitioner performer.exists() implies code.coding.where(code='register-from-practitioner').exists()

This structure is derived from ServiceRequest

Summary

Mandatory: 9 elements(2 nested mandatory elements)
Must-Support: 19 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