Care Contexts & Linking
How episodes of care get attached to a patient's ABHA — the foundation for all data sharing.
A care context is a reference to an episode of care in your system — an outpatient visit, an admission, a lab order. Linking a care context to a patient's ABHA is what makes that episode discoverable and shareable later.
Patient (ABHA address)
└── Patient reference (your MRN) ← per HIP
├── Care context: OPD-2025-01-15 ← an OPD visit
├── Care context: IPD-2025-02-03 ← an admission
└── Care context: LAB-2025-02-10 ← a lab reportOnly references (IDs + display names) are linked to the CM — the actual clinical data stays in your system until a consent-based data flow occurs.
Linking flows
HIP-initiated linking (recommended)
After you verify the patient's ABHA at the point of care (Milestone 1), link new episodes automatically:
sequenceDiagram participant HIP as HIP (your HMIS) participant GW as Gateway participant CM as HIE-CM HIP->>HIP: verify patient's ABHA (OTP / QR / demographic) HIP->>GW: link care context (with link token) GW->>CM: forward CM-->>GW: success GW->>HIP: on-link confirmation CM->>CM: notify patient (record added)
In the v3 APIs, ABHA verification yields a link token for the patient,
which authorises subsequent link/carecontext calls without further patient
interaction. Demographic-auth based linking exists for assisted flows.
Patient-initiated linking (discovery)
The patient, from their PHR app, searches a facility for their records:
- CM sends your HIP a discovery request (
care-contexts/discover) with the patient's demographics + identifiers. - Your HIP matches the patient (fuzzy match on name/gender/YOB, exact on
verified mobile/ABHA) and responds with unlinked care contexts
(
on-discover). - CM asks your HIP to initiate authentication (
link/init) — you typically send an OTP to the patient's registered mobile. - Patient enters the OTP in their PHR app; CM passes it to your HIP
(
link/confirm); on success the contexts are linked.
Matching matters
Discovery matching is a certification focus: return only high-confidence matches, never leak other patients' data, and respond with an empty result rather than a wrong one. Log every discovery request for audit.
New episodes for already-linked patients
When a linked patient has a new visit, link the new care context and the CM notifies the patient ("Sunrise Hospital added a new record"). Keep display names human-friendly — patients see them verbatim in their PHR app:
{
"patientReference": "MRN-2024-0042",
"careContextReference": "OPD-2025-01-15",
"display": "OPD Consultation — General Medicine, 15 Jan 2025"
}Link care contexts as soon as episodes are created, and include the HI types each context will provide — it improves the patient's consent experience and narrows requests to relevant contexts.
For API payloads, see the Milestone 2 guides for HIP-initiated linking and Discovery & Link.
Sources
- ABDM Proposed Simplified Milestone 2 (DOCX→MD, 2026-08)