AllergyIntolerance

The AllergyIntolerance resource records allergies and adverse reactions to substances, medications, food, and other agents. This is critical for patient safety.

API convention: the patient reference is sent as a flat string id field (patientId). encounterId is optional for the recording context. All resource ids are raw UUIDs (v4).

Creating an Allergy Record

curl -X POST https://api.esus.health/fhir/AllergyIntolerance \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "clinicalStatus": {
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
        "code": "active",
        "display": "Active"
      }]
    },
    "verificationStatus": {
      "coding": [{ "code": "confirmed", "display": "Confirmed" }]
    },
    "type": "allergy",
    "category": ["medication"],
    "criticality": "high",
    "code": {
      "coding": [{
        "system": "http://snomed.info/sct",
        "code": "387458008",
        "display": "Penicillin"
      }]
    },
    "reaction": [
      {
        "manifestation": [
          { "coding": [{ "code": "271807003", "display": "Urticaria" }] }
        ],
        "severity": "severe"
      }
    ]
  }'

The code field is optional — for verbal allergy history without a coded substance, the record can be created with reaction.manifestation alone.

Clinical Status

CodeDescription
activeCurrently affecting the patient
inactiveNo longer active
resolvedPreviously existed, now resolved

Criticality

LevelMeaning
lowLow risk if exposed
highHigh risk if exposed
unable-to-assessCannot be determined

Categories

  • medication — drug allergies
  • food — food allergies
  • environment — pollen, dust, animal dander
  • biologic — biologic therapies

Reaction Details

Each entry in reaction[] can additionally include:

FieldDescription
substanceThe specific agent that triggered this reaction (CodeableConcept)
exposureRouteHow the patient was exposed (oral, topical, etc.)
severitymild, moderate, or severe

Why It Matters

Allergy information must be easily accessible to all care providers. Many medical errors occur when allergy information is not adequately communicated.