<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="MedicationUsage" />
  <meta>
    <lastUpdated value="2021-01-02T08:58:31.578+11:00" />
  </meta>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Clinical.Medications" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status">
    <valueCode value="trial-use" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-fmm">
    <valueInteger value="3" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="patient" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-wg">
    <valueCode value="phx" />
  </extension>
  <extension url="http://hl7.org/fhir/build/StructureDefinition/entered-in-error-status">
    <valueCode value=".status = entered-in-error" />
  </extension>
  <url value="http://hl7.org/fhir/StructureDefinition/MedicationUsage" />
  <version value="4.6.0" />
  <name value="MedicationUsage" />
  <status value="draft" />
  <date value="2021-01-02T08:58:31+11:00" />
  <publisher value="Health Level Seven International (Pharmacy)" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org/fhir" />
    </telecom>
  </contact>
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/medication/index.cfm" />
    </telecom>
  </contact>
  <description value="A record of a medication that is being consumed by a patient.   A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. &#xA;&#xA;The primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Usage information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information." />
  <fhirVersion value="4.6.0" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="rim" />
    <uri value="http://hl7.org/v3" />
    <name value="RIM Mapping" />
  </mapping>
  <mapping>
    <identity value="w5" />
    <uri value="http://hl7.org/fhir/fivews" />
    <name value="FiveWs Pattern Mapping" />
  </mapping>
  <mapping>
    <identity value="v2" />
    <uri value="http://hl7.org/v2" />
    <name value="HL7 v2 Mapping" />
  </mapping>
  <kind value="resource" />
  <abstract value="false" />
  <type value="MedicationUsage" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/DomainResource" />
  <derivation value="specialization" />
  <differential>
    <element id="MedicationUsage">
      <path value="MedicationUsage" />
      <short value="Record of medication being taken by a patient" />
      <definition value="A record of a medication that is being consumed by a patient.   A MedicationUsage may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains. &#xA;&#xA;The primary difference between a medicationusage and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationusage is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Usage information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information.&#xA;&#xA;The MedicationUsage resource was previously called MedicationStatement." />
      <alias value="MedicationStatement" />
      <min value="0" />
      <max value="*" />
      <mapping>
        <identity value="workflow" />
        <map value="Event" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value="SubstanceAdministration" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="clinical.medication" />
      </mapping>
    </element>
    <element id="MedicationUsage.identifier">
      <path value="MedicationUsage.identifier" />
      <short value="External identifier" />
      <definition value="Identifiers associated with this Medication Usage that are defined by business processes and/or used to refer to it when a direct URL reference to the resource itself is not appropriate. They are business identifiers assigned to this resource by the performer or other systems and remain constant as the resource is updated and propagates from server to server." />
      <comment value="This is a business identifier, not a resource identifier." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Identifier" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.identifier" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.identifier" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".id" />
      </mapping>
    </element>
    <element id="MedicationUsage.status">
      <path value="MedicationUsage.status" />
      <short value="recorded | entered-in-error | draft" />
      <definition value="A code representing the status of recording the medication usage." />
      <comment value="This status concerns just the recording of the medication usage.  MedicationUsage.adherence should be used for indicating a patient's adherence to the information in this resource.  Note, the statuses are different than in previous releases for MedicationUsage or MedicationStatement.&#xA;&#xA;This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="code" />
      </type>
      <isModifier value="true" />
      <isModifierReason value="This element is labelled as a modifier because it is a status element that contains status entered-in-error which means that the resource should not be treated as valid" />
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationUsageStatus" />
        </extension>
        <extension url="http://hl7.org/fhir/build/StructureDefinition/v3-map">
          <valueString value="ActStatus" />
        </extension>
        <strength value="required" />
        <description value="A coded concept indicating the current status of a MedicationUsage." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medication-usage-status" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Event.status" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.status" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".statusCode" />
      </mapping>
    </element>
    <element id="MedicationUsage.category">
      <path value="MedicationUsage.category" />
      <short value="Type of medication usage" />
      <definition value="Type of medication usage (for example, drug classification like ATC, where meds would be administered, legal category of the medication.)." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationUsageAdministrationLocation" />
        </extension>
        <strength value="example" />
        <description value="A coded concept identifying where the medication included in the MedicationUsage is expected to be consumed or administered." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medicationrequest-admin-location" />
      </binding>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.class" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=COMP].source[classCode=OBS, moodCode=EVN, code=&quot;type of medication usage&quot;].value" />
      </mapping>
    </element>
    <element id="MedicationUsage.medication">
      <path value="MedicationUsage.medication" />
      <short value="What medication was taken" />
      <definition value="Identifies the medication being administered. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code that identifies the medication from a known list of medications." />
      <comment value="If only a code is specified, then it needs to be a code for a specific product. If more information is required, then the use of the medication resource is recommended.  For example, if you require form or lot number, then you must reference the Medication resource." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Medication" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationCode" />
        </extension>
        <strength value="example" />
        <description value="A coded concept identifying the substance or product being taken." />
        <valueSet value="http://hl7.org/fhir/ValueSet/medication-codes" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Event.code" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.what[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=CSM].role[classCode=ADMM or MANU]" />
      </mapping>
    </element>
    <element id="MedicationUsage.subject">
      <path value="MedicationUsage.subject" />
      <short value="Who is/was taking  the medication" />
      <definition value="The person, animal or group who is/was taking the medication." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Group" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.subject" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject[x]" />
      </mapping>
      <mapping>
        <identity value="v2" />
        <map value="PID-3-Patient ID List" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=SBJ].role[classCode=PAT]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.subject" />
      </mapping>
    </element>
    <element id="MedicationUsage.encounter">
      <path value="MedicationUsage.encounter" />
      <short value="Encounter associated with MedicationUsage" />
      <definition value="The encounter that establishes the context for this MedicationUsage." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Encounter" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.context" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=COMP].source[classCode=ENC, moodCode=EVN, code=&quot;type of encounter or episode&quot;]" />
      </mapping>
    </element>
    <element id="MedicationUsage.effective[x]">
      <path value="MedicationUsage.effective[x]" />
      <short value="The date/time or interval when the medication is/was/will be taken" />
      <definition value="The interval of time during which it is being asserted that the patient is/was/will be taking the medication (or was not taking, when the MedicationUsage.adherence element is Not Taking)." />
      <comment value="This attribute reflects the period over which the patient consumed the medication and is expected to be populated on the majority of Medication Usages. If the medication is still being taken and is expected to continue indefinitely at the time the usage is recorded, the &quot;end&quot; date will be omitted.  If the end date is known, then it is included as the &quot;end date&quot;.  The date/time attribute supports a variety of dates - year, year/month and exact date.  If something more than this is required, this should be conveyed as text." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <type>
        <code value="Period" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="workflow" />
        <map value="Event.occurrence[x]" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.done[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".effectiveTime" />
      </mapping>
    </element>
    <element id="MedicationUsage.dateAsserted">
      <path value="MedicationUsage.dateAsserted" />
      <short value="When the usage was asserted?" />
      <definition value="The date when the Medication Usage was asserted by the information source." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="dateTime" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.recorded" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=AUT].time" />
      </mapping>
    </element>
    <element id="MedicationUsage.informationSource">
      <path value="MedicationUsage.informationSource" />
      <short value="Person or organization that provided the information about the taking of this medication" />
      <definition value="The person or organization that provided the information about the taking of this medication. Note: Use derivedFrom when a MedicationUsage is derived from other resources, e.g. Claim or MedicationRequest." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Patient" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Practitioner" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/PractitionerRole" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/RelatedPerson" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Organization" />
      </type>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.source" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".participation[typeCode=INF].role[classCode=PAT, or codes for Practitioner or Related Person (if PAT is the informer, then syntax for self-reported =true)" />
      </mapping>
    </element>
    <element id="MedicationUsage.derivedFrom">
      <path value="MedicationUsage.derivedFrom" />
      <short value="Link to information used to derive the MedicationUsage" />
      <definition value="Allows linking the MedicationUsage to the underlying MedicationRequest, or to other information that supports or is used to derive the MedicationUsage." />
      <comment value="Likely references would be to MedicationRequest, MedicationDispense, Claim, Observation or QuestionnaireAnswers.  The most common use cases for deriving a MedicationUsage comes from creating a MedicationUsage from a MedicationRequest or from a lab observation or a claim.  it should be noted that the amount of information that is available varies from the type resource that you derive the MedicationUsage from." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Resource" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value=".outboundRelationship[typeCode=SPRT]/target[classCode=ACT,moodCode=EVN]" />
      </mapping>
    </element>
    <element id="MedicationUsage.reason">
      <path value="MedicationUsage.reason" />
      <short value="Reason for why the medication is being/was taken" />
      <definition value="A concept, Condition or observation that supports why the medication is being/was taken." />
      <comment value="This could be a diagnosis code. If a full condition record exists or additional detail is needed, use reasonForUseReference." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="CodeableReference" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Condition" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/Observation" />
        <targetProfile value="http://hl7.org/fhir/StructureDefinition/DiagnosticReport" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationReason" />
        </extension>
        <strength value="example" />
        <description value="A coded concept identifying why the medication is being taken." />
        <valueSet value="http://hl7.org/fhir/ValueSet/condition-code" />
      </binding>
      <mapping>
        <identity value="workflow" />
        <map value="Event.reason" />
      </mapping>
      <mapping>
        <identity value="w5" />
        <map value="FiveWs.why[x]" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".reasonCode" />
      </mapping>
    </element>
    <element id="MedicationUsage.note">
      <path value="MedicationUsage.note" />
      <short value="Further information about the usage" />
      <definition value="Provides extra information about the Medication Usage that is not conveyed by the other attributes." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Annotation" />
      </type>
      <mapping>
        <identity value="workflow" />
        <map value="Event.note" />
      </mapping>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=SUBJ]/source[classCode=OBS,moodCode=EVN,code=&quot;annotation&quot;].value" />
      </mapping>
    </element>
    <element id="MedicationUsage.renderedDosageInstruction">
      <path value="MedicationUsage.renderedDosageInstruction" />
      <short value="Full representation of the dosage instructions" />
      <definition value="The full representation of the dose of the medication included in all dosage instructions.  To be used when multiple dosage instructions are included to represent complex dosing such as increasing or tapering doses." />
      <requirements value="The content of the renderedDosageInstructions must not be different than the dose represented in the dosageInstruction content." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="string" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="SubstanceAdministration.text" />
      </mapping>
    </element>
    <element id="MedicationUsage.dosage">
      <extension url="http://hl7.org/fhir/build/StructureDefinition/uml-dir">
        <valueCode value="right" />
      </extension>
      <path value="MedicationUsage.dosage" />
      <short value="Details of how medication is/was taken or should be taken" />
      <definition value="Indicates how the medication is/was or should be taken by the patient." />
      <comment value="The dates included in the dosage on a Medication Usage reflect the dates for a given dose.  For example, &quot;from November 1, 2016 to November 3, 2016, take one tablet daily and from November 4, 2016 to November 7, 2016, take two tablets daily.&quot;  It is expected that this specificity may only be populated where the patient brings in their labeled container or where the Medication Usage is derived from a MedicationRequest." />
      <min value="0" />
      <max value="*" />
      <type>
        <code value="Dosage" />
      </type>
      <mapping>
        <identity value="rim" />
        <map value="refer dosageInstruction mapping" />
      </mapping>
    </element>
    <element id="MedicationUsage.adherence">
      <path value="MedicationUsage.adherence" />
      <short value="Indicates if the medication is being consumed or administered as instructed" />
      <definition value="Indicates if the medication is being consumed or administered as instructed." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="BackboneElement" />
      </type>
      <isSummary value="true" />
      <mapping>
        <identity value="rim" />
        <map value="outboundRelationship[typeCode=PERT].target[classCode=OBV,moodCode=EVN].value[xsi:type=BL]" />
      </mapping>
    </element>
    <element id="MedicationUsage.adherence.code">
      <path value="MedicationUsage.adherence.code" />
      <short value="Type of adherence" />
      <definition value="Type of the adherence for the medication." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <isSummary value="true" />
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationUsageAdherence" />
        </extension>
        <strength value="example" />
        <valueSet value="http://hl7.org/fhir/ValueSet/medication-usage-adherence" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value="outboundRelationship[typeCode=PERT].target[classCode=OBV,moodCode=EVN].value[xsi:type=BL]" />
      </mapping>
    </element>
    <element id="MedicationUsage.adherence.reason">
      <path value="MedicationUsage.adherence.reason" />
      <short value="Details of the reason for the current use of the medication" />
      <definition value="Captures the reason for the current use or adherence of a medication." />
      <comment value="This is generally only used for &quot;exception&quot; statuses such as &quot;entered-in-error&quot;. The reason for performing the event at all is captured in reasonCode, not here." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <extension url="http://hl7.org/fhir/StructureDefinition/elementdefinition-bindingName">
          <valueString value="MedicationUsageStatusReason" />
        </extension>
        <strength value="example" />
        <valueSet value="http://hl7.org/fhir/ValueSet/reason-medication-status-codes" />
      </binding>
      <mapping>
        <identity value="rim" />
        <map value=".inboundRelationship[typeCode=SUBJ].source[classCode=CACT, moodCode=EVN].reasonCode" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>