{
  "resourceType": "StructureDefinition",
  "id": "AllergyIntoleranceMERT",
  "url": "https://intrahealth.com/fhir/mert/StructureDefinition/AllergyIntoleranceMERT",
  "name": "AllergyIntoleranceMERT",
  "title": "AllergyIntolerance (MERT)",
  "status": "draft",
  "description": "This profile describes the AllergyIntolerance for MERT.",
  "fhirVersion": "4.0.1",
  "kind": "resource",
  "abstract": false,
  "type": "AllergyIntolerance",
  "baseDefinition": "http://hl7.org/fhir/StructureDefinition/AllergyIntolerance",
  "derivation": "constraint",
  "differential": {
    "element": [
      {
        "id": "AllergyIntolerance.clinicalStatus",
        "path": "AllergyIntolerance.clinicalStatus",
        "comment": "Required in MERT. Uses base required binding (AllergyIntoleranceClinicalStatusCodes).",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.type",
        "path": "AllergyIntolerance.type",
        "comment": "Indicates allergy or intolerance mechanism when known. Uses base required binding.",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.category",
        "path": "AllergyIntolerance.category",
        "comment": "Use category when known (food | medication | environment | biologic). Uses base required binding."
      },
      {
        "id": "AllergyIntolerance.code",
        "path": "AllergyIntolerance.code",
        "comment": "Transport-first: send existing source coding when available (e.g., DIN for medication allergies). If no appropriate coded concept is available, populate CodeableConcept.text.",
        "min": 1,
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.patient",
        "path": "AllergyIntolerance.patient",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://intrahealth.com/fhir/mert/StructureDefinition/PatientMERT"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.encounter",
        "path": "AllergyIntolerance.encounter",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.onset[x]",
        "path": "AllergyIntolerance.onset[x]",
        "comment": "Use onset[x] when available to indicate when the allergy/intolerance was first identified.",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.recordedDate",
        "path": "AllergyIntolerance.recordedDate",
        "comment": "Date the first version of the resource instance was recorded.",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.asserter",
        "path": "AllergyIntolerance.asserter",
        "type": [
          {
            "code": "Reference",
            "targetProfile": [
              "https://intrahealth.com/fhir/mert/StructureDefinition/PractitionerMERT"
            ]
          }
        ],
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.note",
        "path": "AllergyIntolerance.note",
        "comment": "Additional information about the allergy/intolerance not captured in structured fields.",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction",
        "path": "AllergyIntolerance.reaction",
        "comment": "Details about adverse reaction events linked to exposure.",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction.substance",
        "path": "AllergyIntolerance.reaction.substance",
        "comment": "Specific substance or product responsible for the reaction (base example binding)."
      },
      {
        "id": "AllergyIntolerance.reaction.manifestation",
        "path": "AllergyIntolerance.reaction.manifestation",
        "comment": "Clinical signs or symptoms associated with the reaction. Prefer SNOMED CT when available.",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction.description",
        "path": "AllergyIntolerance.reaction.description",
        "comment": "Narrative description of the reaction event."
      },
      {
        "id": "AllergyIntolerance.reaction.onset",
        "path": "AllergyIntolerance.reaction.onset",
        "comment": "Date/time when reaction manifestations occurred."
      },
      {
        "id": "AllergyIntolerance.reaction.severity",
        "path": "AllergyIntolerance.reaction.severity",
        "comment": "Severity of the reaction event (mild | moderate | severe). Uses base required binding.",
        "mustSupport": true
      },
      {
        "id": "AllergyIntolerance.reaction.exposureRoute",
        "path": "AllergyIntolerance.reaction.exposureRoute",
        "comment": "Route of exposure (e.g., oral, inhaled). Prefer SNOMED CT route codes when available."
      },
      {
        "id": "AllergyIntolerance.reaction.note",
        "path": "AllergyIntolerance.reaction.note",
        "comment": "Additional text about the reaction not captured elsewhere."
      }
    ]
  }
}