AnpherosAnpheros PlatformDevelopers

FHIR R4 Immunization resource example

Immunization records one dose given (or not given). The vaccine is coded in vaccineCode; in the United States that is usually a CVX code.

The Immunization in JSON

{
  "resourceType": "Immunization",
  "id": "flu-2026",
  "status": "completed",
  "vaccineCode": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/sid/cvx",
        "code": "141",
        "display": "Influenza, split virus, trivalent, preservative"
      }
    ],
    "text": "Flu vaccine"
  },
  "patient": {
    "reference": "Patient/example",
    "display": "Jane Doe"
  },
  "occurrenceDateTime": "2026-10-05",
  "primarySource": true,
  "lotNumber": "FL2026-118",
  "site": {
    "coding": [
      {
        "system": "http://terminology.hl7.org/CodeSystem/v3-ActSite",
        "code": "LA",
        "display": "left arm"
      }
    ]
  },
  "doseQuantity": {
    "value": 0.5,
    "unit": "mL",
    "system": "http://unitsofmeasure.org",
    "code": "mL"
  }
}

Validator result: raw JSON ยท open the validator

The elements that matter

ElementCardinalityNotes
status1..1completed, entered-in-error or not-done.
vaccineCode1..1The vaccine product.
patient1..1The person vaccinated.
occurrence[x]1..1occurrenceDateTime or occurrenceString.
lotNumber0..1Batch, useful for recalls.

The full definition is in the FHIR R4 Immunization specification.

Common mistakes and the errors they cause

Status outside the value set

given is not an Immunization status.

Missing occurrence

occurrence[x] is 1..1: a dose has a date.

Date in a local format

FHIR dates are ISO 8601.

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

More examples

Related guides