Foundation
Publish-box
(todo)
This
is
the
Continuous
Integration
Build
of
FHIR
(will
be
incorrect/inconsistent
at
times).
See
the
Directory
of
published
versions
| Responsible Owner: Pharmacy Work Group | Standards Status : Informative | Compartments : Encounter , Group , Patient , Practitioner |
ShEx statement for medicationdispense
PREFIX fhir: <http://hl7.org/fhir/> PREFIX fhirvs: <http://hl7.org/fhir/ValueSet/> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>IMPORT <code.shex># ShEx Version 2.2 IMPORT <Code.shex> IMPORT <Group.shex> IMPORT <Dosage.shex> IMPORT <Device.shex> IMPORT <Patient.shex>IMPORT <boolean.shex> IMPORT <dateTime.shex>IMPORT <Boolean.shex> IMPORT <DateTime.shex> IMPORT <Location.shex> IMPORT <Quantity.shex>IMPORT <markdown.shex>IMPORT <Markdown.shex> IMPORT <CareTeam.shex> IMPORT <CarePlan.shex> IMPORT <Resource.shex> IMPORT <Reference.shex> IMPORT <Encounter.shex> IMPORT <Procedure.shex> IMPORT <Identifier.shex> IMPORT <Annotation.shex> IMPORT <Provenance.shex>IMPORT <positiveInt.shex>IMPORT <PositiveInt.shex> IMPORT <Organization.shex> IMPORT <Practitioner.shex> IMPORT <RelatedPerson.shex> IMPORT <DomainResource.shex> IMPORT <CodeableConcept.shex> IMPORT <BackboneElement.shex> IMPORT <PractitionerRole.shex> IMPORT <CodeableReference.shex> IMPORT <MedicationRequest.shex> IMPORT <MedicationAdministration.shex> start=@<MedicationDispense> AND {fhir:nodeRole [fhir:treeRoot]} # Dispensing a medication to a named patient <MedicationDispense> EXTENDS @<DomainResource> CLOSED { a [fhir:MedicationDispense]?;fhir:nodeRole [fhir:treeRoot]?; fhir:identifier @<OneOrMore_Identifier>?; # External identifier fhir:basedOn @<OneOrMore_Reference_CarePlan>?; # Plan that is fulfilled by this # dispense fhir:partOf @<OneOrMore_Reference_MedicationAdministration_OR_Procedure>?; # Event that dispense is part offhir:status @<code> ANDfhir:status @<Code> AND {fhir:v @fhirvs:medicationdispense-status}; # preparation | in-progress | # cancelled | on-hold | completed |# entered-in-error | stopped |# entered-in-error | unfulfilled | # declined | unknown fhir:notPerformedReason @<CodeableReference>?; # Why a dispense was not performedfhir:statusChanged @<dateTime>?; # When the status changedfhir:statusChanged @<DateTime>?; # When the status changed fhir:category @<OneOrMore_CodeableConcept>?; # Type of medication dispensefhir:medication @<CodeableReference>; # What medication was supplied fhir:subject @<Reference> AND {fhir:linkfhir:medication @<CodeableReference>; # What medication was (or was # intended to be) supplied fhir:subject @<Reference> AND {fhir:l @<Group> OR @<Patient> ? }; # Who the dispense is forfhir:encounter @<Reference> AND {fhir:linkfhir:encounter @<Reference> AND {fhir:l @<Encounter> ? }?; # Encounter associated with event fhir:supportingInformation @<OneOrMore_Reference_Resource>?; # Information that supports the # dispensing of the medication fhir:performer @<OneOrMore_MedicationDispense.performer>?; # Who performed eventfhir:location @<Reference> AND {fhir:linkfhir:location @<Reference> AND {fhir:l @<Location> ? }?; # Where the dispense occurred fhir:authorizingPrescription @<OneOrMore_Reference_MedicationRequest>?; # Medication order that authorizes # the dispense fhir:type @<CodeableConcept>?; # Trial fill, partial fill, # emergency fill, etcfhir:quantity @<Quantity>?; # Amount dispensedfhir:quantity @<Quantity>?; # Amount of medication fhir:daysSupply @<Quantity>?; # Amount of medication expressed as # a timing amountfhir:fillNumber @<positiveInt>?; # A number that represents the knownfhir:fillNumber @<PositiveInt>?; # A number that represents the known # fill this dispense representsfhir:recorded @<dateTime>?; # When the recording of the dispensefhir:recorded @<DateTime>?; # When the recording of the dispense # startedfhir:whenPrepared @<dateTime>?; # When product was packaged andfhir:whenPrepared @<DateTime>?; # When product was packaged and # reviewedfhir:whenHandedOver @<dateTime>?; # When product was given out fhir:destination @<Reference> AND {fhir:linkfhir:whenHandedOver @<DateTime>?; # When product was given out fhir:destination @<Reference> AND {fhir:l @<Location> ? }?; # Where the medication was/will be # sentfhir:receiver @<OneOrMore_Reference_Group_OR_Location_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson>?; # Who collected the medication orfhir:receiver @<OneOrMore_Reference_Group_OR_Location_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson>?; # Who collected the medication or # where the medication was delivered fhir:note @<OneOrMore_Annotation>?; # Information about the dispensefhir:renderedDosageInstruction @<markdown>?; # Full representation of the dosagefhir:renderedDosageInstruction @<Markdown>?; # Full representation of the dosage # instructions fhir:dosageInstruction @<OneOrMore_Dosage>?; # How the medication is to be used # by the patient or administered by # the caregiver fhir:doseAdministrationAid @<CodeableConcept>?; # Type of adherence packaging to use # for the dispense fhir:substitution @<MedicationDispense.substitution>?; # Whether a substitution was # performed on the dispense fhir:eventHistory @<OneOrMore_Reference_Provenance>?; # A list of relevant lifecycle events } # Whether a substitution was performed on the dispense <MedicationDispense.substitution> EXTENDS @<BackboneElement> CLOSED { fhir:wasSubstituted @<Boolean>; # Whether a substitution was or was # not performed on the dispense fhir:type @<CodeableConcept>?; # Code signifying whether a # different drug was dispensed from # what was prescribed fhir:reason @<OneOrMore_CodeableConcept>?; # Why was substitution made fhir:responsibleParty @<Reference> AND {fhir:l @<Organization> OR @<Practitioner> OR @<PractitionerRole> ? }?; # Who is responsible for the # substitution } # Who performed event <MedicationDispense.performer> EXTENDS @<BackboneElement> CLOSED { fhir:function @<CodeableConcept>?; # Who performed the dispense and # what they didfhir:actor @<Reference> AND {fhir:linkfhir:actor @<Reference> AND {fhir:l @<CareTeam> OR @<Device> OR @<Group> OR @<Organization> OR @<Patient> OR @<Practitioner> OR @<PractitionerRole> OR @<RelatedPerson> ? }; # Individual who was performing }# Whether a substitution was performed on the dispense <MedicationDispense.substitution> EXTENDS @<BackboneElement> CLOSED { fhir:wasSubstituted @<boolean>; # Whether a substitution was or was # not performed on the dispense fhir:type @<CodeableConcept>?; # Code signifying whether a # different drug was dispensed from # what was prescribed fhir:reason @<OneOrMore_CodeableConcept>?; # Why was substitution made fhir:responsibleParty @<Reference> AND {fhir:link @<Organization> OR @<Practitioner> OR @<PractitionerRole> ? }?; # Who is responsible for the # substitution }#---------------------- Cardinality Types (OneOrMore) ------------------- <OneOrMore_Identifier> CLOSED { rdf:first @<Identifier> ; rdf:rest [rdf:nil] OR @<OneOrMore_Identifier> } <OneOrMore_Reference_CarePlan> CLOSED {rdf:first @<Reference> AND {fhir:linkrdf:first @<Reference> AND {fhir:l @<CarePlan> } ; rdf:rest [rdf:nil] OR @<OneOrMore_Reference_CarePlan> } <OneOrMore_Reference_MedicationAdministration_OR_Procedure> CLOSED {rdf:first @<Reference> AND {fhir:linkrdf:first @<Reference> AND {fhir:l @<MedicationAdministration> OR @<Procedure> } ; rdf:rest [rdf:nil] OR @<OneOrMore_Reference_MedicationAdministration_OR_Procedure> } <OneOrMore_CodeableConcept> CLOSED { rdf:first @<CodeableConcept> ; rdf:rest [rdf:nil] OR @<OneOrMore_CodeableConcept> } <OneOrMore_Reference_Resource> CLOSED {rdf:first @<Reference> AND {fhir:linkrdf:first @<Reference> AND {fhir:l @<Resource> } ; rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Resource> } <OneOrMore_MedicationDispense.performer> CLOSED { rdf:first @<MedicationDispense.performer> ; rdf:rest [rdf:nil] OR @<OneOrMore_MedicationDispense.performer> } <OneOrMore_Reference_MedicationRequest> CLOSED {rdf:first @<Reference> AND {fhir:linkrdf:first @<Reference> AND {fhir:l @<MedicationRequest> } ; rdf:rest [rdf:nil] OR @<OneOrMore_Reference_MedicationRequest> }<OneOrMore_Reference_Group_OR_Location_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson> CLOSED { rdf:first @<Reference> AND {fhir:link<OneOrMore_Reference_Group_OR_Location_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson> CLOSED { rdf:first @<Reference> AND {fhir:l @<Group> OR @<Location> OR @<Organization> OR @<Patient> OR @<Practitioner> OR @<PractitionerRole> OR @<RelatedPerson> } ;rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Group_OR_Location_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson>rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Group_OR_Location_OR_Organization_OR_Patient_OR_Practitioner_OR_PractitionerRole_OR_RelatedPerson> } <OneOrMore_Annotation> CLOSED { rdf:first @<Annotation> ; rdf:rest [rdf:nil] OR @<OneOrMore_Annotation> } <OneOrMore_Dosage> CLOSED { rdf:first @<Dosage> ; rdf:rest [rdf:nil] OR @<OneOrMore_Dosage> } <OneOrMore_Reference_Provenance> CLOSED {rdf:first @<Reference> AND {fhir:linkrdf:first @<Reference> AND {fhir:l @<Provenance> } ; rdf:rest [rdf:nil] OR @<OneOrMore_Reference_Provenance> } #---------------------- Value Sets ------------------------ # MedicationDispense Status Codesfhirvs:medicationdispense-status ["preparation" "in-progress" "cancelled" "on-hold" "completed" "entered-in-error" "stopped" "declined" "unknown"]fhirvs:medicationdispense-status ["preparation" "in-progress" "cancelled" "on-hold" "completed" "entered-in-error" "unfulfilled" "declined" "unknown"]
Usage note: every effort has been made to ensure that the ShEx files are correct and useful, but they are not a normative part of the specification.
FHIR
®©
HL7.org
2011+.
FHIR
R6
hl7.fhir.core#6.0.0-ballot3
generated
on
Tue,
Apr
1,
Mon,
Nov
10,
2025
12:25+1100.
15:22+0000.
Links:
Search
|
Version
History
|
Contents
|
Glossary
|
QA
|
Compare
to
R4
|
Compare
to
R5
|
Compare
to
Last
Ballot
|
|
Propose
a
change