DSTU2 Ballot Source

This page is part of the FHIR Specification (v0.5.0: DSTU 2 Ballot 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

StructureDefinition for Profile of MedicationDispense for decision support/quality metrics. Defines the core set of elements and extensions for quality rule and measure authors.

{
  "resourceType": "StructureDefinition",
  "id": "medicationdispense-qicore-qicore-medicationdispense",
  "text": {
    "status": "generated",
    "div": "<div>!-- Snipped for Brevity --></div>"
  },
  "url": "http://hl7.org/fhir/StructureDefinition/medicationdispense-qicore-qicore-medicationdispense",
  "name": "QICore-MedicationDispense",
  "publisher": "Health Level Seven, Inc. - CQI WG",
  "contact": [
    {
      "telecom": [
        {
          "system": "url",
          "value": "http://hl7.org/special/committees/CQI"
        }
      ]
    }
  ],
  "description": "Profile of MedicationDispense for decision support/quality metrics. Defines the core set of elements and extensions for quality rule and measure authors.",
  "status": "draft",
  "date": "2015-02-27",
  "mapping": [
    {
      "identity": "qdm",
      "uri": "http://www.healthit.gov/quality-data-model",
      "name": "Quality Data Model"
    }
  ],
  "type": "constraint",
  "abstract": false,
  "base": "http://hl7.org/fhir/StructureDefinition/MedicationDispense",
  "snapshot": {
    "element": [
      {
        "path": "MedicationDispense",
        "name": "QICore-MedicationDispense",
        "short": "Dispensing a medication to a named patient",
        "definition": "Dispensing a medication to a named patient.  This includes a description of the supply provided and the instructions for administering the medication.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "MedicationDispense"
          }
        ],
        "constraint": [
          {
            "key": "mdd-1",
            "name": "Timing",
            "severity": "error",
            "human": "whenHandedOver cannot be before whenPrepared",
            "xpath": "not(exists(f:whenHandedOver/@value)) or not(exists(f:whenPrepared/@value)) or ( f:whenHandedOver/@value >= f:whenPrepared/@value)"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Supply[moodCode=EVN]"
          },
          {
            "identity": "qdm",
            "map": "Medication, Dispensed"
          }
        ]
      },
      {
        "path": "MedicationDispense.id",
        "short": "Logical id of this artefact",
        "definition": "The logical id of the resource, as used in the url for the resoure. Once assigned, this value never changes.",
        "comments": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ]
      },
      {
        "path": "MedicationDispense.meta",
        "short": "Metadata about the resource",
        "definition": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "Meta"
          }
        ]
      },
      {
        "path": "MedicationDispense.implicitRules",
        "short": "A set of rules under which this content was created",
        "definition": "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": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "uri"
          }
        ],
        "isModifier": true
      },
      {
        "path": "MedicationDispense.language",
        "short": "Language of the resource content",
        "definition": "The base language in which the resource is written.",
        "comments": "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\n\nNot 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": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "binding": {
          "name": "Language",
          "strength": "required",
          "description": "A human language",
          "valueSetUri": "http://tools.ietf.org/html/bcp47"
        }
      },
      {
        "path": "MedicationDispense.text",
        "short": "Text summary of the resource, for human interpretation",
        "definition": "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 \"clinically safe\" 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": "Contained resources do not have narrative. Resources that are not contained SHOULD have a narrative.",
        "alias": [
          "narrative",
          "html",
          "xhtml",
          "display"
        ],
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Narrative"
          }
        ],
        "condition": [
          "dom-1"
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "Act.text?"
          }
        ]
      },
      {
        "path": "MedicationDispense.contained",
        "short": "Contained, inline Resources",
        "definition": "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": "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": [
          "inline resources",
          "anonymous resources",
          "contained resources"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Resource"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "MedicationDispense.extension",
        "slicing": {
          "discriminator": [
            "url"
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "path": "MedicationDispense.extension",
        "name": "MedicationDispense.validityPeriod",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/medicationdispense-validityPeriod"
          }
        ]
      },
      {
        "path": "MedicationDispense.extension",
        "name": "MedicationDispense.refillsRemaining",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-refillsRemaining"
          }
        ],
        "mapping": [
          {
            "identity": "qdm",
            "map": "refills"
          }
        ]
      },
      {
        "path": "MedicationDispense.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "MedicationDispense.identifier",
        "short": "External identifier",
        "definition": "Identifier assigned by the dispensing facility - this is an identifier assigned outside FHIR.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Identifier"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".id"
          }
        ]
      },
      {
        "path": "MedicationDispense.status",
        "short": "in-progress | on-hold | completed | entered-in-error | stopped",
        "definition": "A code specifying the state of the set of dispense events.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "code"
          }
        ],
        "mustSupport": true,
        "isModifier": true,
        "binding": {
          "name": "MedicationDispenseStatus",
          "strength": "required",
          "description": "A code specifying the state of the dispense event.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/vs/medication-dispense-status"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "(Not clear whether or how V2 provides for a snapshot of dispense status)"
          },
          {
            "identity": "rim",
            "map": ".status"
          }
        ]
      },
      {
        "path": "MedicationDispense.patient",
        "short": "Who the dispense is for",
        "definition": "A link to a resource representing the person to whom the medication will be given.",
        "comments": "SubstanceAdministration->subject->Patient.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/patient-qicore-qicore-patient"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "PID-3-Patient ID List"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=SBJ].role[classCode=PAT]"
          }
        ]
      },
      {
        "path": "MedicationDispense.dispenser",
        "short": "Practitioner responsible for dispensing medication",
        "definition": "The individual responsible for dispensing the medication.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/practitioner-qicore-qicore-practitioner"
          }
        ],
        "mapping": [
          {
            "identity": "v2",
            "map": "RXD-10-Dispensing Provider / PRT-5-Participation Person: PRT-4-Participation='DP' (RXD-10 is deprecated)"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=PFM].role[classCode=ASSIGN]"
          }
        ]
      },
      {
        "path": "MedicationDispense.authorizingPrescription",
        "short": "Medication order that authorizes the dispense",
        "definition": "Indicates the medication order that is being dispensed against.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/medicationprescription-qicore-qicore-medicationprescription"
          }
        ],
        "mapping": [
          {
            "identity": "v2",
            "map": "ORC-3-Filler Order Number / ORC-2-Placer Order Number"
          },
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=FLFS].target[moodCode=RQO]"
          }
        ]
      },
      {
        "path": "MedicationDispense.type",
        "short": "Trial fill, partial fill, emergency fill, etc.",
        "definition": "Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "name": "MedicationDispenseType",
          "strength": "example",
          "description": "Indicates the type of dispensing event that is performed. Examples include: Trial Fill, Completion of Trial, Partial Fill, Emergency Fill, Samples, etc.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/v3/vs/ActPharmacySupplyType"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RXD-33-Dispense Type"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "path": "MedicationDispense.quantity",
        "short": "Amount dispensed",
        "definition": "The amount of medication that has been dispensed. Includes unit of measure.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RXD-4-Actual Dispense Amount / RXD-5.1-Actual Dispense Units.code / RXD-5.3-Actual Dispense Units.name of coding system"
          },
          {
            "identity": "rim",
            "map": ".quantity"
          }
        ]
      },
      {
        "path": "MedicationDispense.daysSupply",
        "short": "Days Supply",
        "definition": "The amount of medication expressed as a timing amount.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": true
      },
      {
        "path": "MedicationDispense.medication",
        "short": "What medication was supplied",
        "definition": "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": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/Medication"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RXD-2-Dispense/Give Code"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=PRD].role"
          },
          {
            "identity": "qdm",
            "map": "primary code"
          }
        ]
      },
      {
        "path": "MedicationDispense.whenPrepared",
        "short": "Dispense processing time",
        "definition": "The time when the dispensed product was packaged and reviewed.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mapping": [
          {
            "identity": "v2",
            "map": "RXD-3-Date/Time Dispensed"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime[xmi:type=IVL_TS].low"
          }
        ]
      },
      {
        "path": "MedicationDispense.whenHandedOver",
        "short": "Handover time",
        "definition": "The time the dispensed product was provided to the patient or their representative.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RXD-3-Date/Time Dispensed"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime[xmi:type=IVL_TS].high"
          },
          {
            "identity": "qdm",
            "map": "stop datetime"
          }
        ]
      },
      {
        "path": "MedicationDispense.destination",
        "short": "Where the medication was sent",
        "definition": "Identification of the facility/location where the medication was shipped to, as part of the dispense event.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/location-qicore-qicore-location"
          }
        ],
        "mapping": [
          {
            "identity": "v2",
            "map": "RXD-13-Dispense-to Location; RXD-30-Dispense to Pharmacy; RXD-31-Dispense to Pharmacy Address (V2 (in definition of RXD-13, RXD-30 and RXD-31) directs use of the PRT segment but there doesn't appear to be a standard code in Table 0912 suitable for PRT-4-Participation)"
          },
          {
            "identity": "rim",
            "map": ".participation[typeCode=DST].role"
          }
        ]
      },
      {
        "path": "MedicationDispense.receiver",
        "short": "Who collected the medication",
        "definition": "Identifies the person who picked up the medication.  This will usually be a patient or their carer, but some cases exist where it can be a healthcare professional.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/patient-qicore-qicore-patient"
          },
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/practitioner-qicore-qicore-practitioner"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".participation[typeCode=RCV].role"
          }
        ]
      },
      {
        "path": "MedicationDispense.note",
        "short": "Information about the dispense",
        "definition": "Extra information about the dispense that could not be conveyed in the other attributes.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "string"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction",
        "short": "Medicine administration instructions to the patient/carer",
        "definition": "Indicates how the medication is to be used by the patient.",
        "comments": "When the dose or rate is intended to change over the entire administration period, eg. Tapering dose prescriptions, multiple instances of dosage instructions will need to be supplied to convey the different doses/rates.",
        "min": 0,
        "max": "*",
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=COMP].target[classCode=SBADM, moodCode=INT]"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "slicing": {
          "discriminator": [
            "url"
          ],
          "ordered": false,
          "rules": "open"
        },
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.doseType",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-doseType"
          }
        ],
        "binding": {
          "name": "QICoreMedicationDoseType",
          "strength": "preferred",
          "description": "Medication dose types (e.g., loading, maintenance, etc.)",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/vs/qicore-medication-dose-type"
          }
        }
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.infuseOver",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-infuseOver"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.rateIncrement",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrement"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.rateIncrementInterval",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrementInterval"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.rateGoal",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateGoal"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.minDosePerPeriod",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-minDosePerPeriod"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.maxDeliveryRate",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryRate"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.maxDeliveryVolume",
        "short": "Extension",
        "definition": "An Extension",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryVolume"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "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": "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": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.additionalInstructions",
        "short": "E.g. \"Take with food\"",
        "definition": "Additional instructions such as \"Swallow with plenty of water\" which may or may not be coded.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".text"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.schedule[x]",
        "short": "When medication should be administered",
        "definition": "The timing schedule for giving the medication to the patient.  The Schedule data type allows many different expressions, for example.  \"Every  8 hours\"; \"Three times a day\"; \"1/2 an hour before breakfast for 10 days from 23-Dec 2011:\";  \"15 Oct 2013, 17 Oct 2013 and 1 Nov 2013\".",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "dateTime"
          },
          {
            "code": "Period"
          },
          {
            "code": "Timing"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RDS:TQ1"
          },
          {
            "identity": "rim",
            "map": ".effectiveTime"
          },
          {
            "identity": "qdm",
            "map": "frequency"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.asNeeded[x]",
        "short": "Take \"as needed\" f(or x)",
        "definition": "If set to true or if specified as a CodeableConcept, indicates that the medication is only taken when needed within the specified schedule rather than at every scheduled dose.  If a CodeableConcept is present, it indicates the pre-condition for taking the Medication.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "boolean"
          },
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "name": "MedicationAsNeededReason",
          "strength": "required",
          "description": "A coded concept identifying the pre-condition that should hold prior to consuming a medication dose.  For example \"pain\", \"30 minutes prior to sexual intercourse\", \"on flare-up\", etc."
        },
        "mapping": [
          {
            "identity": "rim",
            "map": "boolean: .outboundRelationship[typeCode=PRCN].negationInd (inversed - so negationInd = true means asNeeded=false\r\rCodeableConcept: .outboundRelationship[typCode=PRCN].target[classCode=OBS, moodCode=EVN, isCriterionInd=true, code=\"Assertion\"].value"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.site",
        "short": "Body site to administer to",
        "definition": "A coded specification of the anatomic site where the medication first enters the body.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "name": "MedicationAdministrationSite",
          "strength": "example",
          "description": "A coded concept describing the site location the medicine enters into or onto the body",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/vs/approach-site-codes"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RXR-2-Administration Site"
          },
          {
            "identity": "rim",
            "map": ".approachSiteCode"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.route",
        "short": "How drug should enter body",
        "definition": "A code specifying the route or physiological path of administration of a therapeutic agent into or onto a subject.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "mustSupport": true,
        "binding": {
          "name": "RouteOfAdministration",
          "strength": "example",
          "description": "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": "http://hl7.org/fhir/vs/route-codes"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RXR-1-Route"
          },
          {
            "identity": "rim",
            "map": ".routeCode"
          },
          {
            "identity": "qdm",
            "map": "route"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.method",
        "short": "Technique for administering medication",
        "definition": "A coded value indicating the method by which the medication is introduced into or onto the body. Most commonly used for injections.  Examples:  Slow Push; Deep IV.\r\rTerminologies used often pre-coordinate this term with the route and or form of administration.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "name": "MedicationAdministrationMethod",
          "strength": "example",
          "description": "A coded concept describing the technique by which the medicine is administered",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/vs/administration-method-codes"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RXR-4-Administration Method"
          },
          {
            "identity": "rim",
            "map": ".methodCode"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.dose[x]",
        "short": "Amount of medication per dose",
        "definition": "The amount of therapeutic or other substance given at one administration event.",
        "comments": "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.\rIf 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": 0,
        "max": "1",
        "type": [
          {
            "code": "Range"
          },
          {
            "code": "Quantity"
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "v2",
            "map": "RXE-23-Give Rate Amount / RXE-24.1-Give Rate Units.code / RXE-24.3-Give Rate Units.name of coding system"
          },
          {
            "identity": "rim",
            "map": ".doseQuantity"
          },
          {
            "identity": "qdm",
            "map": "dose"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.rate",
        "short": "Amount of medication per unit of time",
        "definition": "Identifies the speed with which the substance is introduced into the subject. Typically the rate for an infusion. 200ml in 2 hours.",
        "comments": "It is possible to supply both a rate and a doseQuantity to provide full details about how the medication is to be administered and supplied.\rIf the rate is intended to change over time, each change should be captured as a distinct \"dosage\" repetition, except for titration orders.",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "mapping": [
          {
            "identity": "v2",
            "map": "RXE-22-Give Per (Time Unit)"
          },
          {
            "identity": "rim",
            "map": ".rateQuantity"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.maxDosePerPeriod",
        "short": "Upper limit on medication per unit of time",
        "definition": "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": 0,
        "max": "1",
        "type": [
          {
            "code": "Ratio"
          }
        ],
        "mapping": [
          {
            "identity": "v2",
            "map": "RXE-4-Give Amount - Maximum / RXE-5-Give Units"
          },
          {
            "identity": "rim",
            "map": ".maxDoseQuantity"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution",
        "short": "Deals with substitution of one medicine for another",
        "definition": "Indicates whether or not substitution was made as part of the dispense.  In some cases substitution will be expected but doesn't happen, in other cases substitution is not expected but does happen.  This block explains what substitition did or did not happen and why.",
        "min": 0,
        "max": "1",
        "mapping": [
          {
            "identity": "rim",
            "map": ".outboundRelationship[typeCode=COMP].target[classCode=SUBST, moodCode=EVN]"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution.id",
        "representation": [
          "xmlAttr"
        ],
        "short": "xml:id (or equivalent in JSON)",
        "definition": "unique id for the element within a resource (for internal references).",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "id"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution.extension",
        "short": "Additional Content defined by implementations",
        "definition": "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": "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": [
          "extensions",
          "user content"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": "n/a"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution.modifierExtension",
        "short": "Extensions that cannot be ignored",
        "definition": "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": "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": [
          "extensions",
          "user content",
          "modifiers"
        ],
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Extension"
          }
        ],
        "isModifier": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "N/A"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution.type",
        "short": "Type of substitiution",
        "definition": "A code signifying whether a different drug was dispensed from what was prescribed.",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "name": "MedicationIntendedSubstitutionType",
          "strength": "example",
          "description": "A coded concept describing whether a different medicinal product may be dispensed other than the product as specified exactly in the prescription",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/v3/vs/ActSubstanceAdminSubstitutionCode"
          }
        },
        "mapping": [
          {
            "identity": "v2",
            "map": "RXE-9-Substitution Status? (perhaps RXO-9-Allow Substitutions?)"
          },
          {
            "identity": "rim",
            "map": ".code"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution.reason",
        "short": "Why was substitution made",
        "definition": "Indicates the reason for the substitution of (or lack of substitution) from what was prescribed.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "CodeableConcept"
          }
        ],
        "binding": {
          "name": "MedicationIntendedSubstitutionReason",
          "strength": "example",
          "description": "A coded concept describing the reason that a different medication should (or should not) be substituted from what was prescribed.",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/v3/vs/SubstanceAdminSubstitutionReason"
          }
        },
        "mapping": [
          {
            "identity": "rim",
            "map": ".reasonCode"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution.responsibleParty",
        "short": "Who is responsible for the substitution",
        "definition": "The person or organization that has primary responsibility for the substitution.",
        "comments": "rename.",
        "min": 0,
        "max": "*",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/practitioner-qicore-qicore-practitioner"
          }
        ],
        "mapping": [
          {
            "identity": "rim",
            "map": ".participation[typeCode=PFM].role[classCode=ASSIGN]"
          }
        ]
      }
    ]
  },
  "differential": {
    "element": [
      {
        "path": "MedicationDispense",
        "name": "QICore-MedicationDispense",
        "min": 1,
        "max": "1",
        "type": [
          {
            "code": "MedicationDispense"
          }
        ],
        "mapping": [
          {
            "identity": "qdm",
            "map": "Medication, Dispensed"
          }
        ]
      },
      {
        "path": "MedicationDispense.extension",
        "slicing": {
          "discriminator": [
            "url"
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "path": "MedicationDispense.extension",
        "name": "MedicationDispense.validityPeriod",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/medicationdispense-validityPeriod"
          }
        ]
      },
      {
        "path": "MedicationDispense.extension",
        "name": "MedicationDispense.refillsRemaining",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-refillsRemaining"
          }
        ],
        "mapping": [
          {
            "identity": "qdm",
            "map": "refills"
          }
        ]
      },
      {
        "path": "MedicationDispense.status",
        "mustSupport": true
      },
      {
        "path": "MedicationDispense.patient",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/patient-qicore-qicore-patient"
          }
        ],
        "mustSupport": true
      },
      {
        "path": "MedicationDispense.dispenser",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/practitioner-qicore-qicore-practitioner"
          }
        ]
      },
      {
        "path": "MedicationDispense.authorizingPrescription",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/medicationprescription-qicore-qicore-medicationprescription"
          }
        ]
      },
      {
        "path": "MedicationDispense.quantity",
        "mustSupport": true
      },
      {
        "path": "MedicationDispense.daysSupply",
        "mustSupport": true
      },
      {
        "path": "MedicationDispense.medication",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "qdm",
            "map": "primary code"
          }
        ]
      },
      {
        "path": "MedicationDispense.whenHandedOver",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "qdm",
            "map": "stop datetime"
          }
        ]
      },
      {
        "path": "MedicationDispense.destination",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/location-qicore-qicore-location"
          }
        ]
      },
      {
        "path": "MedicationDispense.receiver",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/patient-qicore-qicore-patient"
          },
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/practitioner-qicore-qicore-practitioner"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction",
        "min": 0,
        "max": "*"
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "slicing": {
          "discriminator": [
            "url"
          ],
          "ordered": false,
          "rules": "open"
        }
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.doseType",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-doseType"
          }
        ],
        "binding": {
          "name": "QICoreMedicationDoseType",
          "strength": "preferred",
          "description": "Medication dose types (e.g., loading, maintenance, etc.)",
          "valueSetReference": {
            "reference": "http://hl7.org/fhir/vs/qicore-medication-dose-type"
          }
        }
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.infuseOver",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-infuseOver"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.rateIncrement",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrement"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.rateIncrementInterval",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateIncrementInterval"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.rateGoal",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-rateGoal"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.minDosePerPeriod",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-minDosePerPeriod"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.maxDeliveryRate",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryRate"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.extension",
        "name": "MedicationDispense.dosageInstruction.maxDeliveryVolume",
        "min": 0,
        "max": "1",
        "type": [
          {
            "code": "Extension",
            "profile": "http://hl7.org/fhir/StructureDefinition/pharmacy-core-maxDeliveryVolume"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.schedule[x]",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "qdm",
            "map": "frequency"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.route",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "qdm",
            "map": "route"
          }
        ]
      },
      {
        "path": "MedicationDispense.dosageInstruction.dose[x]",
        "mustSupport": true,
        "mapping": [
          {
            "identity": "qdm",
            "map": "dose"
          }
        ]
      },
      {
        "path": "MedicationDispense.substitution"
      },
      {
        "path": "MedicationDispense.substitution.responsibleParty",
        "type": [
          {
            "code": "Reference",
            "profile": "http://hl7.org/fhir/StructureDefinition/practitioner-qicore-qicore-practitioner"
          }
        ]
      }
    ]
  }
}