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-medication-dispense | Version: 0.1.0 | |||
| Draft as of 2026-10-08 | Computable Name: TRxHubMedicationDispense | |||
Dispensation of an ordered MedicationRequest
MedicationDispense represents the response to an order (ServiceRequest order-medication) based on a given MedicationRequest.
It's created by the MediService ERP once an order has been processed and is available to clients by querying by the MedicationRequest-ID (supportingInformation) or the order-medication ServiceRequest-ID (authorizingPrescription).
A dispense records one of two outcomes, indicated by status:
completed — the medication was dispensed and shipped to the patient.declined — the pharmacy did not dispense the medication, and statusReason holds the explanation.The outcome determines which elements are present, and what medication refers to.
| Element | completed |
declined |
Rule |
|---|---|---|---|
statusReason |
must not be present | required | trxhub-md-1, trxhub-md-2 |
medication |
the medication actually dispensed | the medication that was requested | — |
type |
required | must not be present | trxhub-md-3, trxhub-md-4 |
quantity |
required | must not be present | trxhub-md-3, trxhub-md-4 |
whenHandedOver |
required | must not be present | trxhub-md-3, trxhub-md-4 |
substitution.wasSubstituted |
required | must not be present | trxhub-md-3, trxhub-md-4 |
extension[shimpmentTrackingUrl] |
required | must not be present | trxhub-md-5, trxhub-md-6 |
medication always identifies the medication the dispense concerns.
For a completed dispense it is the medication that was shipped to the patient. If the medication was substituted this differs from the medication on the referenced MedicationRequest.
For a declined dispense nothing was shipped to the patient so it holds the same values as the referenced MedicationRequest.
substitution.wasSubstituted states whether the dispensed medication differs from the one requested in the referenced MedicationRequest.
It applies only to a completed dispense. On a declined dispense nothing was dispensed and therefore nothing could have been substituted.
The type defines the nature of the dispensation.
It can be one of partially-dispensed or fully-dispensed.
In case of a partial dispensation further orders for a MedicationRequest can be placed.
In case of a full dispensation no further order for the MedicationRequest can be placed.
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..* | MedicationDispense | Dispensing a medication to a named patient Constraints: mdd-1, trxhub-md-1, trxhub-md-2, trxhub-md-3, trxhub-md-4, trxhub-md-5, trxhub-md-6 |
![]() ![]() |
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 | url | Shipment Tracking URL URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url | |
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |
![]() ![]() |
1..1 | code | preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown Binding: TRxHub MedicationDispense Status ValueSet (required) | |
![]() ![]() |
0..1 | CodeableConcept | Why a dispense was not performed Binding: TRxHub MedicationDispense Status Reason 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-medication-dispense-status-reason | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
1..1 | CodeableConcept | The exact medication that has been dispensed, may differ from the requested medication if substituted; for a declined dispense, the medication that was requested but not dispensed Binding: SNOMEDCTMedicationCodes (example): A coded concept identifying which substance or product can be dispensed. | |
![]() ![]() ![]() |
1..* | Coding | Code defined by a terminology system Slice: Unordered, Closed by value:system Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:2.51.1.3 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:1.3.160 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Who the dispense is for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
C | 1..1 | Reference(ServiceRequest) | order-medication ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() |
C | 1..1 | Reference(MedicationRequest) | Medication order that authorizes the dispense Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() |
0..1 | CodeableConcept | Trial fill, partial fill, emergency fill, etc. Binding: TRxHub MedicationDispense Type 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-medication-dispense-type | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
C | 0..1 | SimpleQuantity(4.0.1) | Amount dispensed Constraints: sqty-1 |
![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |
![]() ![]() |
0..1 | dateTime | When medicament was shipped | |
![]() ![]() |
0..1 | Annotation | Information about the dispense | |
![]() ![]() ![]() |
1..1 | markdown | The annotation - text content (as markdown) | |
![]() ![]() |
0..1 | BackboneElement | Whether a substitution was performed on the dispense | |
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |
![]() ![]() ![]() |
1..1 | boolean | Whether a substitution was or was not performed on the dispense | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| MedicationDispense.status | Base | required | TRxHub MedicationDispense Status ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.statusReason[x] | Base | required | TRxHub MedicationDispense Status Reason ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.medication[x] | Base | example | SNOMED CT Medication Codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.type | Base | required | TRxHub MedicationDispense Type ValueSet | 📦0.1.0 | This IG |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | MedicationDispense | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | MedicationDispense | 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 | MedicationDispense | 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 | MedicationDispense | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | MedicationDispense | 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()
|
| mdd-1 | error | MedicationDispense | whenHandedOver cannot be before whenPrepared |
whenHandedOver.empty() or whenPrepared.empty() or whenHandedOver >= whenPrepared
|
| sqty-1 | error | MedicationDispense.quantity | The comparator is not used on a SimpleQuantity |
comparator.empty()
|
| trxhub-inv-medication-request-ref-only | error | MedicationDispense.authorizingPrescription | Reference must point to a MedicationRequest resource |
reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-patient-ref-only | error | MedicationDispense.subject | Reference must point to a Patient resource |
reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-service-request-ref-only | error | MedicationDispense.supportingInformation | Reference must point to a ServiceRequest resource |
reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-md-1 | error | MedicationDispense | statusReason must be present when status is declined |
status = 'declined' implies statusReason.exists()
|
| trxhub-md-2 | error | MedicationDispense | statusReason must not be present when status is completed |
status = 'completed' implies statusReason.empty()
|
| trxhub-md-3 | error | MedicationDispense | type, quantity, whenHandedOver and substitution are required when status is completed |
status = 'completed' implies (type.exists() and quantity.exists() and whenHandedOver.exists() and substitution.exists())
|
| trxhub-md-4 | error | MedicationDispense | type, quantity, whenHandedOver and substitution must not be present when status is declined |
status = 'declined' implies (type.empty() and quantity.empty() and whenHandedOver.empty() and substitution.empty())
|
| trxhub-md-5 | error | MedicationDispense | shipmentTrackingUrl is required when status is completed |
status = 'completed' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').exists()
|
| trxhub-md-6 | error | MedicationDispense | shipmentTrackingUrl must not be present when status is declined |
status = 'declined' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').empty()
|
This structure is derived from MedicationDispense
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | MedicationDispense | Dispensing a medication to a named patient Constraints: trxhub-md-1, trxhub-md-2, trxhub-md-3, trxhub-md-4, trxhub-md-5, trxhub-md-6 |
![]() ![]() |
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 | url | Shipment Tracking URL URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url | |
![]() ![]() |
1..1 | code | preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown Binding: TRxHub MedicationDispense Status ValueSet (required) | |
![]() ![]() |
0..1 | CodeableConcept | Why a dispense was not performed Binding: TRxHub MedicationDispense Status Reason 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-medication-dispense-status-reason | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
1..1 | CodeableConcept | The exact medication that has been dispensed, may differ from the requested medication if substituted; for a declined dispense, the medication that was requested but not dispensed | |
![]() ![]() ![]() |
1..* | Coding | Code defined by a terminology system Slice: Unordered, Closed by value:system Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:2.51.1.3 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:1.3.160 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Who the dispense is for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
C | 1..1 | Reference(ServiceRequest) | order-medication ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() |
C | 1..1 | Reference(MedicationRequest) | Medication order that authorizes the dispense Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() |
0..1 | CodeableConcept | Trial fill, partial fill, emergency fill, etc. Binding: TRxHub MedicationDispense Type 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-medication-dispense-type | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
0..1 | SimpleQuantity(4.0.1) | Amount dispensed | |
![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |
![]() ![]() |
0..1 | dateTime | When medicament was shipped | |
![]() ![]() |
0..1 | Annotation | Information about the dispense | |
![]() ![]() ![]() |
1..1 | markdown | The annotation - text content (as markdown) | |
![]() ![]() |
0..1 | BackboneElement | Whether a substitution was performed on the dispense | |
![]() ![]() ![]() |
1..1 | boolean | Whether a substitution was or was not performed on the dispense | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| MedicationDispense.status | Base | required | TRxHub MedicationDispense Status ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.statusReason[x] | Base | required | TRxHub MedicationDispense Status Reason ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.type | Base | required | TRxHub MedicationDispense Type ValueSet | 📦0.1.0 | This IG |
| Id | Grade | Path(s) | Description | Expression |
| trxhub-inv-medication-request-ref-only | error | MedicationDispense.authorizingPrescription | Reference must point to a MedicationRequest resource |
reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-patient-ref-only | error | MedicationDispense.subject | Reference must point to a Patient resource |
reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-service-request-ref-only | error | MedicationDispense.supportingInformation | Reference must point to a ServiceRequest resource |
reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-md-1 | error | MedicationDispense | statusReason must be present when status is declined |
status = 'declined' implies statusReason.exists()
|
| trxhub-md-2 | error | MedicationDispense | statusReason must not be present when status is completed |
status = 'completed' implies statusReason.empty()
|
| trxhub-md-3 | error | MedicationDispense | type, quantity, whenHandedOver and substitution are required when status is completed |
status = 'completed' implies (type.exists() and quantity.exists() and whenHandedOver.exists() and substitution.exists())
|
| trxhub-md-4 | error | MedicationDispense | type, quantity, whenHandedOver and substitution must not be present when status is declined |
status = 'declined' implies (type.empty() and quantity.empty() and whenHandedOver.empty() and substitution.empty())
|
| trxhub-md-5 | error | MedicationDispense | shipmentTrackingUrl is required when status is completed |
status = 'completed' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').exists()
|
| trxhub-md-6 | error | MedicationDispense | shipmentTrackingUrl must not be present when status is declined |
status = 'declined' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').empty()
|
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | MedicationDispense | Dispensing a medication to a named patient Constraints: mdd-1, trxhub-md-1, trxhub-md-2, trxhub-md-3, trxhub-md-4, trxhub-md-5, trxhub-md-6 | ||||
![]() ![]() |
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 | url | Shipment Tracking URL URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url | |||||
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |||||
![]() ![]() |
0..* | Identifier | External identifier | |||||
![]() ![]() |
0..* | Reference(Procedure) | Event that dispense is part of | |||||
![]() ![]() |
1..1 | code | preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown Binding: TRxHub MedicationDispense Status ValueSet (required) | |||||
![]() ![]() |
0..1 | CodeableConcept | Why a dispense was not performed Binding: TRxHub MedicationDispense Status Reason 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-medication-dispense-status-reason | |||||
![]() ![]() ![]() ![]() |
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 | CodeableConcept | Type of medication dispense Binding: MedicationDispense Category Codes (preferred): A code describing where the dispensed medication is expected to be consumed or administered. | |||||
![]() ![]() |
1..1 | CodeableConcept | The exact medication that has been dispensed, may differ from the requested medication if substituted; for a declined dispense, the medication that was requested but not dispensed Binding: SNOMEDCTMedicationCodes (example): A coded concept identifying which substance or product can be dispensed. | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..* | Coding | Code defined by a terminology system Slice: Unordered, Closed by value:system Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them | |||||
![]() ![]() ![]() ![]() |
0..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 Fixed Value: urn:oid:2.51.1.3 | |||||
![]() ![]() ![]() ![]() ![]() |
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 | 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 Fixed Value: urn:oid:1.3.160 | |||||
![]() ![]() ![]() ![]() ![]() |
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 | 1..1 | Reference(Patient) | Who the dispense is for Constraints: trxhub-inv-patient-ref-only | ||||
![]() ![]() |
0..1 | Reference(Encounter | EpisodeOfCare) | Encounter / Episode associated with event | |||||
![]() ![]() |
C | 1..1 | Reference(ServiceRequest) | order-medication ServiceRequest Constraints: trxhub-inv-service-request-ref-only | ||||
![]() ![]() |
0..* | BackboneElement | Who performed event | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |||||
![]() ![]() ![]() |
0..1 | CodeableConcept | Who performed the dispense and what they did Binding: MedicationDispense Performer Function Codes (example): A code describing the role an individual played in dispensing a medication. | |||||
![]() ![]() ![]() |
1..1 | Reference(Practitioner | PractitionerRole | Organization | Patient | Device | RelatedPerson) | Individual who was performing | |||||
![]() ![]() |
0..1 | Reference(Location) | Where the dispense occurred | |||||
![]() ![]() |
C | 1..1 | Reference(MedicationRequest) | Medication order that authorizes the dispense Constraints: trxhub-inv-medication-request-ref-only | ||||
![]() ![]() |
0..1 | CodeableConcept | Trial fill, partial fill, emergency fill, etc. Binding: TRxHub MedicationDispense Type 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-medication-dispense-type | |||||
![]() ![]() ![]() ![]() |
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..1 | SimpleQuantity(4.0.1) | Amount dispensed Constraints: sqty-1 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |||||
![]() ![]() ![]() |
0..1 | string | Unit representation | |||||
![]() ![]() ![]() |
C | 0..1 | uri | System that defines coded unit form | ||||
![]() ![]() ![]() |
0..1 | code | Coded form of the unit | |||||
![]() ![]() |
C | 0..1 | SimpleQuantity(4.0.1) | Amount of medication expressed as a timing amount Constraints: sqty-1 | ||||
![]() ![]() |
0..1 | dateTime | When product was packaged and reviewed | |||||
![]() ![]() |
0..1 | dateTime | When medicament was shipped | |||||
![]() ![]() |
0..1 | Reference(Location) | Where the medication was sent | |||||
![]() ![]() |
0..* | Reference(Patient | Practitioner) | Who collected the medication | |||||
![]() ![]() |
0..1 | Annotation | Information about the dispense | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
0..1 | Individual responsible for the annotation | ||||||
![]() ![]() ![]() ![]() |
Reference(Practitioner | Patient | RelatedPerson | Organization) | |||||||
![]() ![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() |
0..1 | dateTime | When the annotation was made | |||||
![]() ![]() ![]() |
1..1 | markdown | The annotation - text content (as markdown) | |||||
![]() ![]() |
0..* | Dosage | How the medication is to be used by the patient or administered by the caregiver | |||||
![]() ![]() |
0..1 | BackboneElement | Whether a substitution was performed on the dispense | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |||||
![]() ![]() ![]() |
1..1 | boolean | Whether a substitution was or was not performed on the dispense | |||||
![]() ![]() ![]() |
0..1 | CodeableConcept | Code signifying whether a different drug was dispensed from what was prescribed Binding: ActSubstanceAdminSubstitutionCode (example): A coded concept describing whether a different medicinal product may be dispensed other than the product as specified exactly in the prescription. | |||||
![]() ![]() ![]() |
0..* | CodeableConcept | Why was substitution made Binding: SubstanceAdminSubstitutionReason (example): A coded concept describing the reason that a different medication should (or should not) be substituted from what was prescribed. | |||||
![]() ![]() ![]() |
0..* | Reference(Practitioner | PractitionerRole) | Who is responsible for the substitution | |||||
![]() ![]() |
0..* | Reference(DetectedIssue) | Clinical issue with action | |||||
![]() ![]() |
0..* | Reference(Provenance) | A list of relevant lifecycle events | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| MedicationDispense.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
| MedicationDispense.status | Base | required | TRxHub MedicationDispense Status ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.statusReason[x] | Base | required | TRxHub MedicationDispense Status Reason ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.category | Base | preferred | Medication dispense category codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.medication[x] | Base | example | SNOMED CT Medication Codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.performer.function | Base | example | Medication dispense performer function codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.type | Base | required | TRxHub MedicationDispense Type ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.substitution.type | Base | example | ActSubstanceAdminSubstitutionCode | 📦3.0.0 | THO v7.4 |
| MedicationDispense.substitution.reason | Base | example | SubstanceAdminSubstitutionReason | 📦3.0.0 | THO v7.4 |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | MedicationDispense | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | MedicationDispense | 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 | MedicationDispense | 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 | MedicationDispense | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | MedicationDispense | 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()
|
| mdd-1 | error | MedicationDispense | whenHandedOver cannot be before whenPrepared |
whenHandedOver.empty() or whenPrepared.empty() or whenHandedOver >= whenPrepared
|
| sqty-1 | error | MedicationDispense.quantity, MedicationDispense.daysSupply | The comparator is not used on a SimpleQuantity |
comparator.empty()
|
| trxhub-inv-medication-request-ref-only | error | MedicationDispense.authorizingPrescription | Reference must point to a MedicationRequest resource |
reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-patient-ref-only | error | MedicationDispense.subject | Reference must point to a Patient resource |
reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-service-request-ref-only | error | MedicationDispense.supportingInformation | Reference must point to a ServiceRequest resource |
reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-md-1 | error | MedicationDispense | statusReason must be present when status is declined |
status = 'declined' implies statusReason.exists()
|
| trxhub-md-2 | error | MedicationDispense | statusReason must not be present when status is completed |
status = 'completed' implies statusReason.empty()
|
| trxhub-md-3 | error | MedicationDispense | type, quantity, whenHandedOver and substitution are required when status is completed |
status = 'completed' implies (type.exists() and quantity.exists() and whenHandedOver.exists() and substitution.exists())
|
| trxhub-md-4 | error | MedicationDispense | type, quantity, whenHandedOver and substitution must not be present when status is declined |
status = 'declined' implies (type.empty() and quantity.empty() and whenHandedOver.empty() and substitution.empty())
|
| trxhub-md-5 | error | MedicationDispense | shipmentTrackingUrl is required when status is completed |
status = 'completed' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').exists()
|
| trxhub-md-6 | error | MedicationDispense | shipmentTrackingUrl must not be present when status is declined |
status = 'declined' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').empty()
|
This structure is derived from MedicationDispense
Summary
Mandatory: 4 elements(11 nested mandatory elements)
Must-Support: 29 elements
Fixed: 2 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..* | MedicationDispense | Dispensing a medication to a named patient Constraints: mdd-1, trxhub-md-1, trxhub-md-2, trxhub-md-3, trxhub-md-4, trxhub-md-5, trxhub-md-6 |
![]() ![]() |
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 | url | Shipment Tracking URL URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url | |
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |
![]() ![]() |
1..1 | code | preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown Binding: TRxHub MedicationDispense Status ValueSet (required) | |
![]() ![]() |
0..1 | CodeableConcept | Why a dispense was not performed Binding: TRxHub MedicationDispense Status Reason 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-medication-dispense-status-reason | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
1..1 | CodeableConcept | The exact medication that has been dispensed, may differ from the requested medication if substituted; for a declined dispense, the medication that was requested but not dispensed Binding: SNOMEDCTMedicationCodes (example): A coded concept identifying which substance or product can be dispensed. | |
![]() ![]() ![]() |
1..* | Coding | Code defined by a terminology system Slice: Unordered, Closed by value:system Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:2.51.1.3 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:1.3.160 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Who the dispense is for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
C | 1..1 | Reference(ServiceRequest) | order-medication ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() |
C | 1..1 | Reference(MedicationRequest) | Medication order that authorizes the dispense Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() |
0..1 | CodeableConcept | Trial fill, partial fill, emergency fill, etc. Binding: TRxHub MedicationDispense Type 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-medication-dispense-type | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
C | 0..1 | SimpleQuantity(4.0.1) | Amount dispensed Constraints: sqty-1 |
![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |
![]() ![]() |
0..1 | dateTime | When medicament was shipped | |
![]() ![]() |
0..1 | Annotation | Information about the dispense | |
![]() ![]() ![]() |
1..1 | markdown | The annotation - text content (as markdown) | |
![]() ![]() |
0..1 | BackboneElement | Whether a substitution was performed on the dispense | |
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |
![]() ![]() ![]() |
1..1 | boolean | Whether a substitution was or was not performed on the dispense | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| MedicationDispense.status | Base | required | TRxHub MedicationDispense Status ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.statusReason[x] | Base | required | TRxHub MedicationDispense Status Reason ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.medication[x] | Base | example | SNOMED CT Medication Codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.type | Base | required | TRxHub MedicationDispense Type ValueSet | 📦0.1.0 | This IG |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | MedicationDispense | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | MedicationDispense | 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 | MedicationDispense | 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 | MedicationDispense | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | MedicationDispense | 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()
|
| mdd-1 | error | MedicationDispense | whenHandedOver cannot be before whenPrepared |
whenHandedOver.empty() or whenPrepared.empty() or whenHandedOver >= whenPrepared
|
| sqty-1 | error | MedicationDispense.quantity | The comparator is not used on a SimpleQuantity |
comparator.empty()
|
| trxhub-inv-medication-request-ref-only | error | MedicationDispense.authorizingPrescription | Reference must point to a MedicationRequest resource |
reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-patient-ref-only | error | MedicationDispense.subject | Reference must point to a Patient resource |
reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-service-request-ref-only | error | MedicationDispense.supportingInformation | Reference must point to a ServiceRequest resource |
reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-md-1 | error | MedicationDispense | statusReason must be present when status is declined |
status = 'declined' implies statusReason.exists()
|
| trxhub-md-2 | error | MedicationDispense | statusReason must not be present when status is completed |
status = 'completed' implies statusReason.empty()
|
| trxhub-md-3 | error | MedicationDispense | type, quantity, whenHandedOver and substitution are required when status is completed |
status = 'completed' implies (type.exists() and quantity.exists() and whenHandedOver.exists() and substitution.exists())
|
| trxhub-md-4 | error | MedicationDispense | type, quantity, whenHandedOver and substitution must not be present when status is declined |
status = 'declined' implies (type.empty() and quantity.empty() and whenHandedOver.empty() and substitution.empty())
|
| trxhub-md-5 | error | MedicationDispense | shipmentTrackingUrl is required when status is completed |
status = 'completed' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').exists()
|
| trxhub-md-6 | error | MedicationDispense | shipmentTrackingUrl must not be present when status is declined |
status = 'declined' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').empty()
|
Differential View
This structure is derived from MedicationDispense
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() |
|---|---|---|---|---|
![]() |
C | 0..* | MedicationDispense | Dispensing a medication to a named patient Constraints: trxhub-md-1, trxhub-md-2, trxhub-md-3, trxhub-md-4, trxhub-md-5, trxhub-md-6 |
![]() ![]() |
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 | url | Shipment Tracking URL URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url | |
![]() ![]() |
1..1 | code | preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown Binding: TRxHub MedicationDispense Status ValueSet (required) | |
![]() ![]() |
0..1 | CodeableConcept | Why a dispense was not performed Binding: TRxHub MedicationDispense Status Reason 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-medication-dispense-status-reason | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
1..1 | CodeableConcept | The exact medication that has been dispensed, may differ from the requested medication if substituted; for a declined dispense, the medication that was requested but not dispensed | |
![]() ![]() ![]() |
1..* | Coding | Code defined by a terminology system Slice: Unordered, Closed by value:system Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:2.51.1.3 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() ![]() |
0..1 | Coding | Code defined by a terminology system | |
![]() ![]() ![]() ![]() ![]() |
1..1 | uri | Identity of the terminology system Fixed Value: urn:oid:1.3.160 | |
![]() ![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() ![]() |
0..1 | string | Plain text representation of the concept | |
![]() ![]() |
C | 1..1 | Reference(Patient) | Who the dispense is for Constraints: trxhub-inv-patient-ref-only |
![]() ![]() |
C | 1..1 | Reference(ServiceRequest) | order-medication ServiceRequest Constraints: trxhub-inv-service-request-ref-only |
![]() ![]() |
C | 1..1 | Reference(MedicationRequest) | Medication order that authorizes the dispense Constraints: trxhub-inv-medication-request-ref-only |
![]() ![]() |
0..1 | CodeableConcept | Trial fill, partial fill, emergency fill, etc. Binding: TRxHub MedicationDispense Type 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-medication-dispense-type | |
![]() ![]() ![]() ![]() |
1..1 | code | Symbol in syntax defined by the system | |
![]() ![]() |
0..1 | SimpleQuantity(4.0.1) | Amount dispensed | |
![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |
![]() ![]() |
0..1 | dateTime | When medicament was shipped | |
![]() ![]() |
0..1 | Annotation | Information about the dispense | |
![]() ![]() ![]() |
1..1 | markdown | The annotation - text content (as markdown) | |
![]() ![]() |
0..1 | BackboneElement | Whether a substitution was performed on the dispense | |
![]() ![]() ![]() |
1..1 | boolean | Whether a substitution was or was not performed on the dispense | |
Documentation for this format | ||||
| Path | Status | Usage | ValueSet | Version | Source |
| MedicationDispense.status | Base | required | TRxHub MedicationDispense Status ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.statusReason[x] | Base | required | TRxHub MedicationDispense Status Reason ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.type | Base | required | TRxHub MedicationDispense Type ValueSet | 📦0.1.0 | This IG |
| Id | Grade | Path(s) | Description | Expression |
| trxhub-inv-medication-request-ref-only | error | MedicationDispense.authorizingPrescription | Reference must point to a MedicationRequest resource |
reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-patient-ref-only | error | MedicationDispense.subject | Reference must point to a Patient resource |
reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-service-request-ref-only | error | MedicationDispense.supportingInformation | Reference must point to a ServiceRequest resource |
reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-md-1 | error | MedicationDispense | statusReason must be present when status is declined |
status = 'declined' implies statusReason.exists()
|
| trxhub-md-2 | error | MedicationDispense | statusReason must not be present when status is completed |
status = 'completed' implies statusReason.empty()
|
| trxhub-md-3 | error | MedicationDispense | type, quantity, whenHandedOver and substitution are required when status is completed |
status = 'completed' implies (type.exists() and quantity.exists() and whenHandedOver.exists() and substitution.exists())
|
| trxhub-md-4 | error | MedicationDispense | type, quantity, whenHandedOver and substitution must not be present when status is declined |
status = 'declined' implies (type.empty() and quantity.empty() and whenHandedOver.empty() and substitution.empty())
|
| trxhub-md-5 | error | MedicationDispense | shipmentTrackingUrl is required when status is completed |
status = 'completed' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').exists()
|
| trxhub-md-6 | error | MedicationDispense | shipmentTrackingUrl must not be present when status is declined |
status = 'declined' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').empty()
|
Snapshot View
| Name | Flags | Card. | Type | Description & Constraints Filter: ![]() | ||||
|---|---|---|---|---|---|---|---|---|
![]() |
C | 0..* | MedicationDispense | Dispensing a medication to a named patient Constraints: mdd-1, trxhub-md-1, trxhub-md-2, trxhub-md-3, trxhub-md-4, trxhub-md-5, trxhub-md-6 | ||||
![]() ![]() |
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 | url | Shipment Tracking URL URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url | |||||
![]() ![]() |
0..* | Extension | Extensions that cannot be ignored | |||||
![]() ![]() |
0..* | Identifier | External identifier | |||||
![]() ![]() |
0..* | Reference(Procedure) | Event that dispense is part of | |||||
![]() ![]() |
1..1 | code | preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown Binding: TRxHub MedicationDispense Status ValueSet (required) | |||||
![]() ![]() |
0..1 | CodeableConcept | Why a dispense was not performed Binding: TRxHub MedicationDispense Status Reason 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-medication-dispense-status-reason | |||||
![]() ![]() ![]() ![]() |
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 | CodeableConcept | Type of medication dispense Binding: MedicationDispense Category Codes (preferred): A code describing where the dispensed medication is expected to be consumed or administered. | |||||
![]() ![]() |
1..1 | CodeableConcept | The exact medication that has been dispensed, may differ from the requested medication if substituted; for a declined dispense, the medication that was requested but not dispensed Binding: SNOMEDCTMedicationCodes (example): A coded concept identifying which substance or product can be dispensed. | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..* | Coding | Code defined by a terminology system Slice: Unordered, Closed by value:system Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them | |||||
![]() ![]() ![]() ![]() |
0..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 Fixed Value: urn:oid:2.51.1.3 | |||||
![]() ![]() ![]() ![]() ![]() |
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 | 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 Fixed Value: urn:oid:1.3.160 | |||||
![]() ![]() ![]() ![]() ![]() |
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 | 1..1 | Reference(Patient) | Who the dispense is for Constraints: trxhub-inv-patient-ref-only | ||||
![]() ![]() |
0..1 | Reference(Encounter | EpisodeOfCare) | Encounter / Episode associated with event | |||||
![]() ![]() |
C | 1..1 | Reference(ServiceRequest) | order-medication ServiceRequest Constraints: trxhub-inv-service-request-ref-only | ||||
![]() ![]() |
0..* | BackboneElement | Who performed event | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |||||
![]() ![]() ![]() |
0..1 | CodeableConcept | Who performed the dispense and what they did Binding: MedicationDispense Performer Function Codes (example): A code describing the role an individual played in dispensing a medication. | |||||
![]() ![]() ![]() |
1..1 | Reference(Practitioner | PractitionerRole | Organization | Patient | Device | RelatedPerson) | Individual who was performing | |||||
![]() ![]() |
0..1 | Reference(Location) | Where the dispense occurred | |||||
![]() ![]() |
C | 1..1 | Reference(MedicationRequest) | Medication order that authorizes the dispense Constraints: trxhub-inv-medication-request-ref-only | ||||
![]() ![]() |
0..1 | CodeableConcept | Trial fill, partial fill, emergency fill, etc. Binding: TRxHub MedicationDispense Type 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-medication-dispense-type | |||||
![]() ![]() ![]() ![]() |
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..1 | SimpleQuantity(4.0.1) | Amount dispensed Constraints: sqty-1 | ||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
1..1 | decimal | Numerical value (with implicit precision) | |||||
![]() ![]() ![]() |
0..1 | string | Unit representation | |||||
![]() ![]() ![]() |
C | 0..1 | uri | System that defines coded unit form | ||||
![]() ![]() ![]() |
0..1 | code | Coded form of the unit | |||||
![]() ![]() |
C | 0..1 | SimpleQuantity(4.0.1) | Amount of medication expressed as a timing amount Constraints: sqty-1 | ||||
![]() ![]() |
0..1 | dateTime | When product was packaged and reviewed | |||||
![]() ![]() |
0..1 | dateTime | When medicament was shipped | |||||
![]() ![]() |
0..1 | Reference(Location) | Where the medication was sent | |||||
![]() ![]() |
0..* | Reference(Patient | Practitioner) | Who collected the medication | |||||
![]() ![]() |
0..1 | Annotation | Information about the dispense | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations Slice: Unordered, Open by value:url | |||||
![]() ![]() ![]() |
0..1 | Individual responsible for the annotation | ||||||
![]() ![]() ![]() ![]() |
Reference(Practitioner | Patient | RelatedPerson | Organization) | |||||||
![]() ![]() ![]() ![]() |
string | |||||||
![]() ![]() ![]() |
0..1 | dateTime | When the annotation was made | |||||
![]() ![]() ![]() |
1..1 | markdown | The annotation - text content (as markdown) | |||||
![]() ![]() |
0..* | Dosage | How the medication is to be used by the patient or administered by the caregiver | |||||
![]() ![]() |
0..1 | BackboneElement | Whether a substitution was performed on the dispense | |||||
![]() ![]() ![]() |
0..1 | string | Unique id for inter-element referencing | |||||
![]() ![]() ![]() |
0..* | Extension | Additional content defined by implementations | |||||
![]() ![]() ![]() |
0..* | Extension | Extensions that cannot be ignored even if unrecognized | |||||
![]() ![]() ![]() |
1..1 | boolean | Whether a substitution was or was not performed on the dispense | |||||
![]() ![]() ![]() |
0..1 | CodeableConcept | Code signifying whether a different drug was dispensed from what was prescribed Binding: ActSubstanceAdminSubstitutionCode (example): A coded concept describing whether a different medicinal product may be dispensed other than the product as specified exactly in the prescription. | |||||
![]() ![]() ![]() |
0..* | CodeableConcept | Why was substitution made Binding: SubstanceAdminSubstitutionReason (example): A coded concept describing the reason that a different medication should (or should not) be substituted from what was prescribed. | |||||
![]() ![]() ![]() |
0..* | Reference(Practitioner | PractitionerRole) | Who is responsible for the substitution | |||||
![]() ![]() |
0..* | Reference(DetectedIssue) | Clinical issue with action | |||||
![]() ![]() |
0..* | Reference(Provenance) | A list of relevant lifecycle events | |||||
Documentation for this format | ||||||||
| Path | Status | Usage | ValueSet | Version | Source |
| MedicationDispense.language | Base | preferred | Common Languages | 📍4.0.1 | FHIR Std. |
| MedicationDispense.status | Base | required | TRxHub MedicationDispense Status ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.statusReason[x] | Base | required | TRxHub MedicationDispense Status Reason ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.category | Base | preferred | Medication dispense category codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.medication[x] | Base | example | SNOMED CT Medication Codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.performer.function | Base | example | Medication dispense performer function codes | 📍4.0.1 | FHIR Std. |
| MedicationDispense.type | Base | required | TRxHub MedicationDispense Type ValueSet | 📦0.1.0 | This IG |
| MedicationDispense.substitution.type | Base | example | ActSubstanceAdminSubstitutionCode | 📦3.0.0 | THO v7.4 |
| MedicationDispense.substitution.reason | Base | example | SubstanceAdminSubstitutionReason | 📦3.0.0 | THO v7.4 |
| Id | Grade | Path(s) | Description | Expression |
| dom-2 | error | MedicationDispense | If the resource is contained in another resource, it SHALL NOT contain nested Resources |
contained.contained.empty()
|
| dom-3 | error | MedicationDispense | 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 | MedicationDispense | 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 | MedicationDispense | If a resource is contained in another resource, it SHALL NOT have a security label |
contained.meta.security.empty()
|
| dom-6 | best practice | MedicationDispense | 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()
|
| mdd-1 | error | MedicationDispense | whenHandedOver cannot be before whenPrepared |
whenHandedOver.empty() or whenPrepared.empty() or whenHandedOver >= whenPrepared
|
| sqty-1 | error | MedicationDispense.quantity, MedicationDispense.daysSupply | The comparator is not used on a SimpleQuantity |
comparator.empty()
|
| trxhub-inv-medication-request-ref-only | error | MedicationDispense.authorizingPrescription | Reference must point to a MedicationRequest resource |
reference.exists() implies (reference.startsWith('MedicationRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-patient-ref-only | error | MedicationDispense.subject | Reference must point to a Patient resource |
reference.exists() implies (reference.startsWith('Patient/') or reference.startsWith('urn:uuid:'))
|
| trxhub-inv-service-request-ref-only | error | MedicationDispense.supportingInformation | Reference must point to a ServiceRequest resource |
reference.exists() implies (reference.startsWith('ServiceRequest/') or reference.startsWith('urn:uuid:'))
|
| trxhub-md-1 | error | MedicationDispense | statusReason must be present when status is declined |
status = 'declined' implies statusReason.exists()
|
| trxhub-md-2 | error | MedicationDispense | statusReason must not be present when status is completed |
status = 'completed' implies statusReason.empty()
|
| trxhub-md-3 | error | MedicationDispense | type, quantity, whenHandedOver and substitution are required when status is completed |
status = 'completed' implies (type.exists() and quantity.exists() and whenHandedOver.exists() and substitution.exists())
|
| trxhub-md-4 | error | MedicationDispense | type, quantity, whenHandedOver and substitution must not be present when status is declined |
status = 'declined' implies (type.empty() and quantity.empty() and whenHandedOver.empty() and substitution.empty())
|
| trxhub-md-5 | error | MedicationDispense | shipmentTrackingUrl is required when status is completed |
status = 'completed' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').exists()
|
| trxhub-md-6 | error | MedicationDispense | shipmentTrackingUrl must not be present when status is declined |
status = 'declined' implies extension('https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url').empty()
|
This structure is derived from MedicationDispense
Summary
Mandatory: 4 elements(11 nested mandatory elements)
Must-Support: 29 elements
Fixed: 2 elements
Extensions
This structure refers to these extensions:
Slices
This structure defines the following Slices:
Other representations of profile: CSV, Excel, Schematron