<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="AllergyIntolerancePSAB" />
  <url value="https://www.alberta.ca/fhir/psab/StructureDefinition/AllergyIntolerancePSAB" />
  <version value="1.2.0" />
  <name value="AllergyIntolerancePSAB" />
  <title value="AllergyIntolerance (PS-AB)" />
  <status value="draft" />
  <description value="This profile defines a set of constraints to the FHIR AllergyIntolerance resource for use in Alberta Patient Summaries (PS-AB). It re-profiles the PS-CA AllergyIntolerance profile and refines constraints applied to the AllergyIntolerance resource by the PS-CA project to represent the minimum expectations for the AllergyIntolerance resource when used in the PS-AB Composition profile." />
  <fhirVersion value="4.0.1" />
  <kind value="resource" />
  <abstract value="false" />
  <type value="AllergyIntolerance" />
  <baseDefinition value="http://fhir.infoway-inforoute.ca/io/psca/StructureDefinition/allergyintolerance-ca-ps" />
  <derivation value="constraint" />
  <differential>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code" />
      <comment value="No terminology has been defined in AB for this element. Future releases may include defined terminology" />
    </element>
    <element id="AllergyIntolerance.code.text">
      <path value="AllergyIntolerance.code.text" />
      <comment value="Required if any allergy/intolerance data is submitted; otherwise blank/null. String: Max Character length (250)" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.patient">
      <path value="AllergyIntolerance.patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSAB" />
      </type>
    </element>
    <element id="AllergyIntolerance.onset[x]">
      <path value="AllergyIntolerance.onset[x]" />
      <comment value="May be full or partial date, numeric age or string description" />
    </element>
    <element id="AllergyIntolerance.recorder">
      <path value="AllergyIntolerance.recorder" />
      <type>
        <code value="Reference" />
        <targetProfile value="https://www.alberta.ca/fhir/psab/StructureDefinition/PractitionerPSAB" />
        <targetProfile value="https://www.alberta.ca/fhir/psab/StructureDefinition/PractitionerRolePSAB" />
        <targetProfile value="https://www.alberta.ca/fhir/psab/StructureDefinition/PatientPSAB" />
      </type>
    </element>
    <element id="AllergyIntolerance.lastOccurrence">
      <path value="AllergyIntolerance.lastOccurrence" />
      <comment value="If supplied, optional YYYY-MM-DD format. Partial dates (YYYY only or YYYY-MM only) are accepted. ISO-8601 doesn't support partial dates like YYYY or YYYY-MM" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation">
      <path value="AllergyIntolerance.reaction.manifestation" />
      <comment value="AllergyIntolerance.reaction.manifestation only needs to be populated if AllergyIntolerance.reaction is populated with other details. No terminology has been defined in AB for this element. Future releases may include defined terminology" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.text">
      <path value="AllergyIntolerance.reaction.manifestation.text" />
      <comment value="AllergyIntolerance.reaction.manifestation.text only needs to be populated if AllergyIntolerance.reaction is populated with other details" />
      <min value="1" />
    </element>
  </differential>
</StructureDefinition>