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
| 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
The ServiceRequest resource is a central part of the TRxHub and is used to specify the intent of a request.
Depending on the category, the request represents either:
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 must only be present when ordering medication and must reference the register-prescription ServiceRequest as well as the MedicationRequests that should be ordered.
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.
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.
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. |
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.
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.
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.
Usages:
You can also check for usages in the FHIR IG Statistics
Description of Profiles, Differentials, Snapshots and how the different presentations work.
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
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 |
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |
![]() ![]() |
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 | |
![]() ![]() ![]() |
0..1 | boolean | Medication Substitution Preference URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference | |
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |
![]() ![]() |
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 | |
![]() ![]() ![]() |
C | 0..1 | Reference(ServiceRequest) | Reference to the register-prescription ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() ![]() ![]() |
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 | |
![]() ![]() ![]() |
C | 0..* | Reference(MedicationRequest) | MedicationRequests that should be ordered Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() ![]() ![]() |
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 | |
![]() ![]() |
1..1 | code | draft | active | on-hold | revoked | completed | entered-in-error | unknown Binding: TRxHub ServiceRequest Status ValueSet (required) | |
![]() ![]() |
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 | |
![]() ![]() |
1..1 | CodeableConcept | Classification of service Binding: TRxHub ServiceRequest Category ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
0..1 | boolean | True if service/procedure should not be performed | |
![]() ![]() |
1..1 | CodeableConcept | What is being requested/ordered Binding: TRxHub ServiceRequest Code ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Individual or Entity the service is ordered for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
0..1 | dateTime | Requested delivery date | |
![]() ![]() |
1..1 | dateTime | Date request signed | |
![]() ![]() |
C | 0..1 | Reference(Practitioner) | Practitioner to order the prescription from (required for code register-from-practitioner) Constraints: trxhub-inv-practitioner-ref-only |
![]() ![]() |
C | 0..1 | Reference(Coverage) | Associated insurance coverage Constraints: trxhub-inv-coverage-ref-only |
Documentation for this format | ||||
| 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 |
| 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
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
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 |
![]() ![]() |
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 | |
![]() ![]() ![]() |
0..1 | boolean | Medication Substitution Preference URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference | |
![]() ![]() |
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 | |
![]() ![]() ![]() |
C | 0..1 | Reference(ServiceRequest) | Reference to the register-prescription ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() ![]() ![]() |
1..1 | uri | Type the reference refers to (e.g. "Patient") Required Pattern: ServiceRequest | |
![]() ![]() ![]() |
C | 0..* | Reference(MedicationRequest) | MedicationRequests that should be ordered Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() ![]() ![]() |
1..1 | uri | Type the reference refers to (e.g. "Patient") Required Pattern: MedicationRequest | |
![]() ![]() |
1..1 | code | draft | active | on-hold | revoked | completed | entered-in-error | unknown Binding: TRxHub ServiceRequest Status ValueSet (required) | |
![]() ![]() |
1..1 | code | proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option Required Pattern: order | |
![]() ![]() |
1..1 | CodeableConcept | Classification of service Binding: TRxHub ServiceRequest Category ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
1..1 | CodeableConcept | What is being requested/ordered Binding: TRxHub ServiceRequest Code ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Individual or Entity the service is ordered for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
0..1 | dateTime | Requested delivery date | |
![]() ![]() |
1..1 | dateTime | Date request signed | |
![]() ![]() |
C | 0..1 | Reference(Practitioner) | Practitioner to order the prescription from (required for code register-from-practitioner) Constraints: trxhub-inv-practitioner-ref-only |
![]() ![]() |
C | 0..1 | Reference(Coverage) | Associated insurance coverage Constraints: trxhub-inv-coverage-ref-only |
Documentation for this format | ||||
| 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 |
| 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()
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
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 | ||||
![]() ![]() |
0..1 | id | Logical id of this artifact | |||||
![]() ![]() |
0..1 | Meta | Metadata about the resource | |||||
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
| |||||
![]() ![]() |
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 | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
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 | |||||
![]() ![]() ![]() |
0..1 | boolean | Medication Substitution Preference URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference | |||||
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |||||
![]() ![]() |
0..* | Identifier | Identifiers assigned to this order | |||||
![]() ![]() |
0..* | canonical(ActivityDefinition | PlanDefinition) | Instantiates FHIR protocol or definition | |||||
![]() ![]() |
0..* | uri | Instantiates external protocol or definition | |||||
![]() ![]() |
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 | |||||
![]() ![]() ![]() |
C | 0..1 | Reference(ServiceRequest) | Reference to the register-prescription ServiceRequest Constraints: trxhub-inv-service-request-ref-only | ||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
C | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
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 | |||||
![]() ![]() ![]() ![]() |
0..1 | Identifier | Logical reference, when literal reference is not known | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Text alternative for the resource | |||||
![]() ![]() ![]() |
C | 0..* | Reference(MedicationRequest) | MedicationRequests that should be ordered Constraints: trxhub-inv-medication-request-ref-only | ||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
C | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
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 | |||||
![]() ![]() ![]() ![]() |
0..1 | Identifier | Logical reference, when literal reference is not known | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Text alternative for the resource | |||||
![]() ![]() |
0..* | Reference(ServiceRequest) | What request replaces | |||||
![]() ![]() |
0..1 | Identifier | Composite Request ID | |||||
![]() ![]() |
1..1 | code | draft | active | on-hold | revoked | completed | entered-in-error | unknown Binding: TRxHub ServiceRequest Status ValueSet (required) | |||||
![]() ![]() |
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 | |||||
![]() ![]() |
1..1 | CodeableConcept | Classification of service Binding: TRxHub ServiceRequest Category ValueSet (required) | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Version of the system - if relevant | |||||
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Representation defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | boolean | If this coding was chosen directly by the user | |||||
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |||||
![]() ![]() |
0..1 | code | routine | urgent | asap | stat Binding: RequestPriority (required): Identifies the level of importance to be assigned to actioning the request. | |||||
![]() ![]() |
0..1 | boolean | True if service/procedure should not be performed | |||||
![]() ![]() |
1..1 | CodeableConcept | What is being requested/ordered Binding: TRxHub ServiceRequest Code ValueSet (required) | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Version of the system - if relevant | |||||
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Representation defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | boolean | If this coding was chosen directly by the user | |||||
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |||||
![]() ![]() |
C | 0..* | CodeableConcept | Additional order information Binding: ServiceRequestOrderDetailsCodes (example): Codified order entry details which are based on order context. | ||||
![]() ![]() |
0..1 | Service amount | ||||||
![]() ![]() ![]() |
Quantity | |||||||
![]() ![]() ![]() |
Ratio | |||||||
![]() ![]() ![]() |
Range | |||||||
![]() ![]() |
C | 1..1 | Reference(Patient) | Individual or Entity the service is ordered for Constraints: trxhub-inv-patient-ref-only | ||||
![]() ![]() |
0..1 | Reference(Encounter) | Encounter in which the request was created | |||||
![]() ![]() |
0..1 | dateTime | Requested delivery date | |||||
![]() ![]() |
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. | ||||||
![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() |
CodeableConcept | |||||||
![]() ![]() |
1..1 | dateTime | Date request signed | |||||
![]() ![]() |
0..1 | Reference(Practitioner | PractitionerRole | Organization | Patient | RelatedPerson | Device) | Who/what is requesting service | |||||
![]() ![]() |
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. | |||||
![]() ![]() |
C | 0..1 | Reference(Practitioner) | Practitioner to order the prescription from (required for code register-from-practitioner) Constraints: trxhub-inv-practitioner-ref-only | ||||
![]() ![]() |
0..* | CodeableConcept | Requested location Binding: ServiceDeliveryLocationRoleType (example): A location type where services are delivered. | |||||
![]() ![]() |
0..* | Reference(Location) | Requested location | |||||
![]() ![]() |
0..* | CodeableConcept | Explanation/Justification for procedure or service Binding: ProcedureReasonCodes (example): Diagnosis or problem codes justifying the reason for requesting the service investigation. | |||||
![]() ![]() |
0..* | Reference(Condition | Observation | DiagnosticReport | DocumentReference) | Explanation/Justification for service or service | |||||
![]() ![]() |
C | 0..1 | Reference(Coverage) | Associated insurance coverage Constraints: trxhub-inv-coverage-ref-only | ||||
![]() ![]() |
0..* | Reference(Resource) | Additional clinical information | |||||
![]() ![]() |
0..* | Reference(Specimen) | Procedure Samples | |||||
![]() ![]() |
0..* | CodeableConcept | Location on Body Binding: SNOMEDCTBodyStructures (example): Codes describing anatomical locations. May include laterality. | |||||
![]() ![]() |
0..* | Annotation | Comments | |||||
![]() ![]() |
0..1 | string | Patient or consumer-oriented instructions | |||||
![]() ![]() |
0..* | Reference(Provenance) | Request provenance | |||||
Documentation for this format | ||||||||
| 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. |
| 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:
Key Elements View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
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 |
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |
![]() ![]() |
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 | |
![]() ![]() ![]() |
0..1 | boolean | Medication Substitution Preference URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference | |
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |
![]() ![]() |
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 | |
![]() ![]() ![]() |
C | 0..1 | Reference(ServiceRequest) | Reference to the register-prescription ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() ![]() ![]() |
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 | |
![]() ![]() ![]() |
C | 0..* | Reference(MedicationRequest) | MedicationRequests that should be ordered Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() ![]() ![]() |
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 | |
![]() ![]() |
1..1 | code | draft | active | on-hold | revoked | completed | entered-in-error | unknown Binding: TRxHub ServiceRequest Status ValueSet (required) | |
![]() ![]() |
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 | |
![]() ![]() |
1..1 | CodeableConcept | Classification of service Binding: TRxHub ServiceRequest Category ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
0..1 | boolean | True if service/procedure should not be performed | |
![]() ![]() |
1..1 | CodeableConcept | What is being requested/ordered Binding: TRxHub ServiceRequest Code ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Individual or Entity the service is ordered for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
0..1 | dateTime | Requested delivery date | |
![]() ![]() |
1..1 | dateTime | Date request signed | |
![]() ![]() |
C | 0..1 | Reference(Practitioner) | Practitioner to order the prescription from (required for code register-from-practitioner) Constraints: trxhub-inv-practitioner-ref-only |
![]() ![]() |
C | 0..1 | Reference(Coverage) | Associated insurance coverage Constraints: trxhub-inv-coverage-ref-only |
Documentation for this format | ||||
| 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 |
| 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
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
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 |
![]() ![]() |
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 | |
![]() ![]() ![]() |
0..1 | boolean | Medication Substitution Preference URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference | |
![]() ![]() |
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 | |
![]() ![]() ![]() |
C | 0..1 | Reference(ServiceRequest) | Reference to the register-prescription ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() ![]() ![]() |
1..1 | uri | Type the reference refers to (e.g. "Patient") Required Pattern: ServiceRequest | |
![]() ![]() ![]() |
C | 0..* | Reference(MedicationRequest) | MedicationRequests that should be ordered Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() ![]() ![]() |
1..1 | uri | Type the reference refers to (e.g. "Patient") Required Pattern: MedicationRequest | |
![]() ![]() |
1..1 | code | draft | active | on-hold | revoked | completed | entered-in-error | unknown Binding: TRxHub ServiceRequest Status ValueSet (required) | |
![]() ![]() |
1..1 | code | proposal | plan | directive | order | original-order | reflex-order | filler-order | instance-order | option Required Pattern: order | |
![]() ![]() |
1..1 | CodeableConcept | Classification of service Binding: TRxHub ServiceRequest Category ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
1..1 | CodeableConcept | What is being requested/ordered Binding: TRxHub ServiceRequest Code ValueSet (required) | |
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Individual or Entity the service is ordered for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
0..1 | dateTime | Requested delivery date | |
![]() ![]() |
1..1 | dateTime | Date request signed | |
![]() ![]() |
C | 0..1 | Reference(Practitioner) | Practitioner to order the prescription from (required for code register-from-practitioner) Constraints: trxhub-inv-practitioner-ref-only |
![]() ![]() |
C | 0..1 | Reference(Coverage) | Associated insurance coverage Constraints: trxhub-inv-coverage-ref-only |
Documentation for this format | ||||
| 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 |
| 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
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
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 | ||||
![]() ![]() |
0..1 | id | Logical id of this artifact | |||||
![]() ![]() |
0..1 | Meta | Metadata about the resource | |||||
![]() ![]() |
0..1 | uri | A set of rules under which this content was created | |||||
![]() ![]() |
0..1 | code | Language of the resource content Binding: CommonLanguages (preferred): A human language.
| |||||
![]() ![]() |
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 | |||||
![]() ![]() |
0..* | Resource | Contained, inline Resources | |||||
![]() ![]() |
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 | |||||
![]() ![]() ![]() |
0..1 | boolean | Medication Substitution Preference URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-medication-substitution-preference | |||||
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |||||
![]() ![]() |
0..* | Identifier | Identifiers assigned to this order | |||||
![]() ![]() |
0..* | canonical(ActivityDefinition | PlanDefinition) | Instantiates FHIR protocol or definition | |||||
![]() ![]() |
0..* | uri | Instantiates external protocol or definition | |||||
![]() ![]() |
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 | |||||
![]() ![]() ![]() |
C | 0..1 | Reference(ServiceRequest) | Reference to the register-prescription ServiceRequest Constraints: trxhub-inv-service-request-ref-only | ||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
C | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
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 | |||||
![]() ![]() ![]() ![]() |
0..1 | Identifier | Logical reference, when literal reference is not known | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Text alternative for the resource | |||||
![]() ![]() ![]() |
C | 0..* | Reference(MedicationRequest) | MedicationRequests that should be ordered Constraints: trxhub-inv-medication-request-ref-only | ||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
C | 0..1 | string | Literal reference, Relative, internal or absolute URL | ||||
![]() ![]() ![]() ![]() |
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 | |||||
![]() ![]() ![]() ![]() |
0..1 | Identifier | Logical reference, when literal reference is not known | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Text alternative for the resource | |||||
![]() ![]() |
0..* | Reference(ServiceRequest) | What request replaces | |||||
![]() ![]() |
0..1 | Identifier | Composite Request ID | |||||
![]() ![]() |
1..1 | code | draft | active | on-hold | revoked | completed | entered-in-error | unknown Binding: TRxHub ServiceRequest Status ValueSet (required) | |||||
![]() ![]() |
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 | |||||
![]() ![]() |
1..1 | CodeableConcept | Classification of service Binding: TRxHub ServiceRequest Category ValueSet (required) | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-category | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Version of the system - if relevant | |||||
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Representation defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | boolean | If this coding was chosen directly by the user | |||||
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |||||
![]() ![]() |
0..1 | code | routine | urgent | asap | stat Binding: RequestPriority (required): Identifies the level of importance to be assigned to actioning the request. | |||||
![]() ![]() |
0..1 | boolean | True if service/procedure should not be performed | |||||
![]() ![]() |
1..1 | CodeableConcept | What is being requested/ordered Binding: TRxHub ServiceRequest Code ValueSet (required) | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..1 | Coding | Code defined by a terminology system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-service-request-code | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Version of the system - if relevant | |||||
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | string | Representation defined by the system | |||||
![]() ![]() ![]() ![]() |
0..1 | boolean | If this coding was chosen directly by the user | |||||
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |||||
![]() ![]() |
C | 0..* | CodeableConcept | Additional order information Binding: ServiceRequestOrderDetailsCodes (example): Codified order entry details which are based on order context. | ||||
![]() ![]() |
0..1 | Service amount | ||||||
![]() ![]() ![]() |
Quantity | |||||||
![]() ![]() ![]() |
Ratio | |||||||
![]() ![]() ![]() |
Range | |||||||
![]() ![]() |
C | 1..1 | Reference(Patient) | Individual or Entity the service is ordered for Constraints: trxhub-inv-patient-ref-only | ||||
![]() ![]() |
0..1 | Reference(Encounter) | Encounter in which the request was created | |||||
![]() ![]() |
0..1 | dateTime | Requested delivery date | |||||
![]() ![]() |
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. | ||||||
![]() ![]() ![]() |
boolean | |||||||
![]() ![]() ![]() |
CodeableConcept | |||||||
![]() ![]() |
1..1 | dateTime | Date request signed | |||||
![]() ![]() |
0..1 | Reference(Practitioner | PractitionerRole | Organization | Patient | RelatedPerson | Device) | Who/what is requesting service | |||||
![]() ![]() |
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. | |||||
![]() ![]() |
C | 0..1 | Reference(Practitioner) | Practitioner to order the prescription from (required for code register-from-practitioner) Constraints: trxhub-inv-practitioner-ref-only | ||||
![]() ![]() |
0..* | CodeableConcept | Requested location Binding: ServiceDeliveryLocationRoleType (example): A location type where services are delivered. | |||||
![]() ![]() |
0..* | Reference(Location) | Requested location | |||||
![]() ![]() |
0..* | CodeableConcept | Explanation/Justification for procedure or service Binding: ProcedureReasonCodes (example): Diagnosis or problem codes justifying the reason for requesting the service investigation. | |||||
![]() ![]() |
0..* | Reference(Condition | Observation | DiagnosticReport | DocumentReference) | Explanation/Justification for service or service | |||||
![]() ![]() |
C | 0..1 | Reference(Coverage) | Associated insurance coverage Constraints: trxhub-inv-coverage-ref-only | ||||
![]() ![]() |
0..* | Reference(Resource) | Additional clinical information | |||||
![]() ![]() |
0..* | Reference(Specimen) | Procedure Samples | |||||
![]() ![]() |
0..* | CodeableConcept | Location on Body Binding: SNOMEDCTBodyStructures (example): Codes describing anatomical locations. May include laterality. | |||||
![]() ![]() |
0..* | Annotation | Comments | |||||
![]() ![]() |
0..1 | string | Patient or consumer-oriented instructions | |||||
![]() ![]() |
0..* | Reference(Provenance) | Request provenance | |||||
Documentation for this format | ||||||||
| 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. |
| 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:
Other representations of profile: CSV, Excel, Schematron