Home  /  Writing  /  Healthcare & Standards
Healthcare & Standards

ABDM Integration: A Pragmatic Engineering Guide for HealthTech Developers

TL;DR

ABDM integration means wiring your hospital system into India's National Health Authority gateway as a HIP (data holder) or HIU (data consumer). Every gateway call is asynchronous: you receive HTTP 202, then a signed callback to your /v0.5/ webhook. Production readiness spans three milestones โ€” ABHA verification (M1), care-context linking (M2), and consent-driven FHIR R4 data exchange encrypted with ECDH key agreement (M3) โ€” plus idempotent webhook processing and PII-free logging.

The Ayushman Bharat Digital Mission (ABDM), stewarded by India's National Health Authority (NHA), is creating an open national digital health network similar to what UPI accomplished for digital payments.

However, for software engineers and engineering leads, the ABDM developer documentation can initially feel overwhelming: hundreds of API endpoints, asynchronous webhook patterns, cryptographic consent artifacts, and FHIR R4 schema specifications.

In this guide, we break down the ABDM architecture into actionable engineering concepts, highlighting the critical integration milestones, callback patterns, and cryptographic plumbing required to achieve production compliance.

1. The Mental Model: Gateway, HIP, HIU, and Registries

To architect an ABDM-compliant system, you must understand the four primary entities in the network:

  • ABDM Gateway (NHA): The central routing bus. It does not store medical records; it acts as a router for identity verification, consent negotiation, and metadata discovery.
  • Health Information Provider (HIP): Any hospital, diagnostic lab, or clinic system that generates and holds patient clinical data (e.g., electronic medical records, lab reports).
  • Health Information User (HIU): Any authorized entity (teleconsultation app, specialist doctor portal) requesting access to historical health records with patient consent.
  • Registries: Authoritative databases including ABHA (Ayushman Bharat Health Account), HFR (Health Facility Registry), and HPR (Healthcare Professionals Registry).
Core Architectural Principle

Zero Centralized PHI: The ABDM Gateway never sees unencrypted patient health data. Clinical records travel point-to-point between HIP and HIU using Elliptic-Curve Diffie-Hellman (ECDH) key exchange and AES-GCM encryption.

2. The Asynchronous Callback Pattern: `/v0.5/` Endpoints

Unlike traditional synchronous REST APIs where a `POST /create` immediately returns the generated record, the ABDM Gateway operates almost entirely on asynchronous request-response pairs.

When your system calls the gateway, it receives an immediate `HTTP 202 Accepted` response. The actual result is delivered seconds later as an HTTP POST callback to your configured webhook endpoint:

// 1. You make the request to Gateway:
POST https://dev.abdm.gov.in/v0.5/users/auth/init
Headers: { "X-CM-ID": "sbx", "Authorization": "Bearer <GATEWAY_JWT>" }
Body: {
  "requestId": "a9b8c7d6-...",
  "timestamp": "2026-08-20T10:00:00.000Z",
  "query": { "id": "919876543210@abdm", "purpose": "KYC_AND_LINK", "authMode": "MOBILE_OTP" }
}

// 2. Gateway returns immediate HTTP 202 Accepted.

// 3. Gateway hits YOUR webhook seconds later:
POST https://api.yourfacility.com/v0.5/users/auth/on-init
Body: {
  "requestId": "f1e2d3c4-...",
  "timestamp": "2026-08-20T10:00:02.100Z",
  "auth": { "transactionId": "tx-994821", "mode": "MOBILE_OTP" },
  "resp": { "requestId": "a9b8c7d6-..." }  // Matches your initial requestId
}

To manage this robustly in production, your backend must maintain an internal state machine (e.g., in Redis or PostgreSQL) that matches incoming resp.requestId callbacks with your originating client transaction.

3. The Three Integration Milestones (M1, M2, M3)

Milestone 1 (M1): ABHA Creation & Verification

Enables creating new 14-digit ABHA IDs and ABHA Addresses (e.g., user@abdm) via Aadhaar OTP or mobile OTP, followed by demographic validation.

Milestone 2 (M2): Health Record Linking (HIP Role)

Allows your hospital/lab management software to link care contexts (e.g., Visit ID, Prescription ID) to the patient's ABHA account and respond to OTP-based linking requests.

Milestone 3 (M3): Consent-Driven Health Data Exchange (HIU & HIP)

The full lifecycle: initiating consent requests, receiving cryptographic consent artifacts approved by the patient via the ABHA mobile app, packaging clinical data into FHIR R4 bundles, encrypting with ECDH, and transferring over the data bridge.

4. Structuring FHIR R4 Bundles

All medical records shared under ABDM must be encoded as standardized HL7 FHIR (Fast Healthcare Interoperability Resources) Release 4 JSON bundles. A typical DiagnosticReport bundle looks like this:

{
  "resourceType": "Bundle",
  "id": "bundle-cbc-report-01",
  "meta": {
    "versionId": "1",
    "lastUpdated": "2026-08-20T11:00:00Z",
    "profile": ["https://nrces.in/ndhm/fhir/r4/StructureDefinition/DiagnosticReportRecord"]
  },
  "type": "document",
  "entry": [
    {
      "fullUrl": "Composition/comp-01",
      "resource": {
        "resourceType": "Composition",
        "status": "final",
        "type": { "coding": [{ "system": "http://snomed.info/sct", "code": "721981007", "display": "Diagnostic studies report" }] },
        "subject": { "reference": "Patient/pat-01", "display": "Rohan Kumar" },
        "date": "2026-08-20T11:00:00Z",
        "title": "Complete Blood Count Report"
      }
    },
    {
      "fullUrl": "Patient/pat-01",
      "resource": {
        "resourceType": "Patient",
        "identifier": [{ "system": "https://healthid.abdm.gov.in", "value": "91-8842-1920-4491" }],
        "name": [{ "text": "Rohan Kumar" }],
        "gender": "male"
      }
    }
  ]
}

5. Engineering Best Practices for ABDM Production

  • Idempotency Enforcement: Gateway webhooks can occasionally retry due to network timeouts. Always store processed requestId values in Redis with a 24-hour TTL to prevent double-processing.
  • Asynchronous Worker Queues: Never process FHIR generation or ECDH encryption inside the synchronous HTTP request handler. Enqueue incoming webhooks into BullMQ or Celery worker pools.
  • Zero Direct PII in Logs: Mask Aadhaar numbers and ABHA IDs in application logs to maintain compliance with the Digital Personal Data Protection Act.
Pravesh Singh

Written by Pravesh Singh

Founder & CTO at SoftEdge Technology Solutions. Architect of mission-critical healthcare networks and multi-tenant SaaS platforms. Advises founders and executive engineering teams on high-consequence system architecture.