National Health Authority

Command Palette

Search for a command to run...

Blood Bank Discovery

Discover blood availability through UHI search and on_search.

Blood Bank Discovery helps an EUA find blood stock across Blood Bank HSPAs through UHI. Phase 1 supports only search and on_search. Use this page with the shared UHI guide at /docs/uhi/v1/network-and-protocol.

ParameterValue
ServiceBlood Bank Discovery
Domain codenic2008:86906
Core version0.7.1
Phase 1 scopesearch and on_search only
Service ownerNHA, ABDM

Roles

RoleActorResponsibility
EUAA patient app or clinician appSend blood stock search requests. Receive on_search callbacks.
HSPAA blood bank system or aggregatorReturn blood bank stock from its database.
GatewayUHI GatewayRoute search and on_search messages. Return ACK or NACK.

Flow

sequenceDiagram
participant EUA
participant Gateway
participant HSPA as Blood Bank HSPA
EUA->>Gateway: search
Gateway-->>EUA: ACK
Gateway->>HSPA: search
HSPA->>Gateway: on_search
Gateway->>EUA: on_search
EUA-->>Gateway: ACK

Service identity

Use exact values

Set these values exactly. A wrong domain can stop HSPA responses.

ParameterValueUse
domainnic2008:86906Use in each request.
core_version0.7.1Use in each request.
actionsearchUse in outbound search context.
actionon_searchUse in HSPA response context.
fulfillment.typeBloodStockUse in each search request.

Authentication

Sign each UHI request with Ed25519 and a BLAKE-512 body digest. Follow the shared header, ACK, and callback rules at /docs/uhi/v1/network-and-protocol.

Search filter types

Search modeMandatory fieldsOptional fieldsRule
GPS + radiuslocation.gps, radius.valueBlood group, blood componentUse this for proximity search.
State + districtstate code and name, district code and nameBlood group, blood componentUse this when GPS is absent.

Field references

search context

FieldTypeRule
domainstringUse nic2008:86906.
countrystringUse IND.
citystringUse std:011 as the default.
actionstringUse search.
core_versionstringUse 0.7.1.
consumer_idstringUse your EUA ID.
consumer_uriURLUse your HTTPS callback URL.
transaction_idUUIDUse a unique value per transaction.
message_idUUIDUse a unique value per message.
timestampISO 8601Use the UTC request time.

search message.intent

Field pathTypeRule
item.descriptor.namestringUse a blood group or All.
item.descriptor.codestringUse the blood group code or -1.
category.descriptor.namestringUse the blood component name.
category.descriptor.codestringUse the blood component code.
fulfillment.typestringUse BloodStock.
fulfillment.start.time.timestampISO 8601Set the start time.
fulfillment.end.time.timestampISO 8601Set the end time.
location.gpsstringUse lat,long for GPS search.
location.radius.typestringUse CONSTANT for GPS search.
location.radius.valuestringSet radius in km.
location.radius.unitstringUse km.
location.state.namestringUse the state name.
location.state.codestringUse the state code.
location.district.namestringUse the district name.
location.district.codestringUse the district code.

on_search provider record fields

Field pathTypeRule
catalog.descriptor.namestringHSPA or data source name.
providers[].idstringBlood bank provider ID.
providers[].descriptor.namestringBlood bank name.
providers[].descriptor.short_descstringBlood bank type.
providers[].categories[].descriptor.namestringBlood component name.
providers[].categories[].descriptor.codestringBlood component code.
providers[].fulfillments[].typestringAvailable or NotAvailable.
providers[].items[].descriptor.namestringBlood group name.
providers[].items[].descriptor.codestringBlood group code.
providers[].items[].quantity.countintegerUnit count.
providers[].items[].fulfillment_idstringLink to availability status.
providers[].location.gpsstringBlood bank lat,long.
providers[].location.addressstringFull address.
providers[].location.city.namestringCity name.
providers[].location.state.namestringState name.
providers[].location.district.namestringDistrict name.
providers[].contact.phonestringBlood bank phone number.
providers[].contact.emailstringBlood bank email.

Sample payloads

Use code -1 and name All to search all blood groups. Use a component code from the master list.

search — GPS with blood group and component
{
  "context": {
    "domain": "nic2008:86906",
    "country": "IND",
    "city": "std:011",
    "action": "search",
    "core_version": "0.7.1",
    "consumer_id": "<your-eua-id>",
    "consumer_uri": "<your-https-callback-url>",
    "message_id": "5cc46ce0-cd96-11ef-957f-718cff4e4e0a",
    "timestamp": "2025-01-08T07:58:36.421576Z",
    "transaction_id": "5cc46ce0-cd96-11ef-957f-718cff4e4e0a"
  },
  "message": {
    "intent": {
      "item": { "descriptor": { "name": "O+Ve", "code": "15" } },
      "fulfillment": {
        "type": "BloodStock",
        "start": { "time": { "timestamp": "2025-01-08T13:28:36" } },
        "end": { "time": { "timestamp": "2025-01-08T23:59:59" } }
      },
      "category": { "descriptor": { "name": "WholeBlood", "code": "11" } },
      "location": {
        "gps": "17.3788008,78.4368212",
        "radius": { "type": "CONSTANT", "value": "10.0", "unit": "km" }
      }
    }
  }
}

on_search sample

The source has a larger stock list. This sample keeps 2 blood group items for 1 provider.

on_search — Blood Bank response
{
  "context": {
    "domain": "nic2008:86906",
    "action": "on_search",
    "consumer_id": "<your-eua-id>",
    "consumer_uri": "<your-https-callback-url>",
    "provider_id": "nha.hspa",
    "provider_uri": "https://hspasbx.abdm.gov.in/api/v1/bloodbank",
    "transaction_id": "c51c2800-cd96-11ef-957f-718cff4e4e0a",
    "message_id": "c51c2800-cd96-11ef-957f-718cff4e4e0a"
  },
  "message": {
    "catalog": {
      "descriptor": {
        "name": "e-RaktKosh",
        "short_desc": "e-RaktKosh: A Centralized Blood Bank Management System"
      },
      "providers": [
        {
          "id": "0",
          "descriptor": {
            "name": "Janseva Blood Centre",
            "short_desc": "Charitable/Vol"
          },
          "categories": [
            { "id": "0", "descriptor": { "name": "WholeBlood", "code": "11" } }
          ],
          "fulfillments": [
            { "id": "0", "type": "NotAvailable" },
            { "id": "1", "type": "Available" }
          ],
          "items": [
            {
              "id": "0",
              "descriptor": { "name": "O+Ve", "code": "15" },
              "quantity": { "count": 2 },
              "category_id": "0",
              "fulfillment_id": "1"
            },
            {
              "id": "1",
              "descriptor": { "name": "AB+Ve", "code": "17" },
              "quantity": { "count": 16 },
              "category_id": "0",
              "fulfillment_id": "0"
            }
          ],
          "location": {
            "gps": "18.5246036,73.792927",
            "address": "Paud Road, Pune, Maharashtra",
            "city": { "name": "Pune" },
            "state": { "name": "Maharashtra", "code": "27" },
            "district": { "name": "Pune", "code": "521" }
          },
          "contact": {
            "phone": "8987628900",
            "email": "contact@jansevabc.org"
          }
        }
      ]
    }
  }
}

Service-specific masters

Blood group master

CodeValue
-1All
11A+Ve
12A-Ve
13B+Ve
14B-Ve
15O+Ve
16O-Ve
17AB+Ve
18AB-Ve
22Oh+Ve
23Oh-Ve

Blood component master

CodeValue
11Whole Blood
12Packed Red Blood Cells
13Fresh Frozen Plasma
14Single Donor Platelet
16Platelet Rich Plasma
17Cryoprecipitate
18Single Donor Plasma
19Plasma
20Platelet Concentrate
21Cryo Poor Plasma
23Random Donor Platelets
24Platelets Additive Solutions
28SAGM Packed Red Blood Cells
29Irradiated RBC
30Leukoreduced RBC

Known limitations

Stock can change

Some blood banks update stock in real time. Other blood banks update stock once per day.

  • Offer state and district search as a GPS fallback.
  • Show a stock disclaimer before users travel.
  • Recommend a call to confirm stock before travel.
  • Set a 10 to 15 second callback timeout.
  • Add client-side pagination for large catalogs.
  • Keep reservation workflows outside Phase 1.

Onboarding steps

Use this service checklist with /docs/uhi/v1/onboarding.

Express intent

Contact your NHA point of contact for Blood Bank Discovery onboarding.

Complete the form

Submit your organisation details and the EUA, HSPA, or both roles.

Create your key pair

Run Generator.java Option 1 from the NHA UHI repository.

Test in sandbox

Use the UHI Postman Collection and the Gateway API docs.

Request go-live

Request production access after NHA approves your sandbox tests.

Technical prerequisites

M2 prerequisite

Complete ABDM M2 with HIECM before Blood Bank Discovery onboarding. NHA treats this as a hard prerequisite.

EUA prerequisites

  • Use an ABDM-compliant app with M2 of HIECM complete.
  • Publish an HTTPS consumer_uri for on_search callbacks.
  • Create UHI Authorization headers for search requests.
  • Accept asynchronous on_search responses.
  • Use the UHI Postman Collection for sandbox tests.

HSPA prerequisites

HSPA database quality

Maintain an independent blood bank database. NHA expects stock data of a scope and quality near e-RaktKosh.

  • Maintain blood group and component inventory data.
  • Publish an HTTPS provider_uri for Gateway search requests.
  • Create UHI Authorization headers for on_search callbacks.
  • Return a valid on_search payload inside an acceptable latency window.
  • Complete sandbox tests and get NHA approval before production.

Resources and support

ResourceLink or detail
Key utilityhttps://github.com/NHA-ABDM/UHI/tree/main/header_generator_utility
Onboarding docshttps://abdm.gov.in/uhi/resources/onboarding-documentation
Onboarding formhttps://sandbox.abdm.gov.in/sandbox/v3/sandbox-registration
Gateway YAMLhttps://uhigatewaysandbox.abdm.gov.in/swagger-docs/v2.0.1/Gateway.yaml
Swagger UIhttps://uhigatewaysandbox.abdm.gov.in/swagger-ui/index.html
Signature referencehttps://github.com/NHA-ABDM/UHI/blob/main/docs/Signing%20UHI%20APIs_Final.docx
e-RaktKosh portalhttps://eraktkosh.in
Supportabdm.cons11@nha.gov.in, abdm.cons50@nha.gov.in, abdm.iosdev1@nha.gov.in

Sources

  • UHI Blood Bank Discovery Service - Integrator Onboarding v1.0