TRxHub IG
0.1.0 - ci-build

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

Resource Profile: TRxHub MedicationDispense

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

Overview

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.

Elements by status

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

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

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.

Type

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

Formal Views of Profile Content

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

NameFlagsCard.TypeDescription & Constraints    Filter: doco
MedicationDispense 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
MedicationDispense.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
MedicationDispense.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
MedicationDispense.Slices for extension.extension:shipmentTrackingUrl This element must be supported. 0..1 url Shipment Tracking URL
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url
MedicationDispense.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
MedicationDispense.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown
Binding: TRxHub MedicationDispense Status ValueSet (required)
MedicationDispense.statusReason[x] This element must be supported. 0..1 CodeableConcept Why a dispense was not performed
Binding: TRxHub MedicationDispense Status Reason ValueSet (required)
MedicationDispense.statusReason[x].coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.statusReason[x].coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-status-reason
MedicationDispense.statusReason[x].coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x] This element must be supported. This element is included in summaries. 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.
MedicationDispense.medication[x].Slices for coding This element must be supported. This element is included in summaries. 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
MedicationDispense.medication[x].Slices for coding.coding:pharmacode This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:2.51.1.3
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:gtin.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:1.3.160
MedicationDispense.medication[x].Slices for coding.coding:gtin.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].text This element must be supported. This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Who the dispense is for
Constraints: trxhub-inv-patient-ref-only
MedicationDispense.supportingInformation This element must be supported. C 1..1 Reference(ServiceRequest) order-medication ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
MedicationDispense.authorizingPrescription This element must be supported. C 1..1 Reference(MedicationRequest) Medication order that authorizes the dispense
Constraints: trxhub-inv-medication-request-ref-only
MedicationDispense.type This element must be supported. 0..1 CodeableConcept Trial fill, partial fill, emergency fill, etc.
Binding: TRxHub MedicationDispense Type ValueSet (required)
MedicationDispense.type.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.type.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-type
MedicationDispense.type.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.quantity This element must be supported. C 0..1 SimpleQuantity(4.0.1) Amount dispensed
Constraints: sqty-1
MedicationDispense.quantity.value This element must be supported. This element is included in summaries. 1..1 decimal Numerical value (with implicit precision)
MedicationDispense.whenHandedOver This element must be supported. 0..1 dateTime When medicament was shipped
MedicationDispense.note This element must be supported. 0..1 Annotation Information about the dispense
MedicationDispense.note.text This element must be supported. This element is included in summaries. 1..1 markdown The annotation - text content (as markdown)
MedicationDispense.substitution This element must be supported. 0..1 BackboneElement Whether a substitution was performed on the dispense
MedicationDispense.substitution.modifierExtension This element is a modifier element. This element is included in summaries. 0..* Extension Extensions that cannot be ignored even if unrecognized
MedicationDispense.substitution.wasSubstituted This element must be supported. 1..1 boolean Whether a substitution was or was not performed on the dispense

doco Documentation for this format

Terminology Bindings

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

Constraints

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

NameFlagsCard.TypeDescription & Constraints    Filter: doco
MedicationDispense 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
MedicationDispense.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
MedicationDispense.Slices for extension.extension:shipmentTrackingUrl This element must be supported. 0..1 url Shipment Tracking URL
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url
MedicationDispense.status This element must be supported. 1..1 code preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown
Binding: TRxHub MedicationDispense Status ValueSet (required)
MedicationDispense.statusReason[x] This element must be supported. 0..1 CodeableConcept Why a dispense was not performed
Binding: TRxHub MedicationDispense Status Reason ValueSet (required)
MedicationDispense.statusReason[x].coding This element must be supported. 1..1 Coding Code defined by a terminology system
MedicationDispense.statusReason[x].coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-status-reason
MedicationDispense.statusReason[x].coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding This element must be supported. 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
MedicationDispense.medication[x].Slices for coding.coding:pharmacode This element must be supported. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.system This element must be supported. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:2.51.1.3
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin This element must be supported. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:gtin.system This element must be supported. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:1.3.160
MedicationDispense.medication[x].Slices for coding.coding:gtin.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].text This element must be supported. 0..1 string Plain text representation of the concept
MedicationDispense.subject This element must be supported. C 1..1 Reference(Patient) Who the dispense is for
Constraints: trxhub-inv-patient-ref-only
MedicationDispense.supportingInformation This element must be supported. C 1..1 Reference(ServiceRequest) order-medication ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
MedicationDispense.authorizingPrescription This element must be supported. C 1..1 Reference(MedicationRequest) Medication order that authorizes the dispense
Constraints: trxhub-inv-medication-request-ref-only
MedicationDispense.type This element must be supported. 0..1 CodeableConcept Trial fill, partial fill, emergency fill, etc.
Binding: TRxHub MedicationDispense Type ValueSet (required)
MedicationDispense.type.coding This element must be supported. 1..1 Coding Code defined by a terminology system
MedicationDispense.type.coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-type
MedicationDispense.type.coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.quantity This element must be supported. 0..1 SimpleQuantity(4.0.1) Amount dispensed
MedicationDispense.quantity.value This element must be supported. 1..1 decimal Numerical value (with implicit precision)
MedicationDispense.whenHandedOver This element must be supported. 0..1 dateTime When medicament was shipped
MedicationDispense.note This element must be supported. 0..1 Annotation Information about the dispense
MedicationDispense.note.text This element must be supported. 1..1 markdown The annotation - text content (as markdown)
MedicationDispense.substitution This element must be supported. 0..1 BackboneElement Whether a substitution was performed on the dispense
MedicationDispense.substitution.wasSubstituted This element must be supported. 1..1 boolean Whether a substitution was or was not performed on the dispense

doco Documentation for this format

Terminology Bindings (Differential)

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

Constraints

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()
NameFlagsCard.TypeDescription & Constraints    Filter: doco
MedicationDispense 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
MedicationDispense.id This element is included in summaries. 0..1 id Logical id of this artifact
MedicationDispense.meta This element is included in summaries. 0..1 Meta Metadata about the resource
MedicationDispense.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
MedicationDispense.language 0..1 code Language of the resource content
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding
MedicationDispense.text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
MedicationDispense.contained 0..* Resource Contained, inline Resources
MedicationDispense.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
MedicationDispense.Slices for extension.extension:shipmentTrackingUrl This element must be supported. 0..1 url Shipment Tracking URL
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url
MedicationDispense.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
MedicationDispense.identifier 0..* Identifier External identifier
MedicationDispense.partOf 0..* Reference(Procedure) Event that dispense is part of
MedicationDispense.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown
Binding: TRxHub MedicationDispense Status ValueSet (required)
MedicationDispense.statusReason[x] This element must be supported. 0..1 CodeableConcept Why a dispense was not performed
Binding: TRxHub MedicationDispense Status Reason ValueSet (required)
MedicationDispense.statusReason[x].id 0..1 string Unique id for inter-element referencing
MedicationDispense.statusReason[x].extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.statusReason[x].coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.statusReason[x].coding.id 0..1 string Unique id for inter-element referencing
MedicationDispense.statusReason[x].coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.statusReason[x].coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-status-reason
MedicationDispense.statusReason[x].coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.statusReason[x].coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.statusReason[x].coding.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.statusReason[x].coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.statusReason[x].text This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.category 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.
MedicationDispense.medication[x] This element must be supported. This element is included in summaries. 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.
MedicationDispense.medication[x].id 0..1 string Unique id for inter-element referencing
MedicationDispense.medication[x].extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.medication[x].Slices for coding This element must be supported. This element is included in summaries. 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
MedicationDispense.medication[x].Slices for coding.coding:pharmacode This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.id 0..1 string Unique id for inter-element referencing
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:2.51.1.3
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.medication[x].Slices for coding.coding:gtin This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:gtin.id 0..1 string Unique id for inter-element referencing
MedicationDispense.medication[x].Slices for coding.coding:gtin.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.medication[x].Slices for coding.coding:gtin.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:1.3.160
MedicationDispense.medication[x].Slices for coding.coding:gtin.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.medication[x].Slices for coding.coding:gtin.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.medication[x].text This element must be supported. This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Who the dispense is for
Constraints: trxhub-inv-patient-ref-only
MedicationDispense.context 0..1 Reference(Encounter | EpisodeOfCare) Encounter / Episode associated with event
MedicationDispense.supportingInformation This element must be supported. C 1..1 Reference(ServiceRequest) order-medication ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
MedicationDispense.performer 0..* BackboneElement Who performed event
MedicationDispense.performer.id 0..1 string Unique id for inter-element referencing
MedicationDispense.performer.extension 0..* Extension Additional content defined by implementations
MedicationDispense.performer.modifierExtension This element is a modifier element. This element is included in summaries. 0..* Extension Extensions that cannot be ignored even if unrecognized
MedicationDispense.performer.function 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.
MedicationDispense.performer.actor 1..1 Reference(Practitioner | PractitionerRole | Organization | Patient | Device | RelatedPerson) Individual who was performing
MedicationDispense.location 0..1 Reference(Location) Where the dispense occurred
MedicationDispense.authorizingPrescription This element must be supported. C 1..1 Reference(MedicationRequest) Medication order that authorizes the dispense
Constraints: trxhub-inv-medication-request-ref-only
MedicationDispense.type This element must be supported. 0..1 CodeableConcept Trial fill, partial fill, emergency fill, etc.
Binding: TRxHub MedicationDispense Type ValueSet (required)
MedicationDispense.type.id 0..1 string Unique id for inter-element referencing
MedicationDispense.type.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.type.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.type.coding.id 0..1 string Unique id for inter-element referencing
MedicationDispense.type.coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.type.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-type
MedicationDispense.type.coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.type.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.type.coding.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.type.coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.type.text This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.quantity This element must be supported. C 0..1 SimpleQuantity(4.0.1) Amount dispensed
Constraints: sqty-1
MedicationDispense.quantity.id 0..1 string Unique id for inter-element referencing
MedicationDispense.quantity.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.quantity.value This element must be supported. This element is included in summaries. 1..1 decimal Numerical value (with implicit precision)
MedicationDispense.quantity.unit This element is included in summaries. 0..1 string Unit representation
MedicationDispense.quantity.system This element is included in summaries. C 0..1 uri System that defines coded unit form
MedicationDispense.quantity.code This element is included in summaries. 0..1 code Coded form of the unit
MedicationDispense.daysSupply C 0..1 SimpleQuantity(4.0.1) Amount of medication expressed as a timing amount
Constraints: sqty-1
MedicationDispense.whenPrepared This element is included in summaries. 0..1 dateTime When product was packaged and reviewed
MedicationDispense.whenHandedOver This element must be supported. 0..1 dateTime When medicament was shipped
MedicationDispense.destination 0..1 Reference(Location) Where the medication was sent
MedicationDispense.receiver 0..* Reference(Patient | Practitioner) Who collected the medication
MedicationDispense.note This element must be supported. 0..1 Annotation Information about the dispense
MedicationDispense.note.id 0..1 string Unique id for inter-element referencing
MedicationDispense.note.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.note.author[x] This element is included in summaries. 0..1 Individual responsible for the annotation
MedicationDispense.note.author[x].authorReference Reference(Practitioner | Patient | RelatedPerson | Organization)
MedicationDispense.note.author[x].authorString string
MedicationDispense.note.time This element is included in summaries. 0..1 dateTime When the annotation was made
MedicationDispense.note.text This element must be supported. This element is included in summaries. 1..1 markdown The annotation - text content (as markdown)
MedicationDispense.dosageInstruction 0..* Dosage How the medication is to be used by the patient or administered by the caregiver
MedicationDispense.substitution This element must be supported. 0..1 BackboneElement Whether a substitution was performed on the dispense
MedicationDispense.substitution.id 0..1 string Unique id for inter-element referencing
MedicationDispense.substitution.extension 0..* Extension Additional content defined by implementations
MedicationDispense.substitution.modifierExtension This element is a modifier element. This element is included in summaries. 0..* Extension Extensions that cannot be ignored even if unrecognized
MedicationDispense.substitution.wasSubstituted This element must be supported. 1..1 boolean Whether a substitution was or was not performed on the dispense
MedicationDispense.substitution.type 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.
MedicationDispense.substitution.reason 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.
MedicationDispense.substitution.responsibleParty 0..* Reference(Practitioner | PractitionerRole) Who is responsible for the substitution
MedicationDispense.detectedIssue 0..* Reference(DetectedIssue) Clinical issue with action
MedicationDispense.eventHistory 0..* Reference(Provenance) A list of relevant lifecycle events

doco Documentation for this format

Terminology Bindings

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

Constraints

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:

  • The element 1 is sliced based on the value of MedicationDispense.medication[x].coding (Closed)

Key Elements View

NameFlagsCard.TypeDescription & Constraints    Filter: doco
MedicationDispense 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
MedicationDispense.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
MedicationDispense.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
MedicationDispense.Slices for extension.extension:shipmentTrackingUrl This element must be supported. 0..1 url Shipment Tracking URL
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url
MedicationDispense.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
MedicationDispense.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown
Binding: TRxHub MedicationDispense Status ValueSet (required)
MedicationDispense.statusReason[x] This element must be supported. 0..1 CodeableConcept Why a dispense was not performed
Binding: TRxHub MedicationDispense Status Reason ValueSet (required)
MedicationDispense.statusReason[x].coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.statusReason[x].coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-status-reason
MedicationDispense.statusReason[x].coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x] This element must be supported. This element is included in summaries. 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.
MedicationDispense.medication[x].Slices for coding This element must be supported. This element is included in summaries. 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
MedicationDispense.medication[x].Slices for coding.coding:pharmacode This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:2.51.1.3
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:gtin.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:1.3.160
MedicationDispense.medication[x].Slices for coding.coding:gtin.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].text This element must be supported. This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Who the dispense is for
Constraints: trxhub-inv-patient-ref-only
MedicationDispense.supportingInformation This element must be supported. C 1..1 Reference(ServiceRequest) order-medication ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
MedicationDispense.authorizingPrescription This element must be supported. C 1..1 Reference(MedicationRequest) Medication order that authorizes the dispense
Constraints: trxhub-inv-medication-request-ref-only
MedicationDispense.type This element must be supported. 0..1 CodeableConcept Trial fill, partial fill, emergency fill, etc.
Binding: TRxHub MedicationDispense Type ValueSet (required)
MedicationDispense.type.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.type.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-type
MedicationDispense.type.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.quantity This element must be supported. C 0..1 SimpleQuantity(4.0.1) Amount dispensed
Constraints: sqty-1
MedicationDispense.quantity.value This element must be supported. This element is included in summaries. 1..1 decimal Numerical value (with implicit precision)
MedicationDispense.whenHandedOver This element must be supported. 0..1 dateTime When medicament was shipped
MedicationDispense.note This element must be supported. 0..1 Annotation Information about the dispense
MedicationDispense.note.text This element must be supported. This element is included in summaries. 1..1 markdown The annotation - text content (as markdown)
MedicationDispense.substitution This element must be supported. 0..1 BackboneElement Whether a substitution was performed on the dispense
MedicationDispense.substitution.modifierExtension This element is a modifier element. This element is included in summaries. 0..* Extension Extensions that cannot be ignored even if unrecognized
MedicationDispense.substitution.wasSubstituted This element must be supported. 1..1 boolean Whether a substitution was or was not performed on the dispense

doco Documentation for this format

Terminology Bindings

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

Constraints

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

NameFlagsCard.TypeDescription & Constraints    Filter: doco
MedicationDispense 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
MedicationDispense.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url
Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
MedicationDispense.Slices for extension.extension:shipmentTrackingUrl This element must be supported. 0..1 url Shipment Tracking URL
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url
MedicationDispense.status This element must be supported. 1..1 code preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown
Binding: TRxHub MedicationDispense Status ValueSet (required)
MedicationDispense.statusReason[x] This element must be supported. 0..1 CodeableConcept Why a dispense was not performed
Binding: TRxHub MedicationDispense Status Reason ValueSet (required)
MedicationDispense.statusReason[x].coding This element must be supported. 1..1 Coding Code defined by a terminology system
MedicationDispense.statusReason[x].coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-status-reason
MedicationDispense.statusReason[x].coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x] This element must be supported. 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
MedicationDispense.medication[x].Slices for coding This element must be supported. 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
MedicationDispense.medication[x].Slices for coding.coding:pharmacode This element must be supported. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.system This element must be supported. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:2.51.1.3
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin This element must be supported. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:gtin.system This element must be supported. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:1.3.160
MedicationDispense.medication[x].Slices for coding.coding:gtin.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].text This element must be supported. 0..1 string Plain text representation of the concept
MedicationDispense.subject This element must be supported. C 1..1 Reference(Patient) Who the dispense is for
Constraints: trxhub-inv-patient-ref-only
MedicationDispense.supportingInformation This element must be supported. C 1..1 Reference(ServiceRequest) order-medication ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
MedicationDispense.authorizingPrescription This element must be supported. C 1..1 Reference(MedicationRequest) Medication order that authorizes the dispense
Constraints: trxhub-inv-medication-request-ref-only
MedicationDispense.type This element must be supported. 0..1 CodeableConcept Trial fill, partial fill, emergency fill, etc.
Binding: TRxHub MedicationDispense Type ValueSet (required)
MedicationDispense.type.coding This element must be supported. 1..1 Coding Code defined by a terminology system
MedicationDispense.type.coding.system This element must be supported. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-type
MedicationDispense.type.coding.code This element must be supported. 1..1 code Symbol in syntax defined by the system
MedicationDispense.quantity This element must be supported. 0..1 SimpleQuantity(4.0.1) Amount dispensed
MedicationDispense.quantity.value This element must be supported. 1..1 decimal Numerical value (with implicit precision)
MedicationDispense.whenHandedOver This element must be supported. 0..1 dateTime When medicament was shipped
MedicationDispense.note This element must be supported. 0..1 Annotation Information about the dispense
MedicationDispense.note.text This element must be supported. 1..1 markdown The annotation - text content (as markdown)
MedicationDispense.substitution This element must be supported. 0..1 BackboneElement Whether a substitution was performed on the dispense
MedicationDispense.substitution.wasSubstituted This element must be supported. 1..1 boolean Whether a substitution was or was not performed on the dispense

doco Documentation for this format

Terminology Bindings (Differential)

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

Constraints

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

NameFlagsCard.TypeDescription & Constraints    Filter: doco
MedicationDispense 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
MedicationDispense.id This element is included in summaries. 0..1 id Logical id of this artifact
MedicationDispense.meta This element is included in summaries. 0..1 Meta Metadata about the resource
MedicationDispense.implicitRules This element is a modifier element. This element is included in summaries. 0..1 uri A set of rules under which this content was created
MedicationDispense.language 0..1 code Language of the resource content
Binding: CommonLanguages (preferred): A human language.
Additional BindingsPurpose
AllLanguages Max Binding
MedicationDispense.text 0..1 Narrative Text summary of the resource, for human interpretation
This profile does not constrain the narrative in regard to content, language, or traceability to data elements
MedicationDispense.contained 0..* Resource Contained, inline Resources
MedicationDispense.Slices for extension 0..* Extension Extension
Slice: Unordered, Open by value:url

Slicing Note: The rules on this element (including its children) apply to all the slices, but are not repeated in them
MedicationDispense.Slices for extension.extension:shipmentTrackingUrl This element must be supported. 0..1 url Shipment Tracking URL
URL: https://trxhub.mediservice.ch/fhir/StructureDefinition/trxhub-shipment-tracking-url
MedicationDispense.modifierExtension This element is a modifier element. 0..* Extension Extensions that cannot be ignored
MedicationDispense.identifier 0..* Identifier External identifier
MedicationDispense.partOf 0..* Reference(Procedure) Event that dispense is part of
MedicationDispense.status This element is a modifier element. This element must be supported. This element is included in summaries. 1..1 code preparation | in-progress | cancelled | on-hold | completed | entered-in-error | stopped | declined | unknown
Binding: TRxHub MedicationDispense Status ValueSet (required)
MedicationDispense.statusReason[x] This element must be supported. 0..1 CodeableConcept Why a dispense was not performed
Binding: TRxHub MedicationDispense Status Reason ValueSet (required)
MedicationDispense.statusReason[x].id 0..1 string Unique id for inter-element referencing
MedicationDispense.statusReason[x].extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.statusReason[x].coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.statusReason[x].coding.id 0..1 string Unique id for inter-element referencing
MedicationDispense.statusReason[x].coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.statusReason[x].coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-status-reason
MedicationDispense.statusReason[x].coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.statusReason[x].coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.statusReason[x].coding.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.statusReason[x].coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.statusReason[x].text This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.category 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.
MedicationDispense.medication[x] This element must be supported. This element is included in summaries. 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.
MedicationDispense.medication[x].id 0..1 string Unique id for inter-element referencing
MedicationDispense.medication[x].extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.medication[x].Slices for coding This element must be supported. This element is included in summaries. 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
MedicationDispense.medication[x].Slices for coding.coding:pharmacode This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.id 0..1 string Unique id for inter-element referencing
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:2.51.1.3
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.medication[x].Slices for coding.coding:pharmacode.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.medication[x].Slices for coding.coding:gtin This element must be supported. This element is included in summaries. 0..1 Coding Code defined by a terminology system
MedicationDispense.medication[x].Slices for coding.coding:gtin.id 0..1 string Unique id for inter-element referencing
MedicationDispense.medication[x].Slices for coding.coding:gtin.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.medication[x].Slices for coding.coding:gtin.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Fixed Value: urn:oid:1.3.160
MedicationDispense.medication[x].Slices for coding.coding:gtin.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.medication[x].Slices for coding.coding:gtin.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.medication[x].Slices for coding.coding:gtin.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.medication[x].text This element must be supported. This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.subject This element must be supported. This element is included in summaries. C 1..1 Reference(Patient) Who the dispense is for
Constraints: trxhub-inv-patient-ref-only
MedicationDispense.context 0..1 Reference(Encounter | EpisodeOfCare) Encounter / Episode associated with event
MedicationDispense.supportingInformation This element must be supported. C 1..1 Reference(ServiceRequest) order-medication ServiceRequest
Constraints: trxhub-inv-service-request-ref-only
MedicationDispense.performer 0..* BackboneElement Who performed event
MedicationDispense.performer.id 0..1 string Unique id for inter-element referencing
MedicationDispense.performer.extension 0..* Extension Additional content defined by implementations
MedicationDispense.performer.modifierExtension This element is a modifier element. This element is included in summaries. 0..* Extension Extensions that cannot be ignored even if unrecognized
MedicationDispense.performer.function 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.
MedicationDispense.performer.actor 1..1 Reference(Practitioner | PractitionerRole | Organization | Patient | Device | RelatedPerson) Individual who was performing
MedicationDispense.location 0..1 Reference(Location) Where the dispense occurred
MedicationDispense.authorizingPrescription This element must be supported. C 1..1 Reference(MedicationRequest) Medication order that authorizes the dispense
Constraints: trxhub-inv-medication-request-ref-only
MedicationDispense.type This element must be supported. 0..1 CodeableConcept Trial fill, partial fill, emergency fill, etc.
Binding: TRxHub MedicationDispense Type ValueSet (required)
MedicationDispense.type.id 0..1 string Unique id for inter-element referencing
MedicationDispense.type.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.type.coding This element must be supported. This element is included in summaries. 1..1 Coding Code defined by a terminology system
MedicationDispense.type.coding.id 0..1 string Unique id for inter-element referencing
MedicationDispense.type.coding.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.type.coding.system This element must be supported. This element is included in summaries. 1..1 uri Identity of the terminology system
Required Pattern: https://trxhub.mediservice.ch/fhir/CodeSystem/trxhub-medication-dispense-type
MedicationDispense.type.coding.version This element is included in summaries. 0..1 string Version of the system - if relevant
MedicationDispense.type.coding.code This element must be supported. This element is included in summaries. 1..1 code Symbol in syntax defined by the system
MedicationDispense.type.coding.display This element is included in summaries. 0..1 string Representation defined by the system
MedicationDispense.type.coding.userSelected This element is included in summaries. 0..1 boolean If this coding was chosen directly by the user
MedicationDispense.type.text This element is included in summaries. 0..1 string Plain text representation of the concept
MedicationDispense.quantity This element must be supported. C 0..1 SimpleQuantity(4.0.1) Amount dispensed
Constraints: sqty-1
MedicationDispense.quantity.id 0..1 string Unique id for inter-element referencing
MedicationDispense.quantity.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.quantity.value This element must be supported. This element is included in summaries. 1..1 decimal Numerical value (with implicit precision)
MedicationDispense.quantity.unit This element is included in summaries. 0..1 string Unit representation
MedicationDispense.quantity.system This element is included in summaries. C 0..1 uri System that defines coded unit form
MedicationDispense.quantity.code This element is included in summaries. 0..1 code Coded form of the unit
MedicationDispense.daysSupply C 0..1 SimpleQuantity(4.0.1) Amount of medication expressed as a timing amount
Constraints: sqty-1
MedicationDispense.whenPrepared This element is included in summaries. 0..1 dateTime When product was packaged and reviewed
MedicationDispense.whenHandedOver This element must be supported. 0..1 dateTime When medicament was shipped
MedicationDispense.destination 0..1 Reference(Location) Where the medication was sent
MedicationDispense.receiver 0..* Reference(Patient | Practitioner) Who collected the medication
MedicationDispense.note This element must be supported. 0..1 Annotation Information about the dispense
MedicationDispense.note.id 0..1 string Unique id for inter-element referencing
MedicationDispense.note.extension 0..* Extension Additional content defined by implementations
Slice: Unordered, Open by value:url
MedicationDispense.note.author[x] This element is included in summaries. 0..1 Individual responsible for the annotation
MedicationDispense.note.author[x].authorReference Reference(Practitioner | Patient | RelatedPerson | Organization)
MedicationDispense.note.author[x].authorString string
MedicationDispense.note.time This element is included in summaries. 0..1 dateTime When the annotation was made
MedicationDispense.note.text This element must be supported. This element is included in summaries. 1..1 markdown The annotation - text content (as markdown)
MedicationDispense.dosageInstruction 0..* Dosage How the medication is to be used by the patient or administered by the caregiver
MedicationDispense.substitution This element must be supported. 0..1 BackboneElement Whether a substitution was performed on the dispense
MedicationDispense.substitution.id 0..1 string Unique id for inter-element referencing
MedicationDispense.substitution.extension 0..* Extension Additional content defined by implementations
MedicationDispense.substitution.modifierExtension This element is a modifier element. This element is included in summaries. 0..* Extension Extensions that cannot be ignored even if unrecognized
MedicationDispense.substitution.wasSubstituted This element must be supported. 1..1 boolean Whether a substitution was or was not performed on the dispense
MedicationDispense.substitution.type 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.
MedicationDispense.substitution.reason 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.
MedicationDispense.substitution.responsibleParty 0..* Reference(Practitioner | PractitionerRole) Who is responsible for the substitution
MedicationDispense.detectedIssue 0..* Reference(DetectedIssue) Clinical issue with action
MedicationDispense.eventHistory 0..* Reference(Provenance) A list of relevant lifecycle events

doco Documentation for this format

Terminology Bindings

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

Constraints

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:

  • The element 1 is sliced based on the value of MedicationDispense.medication[x].coding (Closed)

 

Other representations of profile: CSV, Excel, Schematron