---
title: "Immunization data model"
url: "https://docs.unified.to/healthcare/immunization/model"
description: "The Immunization data model object in Unified's Immunization API: 15 fields, including created_at, updated_at and patient_id, with types and enum values."
---
# Immunization data model

 View field support, webhooks, and list parameters for each integration on the [Supported Integrations](https://docs.unified.to/healthcare/integrations.md) page. 

| Field                    | Type                                                                                                  | Required | Description                                                                            |
| ------------------------ | ----------------------------------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------- |
| id                       | string                                                                                                | No       | Unique identifier for the immunization                                                 |
| created\_at              | string (date-time)                                                                                    | No       | When the immunization record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)      |
| updated\_at              | string (date-time)                                                                                    | No       | When the immunization record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format) |
| patient\_id              | string                                                                                                | No       | The patient who was immunized                                                          |
| encounter\_id            | string                                                                                                | No       | The encounter in which the vaccine was administered                                    |
| practitioner\_id         | string                                                                                                | No       | The practitioner who administered the vaccine                                          |
| location\_id             | string                                                                                                | No       | Where the vaccine was administered                                                     |
| name                     | string                                                                                                | No       | Human-readable name of the vaccine                                                     |
| codes                    | [HealthcareCode](https://docs.unified.to/healthcare/immunization/model.md#HealthcareCode)\[\]         | No       | Codings for the vaccine (e.g. CVX)                                                     |
| codes\[\].system         | string                                                                                                | No       | The code system URI (e.g. http://loinc.org, http://snomed.info/sct)                    |
| codes\[\].code           | string                                                                                                | No       | The code within the system                                                             |
| codes\[\].display        | string                                                                                                | No       | Human-readable display text for the code                                               |
| status                   | enum                                                                                                  | No       | Status of the immunization Values: COMPLETED, NOT\_DONE, ENTERED\_IN\_ERROR, OTHER     |
| administered\_at         | string (date-time)                                                                                    | No       | When the vaccine was administered (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)             |
| lot\_number              | string                                                                                                | No       | Vaccine lot number                                                                     |
| expires\_at              | string (date-time)                                                                                    | No       | Vaccine expiration date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)                       |
| notes                    | string                                                                                                | No       | Free-text notes about the immunization                                                 |
| metadata                 | [HealthcareMetadata](https://docs.unified.to/healthcare/immunization/model.md#HealthcareMetadata)\[\] | No       |                                                                                        |
| metadata\[\].id          | string                                                                                                | No       |                                                                                        |
| metadata\[\].value       | object                                                                                                | No       |                                                                                        |
| metadata\[\].namespace   | string                                                                                                | No       |                                                                                        |
| metadata\[\].format      | enum                                                                                                  | No       | Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT                                     |
| metadata\[\].extra\_data | object                                                                                                | No       |                                                                                        |
| metadata\[\].slug        | string                                                                                                | No       |                                                                                        |

## TypeScript

```typescript
export type HealthcareImmunization = {
	id?: string; // Unique identifier for the immunization
	created_at?: string-time; // When the immunization record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	updated_at?: string-time; // When the immunization record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	patient_id?: string; // The patient who was immunized
	encounter_id?: string; // The encounter in which the vaccine was administered
	practitioner_id?: string; // The practitioner who administered the vaccine
	location_id?: string; // Where the vaccine was administered
	name?: string; // Human-readable name of the vaccine
	codes?: []; // Codings for the vaccine (e.g. CVX)
	status?: 'COMPLETED' | 'NOT_DONE' | 'ENTERED_IN_ERROR' | 'OTHER'; // Status of the immunization
	administered_at?: string-time; // When the vaccine was administered (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	lot_number?: string; // Vaccine lot number
	expires_at?: string-time; // Vaccine expiration date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
	notes?: string; // Free-text notes about the immunization
	metadata?: [];
	raw?: any; // Raw data from integration
} 
```

## Zod

```typescript
import { z } from 'zod';

export const ZodHealthcareImmunization = z.object({
	id: z.string().optional().describe("Unique identifier for the immunization"),
	created_at: z.string-time().optional().describe("When the immunization record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	updated_at: z.string-time().optional().describe("When the immunization record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	patient_id: z.string().optional().describe("The patient who was immunized"),
	encounter_id: z.string().optional().describe("The encounter in which the vaccine was administered"),
	practitioner_id: z.string().optional().describe("The practitioner who administered the vaccine"),
	location_id: z.string().optional().describe("Where the vaccine was administered"),
	name: z.string().optional().describe("Human-readable name of the vaccine"),
	codes: z.array().optional().describe("Codings for the vaccine (e.g. CVX)"),
	status: z.enum("COMPLETED", "NOT_DONE", "ENTERED_IN_ERROR", "OTHER").optional().describe("Status of the immunization"),
	administered_at: z.string-time().optional().describe("When the vaccine was administered (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	lot_number: z.string().optional().describe("Vaccine lot number"),
	expires_at: z.string-time().optional().describe("Vaccine expiration date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"),
	notes: z.string().optional().describe("Free-text notes about the immunization"),
	metadata: z.array().optional(),

});
```

## Python

```python
import dataclasses

@dataclasses.dataclass
class HealthcareImmunizationStatus(str, Enum):
	COMPLETED = 'COMPLETED'
	NOT_DONE = 'NOT_DONE'
	ENTERED_IN_ERROR = 'ENTERED_IN_ERROR'
	OTHER = 'OTHER'

@dataclasses.dataclass
class HealthcareImmunization:
	"""Unique identifier for the immunization"""
	id: Optional[str]
	"""When the immunization record was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	created_at: Optional[str]
	"""When the immunization record was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	updated_at: Optional[str]
	"""The patient who was immunized"""
	patient_id: Optional[str]
	"""The encounter in which the vaccine was administered"""
	encounter_id: Optional[str]
	"""The practitioner who administered the vaccine"""
	practitioner_id: Optional[str]
	"""Where the vaccine was administered"""
	location_id: Optional[str]
	"""Human-readable name of the vaccine"""
	name: Optional[str]
	"""Codings for the vaccine (e.g. CVX)"""
	codes: Optional[PropertyHealthcareImmunizationCodes]
	"""Status of the immunization"""
	status: Optional[HealthcareImmunizationStatus]
	"""When the vaccine was administered (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	administered_at: Optional[str]
	"""Vaccine lot number"""
	lot_number: Optional[str]
	"""Vaccine expiration date (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)"""
	expires_at: Optional[str]
	"""Free-text notes about the immunization"""
	notes: Optional[str]
	metadata: Optional[PropertyHealthcareImmunizationMetadata]

```
