<StructureDefinition xmlns="http://hl7.org/fhir">
  <meta>
    <lastUpdated value="2022-02-15T06:39:11.411+00:00" />
  </meta>
  <url value="http://example.org/fhir/StructureDefinition/crs-allergyIntolerance" />
  <name value="CrsAllergyIntolerance" />
  <status value="draft" />
  <fhirVersion value="4.0.1" />
  <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="AllergyIntolerance" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance" />
  <derivation value="constraint" />
  <differential>
    <element id="AllergyIntolerance.clinicalStatus">
      <path value="AllergyIntolerance.clinicalStatus" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.clinicalStatus.coding.system">
      <path value="AllergyIntolerance.clinicalStatus.coding.system" />
      <fixedUri value="http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical" />
    </element>
    <element id="AllergyIntolerance.category">
      <path value="AllergyIntolerance.category" />
      <min value="1" />
      <max value="1" />
    </element>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.code.text">
      <path value="AllergyIntolerance.code.text" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.onset[x]">
      <path value="AllergyIntolerance.onset[x]" />
      <min value="1" />
      <type>
        <code value="Period" />
      </type>
    </element>
    <element id="AllergyIntolerance.onset[x].start">
      <path value="AllergyIntolerance.onset[x].start" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding">
      <path value="AllergyIntolerance.reaction.substance.coding" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="system" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="AllergyIntolerance.reaction.substance.coding.system">
      <path value="AllergyIntolerance.reaction.substance.coding.system" />
      <fixedUri value="urn:oid:1.2.410.100110.400.1" />
    </element>
    <element id="AllergyIntolerance.reaction.onset">
      <path value="AllergyIntolerance.reaction.onset" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>