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
- informationNo errors: this Immunization matches the FHIR R4 structure checked here.
The elements that matter
| Element | Cardinality | Notes |
|---|---|---|
status | 1..1 | completed, entered-in-error or not-done. |
vaccineCode | 1..1 | The vaccine product. |
patient | 1..1 | The person vaccinated. |
occurrence[x] | 1..1 | occurrenceDateTime or occurrenceString. |
lotNumber | 0..1 | Batch, 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.
- error
Immunization.statusImmunization.status 'given' is not in the required value set (completed, entered-in-error, not-done).
Missing occurrence
occurrence[x] is 1..1: a dose has a date.
- error
ImmunizationOne of these elements is required: occurrenceDateTime, occurrenceString.
Date in a local format
FHIR dates are ISO 8601.
- error
Immunization.occurrenceDateTimeNot a FHIR dateTime: YYYY, YYYY-MM, YYYY-MM-DD or YYYY-MM-DDThh:mm:ss with a time zone (Z or +hh:mm).
Store it in a real FHIR R4 serverA free sandbox key gives you 30 synthetic patients and the full API, including
Get a free API keyPOST /fhir/R4/Immunization and $validate.More examples
- Patient resource example
- Observation example: blood pressure
- Observation example: laboratory result
- DiagnosticReport example: lab panel
- Condition resource example
- MedicationStatement example
- AllergyIntolerance example
- Encounter resource example
Related guides
- How to store medical records using FHIR R4Tutorial: create a Patient, a blood-pressure Observation and a Condition, use a transaction, search, update with history and read provenance โ every request with curl and the real response, on the free sandbox.