<StructureDefinition xmlns="http://hl7.org/fhir">
  <id value="allergyintolerance-ca-core" />
  <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
    <extension url="code">
      <valueCode value="SHALL:able-to-populate" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.code" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.code.coding" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.code.coding.code" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction.manifestation" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction.manifestation.coding" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction.manifestation.coding.code" />
    </extension>
    <extension url="actor">
      <valueCanonical value="http://fhir.infoway-inforoute.ca/ca-core/ActorDefinition/server" />
    </extension>
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/obligation">
    <extension url="code">
      <valueCode value="SHALL:handle" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.code" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.code.coding" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.code.coding.code" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction.manifestation" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction.manifestation.coding" />
    </extension>
    <extension url="elementId">
      <valueString value="AllergyIntolerance.reaction.manifestation.coding.code" />
    </extension>
    <extension url="actor">
      <valueCanonical value="http://fhir.infoway-inforoute.ca/ca-core/ActorDefinition/client" />
    </extension>
  </extension>
  <extension url="http://hl7.org/fhir/StructureDefinition/structuredefinition-imposeProfile">
    <valueCanonical value="http://hl7.org/fhir/ca/baseline/StructureDefinition/profile-allergyintolerance" />
  </extension>
  <url value="http://fhir.infoway-inforoute.ca/ca-core/StructureDefinition/allergyintolerance-ca-core" />
  <name value="AllergyIntoleranceCACore" />
  <title value="AllergyIntolerance (CA-Core)" />
  <status value="draft" />
  <experimental value="false" />
  <description value="This profile represents the constraints applied to the AllergyIntolerance resource by the CA Core+ project to represent the minimum expectations for the AllergyIntolerance resource when used to promote capacity building for functionality found across Canadian FHIR implementations. It is informed by the constraints of shared across CIHI pCHDCF data sets and has also undergone analysis to assert alignment with the [Canadian Baseline AllergyIntolerance Profile](http://build.fhir.org/ig/HL7-Canada/ca-baseline/branches/master/StructureDefinition-profile-allergyintolerance.html)" />
  <copyright value="Copyright © 2024+ Canada Health Infoway. All rights reserved. [Terms of Use and License Agreements](https://ic.infoway-inforoute.ca/en/about/tou). [Privacy Policy](https://www.infoway-inforoute.ca/en/legal/privacy-policy)." />
  <fhirVersion value="4.0.1" />
  <mapping>
    <identity value="pCHDCF-CACDI" />
    <name value="Pan-Canadian Health Data Content Framework - CACDI" />
  </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">
      <path value="AllergyIntolerance" />
      <mapping>
        <identity value="pCHDCF-CACDI" />
        <map value="Allergy-Intolerance" />
      </mapping>
    </element>
    <element id="AllergyIntolerance.code">
      <path value="AllergyIntolerance.code" />
      <comment value="The additionalBinding extension will be used to express the valueSet for additional negation/exclusion codes for reporting the known absence of allergies or intolerances. At the time of this release, the publisher of the current ValueSet for absence codes (IPS) is developing a SNOMED ValueSet that will replace the current http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-allergies-uv-ips" />
      <min value="1" />
      <binding>
        <extension url="http://hl7.org/fhir/tools/StructureDefinition/additional-binding">
          <extension url="purpose">
            <valueCode value="candidate" />
          </extension>
          <extension url="valueSet">
            <valueCanonical value="https://fhir.infoway-inforoute.ca/ValueSet/therapeuticmoietytm" />
          </extension>
          <extension url="documentation">
            <valueMarkdown value="Per pCHDCF CACDI:Codes for drugs related to an allergy/intolerance should come from the Substance (TM) value set." />
          </extension>
        </extension>
        <strength value="preferred" />
        <description value="Codes for that combine substance and pharmaceuticalbiologicproduct value sets from the SNOMED CT Canadian edition" />
        <valueSet value="http://fhir.infoway-inforoute.ca/ValueSet/substanceandpharmaceuticalbiologicproductcode" />
      </binding>
    </element>
    <element id="AllergyIntolerance.code.coding">
      <path value="AllergyIntolerance.code.coding" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.code.coding.code">
      <path value="AllergyIntolerance.code.coding.code" />
      <min value="1" />
      <mapping>
        <identity value="pCHDCF-CACDI" />
        <map value="Allergy-Intolerance Code" />
      </mapping>
    </element>
    <element id="AllergyIntolerance.patient">
      <path value="AllergyIntolerance.patient" />
      <type>
        <code value="Reference" />
        <targetProfile value="http://fhir.infoway-inforoute.ca/ca-core/StructureDefinition/patient-ca-core" />
      </type>
      <mapping>
        <identity value="pCHDCF-CACDI" />
        <map value="Patient" />
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction">
      <path value="AllergyIntolerance.reaction" />
      <mapping>
        <identity value="pCHDCF-CACDI" />
        <map value="Allergy-Intolerance Reaction" />
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.manifestation">
      <path value="AllergyIntolerance.reaction.manifestation" />
      <binding>
        <strength value="preferred" />
        <description value="Stub ValueSet for Pan-Canadian Health Concern ValueSet" />
        <valueSet value="http://fhir.infoway-inforoute.ca/ca-core/ValueSet/PHCVS" />
      </binding>
      <mapping>
        <identity value="pCHDCF-CACDI" />
        <map value="Reaction Manifestation" />
      </mapping>
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding">
      <path value="AllergyIntolerance.reaction.manifestation.coding" />
      <min value="1" />
    </element>
    <element id="AllergyIntolerance.reaction.manifestation.coding.code">
      <path value="AllergyIntolerance.reaction.manifestation.coding.code" />
      <min value="1" />
      <mapping>
        <identity value="pCHDCF-CACDI" />
        <map value="Reaction Manifestation Code" />
      </mapping>
    </element>
  </differential>
</StructureDefinition>