<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="MedicationRequest-uv-ips" />
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-category">
    <valueString value="Clinical.Medications" />
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-security-category">
    <valueCode value="patient" />
  </extension>
  <url value="http://hl7.org/fhir/uv/ips/StructureDefinition/MedicationRequest-uv-ips" />
  <version value="1.0.0" />
  <name value="MedicationRequestIPS" />
  <title value="Medication Request (IPS)" />
  <status value="active" />
  <date value="2021-05-14T21:56:28-05:00" />
  <publisher value="Health Level Seven International - Patient Care Work Group" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://www.hl7.org/Special/committees/patientcare" />
    </telecom>
  </contact>
  <description value="This profile represents the constraints applied to the MedicationRequest resource by the International Patient Summary (IPS) FHIR Implementation Guide, based on FHIR R4. A record of a medication request is represented in the patient summary as an instance of a MedicationRequest resource constrained by this profile." />
  <jurisdiction>
    <coding>
      <system value="http://unstats.un.org/unsd/methods/m49/m49.htm" />
      <code value="001" />
    </coding>
  </jurisdiction>
  <purpose value="This profile constrains the representation of a medication request related to the patient, in the context of the international patient summary as specified by the IPS project of HL7 International." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="workflow" />
    <uri value="http://hl7.org/fhir/workflow" />
    <name value="Workflow Pattern" />
  </mapping>
  <mapping>
    <identity value="script10.6" />
    <uri value="http://ncpdp.org/SCRIPT10_6" />
    <name value="Mapping to NCPDP SCRIPT 10.6" />
  </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="MedicationRequest" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/MedicationRequest" />
  <derivation value="constraint" />
  <differential>
    <element id="MedicationRequest">
      <path value="MedicationRequest" />
    </element>
    <element id="MedicationRequest.status">
      <path value="MedicationRequest.status" />
      <comment value="In the scope of the IPS the entered-in-error concept is not allowed." />
    </element>
    <element id="MedicationRequest.medication[x]">
      <path value="MedicationRequest.medication[x]" />
      <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. 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="CodeableConcept" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Medication-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="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://hl7.org/fhir/uv/ips/StructureDefinition/Patient-uv-ips" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.subject.reference">
      <path value="MedicationRequest.subject.reference" />
      <min value="1" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction">
      <path value="MedicationRequest.dosageInstruction" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.text">
      <path value="MedicationRequest.dosageInstruction.text" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.timing">
      <path value="MedicationRequest.dosageInstruction.timing" />
      <mustSupport value="true" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route">
      <path value="MedicationRequest.dosageInstruction.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>
    <element id="MedicationRequest.dispenseRequest.validityPeriod.extension:data-absent-reason">
      <path value="MedicationRequest.dispenseRequest.validityPeriod.extension" />
      <sliceName value="data-absent-reason" />
      <short value="validityPeriod absence reason" />
      <definition value="Provides a reason why the validityPeriod is missing." />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org/fhir/StructureDefinition/data-absent-reason" />
      </type>
    </element>
  </differential>
</StructureDefinition>