AnpherosAnpheros PlatformDevelopers

Try it free in the sandbox · first FHIR call in 5 minutesFree · 30 synthetic patients · no cardYour first API call in 2 minutes →

FHIR R4 AllergyIntolerance example

AllergyIntolerance records the risk of a harmful reaction to a substance. The reaction that was observed goes in reaction; criticality is the estimated risk of the next one.

The AllergyIntolerance in JSON

{
  "resourceType": "AllergyIntolerance",
  "id": "penicillin",
  "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://snomed.info/sct",
        "code": "764146007",
        "display": "Penicillin"
      }
    ],
    "text": "Penicillin"
  },
  "patient": {
    "reference": "Patient/example",
    "display": "Jane Doe"
  },
  "recordedDate": "2019-05-02",
  "reaction": [
    {
      "manifestation": [
        {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "271807003",
              "display": "Eruption of skin"
            }
          ],
          "text": "Skin rash"
        }
      ],
      "severity": "moderate"
    }
  ]
}

Validator result: raw JSON · open the validator

The elements that matter

ElementCardinalityNotes
patient1..1Here the element is patient, not subject.
type0..1allergy or intolerance.
category0..*food, medication, environment, biologic.
criticality0..1low, high or unable-to-assess.
reaction0..*Each with at least one manifestation.

The full definition is in the FHIR R4 AllergyIntolerance specification.

Common mistakes and the errors they cause

Subject instead of patient

AllergyIntolerance uses patient.

Criticality outside the value set

severe is a reaction severity, not a criticality.

Category as a string

category repeats, so it is an array even with one value.

Store it in a real FHIR R4 serverA free sandbox key gives you 30 synthetic patients and the full API, including POST /fhir/R4/AllergyIntolerance and $validate.
Get a free API key

More examples

Related guides

Try it free in the sandbox · first FHIR call in 5 minutesFree · 30 synthetic patients · no cardYour first API call in 2 minutes →

Product updates by email

New features, guides and the end of the beta. One email a month at most.

Send me occasional Anpheros Platform updates by email (new features, API changes, guides). I'll confirm by email and can unsubscribe in one click from any email. Privacy