DSTU2

This page is part of the FHIR Specification (v1.0.2: DSTU 2). The current version which supercedes this version is 5.0.0. For a full list of available versions, see the Directory of published versions

StructureDefinition: QICore-MedicationDispense - XML

QICore-MedicationDispense

<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="qicore-medicationdispense"/>
  <text>
    <status value="generated"/>
    <div xmlns="http://www.w3.org/1999/xhtml">to do</div>
  </text>
  <url value="http://hl7.org/fhir/StructureDefinition/qicore-medicationdispense"/>
  <name value="QICore-MedicationDispense"/>
  <status value="draft"/>
  <publisher value="Health Level Seven International (Clinical Quality Information - QICore)"/>
  <contact>
    <telecom>
      <system value="other"/>
      <value value="http://hl7.org/special/committees/CQI"/>
    </telecom>
  </contact>
  <date value="2015-02-27"/>
  <description value="Profile of MedicationDispense for decision support/quality metrics. Defines the core set
   of elements and extensions for quality rule and measure authors."/>
  <fhirVersion value="1.0.2"/>
  <mapping>
    <identity value="qdm"/>
    <uri value="http://www.healthit.gov/quality-data-model"/>
    <name value="Quality Data Model"/>
  </mapping>
  <mapping>
    <identity value="qidam"/>
    <uri value="http://www.hl7.org/implement/standards/product_brief.cfm?product_id=378"/>
    <name value="Quality Improvement Domain Analysis Model"/>
  </mapping>
  <kind value="resource"/>
  <constrainedType value="MedicationDispense"/>
  <abstract value="false"/>
  <base value="http://hl7.org/fhir/StructureDefinition/MedicationDispense"/>
  <snapshot>
    <element>
      <path value="MedicationDispense"/>
      <name value="QICore-MedicationDispense"/>
      <short value="Dispensing a medication to a named patient"/>
      <definition value="Indicates that a medication product is to be or has been dispensed for a named person/patient.
        This includes a description of the medication product (supply) provided and the instructions
       for administering the medication.  The medication dispense is the result of a pharmacy
       system responding to a medication order."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="MedicationDispense"/>
      </type>
      <constraint>
        <key value="mdd-1"/>
        <severity value="error"/>
        <human value="whenHandedOver cannot be before whenPrepared"/>
        <xpath value="not(exists(f:whenHandedOver/@value)) or not(exists(f:whenPrepared/@value)) or ( f:whenHandedOver/@va
        lue &gt;= f:whenPrepared/@value)"/>
      </constraint>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="Supply[moodCode=EVN]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="clinical.medication"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="Medication, Dispensed"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.id"/>
      <short value="Logical id of this artifact"/>
      <definition value="The logical id of the resource, as used in the URL for the resource. Once assigned, this
       value never changes."/>
      <comments value="The only time that a resource does not have an id is when it is being submitted to the
       server using a create operation. Bundles always have an id, though it is usually a generated
       UUID."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.meta"/>
      <short value="Metadata about the resource"/>
      <definition value="The metadata about the resource. This is content that is maintained by the infrastructure.
       Changes to the content may not always be associated with version changes to the resource."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.meta"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Meta"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.implicitRules"/>
      <short value="A set of rules under which this content was created"/>
      <definition value="A reference to a set of rules that were followed when the resource was constructed, and
       which must be understood when processing the content."/>
      <comments value="Asserting this rule set restricts the content to be only understood by a limited set of
       trading partners. This inherently limits the usefulness of the data in the long term.
       However, the existing health eco-system is highly fractured, and not yet ready to define,
       collect, and exchange data in a generally computable sense. Wherever possible, implementers
       and/or specification writers should avoid using this element as much as possible."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.implicitRules"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="uri"/>
      </type>
      <isModifier value="true"/>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.language"/>
      <short value="Language of the resource content"/>
      <definition value="The base language in which the resource is written."/>
      <comments value="Language is provided to support indexing and accessibility (typically, services such as
       text to speech use the language tag). The html language tag in the narrative applies 
       to the narrative. The language tag on the resource may be used to specify the language
       of other presentations generated from the data in the resource  Not all the content has
       to be in the base language. The Resource.language should not be assumed to apply to the
       narrative automatically. If a language is specified, it should it also be specified on
       the div element in the html (see rules in HTML5 for information about the relationship
       between xml:lang and the html lang attribute)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.language"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <binding>
        <strength value="required"/>
        <description value="A human language."/>
        <valueSetUri value="http://tools.ietf.org/html/bcp47"/>
      </binding>
    </element>
    <element>
      <path value="MedicationDispense.text"/>
      <short value="Text summary of the resource, for human interpretation"/>
      <definition value="A human-readable narrative that contains a summary of the resource, and may be used to
       represent the content of the resource to a human. The narrative need not encode all the
       structured data, but is required to contain sufficient detail to make it &quot;clinically
       safe&quot; for a human to just read the narrative. Resource definitions may define what
       content should be represented in the narrative to ensure clinical safety."/>
      <comments value="Contained resources do not have narrative. Resources that are not contained SHOULD have
       a narrative."/>
      <alias value="narrative"/>
      <alias value="html"/>
      <alias value="xhtml"/>
      <alias value="display"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Narrative"/>
      </type>
      <condition value="dom-1"/>
      <mapping>
        <identity value="rim"/>
        <map value="Act.text?"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.contained"/>
      <short value="Contained, inline Resources"/>
      <definition value="These resources do not have an independent existence apart from the resource that contains
       them - they cannot be identified independently, and nor can they have their own independent
       transaction scope."/>
      <comments value="This should never be done when the content can be identified properly, as once identification
       is lost, it is extremely difficult (and context dependent) to restore it again."/>
      <alias value="inline resources"/>
      <alias value="anonymous resources"/>
      <alias value="contained resources"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.contained"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Resource"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the resource. In order to make the use of extensions safe and manageable, there is
       a strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.extension"/>
      <name value="MedicationDispense.validityPeriod"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/medicationdispense-validityPeriod"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dispense.validityPeriod"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.extension"/>
      <name value="MedicationDispense.refillsRemaining"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-refillsRemaining"/>
      </type>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="refills"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the resource, and that modifies the understanding of the element that contains it.
       Usually modifier elements provide negation or qualification. In order to make the use
       of extensions safe and manageable, there is a strict set of governance applied to the
       definition and use of extensions. Though any implementer is allowed to define an extension,
       there is a set of requirements that SHALL be met as part of the definition of the extension.
       Applications processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.identifier"/>
      <short value="External identifier"/>
      <definition value="Identifier assigned by the dispensing facility - this is an identifier assigned outside
       FHIR."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.identifier"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Identifier"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".id"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="id"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.status"/>
      <short value="in-progress | on-hold | completed | entered-in-error | stopped"/>
      <definition value="A code specifying the state of the set of dispense events."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.status"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="code"/>
      </type>
      <mustSupport value="true"/>
      <isModifier value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="required"/>
        <description value="A code specifying the state of the dispense event."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/medication-dispense-status"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value=".status"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="status"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.patient"/>
      <short value="Who the dispense is for"/>
      <definition value="A link to a resource representing the person to whom the medication will be given."/>
      <comments value="SubstanceAdministration-&gt;subject-&gt;Patient."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.patient"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-patient"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="PID-3-Patient ID List"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=SBJ].role[classCode=PAT]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="who.focus"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dispenser"/>
      <short value="Practitioner responsible for dispensing medication"/>
      <definition value="The individual responsible for dispensing the medication."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dispenser"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-10-Dispensing Provider / PRT-5-Participation Person: PRT-4-Participation='DP' (RXD-10
         is deprecated)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=PFM].role[classCode=ASSIGN]"/>
      </mapping>
      <mapping>
        <identity value="w5"/>
        <map value="who.actor"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.authorizingPrescription"/>
      <short value="Medication order that authorizes the dispense"/>
      <definition value="Indicates the medication order that is being dispensed against."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.authorizingPrescription"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-medicationorder"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="ORC-2 Placer Order Number"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=FLFS].target[moodCode=RQO]"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.type"/>
      <short value="Trial fill, partial fill, emergency fill, etc."/>
      <definition value="Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion
       of Trial, Partial Fill, Emergency Fill, Samples, etc."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.type"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="Indicates the type of dispensing event that is performed. For example, Trial Fill, Completion
         of Trial, Partial Fill, Emergency Fill, Samples, etc."/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-ActPharmacySupplyType"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-33-Dispense Type"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.quantity"/>
      <short value="Amount dispensed"/>
      <definition value="The amount of medication that has been dispensed. Includes unit of measure."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.quantity"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Quantity"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-4-Actual Dispense Amount / RXD-5.1-Actual Dispense Units.code / RXD-5.3-Actual Dispense
         Units.name of coding system"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".quantity"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.daysSupply"/>
      <short value="Days Supply"/>
      <definition value="The amount of medication expressed as a timing amount."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.daysSupply"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Quantity"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.medication[x]"/>
      <short value="What medication was supplied"/>
      <definition value="Identifies the medication being administered. This is either a link to a resource representing
       the details of the medication or a simple attribute carrying a code that identifies the
       medication from a known list of medications."/>
      <comments value="If only a code is specified, then it needs to be a code for a specific product.  If more
       information is required, then the use of the medication resource is recommended.  Note:
       do not use Medication.name to describe the dispensed medication. When the only available
       information is a text description of the medication, Medication.code.text should be used."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.medication[x]"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/Medication"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="The set of RxNorm codes to represent medications"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-medication-codes"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-2-Dispense/Give Code"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=PRD].role"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="primary code"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.whenPrepared"/>
      <short value="Dispense processing time"/>
      <definition value="The time when the dispensed product was packaged and reviewed."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.whenPrepared"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-3-Date/Time Dispensed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".effectiveTime[xmi:type=IVL_TS].low"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.whenHandedOver"/>
      <short value="When product was given out"/>
      <definition value="The time the dispensed product was provided to the patient or their representative."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.whenHandedOver"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="dateTime"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-3-Date/Time Dispensed"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".effectiveTime[xmi:type=IVL_TS].high"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="stop datetime"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.destination"/>
      <short value="Where the medication was sent"/>
      <definition value="Identification of the facility/location where the medication was shipped to, as part of
       the dispense event."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.destination"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-13 Dispense-to Location; RXD-30 Dispense to Pharmacy; RXD-31 Dispense to Pharmacy
         Address"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=DST].role"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.receiver"/>
      <short value="Who collected the medication"/>
      <definition value="Identifies the person who picked up the medication.  This will usually be a patient or
       their caregiver, but some cases exist where it can be a healthcare professional."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.receiver"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-patient"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=RCV].role"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.note"/>
      <short value="Information about the dispense"/>
      <definition value="Extra information about the dispense that could not be conveyed in the other attributes."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.note"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXD-9 Dispense Notes"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction"/>
      <short value="Medicine administration instructions to the patient/caregiver"/>
      <definition value="Indicates how the medication is to be used by the patient."/>
      <comments value="When the dose or rate is intended to change over the entire administration period (e.g.
       Tapering dose prescriptions), multiple instances of dosage instructions will need to be
       supplied to convey the different doses/rates."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.dosageInstruction"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=INT]"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.doseType"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-doseType"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="Medication dose types (e.g., loading, maintenance, etc.)"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-medication-dose-type"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.doseType"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.infuseOver"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-infuseOver"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.infuseOver"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.rateIncrement"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrement"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.rateIncrement"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.rateIncrementInterval"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrementInterval"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.rateIncrementInterval"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.rateGoal"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateGoal"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.rateGoal"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.minDosePerPeriod"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-minDosePerPeriod"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.minDosePerPeriod"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.maxDeliveryRate"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryRate"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.maxDeliveryRate"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.maxDeliveryVolume"/>
      <short value="Extension"/>
      <definition value="An Extension"/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryVolume"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.maxDeliveryVolume"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element, and that modifies the understanding of the element that contains it. Usually
       modifier elements provide negation or qualification. In order to make the use of extensions
       safe and manageable, there is a strict set of governance applied to the definition and
       use of extensions. Though any implementer is allowed to define an extension, there is
       a set of requirements that SHALL be met as part of the definition of the extension. Applications
       processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.text"/>
      <short value="Dosage Instructions"/>
      <definition value="Free text dosage instructions can be used for cases where the instructions are too complex
       to code. When coded instructions are present, the free text instructions may still be
       present for display to humans taking or administering the medication."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.text"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="string"/>
      </type>
      <isSummary value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.additionalInstructions"/>
      <short value="E.g. &quot;Take with food&quot;"/>
      <definition value="Additional instructions such as &quot;Swallow with plenty of water&quot; which may or
       may not be coded."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.additionalInstructions"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="Codes identifying additional instructions such as &quot;take with water&quot; or &quot;avoid
         operating heavy machinery&quot;"/>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value=".text"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.timing"/>
      <short value="When medication should be administered"/>
      <definition value="The timing schedule for giving the medication to the patient.  The Schedule data type
       allows many different expressions.  For example, &quot;Every  8 hours&quot;; &quot;Three
       times a day&quot;; &quot;1/2 an hour before breakfast for 10 days from 23-Dec 2011:&quot;;
        &quot;15 Oct 2013, 17 Oct 2013 and 1 Nov 2013&quot;."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.timing"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Timing"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".effectiveTime"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="frequency"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.asNeeded[x]"/>
      <short value="Take &quot;as needed&quot; f(or x)"/>
      <definition value="Indicates whether the Medication is only taken when needed within a specific dosing schedule
       (Boolean option), or it indicates the precondition for taking the Medication (CodeableConcept).
          Specifically if 'boolean' datatype is selected, then the following logic applies: 
       If set to True, this indicates that the medication is only taken when needed, within the
       specified schedule."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.asNeeded[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="boolean"/>
      </type>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="A coded concept identifying the precondition that should be met or evaluated prior to
         consuming or administering a medication dose.  For example &quot;pain&quot;, &quot;30
         minutes prior to sexual intercourse&quot;, &quot;on flare-up&quot; etc."/>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value="boolean: .outboundRelationship[typeCode=PRCN].negationInd (inversed - so negationInd =
         true means asNeeded=false  CodeableConcept: .outboundRelationship[typCode=PRCN].target[classCode=OBS
        , moodCode=EVN, isCriterionInd=true, code=&quot;Assertion&quot;].value"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.site[x]"/>
      <short value="Body site to administer to"/>
      <definition value="A coded specification of the anatomic site where the medication first enters the body."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.site[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/BodySite"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <strength value="preferred"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-bodysite"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="RXR-2-Administration Site"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".approachSiteCode"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.route"/>
      <short value="How drug should enter body"/>
      <definition value="A code specifying the route or physiological path of administration of a therapeutic agent
       into or onto a subject."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.route"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="A coded concept describing the route or physiological path of administration of a therapeutic
         agent into or onto the body of a subject"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/route-codes"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="RXR-1-Route"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".routeCode"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="route"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.method"/>
      <short value="Technique for administering medication"/>
      <definition value="A coded value indicating the method by which the medication is intended to be or was introduced
       into or on the body."/>
      <comments value="This attribute will most often NOT be populated.  It is most commonly used for injections.
        For example, Slow Push, Deep IV.  One of the reasons this attribute is not used often,
       is that the method is often pre-coordinated with the route and/or form of administration.
        This means the codes used in route or form may pre-coordinate the method in the route
       code or the form code.  The implementation decision about what coding system to use for
       route or form code will determine how frequently the method code will be populated e.g.
       if route or form code pre-coordinate method code, then this attribute will not be populated
       often; if there is no pre-coordination then method code may  be used frequently."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.method"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="A coded concept describing the technique by which the medicine is administered"/>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="RXR-4-Administration Method"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".methodCode"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.dose[x]"/>
      <short value="Amount of medication per dose"/>
      <definition value="The amount of therapeutic or other substance given at one administration event."/>
      <comments value="Note that this specifies the quantity of the specified medication, not the quantity of
       active ingredient(s).  The prescribed strength can be calculated by multiplying the doseQuantity
       by the strength of each active ingredient in the prescribed Medication. If the administration
       is not intended to be instantaneous (rate is present or timing has a duration), this can
       be specified to convey the total amount to be administered over the period of time as
       indicated by the schedule."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.dose[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Range"/>
      </type>
      <type>
        <code value="Quantity"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/SimpleQuantity"/>
      </type>
      <mustSupport value="true"/>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXE-23-Give Rate Amount / RXE-24.1-Give Rate Units.code / RXE-24.3-Give Rate Units.name
         of coding system"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".doseQuantity"/>
      </mapping>
      <mapping>
        <identity value="qdm"/>
        <map value="dose"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.rate[x]"/>
      <short value="Amount of medication per unit of time"/>
      <definition value="Identifies the speed with which the medication was or will be introduced into the patient.
       Typically the rate for an infusion e.g. 100 ml per 1 hour or 100 ml/hr.  May also be expressed
       as a rate per unit of time e.g. 500 ml per 2 hours.   Currently we do not specify a default
       of '1' in the denominator, but this is being discussed. Other examples: 200 mcg/min or
       200 mcg/1 minute; 1 liter/8 hours."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.rate[x]"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Ratio"/>
      </type>
      <type>
        <code value="Range"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXE-22-Give Per (Time Unit)"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".rateQuantity"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.maxDosePerPeriod"/>
      <short value="Upper limit on medication per unit of time"/>
      <definition value="The maximum total quantity of a therapeutic substance that may be administered to a subject
       over the period of time,  e.g. 1000mg in 24 hours."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.dosageInstruction.maxDosePerPeriod"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="Ratio"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="v2"/>
        <map value="RXE-4-Give Amount - Maximum / RXE-5-Give Units"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".maxDoseQuantity"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution"/>
      <short value="Deals with substitution of one medicine for another"/>
      <definition value="Indicates whether or not substitution was made as part of the dispense.  In some cases
       substitution will be expected but does not happen, in other cases substitution is not
       expected but does happen.  This block explains what substitution did or did not happen
       and why."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.substitution"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="BackboneElement"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".outboundRelationship[typeCode=COMP].target[classCode=SUBST, moodCode=EVN]"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution.id"/>
      <representation value="xmlAttr"/>
      <short value="xml:id (or equivalent in JSON)"/>
      <definition value="unique id for the element within a resource (for internal references)."/>
      <min value="0"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.substitution.id"/>
        <min value="0"/>
        <max value="1"/>
      </base>
      <type>
        <code value="id"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution.extension"/>
      <short value="Additional Content defined by implementations"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element. In order to make the use of extensions safe and manageable, there is a
       strict set of governance  applied to the definition and use of extensions. Though any
       implementer is allowed to define an extension, there is a set of requirements that SHALL
       be met as part of the definition of the extension."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.substitution.extension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <mapping>
        <identity value="rim"/>
        <map value="n/a"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution.modifierExtension"/>
      <short value="Extensions that cannot be ignored"/>
      <definition value="May be used to represent additional information that is not part of the basic definition
       of the element, and that modifies the understanding of the element that contains it. Usually
       modifier elements provide negation or qualification. In order to make the use of extensions
       safe and manageable, there is a strict set of governance applied to the definition and
       use of extensions. Though any implementer is allowed to define an extension, there is
       a set of requirements that SHALL be met as part of the definition of the extension. Applications
       processing a resource are required to check for modifier extensions."/>
      <comments value="There can be no stigma associated with the use of extensions by any application, project,
       or standard - regardless of the institution or jurisdiction that uses or defines the extensions.
        The use of extensions is what allows the FHIR specification to retain a core level of
       simplicity for everyone."/>
      <alias value="extensions"/>
      <alias value="user content"/>
      <alias value="modifiers"/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.substitution.modifierExtension"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Extension"/>
      </type>
      <isModifier value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value="N/A"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution.type"/>
      <short value="Type of substitution"/>
      <definition value="A code signifying whether a different drug was dispensed from what was prescribed."/>
      <min value="1"/>
      <max value="1"/>
      <base>
        <path value="MedicationDispense.substitution.type"/>
        <min value="1"/>
        <max value="1"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="A coded concept describing whether a different medicinal product may be dispensed other
         than the product as specified exactly in the prescription"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-ActSubstanceAdminSubstitutionCode"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="v2"/>
        <map value="RXO-9-Allow Substitutions / RXE-9-Substitution Status"/>
      </mapping>
      <mapping>
        <identity value="rim"/>
        <map value=".code"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution.reason"/>
      <short value="Why was substitution made"/>
      <definition value="Indicates the reason for the substitution of (or lack of substitution) from what was prescribed."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.substitution.reason"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="CodeableConcept"/>
      </type>
      <isSummary value="true"/>
      <binding>
        <strength value="example"/>
        <description value="A coded concept describing the reason that a different medication should (or should not)
         be substituted from what was prescribed"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/v3-SubstanceAdminSubstitutionReason"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="rim"/>
        <map value=".reasonCode"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution.responsibleParty"/>
      <short value="Who is responsible for the substitution"/>
      <definition value="The person or organization that has primary responsibility for the substitution."/>
      <min value="0"/>
      <max value="*"/>
      <base>
        <path value="MedicationDispense.substitution.responsibleParty"/>
        <min value="0"/>
        <max value="*"/>
      </base>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
      <isSummary value="true"/>
      <mapping>
        <identity value="rim"/>
        <map value=".participation[typeCode=PFM].role[classCode=ASSIGN]"/>
      </mapping>
    </element>
  </snapshot>
  <differential>
    <element>
      <path value="MedicationDispense"/>
      <name value="QICore-MedicationDispense"/>
      <min value="0"/>
      <max value="*"/>
      <type>
        <code value="MedicationDispense"/>
      </type>
      <mapping>
        <identity value="qdm"/>
        <map value="Medication, Dispensed"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.extension"/>
      <name value="MedicationDispense.validityPeriod"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/medicationdispense-validityPeriod"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dispense.validityPeriod"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.extension"/>
      <name value="MedicationDispense.refillsRemaining"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-refillsRemaining"/>
      </type>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="refills"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.status"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.patient"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-patient"/>
      </type>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.dispenser"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
    </element>
    <element>
      <path value="MedicationDispense.authorizingPrescription"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-medicationorder"/>
      </type>
    </element>
    <element>
      <path value="MedicationDispense.quantity"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.daysSupply"/>
      <mustSupport value="true"/>
    </element>
    <element>
      <path value="MedicationDispense.medication[x]"/>
      <mustSupport value="true"/>
      <binding>
        <strength value="preferred"/>
        <description value="The set of RxNorm codes to represent medications"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-medication-codes"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qdm"/>
        <map value="primary code"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.whenHandedOver"/>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="stop datetime"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.destination"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-location"/>
      </type>
    </element>
    <element>
      <path value="MedicationDispense.receiver"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-patient"/>
      </type>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction"/>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.doseType"/>
      <slicing>
        <discriminator value="url"/>
        <ordered value="false"/>
        <rules value="open"/>
      </slicing>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-doseType"/>
      </type>
      <binding>
        <strength value="preferred"/>
        <description value="Medication dose types (e.g., loading, maintenance, etc.)"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/qicore-medication-dose-type"/>
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.doseType"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.infuseOver"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-infuseOver"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.infuseOver"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.rateIncrement"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrement"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.rateIncrement"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.rateIncrementInterval"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrementInterval"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.rateIncrementInterval"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.rateGoal"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateGoal"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.rateGoal"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.minDosePerPeriod"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-minDosePerPeriod"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.minDosePerPeriod"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.maxDeliveryRate"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryRate"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.maxDeliveryRate"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.extension"/>
      <name value="MedicationDispense.dosageInstruction.maxDeliveryVolume"/>
      <min value="0"/>
      <max value="1"/>
      <type>
        <code value="Extension"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryVolume"/>
      </type>
      <mapping>
        <identity value="qidam"/>
        <map value="Dosage.maxDeliveryVolume"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.timing"/>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="frequency"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.site[x]"/>
      <binding>
        <strength value="preferred"/>
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/daf-bodysite"/>
        </valueSetReference>
      </binding>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.route"/>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="route"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.dosageInstruction.dose[x]"/>
      <mustSupport value="true"/>
      <mapping>
        <identity value="qdm"/>
        <map value="dose"/>
      </mapping>
    </element>
    <element>
      <path value="MedicationDispense.substitution"/>
    </element>
    <element>
      <path value="MedicationDispense.substitution.responsibleParty"/>
      <type>
        <code value="Reference"/>
        <profile value="http://hl7.org/fhir/StructureDefinition/qicore-practitioner"/>
      </type>
    </element>
  </differential>
</StructureDefinition>