Skip to main content
The AllergyIntolerance resource records risks of harmful or undesirable reactions when exposed to substances. All records must reference a valid Patient.

Endpoints

Create AllergyIntolerance

Requires admin or practitioner role.
POST /api/fhir/AllergyIntolerance
Authorization: Bearer {token}
Content-Type: application/json
resourceType
string
required
Must be "AllergyIntolerance"
clinicalStatus
object
active, inactive, resolved
verificationStatus
object
unconfirmed, confirmed, refuted, entered-in-error
type
string
allergy or intolerance
category
array
food, medication, environment, biologic
criticality
string
low, high, unable-to-assess
code
object
required
Substance that causes the allergy
patient
object
required
Reference to Patient: {"reference": "Patient/{id}"}
onsetDateTime
string
When allergy/intolerance was identified
reaction
array
Adverse reaction events

Example Request

cURL
curl -X POST https://api.example.com/api/fhir/AllergyIntolerance \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "resourceType": "AllergyIntolerance",
    "clinicalStatus": {
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
        "code": "active"
      }]
    },
    "verificationStatus": {
      "coding": [{
        "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification",
        "code": "confirmed"
      }]
    },
    "type": "allergy",
    "category": ["medication"],
    "criticality": "high",
    "code": {
      "coding": [{
        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
        "code": "7980",
        "display": "Penicillin"
      }]
    },
    "patient": {
      "reference": "Patient/65f1234567890abcdef12345"
    },
    "onsetDateTime": "2020-06-10",
    "reaction": [{
      "substance": {
        "coding": [{
          "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
          "code": "7980",
          "display": "Penicillin"
        }]
      },
      "manifestation": [{
        "coding": [{
          "system": "http://snomed.info/sct",
          "code": "271807003",
          "display": "Rash"
        }]
      }],
      "severity": "moderate"
    }]
  }'

Response

{
  "resourceType": "AllergyIntolerance",
  "id": "65f4567890123abcdef45678",
  "clinicalStatus": {
    "coding": [{
      "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical",
      "code": "active"
    }]
  },
  "type": "allergy",
  "category": ["medication"],
  "criticality": "high",
  "code": {
    "coding": [{
      "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
      "code": "7980",
      "display": "Penicillin"
    }]
  },
  "patient": {
    "reference": "Patient/65f1234567890abcdef12345"
  }
}

List AllergyIntolerances

GET /api/fhir/AllergyIntolerance
Authorization: Bearer {token}
patient
string
Filter by patient: Patient/{id}
clinical-status
string
Filter by status: active, inactive, resolved

Get AllergyIntolerance by ID

GET /api/fhir/AllergyIntolerance/:id
Authorization: Bearer {token}

Update AllergyIntolerance

PUT /api/fhir/AllergyIntolerance/:id
Authorization: Bearer {token}
Content-Type: application/json

Criticality Levels

High criticality allergies should be prominently displayed in the patient chart to prevent adverse reactions.
LevelDescription
lowLow risk of harmful outcome
highHigh risk of serious or life-threatening reaction
unable-to-assessUnable to assess risk

Role Permissions

RoleCreateReadUpdate
Admin
Practitioner
Auditor

Build docs developers (and LLMs) love