Immunization Types Reference
File:
frontend/apps/cms/src/features/encounter/types/pediatricTypes.tsStatus: ✅ Complete
Status Types
ImmunizationStatus
export type ImmunizationStatus = 'given' | 'due' | 'overdue' | 'upcoming' | 'missed'| Value | Label | Badge Color | Meaning |
|---|---|---|---|
given | Given | bg-green-100 text-green-700 | Vaccine administered |
due | Due | bg-blue-100 text-blue-700 | Scheduled for today or within window |
overdue | Overdue | bg-red-100 text-red-700 | Past due date (future use) |
upcoming | Upcoming | bg-yellow-100 text-yellow-700 | No due date scheduled |
missed | Missed | bg-gray-100 text-gray-500 | Past due without administration |
DoseNumber
export type DoseNumber = '0' | '1' | '2' | '3' | '4' | '5' | 'booster'export const DOSE_NUMBER_LABELS: Record<DoseNumber, string> = {
'0': 'Birth Dose (0)',
'1': '1st Dose (1)',
'2': '2nd Dose (2)',
'3': '3rd Dose (3)',
'4': '4th Dose (4)',
'5': '5th Dose (5)',
booster: 'Booster',
}AdministrationRoute
export type AdministrationRoute = 'IM' | 'SC' | 'ID' | 'oral' | 'nasal' | 'other'export const ADMIN_ROUTE_LABELS: Record<AdministrationRoute, string> = {
IM: 'Intramuscular (IM)',
SC: 'Subcutaneous (SC)',
ID: 'Intradermal (ID)',
oral: 'Oral',
nasal: 'Nasal',
other: 'Other',
}AdministrationSite
export type AdministrationSite = 'left_deltoid' | 'right_deltoid' | 'left_thigh' | 'right_thigh' | 'buttock' | 'other'export const ADMIN_SITE_LABELS: Record<AdministrationSite, string> = {
left_deltoid: 'Left Deltoid',
right_deltoid: 'Right Deltoid',
left_thigh: 'Left Anterolateral Thigh',
right_thigh: 'Right Anterolateral Thigh',
buttock: 'Buttock',
other: 'Other',
}AdverseReaction
export type AdverseReaction = 'none' | 'mild' | 'moderate' | 'severe' | 'anaphylaxis'export const ADVERSE_REACTION_LABELS: Record<AdverseReaction, string> = {
none: 'None',
mild: 'Mild (soreness, low-grade fever)',
moderate: 'Moderate (high fever, rash)',
severe: 'Severe (hospitalization)',
anaphylaxis: 'Anaphylaxis',
}
export const ADVERSE_REACTION_COLORS: Record<AdverseReaction, string> = {
none: 'bg-green-100 text-green-700',
mild: 'bg-yellow-100 text-yellow-700',
moderate: 'bg-orange-100 text-orange-700',
severe: 'bg-red-100 text-red-700',
anaphylaxis: 'bg-purple-100 text-purple-700',
}Data Interfaces
VaccinationEntry
The primary record type for a single vaccination. Stored as part of ImmunizationRecordData.vaccinations[].
export interface VaccinationEntry {
// Identity
id: string // Client-generated unique ID (e.g., `vax-${Date.now()}`)
name: string // Vaccine name (e.g., "DPT-1", "BCG", "Hep B - Birth dose")
ageRange: string // Schedule age label (e.g., "Birth", "6 weeks", "5-6 years")
// Scheduling
doseNumber?: DoseNumber // Position in series ('0' through '5', or 'booster')
dueDate?: string // YYYY-MM-DD — when the vaccine is due
givenDate?: string // YYYY-MM-DD — when the vaccine was actually administered
status: ImmunizationStatus // Auto-computed: given | due | overdue | upcoming | missed
// Clinical documentation (for regulatory compliance)
lotNumber?: string // Vaccine lot/batch number (for recall tracing)
expirationDate?: string // YYYY-MM-DD — vaccine expiry date
manufacturer?: string // Manufacturer name (e.g., "Serum Institute of India")
administeredBy?: string // Name of the administering provider
administrationSite?: AdministrationSite // Anatomical injection site
administrationRoute?: AdministrationRoute // IM, SC, ID, oral, etc.
adverseReaction?: AdverseReaction // none | mild | moderate | severe | anaphylaxis
// Notes
notes?: string // Free-text notes for this specific vaccination
}ImmunizationRecordData
The root type stored as a JSON blob in the FHIR immunization_record observation.
export interface ImmunizationRecordData {
vaccinations: VaccinationEntry[] // Ordered list of vaccination records
generalNotes?: string // Encounter-level notes about immunization
}Lookup Tables
IMMUNIZATION_STATUS_LABELS
export const IMMUNIZATION_STATUS_LABELS: Record<ImmunizationStatus, string> = {
given: 'Given',
due: 'Due',
overdue: 'Overdue',
upcoming: 'Upcoming',
missed: 'Missed',
}IMMUNIZATION_STATUS_COLORS
export const IMMUNIZATION_STATUS_COLORS: Record<ImmunizationStatus, string> = {
given: 'bg-green-100 text-green-700',
due: 'bg-blue-100 text-blue-700',
overdue: 'bg-red-100 text-red-700',
upcoming: 'bg-yellow-100 text-yellow-700',
missed: 'bg-gray-100 text-gray-500',
}Schedule Types
StandardScheduleEntry
Describes a vaccine in the standard immunization schedule.
export interface StandardScheduleEntry {
name: string // Vaccine display name
ageRange: string // Human-readable age label (e.g., "6 weeks")
ageDays: number // Days from birth to when vaccine is due
doseNumber: DoseNumber // Position in the vaccine series
route?: AdministrationRoute // Default administration route
}calculateDueDate
export function calculateDueDate(birthDate: string, ageDays: number): string
// birthDate: YYYY-MM-DD string
// ageDays: number of days from birth
// Returns: YYYY-MM-DD stringExample:
calculateDueDate('2025-01-15', 42) // Returns '2025-02-26' (42 days later = 6 weeks)Related Types (Same File)
Pediatric Examination
export interface PediatricExaminationData {
feedingType?: FeedingType
feedingNotes?: string
vaccinationStatus?: VaccinationStatus // Summary status: up_to_date | delayed | incomplete | not_started
immunizationNotes?: string
milestones: MilestoneEntry[]
birthWeight?: string
birthHistory?: string
generalNotes?: string
}Growth Assessment
export interface GrowthAssessmentData {
currentPercentiles: GrowthPercentile // weight, height, headCircumference, BMI, etc.
previousPercentiles?: GrowthPercentile // For comparison
growthConcerns?: string
nutritionalAdvice?: string
}Pediatric Procedure
export type PediatricProcedureType =
| 'vaccination'
| 'newborn_screening'
| 'developmental_screening'
| 'allergy_testing'
| 'tonsillectomy'
| 'other'
export type PediatricProcedureStatus = 'planned' | 'in_progress' | 'completed' | 'cancelled'