<StructureDefinition xmlns="http://hl7.org/fhir">
  <url value="http://apiframework.dedalus.eu/fhir/StructureDefinition/List-ForAllergyIntolerance" />
  <name value="List-ForAllergyIntolerance" />
  <title value="List-ForAllergyIntollerance" />
  <status value="active" />
  <experimental value="false" />
  <description value="Represent a collected snapshot of medication statement information, either flat or grouped by sub-lists of joint statements, that is the output of the medication history collection process (e.g. performed when a patient is admitted)" />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="List" />
  <baseDefinition value="http://apiframework.dedalus.eu/fhir/StructureDefinition/List" />
  <derivation value="constraint" />
  <differential>
    <element id="List.status">
      <path value="List.status" />
      <fixedCode value="current" />
    </element>
    <element id="List.mode">
      <path value="List.mode" />
      <fixedCode value="snapshot" />
    </element>
    <element id="List.title">
      <path value="List.title" />
      <mustSupport value="true" />
    </element>
    <element id="List.code">
      <path value="List.code" />
      <min value="1" />
      <mustSupport value="true" />
      <binding>
        <strength value="required" />
        <valueSetReference>
          <reference value="http://apiframework.dedalus.eu/fhir/ValueSet/ListCodes" />
        </valueSetReference>
      </binding>
    </element>
    <element id="List.code.coding">
      <path value="List.code.coding" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="List.code.coding.code">
      <path value="List.code.coding.code" />
      <min value="1" />
      <fixedCode value="medication-history" />
    </element>
    <element id="List.subject">
      <path value="List.subject" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Patient" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="List.encounter">
      <path value="List.encounter" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Encounter" />
      </type>
      <mustSupport value="true" />
    </element>
    <element id="List.date">
      <path value="List.date" />
      <min value="1" />
    </element>
    <element id="List.source">
      <path value="List.source" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Practitioner" />
      </type>
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/Patient" />
      </type>
    </element>
    <element id="List.entry.item">
      <path value="List.entry.item" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://apiframework.dedalus.eu/fhir/StructureDefinition/AllergyIntolerance" />
      </type>
    </element>
    <element id="List.entry.item.reference">
      <path value="List.entry.item.reference" />
      <min value="1" />
    </element>
    <element id="List.emptyReason">
      <path value="List.emptyReason" />
      <mustSupport value="true" />
    </element>
  </differential>
</StructureDefinition>