<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="MedicationStatement-uv-ips" />
  <url value="http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationStatement-uv-ips" />
  <name value="MedicationStatementIPS" />
  <title value="Medication Statement (IPS)" />
  <status value="active" />
  <publisher value="HL7 International" />
  <description value="This profile represents the constraints applied to the MedicationStatement resource by the International Patient Summary (IPS) FHIR Implementation Guide, based on FHIR R4. A record of a medication statement is represented in the patient summary as an instance of a MedicationStatement resource constrained by this profile." />
  <purpose value="This profile constrains the representation of a medication statement related to the patient, in the context of the international patient summary as specified by the IPS project of HL7 International." />
  <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" />
    </element>
    <element id="MedicationStatement.status">
      <path value="MedicationStatement.status" />
      <comment value="In the scope of the IPS the entered-in-error concept is not allowed." />
    </element>
    <element id="MedicationStatement.medication[x]">
      <path value="MedicationStatement.medication[x]" />
      <!-- The slicing below is expected to be replaced in R5 by a 'medication' element of the new CodeableReference
				data type with the appropriate constraints. -->
      <definition value="Identifies the medication being administered or the reason for absent or unknown Medication. This is either a link to a resource representing the details of the medication or a simple attribute carrying a code. To improve global interoperability is strongly encouraged that the reference to a medication resource is used, limiting the usage of the medicationCodeableConcept only to the cases in which no other information than a simple code is available." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Medication-uv-ips" />
      </type>
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <mustSupport value="true" />
      <binding>
        <strength value="preferred" />
        <description value="SNOMED CT medications (Pharmaceutical / biologic product) or a code for absent/unknown medication" />
        <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/medication-snomed-absent-unknown-uv-ips" />
      </binding>
    </element>
    <element id="MedicationStatement.subject">
      <path value="MedicationStatement.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationStatement.subject.reference">
      <path value="MedicationStatement.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationStatement.effective[x]">
      <path value="MedicationStatement.effective[x]" />
      <min value="1" />
      <max value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationStatement.effective[x].extension:data-absent-reason">
      <path value="MedicationStatement.effective[x].extension" />
      <sliceName value="data-absent-reason" />
      <short value="effective[x] absence reason" />
      <definition value="Provides a reason why the effectiveTime is missing." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationStatement.dosage">
      <path value="MedicationStatement.dosage" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationStatement.dosage.text">
      <path value="MedicationStatement.dosage.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationStatement.dosage.timing">
      <path value="MedicationStatement.dosage.timing" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationStatement.dosage.route">
      <path value="MedicationStatement.dosage.route" />
      <type>
        <code value="CodeableConcept" />
        <profile value="http://hl7.org/fhir/uv/ips/StructureDefinition/CodeableConcept-uv-ips" />
      </type>
      <binding>
        <strength value="preferred" />
        <description value="EDQM Standards Terms" />
        <valueSet value="http://hl7.org/fhir/uv/ips/ValueSet/medicine-route-of-administration" />
      </binding>
    </element>
  </differential>
</StructureDefinition>