<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="au-allergyintolerance" />
  <url value="http://hl7.org.au/fhir/StructureDefinition/au-allergyintolerance" />
  <version value="1.1.0" />
  <name value="AUBaseAllergyIntolerance" />
  <title value="AU Base Allergy Intolerance" />
  <status value="draft" />
  <date value="2018-08-20" />
  <publisher value="Health Level Seven Australia" />
  <contact>
    <telecom>
      <system value="url" />
      <value value="http://hl7.org.au" />
      <use value="work" />
    </telecom>
  </contact>
  <description value="This profile defines an allergy intolerance structure including core localisation concepts for use in an Australian context." />
  <fhirVersion value="3.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="AllergyIntolerance" />
  <baseDefinition value="http://hl7.org/fhir/StructureDefinition/AllergyIntolerance" />
  <derivation value="constraint" />
  <differential>
    <element id="AllergyIntolerance">
      <path value="AllergyIntolerance" />
      <short value="An allergy or intolerance statement in an Australian healthcare context" />
      <constraint>
        <key value="inv-ait-0" />
        <severity value="error" />
        <human value="Recorder and author related party shall not coexist" />
        <expression value="(extension('http://hl7.org.au/fhir/StructureDefinition/author-related-person').exists() and recorder.exists()).not()" />
      </constraint>
    </element>
    <element id="AllergyIntolerance.extension">
      <path value="AllergyIntolerance.extension" />
      <slicing>
        <discriminator>
          <type value="value" />
          <path value="url" />
        </discriminator>
        <rules value="open" />
      </slicing>
    </element>
    <element id="AllergyIntolerance.extension:authorRelatedPerson">
      <path value="AllergyIntolerance.extension" />
      <sliceName value="authorRelatedPerson" />
      <type>
        <code value="Extension" />
        <profile value="http://hl7.org.au/fhir/StructureDefinition/author-related-person" />
      </type>
    </element>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code" />
      <binding>
        <strength value="preferred" />
        <description value="Preferred SNOMED-CT coding for type of the substance/product, allergy or intolerance condition, or negation/exclusion codes for reporting no known allergies." />
        <valueSetUri value="https://healthterminologies.gov.au/fhir/ValueSet/indicator-hypersensitivity-intolerance-to-substance-1" />
      </binding>
    </element>
    <element id="AllergyIntolerance.reaction">
      <path value="AllergyIntolerance.reaction" />
      <short value="Reaction details" />
    </element>
    <element id="AllergyIntolerance.reaction.substance">
      <path value="AllergyIntolerance.reaction.substance" />
      <binding>
        <strength value="preferred" />
        <description value="Preferred SNOMED-CT coding defining the type of the substance (including pharmaceutical products)." />
        <valueSetUri value="https://healthterminologies.gov.au/fhir/ValueSet/adverse-reaction-agent-1" />
      </binding>
    </element>
    <element id="AllergyIntolerance.reaction.manifestation">
      <path value="AllergyIntolerance.reaction.manifestation" />
      <binding>
        <strength value="preferred" />
        <description value="Preferred SNOMED-CT coding of clinical symptoms and/or signs that are observed or associated with an Adverse Reaction Event." />
        <valueSetUri value="https://healthterminologies.gov.au/fhir/ValueSet/clinical-finding-1" />
      </binding>
    </element>
  </differential>
</StructureDefinition>