<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="shr-medication-MedicationUsed" />
  <text>
    <status value="generated" />
    <div xmlns="http://www.w3.org/1999/xhtml">
      <p>
        <b>SHR MedicationUsed Profile</b>
      </p>
      <p>A record of the use of a medication.</p>
      <p>
        <b>SHR Mapping Summary</b>
      </p>
      <p>
        <pre>shr.medication.MedicationUsed maps to http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement:
  Informant maps to informationSource
  Entry.CreationTime maps to dateAsserted
  MedicationOrCode maps to medication[x]
  Category maps to category
  fix taken to #y
  constrain reasonNotTaken to 0..0
  constrain dosage to 0..1
  Dosage maps to dosage
  PerformedContext.Reason maps to reasonCode
  PerformedContext.OccurrenceTimeOrPeriod maps to effective[x]
  PerformedContext.Status maps to status
</pre>
      </p>
    </div>
  </text>
  <url value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-medication-MedicationUsed" />
  <identifier>
    <system value="http://standardhealthrecord.org" />
    <value value="shr.medication.MedicationUsed" />
  </identifier>
  <version value="0.0.1" />
  <name value="SHR MedicationUsed Profile" />
  <status value="draft" />
  <date value="2017-12-20" />
  <publisher value="The MITRE Corporation: Standard Health Record Collaborative" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://standardhealthrecord.org" />
    </telecom>
  </contact>
  <description value="A record of the use of a medication." />
  <jurisdiction>
    <coding>
      <system value="urn:iso:std:iso:3166" />
      <code value="US" />
      <display value="United States Minor Outlying Islands (the)" />
    </coding>
  </jurisdiction>
  <fhirVersion value="3.0.1" />
  <mapping>
    <identity value="argonaut-dq-dstu2" />
    <uri value="http://unknown.org/Argonaut DQ DSTU2" />
    <name value="Argonaut DQ DSTU2" />
  </mapping>
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Mapping" />
  </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/w5" />
    <name value="W5 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="MedicationStatement" />
  <baseDefinition value="http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationstatement" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationStatement:shr-medication-MedicationUsed">
      <path value="MedicationStatement" />
      <short value="SHR MedicationUsed Profile" />
      <definition value="A record of the use of a medication." />
      <mustSupport value="false" />
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.extension:relatedencounter">
      <path value="MedicationStatement.extension" />
      <sliceName value="relatedencounter" />
      <definition value="If content was generated during a patient encounter, related encounter is the encounter where the information was gained." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-RelatedEncounter-extension" />
      </type>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.extension:author">
      <path value="MedicationStatement.extension" />
      <sliceName value="author" />
      <definition value="The person or organization who created the entry and is responsible for (and may certify) the content." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-base-Author-extension" />
      </type>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.extension:type">
      <path value="MedicationStatement.extension" />
      <sliceName value="type" />
      <definition value="The most specific code (lowest level term) describing the kind or sort of thing being represented." />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Type-extension" />
      </type>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.extension:performedcontext">
      <path value="MedicationStatement.extension" />
      <sliceName value="performedcontext" />
      <definition value="ActionContext indicating actual performance or execution of a healthcare-related action, e.g., 3rd dose of Hepatitis B vaccine administered on Dec 4th 2012, appendectomy performed today." />
      <min value="1" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-action-PerformedContext-extension" />
      </type>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.extension:performedcontext.extension:status">
      <path value="MedicationStatement.extension.extension" />
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.extension:performedcontext.extension:status.value[x]">
      <path value="MedicationStatement.extension.extension.value[x]" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/ValueSet/medication-statement-status" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.medication[x]">
      <path value="MedicationStatement.medication[x]" />
      <slicing id="72">
        <discriminator>
          <type value="type" />
          <path value="$this" />
        </discriminator>
        <ordered value="false" />
        <rules value="open" />
      </slicing>
      <type>
        <code value="CodeableConcept" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Medication" />
      </type>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.medicationCodeableConcept:CodeableConcept">
      <path value="MedicationStatement.medicationCodeableConcept" />
      <type>
        <code value="CodeableConcept" />
      </type>
      <binding>
        <strength value="extensible" />
        <valueSetReference>
          <reference value="http://hl7.org/fhir/us/core/ValueSet/us-core-medication-codes" />
        </valueSetReference>
      </binding>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.informationSource">
      <path value="MedicationStatement.informationSource" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Patient" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-RelatedPerson" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-entity-Organization" />
      </type>
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.taken">
      <path value="MedicationStatement.taken" />
      <fixedCode value="y" />
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.reasonNotTaken">
      <path value="MedicationStatement.reasonNotTaken" />
      <min value="0" />
      <max value="0" />
    </element>
    <element id="MedicationStatement:shr-medication-MedicationUsed.dosage">
      <path value="MedicationStatement.dosage" />
      <min value="0" />
      <max value="1" />
      <type>
        <code value="Dosage" />
        <profile value="http://standardhealthrecord.org/fhir/StructureDefinition/shr-medication-Dosage" />
      </type>
    </element>
  </differential>
</StructureDefinition>