Immunization

The Immunization resource records the administration of vaccines. It tracks which vaccines were given, when, and by whom.

API convention: patient, encounter, and location references are sent as flat string id fields (patientId, encounterId, locationId). Performer references use the standard FHIR reference shape. All resource ids are raw UUIDs (v4).

Creating an Immunization Record

curl -X POST https://api.esus.health/fhir/Immunization \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/fhir+json" \
  -d '{
    "status": "completed",
    "patientId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "vaccineCode": {
      "coding": [{
        "system": "http://hl7.org/fhir/sid/cvx",
        "code": "208",
        "display": "COVID-19 vaccine, mRNA, spike protein, LNP-S"
      }]
    },
    "occurrenceDateTime": "2026-04-21",
    "primarySource": true,
    "performer": [
      {
        "actor": {
          "reference": "Practitioner/a7b1c2d3-e4f5-6789-abcd-ef0123456789",
          "display": "Dr. Anna Lopez"
        }
      }
    ]
  }'

Immunization Statuses

StatusMeaning
completedVaccine was administered
entered-in-errorErroneous record
not-doneImmunization not performed

Important Fields

FieldDescription
patientIdThe patient who received the vaccine (UUID)
vaccineCodeThe vaccine administered (CVX or SNOMED codes)
occurrenceDateTimeDate of administration
primarySourceDid the record come from the provider who administered?
performer[]Who administered the vaccine
lotNumberVaccine lot number
siteBody site of administration
routeHow it was administered (oral, IM, etc.)
isSubpotenttrue if the dose is considered subpotent

Protocol Applied

{
  "protocolApplied": [
    {
      "doseNumber": 1,
      "targetDisease": [
        {
          "coding": [{
            "system": "http://snomed.info/sct",
            "code": "840539006",
            "display": "COVID-19"
          }]
        }
      ]
    }
  ]
}

doseNumber identifies this dose within a multi-dose series; the API accepts integers or strings.

Why Track Immunizations

Immunization records are essential for:

  • Patient safety — avoid vaccine duplication
  • Public-health tracking
  • School and travel requirements
  • Reminders for upcoming doses