PREFIX fhir:
PREFIX fhirvs:
PREFIX xsd:
BASE
start=@ AND {fhir:nodeRole [fhir:treeRoot]}
# Dispensing a medication to a named patient
CLOSED {
a [fhir:MedicationDispense];
fhir:nodeRole [fhir:treeRoot]?;
fhir:Resource.id @?; # Logical id of this artifact
fhir:Resource.meta @?; # Metadata about the resource
fhir:Resource.implicitRules @?; # A set of rules under which this
# content was created
fhir:Resource.language @?; # Language of the resource content
fhir:DomainResource.text @?; # Text summary of the resource, for
# human interpretation
fhir:DomainResource.contained @*; # Contained, inline Resources
fhir:DomainResource.extension @*; # Additional content defined by
# implementations
fhir:DomainResource.modifierExtension @*; # Extensions that cannot be ignored
fhir:MedicationDispense.identifier @*; # External identifier
fhir:MedicationDispense.partOf @*; # Event that dispense is part of
fhir:MedicationDispense.status @ AND
{fhir:value @fhirvs:medicationdispense-status}; # preparation | in-progress |
# cancelled | on-hold | completed |
# entered-in-error | stopped |
# declined | unknown
( # Why a dispense was not performed
fhir:MedicationDispense.statusReasonCodeableConcept @ |
fhir:MedicationDispense.statusReasonReference @
)?;
fhir:MedicationDispense.category @?; # Type of medication dispense
( # What medication was supplied
fhir:MedicationDispense.medicationCodeableConcept @ |
fhir:MedicationDispense.medicationReference @
);
fhir:MedicationDispense.subject @?; # Who the dispense is for
fhir:MedicationDispense.context @?; # Encounter / Episode associated
# with event
fhir:MedicationDispense.supportingInformation @*; # Information that supports the
# dispensing of the medication
fhir:MedicationDispense.performer @*; # Who performed event
fhir:MedicationDispense.location @?; # Where the dispense occurred
fhir:MedicationDispense.authorizingPrescription @*; # Medication order that authorizes
# the dispense
fhir:MedicationDispense.type @?; # Trial fill, partial fill,
# emergency fill, etc.
fhir:MedicationDispense.quantity @?; # Amount dispensed
fhir:MedicationDispense.daysSupply @?; # Amount of medication expressed as
# a timing amount
fhir:MedicationDispense.whenPrepared @?; # When product was packaged and
# reviewed
fhir:MedicationDispense.whenHandedOver @?; # When product was given out
fhir:MedicationDispense.destination @?; # Where the medication was sent
fhir:MedicationDispense.receiver @*; # Who collected the medication
fhir:MedicationDispense.note @*; # Information about the dispense
fhir:MedicationDispense.dosageInstruction @*; # How the medication is to be used
# by the patient or administered by
# the caregiver
fhir:MedicationDispense.substitution @?; # Whether a substitution was
# performed on the dispense
fhir:MedicationDispense.detectedIssue @*; # Clinical issue with action
fhir:MedicationDispense.eventHistory @*; # A list of relevant lifecycle events
fhir:index xsd:integer? # Relative position in a list
}
# Who performed event
CLOSED {
fhir:Element.id @?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored
# even if unrecognized
fhir:MedicationDispense.performer.function @?; # Who performed the dispense and
# what they did
fhir:MedicationDispense.performer.actor @; # Individual who was performing
fhir:index xsd:integer? # Relative position in a list
}
# Whether a substitution was performed on the dispense
CLOSED {
fhir:Element.id @?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored
# even if unrecognized
fhir:MedicationDispense.substitution.wasSubstituted @; # Whether a substitution was or was
# not performed on the dispense
fhir:MedicationDispense.substitution.type @?; # Code signifying whether a
# different drug was dispensed from
# what was prescribed
fhir:MedicationDispense.substitution.reason @*; # Why was substitution made
fhir:MedicationDispense.substitution.responsibleParty @*; # Who is responsible for the
# substitution
fhir:index xsd:integer? # Relative position in a list
}
#---------------------- Data Types -------------------
# Primitive Type dateTime
CLOSED {
fhir:Element.id @?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value @?; # Primitive value for dateTime
fhir:index xsd:integer? # Relative position in a list
}
# Metadata about a resource
CLOSED {
fhir:Element.id @?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:Meta.versionId @?; # Version specific identifier
fhir:Meta.lastUpdated @?; # When the resource version last
# changed
fhir:Meta.source @?; # Identifies where the resource
# comes from
fhir:Meta.profile @*; # Profiles this resource claims to
# conform to
fhir:Meta.security @*; # Security Labels applied to this
# resource
fhir:Meta.tag @*; # Tags applied to this resource
fhir:index xsd:integer? # Relative position in a list
}
# Primitive Type code
CLOSED {
fhir:Element.id @?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value @?; # Primitive value for code
fhir:index xsd:integer? # Relative position in a list
}
# A reference from one resource to another
CLOSED {
fhir:link IRI?;
fhir:Element.id @?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:Reference.reference @?; # Literal reference, Relative,
# internal or absolute URL
fhir:Reference.type @?; # Type the reference refers to (e.g.
# "Patient")
fhir:Reference.identifier @?; # Logical reference, when literal
# reference is not known
fhir:Reference.display @?; # Text alternative for the resource
fhir:index xsd:integer? # Relative position in a list
}
# Base Resource
{a .+;
fhir:Resource.id @?; # Logical id of this artifact
fhir:Resource.meta @?; # Metadata about the resource
fhir:Resource.implicitRules @?; # A set of rules under which this
# content was created
fhir:Resource.language @?; # Language of the resource content
fhir:index xsd:integer?
}
# A fixed quantity (no comparator)
CLOSED {
fhir:Element.id @?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:Quantity.value @?; # Numerical value (with implicit
# precision)
fhir:Quantity.unit @?; # Unit representation
fhir:Quantity.system @?; # System that defines coded unit form
fhir:Quantity.code @?; # Coded form of the unit
fhir:index xsd:integer? # Relative position in a list
}
# How the medication is/was taken or should be taken
CLOSED {
fhir:Element.id @?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:BackboneElement.modifierExtension @*; # Extensions that cannot be ignored
# even if unrecognized
fhir:Dosage.sequence @?; # The order of the dosage
# instructions
fhir:Dosage.text @?; # Free text dosage instructions e.g.
# SIG
fhir:Dosage.additionalInstruction @*; # Supplemental instruction or
# warnings to the patient - e.g.
# "with meals", "may cause
# drowsiness"
fhir:Dosage.patientInstruction @?; # Patient or consumer oriented
# instructions
fhir:Dosage.timing @?; # When medication should be
# administered
( # Take "as needed" (for x)
fhir:Dosage.asNeededBoolean @ |
fhir:Dosage.asNeededCodeableConcept @
)?;
fhir:Dosage.site @?; # Body site to administer to
fhir:Dosage.route @?; # How drug should enter body
fhir:Dosage.method @?; # Technique for administering
# medication
fhir:Dosage.doseAndRate @*; # Amount of medication administered
fhir:Dosage.maxDosePerPeriod @?; # Upper limit on medication per unit
# of time
fhir:Dosage.maxDosePerAdministration @?; # Upper limit on medication per
# administration
fhir:Dosage.maxDosePerLifetime @?; # Upper limit on medication per
# lifetime of the patient
fhir:index xsd:integer? # Relative position in a list
}
# Primitive Type uri
CLOSED {
fhir:Element.id @?; # xml:id (or equivalent in JSON)
fhir:Element.extension @*; # Additional content defined by
# implementations
fhir:value @?; # Primitive value for uri
fhir:index xsd:integer? # Relative position in a list
}
# Text node with attribution
CLOSED {
fhir:Element.id @?; # Unique id for inter-element
# referencing
fhir:Element.extension @*; # Additional content defined by
# implementations
( # Individual responsible for the
# annotation
fhir:Annotation.authorReference @ |
fhir:Annotation.authorString @
)?;
fhir:Annotation.time @?; # When the annotation was made
fhir:Annotation.text @; # The annotation - text content (as
# markdown)
fhir:index xsd:integer? # Relative position in a list
}
# Optional Extensions Element
CLOSED {
fhir:Element.id @?;
fhir:Element.extension @*;
fhir:Extension.url @;
(
fhir:Extension.valueBase64Binary @ |
fhir:Extension.valueBoolean @ |
fhir:Extension.valueCanonical @ |
fhir:Extension.valueCode @ |
fhir:Extension.valueDate @ |
fhir:Extension.valueDateTime @ |
fhir:Extension.valueDecimal @ |
fhir:Extension.valueId @ |
fhir:Extension.valueInstant @ |
fhir:Extension.valueInteger @ |
fhir:Extension.valueMarkdown @ |
fhir:Extension.valueOid @ |
fhir:Extension.valuePositiveInt @ |
fhir:Extension.valueString @ |
fhir:Extension.valueTime @