{
  "resourceType": "StructureDefinition",
  "id": "AllergyIntolerance",
  "url": "http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-allergyIntolerance",
  "version": "1.0.0",
  "name": "AllergyIntoleranceEHR",
  "title": "AllergyIntolerance EHR",
  "status": "active",
  "description": "Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance.contained",
        "path": "AllergyIntolerance.contained",
        "short": "A person that is related to a patient, but who is not a direct target of care",
        "definition": "Information about a person that is involved in the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process.",
        "type": [
          {
            "code": "Resource",
            "profile": [
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/proifle-relatedPerson"
            ]
          }
        ],
        "mustSupport": true,
        "mapping": [
          {
            "identity": "rim",
            "map": "Entity. Role, or Act"
          },
          {
            "identity": "rim",
            "map": "N/A"
          },
          {
            "identity": "rim",
            "map": "role"
          }
        ]
      },
      {
        "id": "AllergyIntolerance.extension:abatement",
        "path": "AllergyIntolerance.extension",
        "sliceName": "abatement",
        "type": [
          {
            "code": "Extension",
            "profile": [
              "http://hl7.org/fhir/StructureDefinition/allergyintolerance-abatement"
            ]
          }
        ]
      },
      {
        "id": "AllergyIntolerance.clinicalStatus",
        "path": "AllergyIntolerance.clinicalStatus",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.category",
        "path": "AllergyIntolerance.category",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "min": 1,
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/CodeableConcept-oh-ehr"
            ]
          }
        ],
        "mustSupport": true,
        "binding": {
          "extension": [
            {
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding",
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://fhir.infoway-inforoute.ca/ValueSet/prescriptionmedicinalproduct"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "Canadian Clinical Drug Data Set providing codes for identification of medications and medical devices in Canada. While not the preferred terminology for broader pan-Canadian exchange use cases, this additional binding is surfaced to socialize the value sets that may be more commonly in use. Where multiple codings can be supplied, it is encouraged to supply the original coding alongside the pan-Canadian preferred terminology."
                },
                {
                  "url": "key",
                  "valueId": "prescriptionMedicinalProduct"
                }
              ]
            },
            {
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding",
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "https://fhir.infoway-inforoute.ca/ValueSet/LicensedNaturalHealthProducts"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "All Natural Product Number (NPN) and Homeopathic Medicine Number (DIN-HM) codes that are licensed by Health Canada and present in the Licensed Natural Health Products Database."
                },
                {
                  "url": "key",
                  "valueId": "licensedNaturalHealthProducts"
                }
              ]
            },
            {
              "url": "http://hl7.org/fhir/tools/StructureDefinition/additional-binding",
              "extension": [
                {
                  "url": "purpose",
                  "valueCode": "candidate"
                },
                {
                  "url": "valueSet",
                  "valueCanonical": "http://hl7.org/fhir/uv/ips/ValueSet/absent-or-unknown-allergies-uv-ips"
                },
                {
                  "url": "documentation",
                  "valueMarkdown": "A code that classifies a use of Contrast for an MI procedure. This is used for searching, sorting and display purposes."
                },
                {
                  "url": "key",
                  "valueId": "absentUnknownAllergiesIPS"
                }
              ]
            }
          ],
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/pharmaceuticalbiologicproductandsubstancecode"
        }
      },
      {
        "id": "AllergyIntolerance.code.coding.display.extension:translation",
        "path": "AllergyIntolerance.code.coding.display.extension",
        "sliceName": "translation"
      },
      {
        "id": "AllergyIntolerance.code.coding.display.extension:translation.extension",
        "path": "AllergyIntolerance.code.coding.display.extension.extension",
        "min": 2
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-patient"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.patient.reference",
        "path": "AllergyIntolerance.patient.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.encounter",
        "path": "AllergyIntolerance.encounter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-encounter"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.encounter.reference",
        "path": "AllergyIntolerance.encounter.reference",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.onset[x]",
        "path": "AllergyIntolerance.onset[x]",
        "slicing": {
          "discriminator": [
            {
              "type": "type",
              "path": "$this"
            }
          ],
          "ordered": false,
          "rules": "open"
        },
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.onset[x]:onsetDateTime",
        "path": "AllergyIntolerance.onset[x]",
        "sliceName": "onsetDateTime",
        "type": [
          {
            "code": "dateTime"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.onset[x]:onsetString",
        "path": "AllergyIntolerance.onset[x]",
        "sliceName": "onsetString",
        "type": [
          {
            "code": "string"
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.recordedDate",
        "path": "AllergyIntolerance.recordedDate",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.recorder",
        "path": "AllergyIntolerance.recorder",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-practitioner",
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-practitionerRole",
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/profile-patient",
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/proifle-relatedPerson"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.lastOccurrence",
        "path": "AllergyIntolerance.lastOccurrence",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction",
        "path": "AllergyIntolerance.reaction",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation",
        "path": "AllergyIntolerance.reaction.manifestation",
        "type": [
          {
            "code": "CodeableConcept",
            "profile": [
              "http://ontariohealth.ca/fhir/ehr/StructureDefinition/CodeableConcept-oh-ehr"
            ]
          }
        ],
        "mustSupport": true,
        "binding": {
          "strength": "preferred",
          "valueSet": "https://fhir.infoway-inforoute.ca/ValueSet/clinicalfindingcode"
        }
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation.coding.display.extension:translation",
        "path": "AllergyIntolerance.reaction.manifestation.coding.display.extension",
        "sliceName": "translation"
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation.coding.display.extension:translation.extension",
        "path": "AllergyIntolerance.reaction.manifestation.coding.display.extension.extension",
        "min": 2
      },
      {
        "id": "AllergyIntolerance.reaction.severity",
        "path": "AllergyIntolerance.reaction.severity",
        "mustSupport": true
      }
    ]
  }
}