<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://interopsante.org/fhir/StructureDefinition/FrInpatientMedicationRequest" />
  <version value="1.0.0" />
  <name value="FrInpatientMedicationRequest" />
  <title value="French Inpatient MedicationRequest" />
  <status value="draft" />
  <experimental value="false" />
  <date value="2021-10-18" />
  <publisher value="InterOp'Santé - FRANCE" />
  <contact>
    <telecom>
      <system value="email" />
      <value value="fhir@interopsante.org" />
    </telecom>
  </contact>
  <description value="French inpatient medication request profile" />
  <copyright value="InterOp&amp;#39;Sant&amp;#233; 2021" />
  <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.extension">
      <path value="MedicationRequest.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="MedicationRequest.extension:treatmentIntent">
      <path value="MedicationRequest.extension" />
      <sliceName value="treatmentIntent" />
      <short value="overall treatment intent" />
      <definition value="the overall intention of the treatment" />
      <max value="1" />
      <type>
        <code value="Extension" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrTreatmentIntent" />
      </type>
      <meaningWhenMissing value="overall intention of the treatment not specified" />
    </element>
    <element id="MedicationRequest.extension:treatmentIntent.value[x].coding">
      <path value="MedicationRequest.extension.value[x].coding" />
      <definition value="SNOMED CT code minimal value set for overall treatment intent (extensible)" />
    </element>
    <element id="MedicationRequest.medication[x]">
      <path value="MedicationRequest.medication[x]" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrMedicationUcd" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrMedicationNonproprietaryName" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrMedicationCompound" />
      </type>
    </element>
    <element id="MedicationRequest.subject">
      <path value="MedicationRequest.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrPatient" />
      </type>
    </element>
    <element id="MedicationRequest.encounter">
      <path value="MedicationRequest.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrEncounter" />
      </type>
    </element>
    <element id="MedicationRequest.requester">
      <path value="MedicationRequest.requester" />
      <short value="Who requested the Request" />
      <definition value="The prescriber that initiated the request and has responsibility for its activation." />
      <min value="1" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrPractitioner" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction">
      <path value="MedicationRequest.dosageInstruction" />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dosageInstruction.route">
      <path value="MedicationRequest.dosageInstruction.route" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://interopsante.org/fhir/ValueSet/fr-route-of-administration" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction.method">
      <path value="MedicationRequest.dosageInstruction.method" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://interopsante.org/fhir/ValueSet/fr-method-of-administration" />
      </binding>
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.dose[x]">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.dose[x]" />
      <type>
        <code value="Range" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrRangeUcum" />
      </type>
      <type>
        <code value="Quantity" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrSimpleQuantityUcum" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction.doseAndRate.rate[x]">
      <path value="MedicationRequest.dosageInstruction.doseAndRate.rate[x]" />
      <definition value="Amount of medication per unit of time. Using a ratio, the denominator SHALL be a quantity of time. Using a simple quantity the UCUM unit SHALL be a unit of rate." />
      <type>
        <code value="Ratio" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrRatioUcum" />
      </type>
      <type>
        <code value="Range" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrRangeUcum" />
      </type>
      <type>
        <code value="Quantity" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrSimpleQuantityUcum" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.numerator" />
      <type>
        <code value="Quantity" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrSimpleQuantityUcum" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator">
      <path value="MedicationRequest.dosageInstruction.maxDosePerPeriod.denominator" />
      <type>
        <code value="Quantity" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrSimpleQuantityUcum" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerAdministration">
      <path value="MedicationRequest.dosageInstruction.maxDosePerAdministration" />
      <type>
        <code value="Quantity" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrSimpleQuantityUcum" />
      </type>
    </element>
    <element id="MedicationRequest.dosageInstruction.maxDosePerLifetime">
      <path value="MedicationRequest.dosageInstruction.maxDosePerLifetime" />
      <type>
        <code value="Quantity" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrSimpleQuantityUcum" />
      </type>
    </element>
    <element id="MedicationRequest.dispenseRequest.initialFill">
      <path value="MedicationRequest.dispenseRequest.initialFill" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.dispenseInterval">
      <path value="MedicationRequest.dispenseRequest.dispenseInterval" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.validityPeriod.start">
      <path value="MedicationRequest.dispenseRequest.validityPeriod.start" />
      <comment value="DateTime of the first prescribed dose." />
      <min value="1" />
    </element>
    <element id="MedicationRequest.dispenseRequest.validityPeriod.end">
      <path value="MedicationRequest.dispenseRequest.validityPeriod.end" />
      <comment value="DateTime of the last prescribe dose. Not defined for endless prescription (at prescription time). The high value includes any matching date/time. i.e. 2012-02-03T10:00:00 is in a period that has an end value of 2012-02-03." />
    </element>
    <element id="MedicationRequest.dispenseRequest.quantity">
      <path value="MedicationRequest.dispenseRequest.quantity" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator">
      <path value="MedicationRequest.dispenseRequest.expectedSupplyDuration.comparator" />
      <max value="0" />
    </element>
    <element id="MedicationRequest.dispenseRequest.performer">
      <path value="MedicationRequest.dispenseRequest.performer" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>