<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://interopsante.org/fhir/StructureDefinition/FrMedicationCompound" />
  <version value="1.0.0" />
  <name value="FrMedicationCompound" />
  <title value="French compound Medication" />
  <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="A complex medication composed of two to many simple médication. The simple medications component are described in as many ingredient.itemReference referencing a Medication resource profiled fr-medication-1." />
  <purpose value="Compound medication description" />
  <copyright value="InterOp&amp;#39;Sant&amp;#233; 2021" />
  <fhirVersion value="4.0.1" />
  <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="Medication" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/Medication" />
  <derivation value="constraint" />
  <differential>
    <element id="Medication">
      <path value="Medication" />
      <short value="Definition of a Medication compound of a MedicinalRequest, Dispense or Usage" />
      <definition value="Medication compound of a Medication representing the composition of a MedicationRequest, a MedicationDispense or a MedicationUsage (pka MedicationStatement). For instance, Glucose 5% 1L part of an infusion made of 3 compounds, Glucose 5% 1L + Sodium chloride 3g + Potassium chloride 2g." />
    </element>
    <element id="Medication.code">
      <path value="Medication.code" />
      <short value="No code that identify this medication" />
      <definition value="Defines the text of the compound detailed in this compound Medication." />
      <requirements value="Text of compound SHALL be provided." />
      <min value="1" />
    </element>
    <element id="Medication.code.coding">
      <path value="Medication.code.coding" />
      <short value="Generaly no code for compound medicinal product" />
      <definition value="A code identifing the compound medicinal product. Generaly none : no code defined for G5 1L + NaCl 3g + KCl 2g." />
      <comment value="Codes may be defined very casually in enumerations." />
    </element>
    <element id="Medication.code.text">
      <path value="Medication.code.text" />
      <requirements value="Although a code is genraly unavailable for a compoud medicinal product, there is alway a denomination for it." />
      <min value="1" />
    </element>
    <element id="Medication.form">
      <path value="Medication.form" />
      <binding>
        <strength value="extensible" />
        <valueSet value="http://interopsante.org/fhir/ValueSet/fr-mp-dose-form" />
      </binding>
    </element>
    <element id="Medication.amount">
      <path value="Medication.amount" />
      <definition value="Specific amount in Medication defined by the element collection. For instance 1 L for the amount of the compound Glucose 5% of an infusion Glucose 5% 1L + Sodium chloride 3g + Potassium chloride 2g. Or 3 g for the amount of compound Sodium chloride of the same infusion. SHALL be 1 (without unit, ie. code = 1 in UCUM system) when there is multiple ingredient element with at least the strenght element of two of them expressed in asbolute quantity (ie. simple quantity)." />
      <comment value="The Ratio datatype is limited to numerator value, leading back to the SimpleQuantity datatype." />
      <type>
        <code value="Ratio" />
        <profile value="http://interopsante.org/fhir/StructureDefinition/FrRatioUcum" />
      </type>
    </element>
    <element id="Medication.ingredient">
      <path value="Medication.ingredient" />
      <short value="Medication component of compound medication" />
      <definition value="Identifies a medicinal component of the compound medicinal product" />
      <comment value="The Medication SHALL contain ALL the items of the item element list AND ONLY the items of the item element list." />
      <min value="1" />
    </element>
    <element id="Medication.ingredient.item[x]">
      <path value="Medication.ingredient.item[x]" />
      <short value="The actual compound" />
      <definition value="The actual compound, either nonproprietary named medication or branded named medication identified by a UCD code." />
      <type>
        <code value="Reference" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrMedicationNonproprietaryName" />
        <targetProfile value="http://interopsante.org/fhir/StructureDefinition/FrMedicationUcd" />
      </type>
    </element>
    <element id="Medication.ingredient.strength">
      <path value="Medication.ingredient.strength" />
      <requirements value="The amount and strength of the medication component are described in the item element referencing a Medication ressource profiled fr-medication-1." />
      <max value="0" />
    </element>
    <element id="Medication.batch">
      <path value="Medication.batch" />
      <max value="0" />
    </element>
  </differential>
</StructureDefinition>