<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="mp-MedicationDispense" />
  <url value="http://nictiz.nl/fhir/StructureDefinition/mp-MedicationDispense" />
  <version value="2.0.0-rc.7" />
  <name value="MpMedicationDispense" />
  <title value="mp MedicationDispense" />
  <status value="active" />
  <publisher value="Nictiz" />
  <contact>
    <name value="Nictiz" />
    <telecom>
      <system value="url" />
      <value value="https://www.nictiz.nl" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="A medication dispense is the provision of a supply of a medicine to the patient, their representative or administrator." />
  <purpose value="This MedicationDispense resource represents the MedicationDispense building block for implementations following the information standard [MP9](https://informatiestandaarden.nictiz.nl/wiki/Landingspagina_Medicatieproces). This profile is based on the Dutch zib ('Zorginformatiebouwsteen', i.e. Health and Care Information Model) MedicationDispense, but has no dependency on the corresponding nl-core profile because it contains non-compatible changes. Where compatible, mappings to zib concepts are defined. Additional concepts or concepts that are not compatible with their zib counterparts contain a mapping to the MP9 data set." />
  <copyright value="Copyright and related rights waived via CC0, https://creativecommons.org/publicdomain/zero/1.0/. This does not apply to information from third parties, for example a medical terminology system. The implementer alone is responsible for identifying and obtaining any necessary licenses or authorizations to utilize third party IP in connection with the specification or otherwise." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="zib-medicationdispense-v2.0.2-2020EN" />
    <uri value="https://zibs.nl/wiki/MedicationDispense-v2.0.2(2020EN)" />
    <name value="zib MedicationDispense-v2.0.2(2020EN)" />
  </mapping>
  <mapping>
    <identity value="mp-dataset-mp9-300-rc1-20250522" />
    <uri value="https://decor.nictiz.nl/pub/medicatieproces/mp-html-20250522T132618/ds-2.16.840.1.113883.2.4.3.11.60.20.77.1.4-2022-06-30T000000.html" />
    <name value="ART-DECOR Dataset MP9 3.0.0-rc.1 20250522" />
  </mapping>
  <mapping>
    <identity value="mp-dataset-mp9-300-rc2-20260213" />
    <uri value="https://decor.nictiz.nl/pub/medicatieproces/mp-html-20260213T112547/ds-2.16.840.1.113883.2.4.3.11.60.20.77.1.4-2022-06-30T000000.html" />
    <name value="ART-DECOR Dataset MP9 3.0.0-rc.2 20260213" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="MedicationDispense" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationDispense" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationDispense">
      <path value="MedicationDispense" />
      <short value="MedicationDispense" />
      <alias value="Medicatieverstrekking" />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20270" />
        <comment value="MedicationDispense" />
      </mapping>
    </element>
    <element id="MedicationDispense.extension:medicationDispenseAdditionalInformation">
      <path value="MedicationDispense.extension" />
      <sliceName value="medicationDispenseAdditionalInformation" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/ext-MedicationDispense.MedicationDispenseAdditionalInformation" />
      </type>
    </element>
    <element id="MedicationDispense.extension:medicationDispenseAdditionalInformation.value[x]">
      <path value="MedicationDispense.extension.value[x]" />
      <mapping>
        <identity value="mp-dataset-mp9-300-rc1-20250522" />
        <map value="mp-dataelement9x-357" />
        <comment value="MedicationDispenseAdditionalInformation" />
      </mapping>
      <mapping>
        <identity value="mp-dataset-mp9-300-rc2-20260213" />
        <map value="mp-dataelement9x-357" />
        <comment value="MedicationDispenseAdditionalInformation" />
      </mapping>
    </element>
    <element id="MedicationDispense.extension:requestDate">
      <path value="MedicationDispense.extension" />
      <sliceName value="requestDate" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/ext-MedicationDispense.RequestDate" />
      </type>
    </element>
    <element id="MedicationDispense.extension:requestDate.value[x]">
      <path value="MedicationDispense.extension.value[x]" />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.22500" />
        <comment value="RequestDate" />
      </mapping>
    </element>
    <element id="MedicationDispense.extension:distributionForm">
      <path value="MedicationDispense.extension" />
      <sliceName value="distributionForm" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/ext-MedicationDispense.DistributionForm" />
      </type>
    </element>
    <element id="MedicationDispense.extension:distributionForm.value[x]">
      <path value="MedicationDispense.extension.value[x]" />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20927" />
        <comment value="DistributionForm" />
      </mapping>
    </element>
    <element id="MedicationDispense.extension:pharmaceuticalTreatmentIdentifier">
      <path value="MedicationDispense.extension" />
      <sliceName value="pharmaceuticalTreatmentIdentifier" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/ext-PharmaceuticalTreatment.Identifier" />
      </type>
    </element>
    <element id="MedicationDispense.extension:pharmaceuticalTreatmentIdentifier.value[x]">
      <path value="MedicationDispense.extension.value[x]" />
      <mapping>
        <identity value="mp-dataset-mp9-300-rc1-20250522" />
        <map value="mp-dataelement9x-42" />
        <comment value="Identification" />
      </mapping>
      <mapping>
        <identity value="mp-dataset-mp9-300-rc2-20260213" />
        <map value="mp-dataelement9x-42" />
        <comment value="Identification" />
      </mapping>
    </element>
    <element id="MedicationDispense.identifier">
      <path value="MedicationDispense.identifier" />
      <short value="Identification" />
      <alias value="Identificatie" />
      <mapping>
        <identity value="mp-dataset-mp9-300-rc1-20250522" />
        <map value="mp-dataelement9x-361" />
        <comment value="Identification" />
      </mapping>
      <mapping>
        <identity value="mp-dataset-mp9-300-rc2-20260213" />
        <map value="mp-dataelement9x-361" />
        <comment value="Identification" />
      </mapping>
    </element>
    <element id="MedicationDispense.status">
      <path value="MedicationDispense.status" />
      <comment value="Sending systems that don't record an explicit status can use the following guidance to infer a value from the zib:&#xD;&#xA;&#xD;&#xA;* When MedicationDispenseDateTime exists and its value is in the past, `.status` will usually be set to _completed_.&#xD;&#xA;&#xD;&#xA;Moreover, it is expected that in most use cases only actual, executed, medication dispenses are exchanged which result in a _completed_ value." />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20272" />
        <comment value="MedicationDispenseDateTime (implicit, main mapping is on `.whenHandedOver`)" />
      </mapping>
    </element>
    <element id="MedicationDispense.category">
      <path value="MedicationDispense.category" />
      <min value="1" />
      <patternCodeableConcept>
        <coding>
          <system value="http://snomed.info/sct" />
          <code value="373784005" />
        </coding>
      </patternCodeableConcept>
    </element>
    <element id="MedicationDispense.category.extension:additionalCategory">
      <path value="MedicationDispense.category.extension" />
      <sliceName value="additionalCategory" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/ext-AdditionalCategory" />
      </type>
    </element>
    <element id="MedicationDispense.category.extension:additionalCategory.value[x]">
      <path value="MedicationDispense.category.extension.value[x]" />
      <short value="Type of medication dispense" />
      <definition value="Indicates the type of medication dispense (for example, where the medication is expected to be consumed or administered (i.e. inpatient or outpatient))" />
      <binding>
        <strength value="preferred" />
        <valueSet value="http://hl7.org/fhir/ValueSet/medicationdispense-category" />
      </binding>
    </element>
    <element id="MedicationDispense.medication[x]">
      <path value="MedicationDispense.medication[x]" />
      <slicing>
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationDispense.medication[x]:medicationReference">
      <path value="MedicationDispense.medication[x]" />
      <sliceName value="medicationReference" />
      <short value="DispensedMedicine" />
      <definition value="The dispensed medicine." />
      <alias value="VerstrektGeneesmiddel" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Medication" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/mp-PharmaceuticalProduct" />
      </type>
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.22259" />
        <comment value="DispensedMedicine" />
      </mapping>
    </element>
    <element id="MedicationDispense.subject">
      <path value="MedicationDispense.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-Patient" />
      </type>
    </element>
    <element id="MedicationDispense.performer">
      <path value="MedicationDispense.performer" />
      <max value="1" />
    </element>
    <element id="MedicationDispense.performer.actor">
      <path value="MedicationDispense.performer.actor" />
      <short value="Supplier" />
      <definition value="In almost all cases, the supplier will be a pharmacist. It could also be supplied by a webshop (in case of an online order), a drug store or a foreign pharmacist." />
      <comment value="The 'Supplier' concept of zib MedicationDispense is mapped to both `.performer.actor` and `.location`. This is a Reference to an instance of nl-core-HealthcareProvider-Organization instead of to an instance of nl-core-HealthcareProfessional, because individuals who enter the medication dispense are not recorded." />
      <alias value="Verstrekker" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Device" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider-Organization" />
      </type>
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20858" />
        <comment value="Supplier" />
      </mapping>
    </element>
    <element id="MedicationDispense.location">
      <path value="MedicationDispense.location" />
      <short value="Supplier" />
      <definition value="In almost all cases, the supplier will be a pharmacist. It could also be supplied by a webshop (in case of an online order), a drug store or a foreign pharmacist." />
      <comment value="The 'Supplier' concept of zib MedicationDispense is mapped to both `.performer.actor` and `.location`. Details of the physical location of the supplier of the medication dispense can be referenced here." />
      <alias value="Verstrekker" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Location" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/nl-core-HealthcareProvider" />
      </type>
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20858" />
        <comment value="Supplier" />
      </mapping>
    </element>
    <element id="MedicationDispense.authorizingPrescription">
      <path value="MedicationDispense.authorizingPrescription" />
      <short value="DispenseRequest" />
      <definition value="Relationship to the dispense request." />
      <alias value="Verstrekkingsverzoek" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/mp-DispenseRequest" />
      </type>
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.22396" />
        <comment value="DispenseRequest" />
      </mapping>
    </element>
    <element id="MedicationDispense.quantity">
      <path value="MedicationDispense.quantity" />
      <short value="DispensedAmount" />
      <definition value="Number of units of the product that has been dispensed. The number of units is described in the unit associated with the product, which usually refers to a number of pieces or doses. For the unit, it is mandatory to use both a G-standard unit from file 902, thesaurus number 2, and a UCUM unit. A translation to NHG Table 25 “Usage Instruction” is optional, but may not replace the mandatory designation in G-standard and UCUM." />
      <alias value="VerstrekteHoeveelheid" />
      <type>
        <code value="Quantity" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/pattern-GstdSimpleQuantity" />
      </type>
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20923" />
        <comment value="DispensedAmount [DEPRECATED]" />
      </mapping>
      <mapping>
        <identity value="mp-dataset-mp9-300-rc2-20260213" />
        <map value="mp-dataelement9x-358" />
        <comment value="DispensedAmount" />
      </mapping>
    </element>
    <element id="MedicationDispense.daysSupply">
      <path value="MedicationDispense.daysSupply" />
      <short value="DurationOfUse" />
      <definition value="The duration in days of the period in which the medication is expected to be used. The value depends on the dose and the dispensed amount." />
      <alias value="Verbruiksduur" />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20924" />
        <comment value="DurationOfUse" />
      </mapping>
    </element>
    <element id="MedicationDispense.whenHandedOver">
      <path value="MedicationDispense.whenHandedOver" />
      <short value="MedicationDispenseDateTime" />
      <definition value="The time at which the medicine was supplied. The date and time at which the medicine is delivered. Note: this is the time at which the medicine was delivered to the patient (or their administrator/representative) and not the request date." />
      <alias value="MedicatieverstrekkingsDatumTijd" />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20272" />
        <comment value="MedicationDispenseDateTime" />
      </mapping>
    </element>
    <element id="MedicationDispense.destination">
      <path value="MedicationDispense.destination" />
      <short value="DispenseLocation" />
      <definition value="Dispense location" />
      <comment value="The `Location.name` elements holds the DispenseLocation information." />
      <alias value="Afleverlocatie" />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.20925" />
        <comment value="DispenseLocation. Use `Location.name`." />
      </mapping>
    </element>
    <element id="MedicationDispense.note">
      <path value="MedicationDispense.note" />
      <max value="1" />
    </element>
    <element id="MedicationDispense.note.text">
      <path value="MedicationDispense.note.text" />
      <short value="Comment" />
      <definition value="Comments on the dispense." />
      <alias value="Toelichting" />
      <mapping>
        <identity value="zib-medicationdispense-v2.0.2-2020EN" />
        <map value="NL-CM:9.9.22276" />
        <comment value="Comment" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>