<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="zib-MedicationUse" />
  <url value="http://nictiz.nl/fhir/StructureDefinition/zib-MedicationUse" />
  <version value="2.2.11" />
  <name value="Zib MedicationUse" />
  <title value="HCIM MedicationUse" />
  <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="This profile is based on the Dutch Health and Care Information models (Dutch: Zorginformatiebouwsteen or ZIB) MedicationUse version 1.0.1, year 2017.&#xD;&#xA;&#xD;&#xA;MedicationUse is a statement on the historic, current or intended use of a certain medicine." />
  <purpose value="The goal of the medication use is to provide insight into the patient’s pattern of use." />
  <copyright value="CC0" />
  <fhirVersion value="3.0.2" />
  <mapping>
    <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
    <uri value="https://zibs.nl/wiki/MedicationUse2-v1.0.1(2017EN)" />
    <name value="HCIM MedicationUse2-v1.0.1(2017EN)" />
  </mapping>
  <mapping>
    <identity value="hcim-timeinterval-v1.0-2017EN" />
    <uri value="https://zibs.nl/wiki/TimeInterval-v1.0(2017EN)" />
    <name value="HCIM TimeInterval-v1.0(2017EN)" />
  </mapping>
  <mapping>
    <identity value="hcim-instructionsforuse-v1.1-2017EN" />
    <uri value="https://zibs.nl/wiki/InstructionsForUse-v1.1(2017EN)" />
    <name value="HCIM InstructionsForUse-v1.1(2017EN)" />
  </mapping>
  <mapping>
    <identity value="hcim-basicelements-v1.0-2017EN" />
    <uri value="https://zibs.nl/wiki/BasicElements-v1.0(2017EN)" />
    <name value="HCIM BasicElements-v1.0(2017EN)" />
  </mapping>
  <mapping>
    <identity value="Medication-Process-v09" />
    <uri value="https://decor.nictiz.nl/medicatieproces/mp-html-20181220T121121/ds-2.16.840.1.113883.2.4.3.11.60.20.77.1.3-2016-06-01T000000.html" />
    <name value="Medication Process v09" />
    <comment value="Language of Medication Process is Dutch." />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="MedicationStatement" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationStatement" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationStatement">
      <path value="MedicationStatement" />
      <short value="MedicationUse" />
      <definition value="MedicationUse is a statement on the historic, current or intended use of a certain medicine." />
      <alias value="Medicatiegebruik" />
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.21338" />
        <comment value="MedicationUse" />
      </mapping>
    </element>
    <element id="MedicationStatement.extension">
      <path value="MedicationStatement.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationStatement.extension:asAgreedIndicator">
      <path value="MedicationStatement.extension" />
      <sliceName value="asAgreedIndicator" />
      <short value="AsAgreedIndicator" />
      <definition value="Is the medicine used as outlined in the medication agreement?" />
      <alias value="VolgensAfspraakIndicator" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-MedicationUse-AsAgreedIndicator" />
      </type>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.22492" />
        <comment value="AsAgreedIndicator" />
      </mapping>
    </element>
    <element id="MedicationStatement.extension:asAgreedIndicator.valueBoolean:valueBoolean">
      <path value="MedicationStatement.extension.valueBoolean" />
      <sliceName value="valueBoolean" />
      <example>
        <label value="Example of asAgreed" />
        <valueBoolean value="true" />
      </example>
    </element>
    <element id="MedicationStatement.extension:prescriber">
      <path value="MedicationStatement.extension" />
      <sliceName value="prescriber" />
      <short value="Prescriber" />
      <definition value="The health professional that entered the medication agreement with the patient." />
      <comment value="The health professional's specialty, role, and organization are captured and communicated through the PractitionerRole Resource based on the nl-core-practitionerrole profile." />
      <alias value="Voorschrijver" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-MedicationUse-Prescriber" />
      </type>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.23290" />
        <comment value="Prescriber" />
      </mapping>
    </element>
    <element id="MedicationStatement.extension:author">
      <path value="MedicationStatement.extension" />
      <sliceName value="author" />
      <short value="Author" />
      <definition value="The author of this MedicationStatement. This is either a patient, a health professional or a healthcare provicer." />
      <comment value="The health professional's specialty, role, and organization are captured and communicated through the PractitionerRole Resource based on the nl-core-practitionerrole profile." />
      <alias value="Auteur" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-MedicationUse-Author" />
      </type>
      <mapping>
        <identity value="hcim-basicelements-v1.0-2017EN" />
        <map value="NL-CM:0.0.7" />
        <comment value="Author" />
      </mapping>
    </element>
    <element id="MedicationStatement.extension:medicationTreatment">
      <path value="MedicationStatement.extension" />
      <sliceName value="medicationTreatment" />
      <short value="Medical Treatment" />
      <definition value="This extension is to describe which overarching medical treatment this information is part of. This is done by the use of an identifier of that medical treatment." />
      <comment value="No HCIM concept is available for this element. Therefore a mapping to the relevant element Medication Process data element is provided." />
      <alias value="Medicamenteuze Behandeling" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-Medication-MedicationTreatment" />
      </type>
      <mapping>
        <identity value="Medication-Process-v09" />
        <map value="mp-dataelement900-22092" />
        <comment value="Medicamenteuze behandeling" />
      </mapping>
    </element>
    <element id="MedicationStatement.extension:reasonForChangeOrDiscontinuationOfUse">
      <path value="MedicationStatement.extension" />
      <sliceName value="reasonForChangeOrDiscontinuationOfUse" />
      <short value="ReasonForChangeOrDiscontinuationOfUse" />
      <definition value="Reason for changing or discontinuing use of medication." />
      <alias value="RedenWijzigenOfStoppenGebruik" />
      <alias value="Reden wijzigen of stoppen gebruik" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-MedicationUse-ReasonForChangeOrDiscontinuationOfUse" />
      </type>
    </element>
    <element id="MedicationStatement.extension:reasonForChangeOrDiscontinuationOfUse.valueCodeableConcept:valueCodeableConcept">
      <path value="MedicationStatement.extension.valueCodeableConcept" />
      <sliceName value="valueCodeableConcept" />
      <example>
        <label value="Example of ReasonForChangeOrDiscontinuationOfUse" />
        <valueCodeableConcept>
          <coding>
            <system value="http://snomed.info/sct" />
            <code value="79899007" />
            <display value="Drug interaction (finding)" />
          </coding>
        </valueCodeableConcept>
      </example>
      <binding>
        <strength value="extensible" />
      </binding>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.22493" />
        <comment value="Reden wijzigen of stoppen gebruik" />
      </mapping>
    </element>
    <element id="MedicationStatement.modifierExtension">
      <path value="MedicationStatement.modifierExtension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationStatement.modifierExtension:repeatPeriodCyclicalSchedule">
      <path value="MedicationStatement.modifierExtension" />
      <sliceName value="repeatPeriodCyclicalSchedule" />
      <label value="HerhaalperiodeCyclischSchema" />
      <short value="RepeatPeriodCyclicalSchedule" />
      <definition value="The repeated period in a cyclical schedule (of one or more dosing instructions). A cyclic schedule is noted in days, the corresponding dosing duration is also in days.&#xD;&#xA;&#xD;&#xA;Examples of a cyclical schedule: contraceptive pill (21 days, 1 pill 1x a day, then skip for 7 days, repeat), repeat period here is 28 days.&#xD;&#xA;RepeatPeriodCyclicalSchedule" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-Medication-RepeatPeriodCyclicalSchedule" />
      </type>
      <mapping>
        <identity value="hcim-instructionsforuse-v1.1-2017EN" />
        <map value="NL-CM:9.12.22505" />
        <comment value="RepeatPeriodCyclicalSchedule" />
      </mapping>
    </element>
    <element id="MedicationStatement.identifier">
      <path value="MedicationStatement.identifier" />
      <mapping>
        <identity value="hcim-basicelements-v1.0-2017EN" />
        <map value="NL-CM:0.0.6" />
        <comment value="IdentificationNumber" />
      </mapping>
    </element>
    <element id="MedicationStatement.status">
      <path value="MedicationStatement.status" />
      <short value="MedicationUseStopType" />
      <comment value="MedicationStatement is a statement at a point in time. The status is only representative at the point when it was asserted. The value set for MedicationStatement.status contains codes that assert the status of the use of the medication by the patient (for example, stopped or on hold) as well as codes that assert the status of the medication statement itself (for example, entered in error).&#xA;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid.&#xD;&#xA;&#xD;&#xA;This element is also used for the concept 'Stop type'; the manner in which this medication is discontinued (temporary or definitive). " />
      <alias value="MedicatieGebruikStopType" />
      <binding>
        <strength value="required" />
        <description value="Allergy Intolerance critically Code list" />
        <valueSetReference>
          <extension url="http://hl7.org/fhir/StructureDefinition/11179-permitted-value-conceptmap">
            <valueReference>
              <reference value="http://nictiz.nl/fhir/ConceptMap/MedicationUseStopTypeCodeLijst-to-MedicationStatementStatus" />
              <display value="MedicationUseStopTypeCodeLijst-to-MedicationStatementStatus" />
            </valueReference>
          </extension>
          <reference value="http://hl7.org/fhir/ValueSet/medication-statement-status" />
        </valueSetReference>
      </binding>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.23132" />
        <comment value="MedicationUseStopType. A ConceptMap (http://nictiz.nl/fhir/ConceptMap/MedicationUseStopTypeCodeLijst-to-MedicationStatementStatus) is available that maps MedicationUseStopTypeCodeLijst to the MedicationStatementStatus value set." />
      </mapping>
    </element>
    <element id="MedicationStatement.category">
      <path value="MedicationStatement.category" />
      <min value="1" />
    </element>
    <element id="MedicationStatement.category.coding">
      <path value="MedicationStatement.category.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="code" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationStatement.category.coding:medicationUseCode">
      <path value="MedicationStatement.category.coding" />
      <sliceName value="medicationUseCode" />
      <short value="MedicationUseCode" />
      <definition value="Category code used for indexing/retrieval of the HCIM MedicationUse. The system and code are stated in the Medication Process v09." />
    </element>
    <element id="MedicationStatement.category.coding:medicationUseCode.system">
      <path value="MedicationStatement.category.coding.system" />
      <fixedUri value="urn:oid:2.16.840.1.113883.2.4.3.11.60.20.77.5.3" />
    </element>
    <element id="MedicationStatement.category.coding:medicationUseCode.code">
      <path value="MedicationStatement.category.coding.code" />
      <fixedCode value="6" />
    </element>
    <element id="MedicationStatement.medication[x]:medicationReference">
      <path value="MedicationStatement.medicationReference" />
      <sliceName value="medicationReference" />
      <short value="ProductUsed" />
      <comment value="-" />
      <alias value="Gebruiksproduct" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://nictiz.nl/fhir/StructureDefinition/zib-Product" />
      </type>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.21339" />
        <comment value="ProductUsed" />
      </mapping>
    </element>
    <element id="MedicationStatement.effective[x]:effectivePeriod">
      <path value="MedicationStatement.effectivePeriod" />
      <sliceName value="effectivePeriod" />
      <short value="PeriodOfUse" />
      <definition value="Medication use can be recorded for a certain moment or over a certain period. Thus, medication use can be recorded multiple times during the use of medication. The usage period is the period or moment over which the data is recorded.&#xD;&#xA;&#xD;&#xA;Start date: This is the time at which the agreement was to take effect (or took effect or will take effect). &#xD;&#xA;&#xD;&#xA;Duration: The intended duration of use. E.g. 5 days or 8 weeks. It is not allowed to indicate the duration in months, because different months have a variable duration in days. &#xD;&#xA;&#xD;&#xA;End date: The time at which the period of use ends (or ended or will end). To avoid confusion between 'to' and 'up to', the submission of time is always mandatory for the end date." />
      <alias value="Gebruiksperiode" />
      <type>
        <code value="Period" />
      </type>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.22663" />
        <comment value="PeriodOfUse" />
      </mapping>
      <mapping>
        <identity value="hcim-basicelements-v1.0-2017EN" />
        <map value="NL-CM:0.0.14" />
        <comment value="DateTime" />
      </mapping>
    </element>
    <element id="MedicationStatement.effective[x]:effectivePeriod.extension">
      <path value="MedicationStatement.effectivePeriod.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationStatement.effective[x]:effectivePeriod.extension:Duration">
      <path value="MedicationStatement.effectivePeriod.extension" />
      <sliceName value="Duration" />
      <short value="Duration" />
      <definition value="The intended duration of use. E.g. 5 days or 8 weeks. It is not allowed to indicate the duration in months, because different months have a variable duration in days." />
      <alias value="tijdsDuur" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-MedicationUse-Duration" />
      </type>
    </element>
    <element id="MedicationStatement.effective[x]:effectivePeriod.extension:Duration.valueDuration:valueDuration">
      <path value="MedicationStatement.effectivePeriod.extension.valueDuration" />
      <sliceName value="valueDuration" />
      <example>
        <label value="Example of Duration" />
        <valueDuration>
          <value value="3" />
          <unit value="day" />
          <system value="http://unitsofmeasure.org" />
          <code value="d" />
        </valueDuration>
      </example>
    </element>
    <element id="MedicationStatement.effective[x]:effectivePeriod.start">
      <path value="MedicationStatement.effectivePeriod.start" />
      <short value="StartDate" />
      <definition value="This is the time at which the agreement was to take effect (or took effect or will take effect)." />
      <alias value="Ingangsdatum" />
      <mapping>
        <identity value="hcim-timeinterval-v1.0-2017EN" />
        <map value="NL-CM:20.3.2" />
        <comment value="startDateTime" />
      </mapping>
    </element>
    <element id="MedicationStatement.effective[x]:effectivePeriod.end">
      <path value="MedicationStatement.effectivePeriod.end" />
      <short value="EndDate" />
      <definition value="The time at which the period of use ends (or ended or will end). To avoid confusion between 'to' and 'up to', the submission of time is always mandatory for the end date." />
      <alias value="Einddatum" />
      <mapping>
        <identity value="hcim-timeinterval-v1.0-2017EN" />
        <map value="NL-CM:20.3.3" />
        <comment value="endDateTime" />
      </mapping>
    </element>
    <element id="MedicationStatement.dateAsserted">
      <path value="MedicationStatement.dateAsserted" />
      <short value="MedicationUseDateTime" />
      <definition value="Date on which this use is entered." />
      <alias value="Registratiedatum" />
      <min value="1" />
      <example>
        <label value="Example of MedicationUseDateTime" />
        <valueDateTime value="2017-06-14" />
      </example>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.22398" />
        <comment value="MedicationUseDateTime" />
      </mapping>
    </element>
    <element id="MedicationStatement.informationSource">
      <path value="MedicationStatement.informationSource" />
      <comment value="If a health professional is the informationSource the PractitionerRole reference extension can be used for a PractitionerRole reference. The health professional's specialty, role, and organization are captured and communicated through the PractitionerRole Resource based on the nl-core-practitionerrole profile." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.nl/fhir/StructureDefinition/nl-core-patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.nl/fhir/StructureDefinition/nl-core-practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.nl/fhir/StructureDefinition/nl-core-relatedperson" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.nl/fhir/StructureDefinition/nl-core-organization" />
      </type>
      <mapping>
        <identity value="hcim-basicelements-v1.0-2017EN" />
        <map value="NL-CM:0.0.2" />
        <comment value="InformationSource" />
      </mapping>
    </element>
    <element id="MedicationStatement.informationSource.extension">
      <path value="MedicationStatement.informationSource.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationStatement.informationSource.extension:practitionerRole">
      <path value="MedicationStatement.informationSource.extension" />
      <sliceName value="practitionerRole" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/practitionerrole-reference" />
      </type>
    </element>
    <element id="MedicationStatement.subject">
      <path value="MedicationStatement.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.nl/fhir/StructureDefinition/nl-core-patient" />
      </type>
      <mapping>
        <identity value="hcim-basicelements-v1.0-2017EN" />
        <map value="NL-CM:0.0.11" />
        <comment value="Subject" />
      </mapping>
    </element>
    <element id="MedicationStatement.taken">
      <path value="MedicationStatement.taken" />
      <short value="UseIndicator" />
      <definition value="Is this medicine used or not?" />
      <alias value="GebruikIndicator" />
      <example>
        <label value="Example of taken" />
        <valueCode value="y" />
      </example>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.22399" />
        <comment value="UseIndicator" />
      </mapping>
    </element>
    <element id="MedicationStatement.reasonCode.text">
      <path value="MedicationStatement.reasonCode.text" />
      <short value="ReasonForUse" />
      <definition value="The reason for using the medication, particularly in self-care medicine purchased by the patient themselves." />
      <alias value="RedenGebruik" />
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.22491" />
        <comment value="ReasonForUse" />
      </mapping>
    </element>
    <element id="MedicationStatement.note">
      <path value="MedicationStatement.note" />
      <short value="Comment" />
      <definition value="Comments on the medication use." />
      <alias value="Toelichting" />
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.21624" />
        <comment value="Comment" />
      </mapping>
    </element>
    <element id="MedicationStatement.dosage">
      <path value="MedicationStatement.dosage" />
      <type>
        <code value="Dosage" />
        <profile value="http://nictiz.nl/fhir/StructureDefinition/zib-InstructionsForUse" />
      </type>
      <mapping>
        <identity value="hcim-medicationuse2-v1.0.1-2017EN" />
        <map value="NL-CM:9.11.22504" />
        <comment value="InstructionsForUse" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>