Immunizations Service — Service Overview
Status: populated Owner: TBD Last updated: 2026-04-18 Companion: Service Template
1. Purpose
The immunizations-service is the authoritative system of record for all vaccination activity across the Ghasi eHealth platform. It records administered immunizations, captures refusals and contraindications, computes due-date forecasts against the Afghanistan EPI (Expanded Programme on Immunization) national schedule, tracks defaulters, and integrates bidirectionally with the national immunization registry. It provides FHIR R4 Immunization, ImmunizationRecommendation, and ImmunizationEvaluation resources to downstream consumers.
Module license key: clinical.immunizations
2. Bounded Context
| Aspect | Detail |
|---|---|
| Domain | Clinical — Preventive Care |
| Context name | Immunizations |
| Aggregate roots | ImmunizationRecord, ImmunizationForecast |
| FHIR resources owned | Immunization, ImmunizationRecommendation, ImmunizationEvaluation |
| NATS subjects (produced) | IMMUNIZATIONS.* |
| Database schema | immunizations |
| Module entitlement | clinical.immunizations |
3. Responsibilities
| Responsibility | In scope | Out of scope |
|---|---|---|
| Record vaccine administration (dose, lot, site, route) | Yes | Prescribing vaccines (orders-service) |
| Record immunization refusals with reason | Yes | Enforcing refusal workflows — downstream concern |
| Forecast next due dates per EPI schedule | Yes | Scheduling the actual appointment (scheduling-service) |
| Track defaulters and generate outreach lists | Yes | Sending outreach messages (communication-service) |
| National registry bidirectional sync | Yes | Registry data governance |
| Generate digital vaccination certificates | Yes | Certificate public-key infrastructure |
| Contraindication checking | Yes | Drug allergy checking (orders-service CDS) |
| FHIR Immunization/Recommendation/Evaluation read+search | Yes | FHIR write from external systems (interop-service adapter) |
| Coverage analytics and population reporting | Yes | Data warehouse ETL (analytics-service) |
4. Upstream and Downstream Dependencies
5. Key Architectural Decisions
| Decision | Choice | Rationale |
|---|---|---|
| EPI schedule as configuration | JSON schedule loaded from terminology-service | Allows schedule updates without code deployment |
| Forecast engine | Rule-based interval calculation + contraindication guard | Deterministic, auditable; AI advisory tier planned for S3 |
| Registry sync | Async outbox → interop-service adapter | Decouples from registry availability; retryable |
| Contraindication source | FHIR Immunization.contraindication + allergy graph from registration-service | Avoid duplicating allergy data |
| Coverage reporting | Materialized views refreshed on event receipt | Near-real-time without heavy OLAP joins |
| Digital certificates | Signed JWT payload; public key in JWKS endpoint | Standard verifiable credential pattern |
| FHIR ownership | Owns Immunization, ImmunizationRecommendation, ImmunizationEvaluation | As per FHIR_FIRST_STANDARD.md resource ownership map |
6. Non-Goals
- This service does not own the appointment or scheduling workflow.
- It does not own drug/vaccine allergy records (those live in registration-service or orders-service).
- It does not directly communicate with patients — it emits events consumed by communication-service.
- It does not perform HL7 v2 VXU message parsing — that is interop-service's concern; it receives canonical commands.