National Health AuthorityNHA Docs

Command Palette

Search for a command to run...

PM-JAY HEM Discovery

Discover PM-JAY empanelled hospitals through UHI search and on_search.

PM-JAY Hospital Empanelment Discovery helps an EUA find PM-JAY empanelled hospitals 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.

Phase 1 only

Use this service for hospital discovery only. Do not add appointment, referral, or admission flows yet.

ParameterValue
ServicePM-JAY Hospital Empanelment Discovery
Domain codenic2004:85112
Core version0.7.1
Phase 1 scopesearch and on_search only
Service ownerNHA, ABDM

Roles

RoleActorResponsibility
EUAA user appSend search requests to the Gateway. Receive on_search callbacks.
HSPAPM-JAY HEM HSPAReturn PM-JAY hospital records from the HEM database.
GatewayUHI GatewayRoute search and on_search messages. Return ACK or NACK.

Flow

sequenceDiagram
participant EUA
participant Gateway
participant HSPA as PM-JAY HEM 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. Wrong case or a wrong code can stop HSPA responses.

ParameterValueUse
domainnic2004:85112Use in context.domain.
fulfillment.typePMJAYHEMUse in message.intent.fulfillment.type.
item.descriptor.codePMJAYUse in message.intent.item.descriptor.code.
item.descriptor.namePMJAYUse in message.intent.item.descriptor.name.
item.descriptor.flagfalseUse in message.intent.item.descriptor.flag.

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

Add a fallback for GPS

GPS search can return partial results in low density areas. Offer district or pincode search as a fallback.

Search typeMandatory fieldsOptional fieldsUse case
State onlystate.name, state.codeNoneFind hospitals in one state.
State + districtstate.name, state.codedistrict.name, district.codeNarrow results to one district.
State + specialitystate.name, state.codecategory.descriptor.name, category.descriptor.codeFilter by one speciality.
State + facility namestate.name, state.codeprovider.descriptor.nameFind a hospital by name.
State + pincodestate.name, state.codeaddress.area_codeFind hospitals in one pincode.
State + GPSstate.name, state.codelocation.gps, radius.type, radius.value, radius.unitFind hospitals near coordinates.

Field references

search context

FieldTypeRule
domainstringUse nic2004:85112.
countrystringUse IND.
citystringUse an STD code, such as std:011.
actionstringUse search.
core_versionstringUse 0.7.1.
consumer_idstringUse your EUA ID.
consumer_uriURLUse your HTTPS callback URL.
message_idUUIDUse a unique value for each call.
transaction_idUUIDReuse this value in the on_search flow.
timestampISO 8601Use the request time.

search message.intent

Field pathTypeRequiredRule
fulfillment.typestringYesUse PMJAYHEM.
fulfillment.start.time.timestampdatetimeYesSet the start time.
fulfillment.end.time.timestampdatetimeYesSet the end time.
item.descriptor.codestringYesUse PMJAY.
item.descriptor.namestringYesUse PMJAY.
item.descriptor.flagbooleanYesUse false.
location.state.namestringYesUse the state name in CAPS.
location.state.codestringYesUse the numeric state code.
location.district.namestringNoUse the district name in CAPS.
location.district.codeintegerNoUse the numeric district code.
location.gpsstringNoUse lat,long format.
location.radius.typestringNoUse CONSTANT for GPS search.
location.radius.valuefloatNoUse radius in km.
location.radius.unitstringNoUse km.
address.area_codeintegerNoUse a 6-digit pincode.
category.descriptor.namestringNoUse a speciality name.
category.descriptor.codeintegerNoUse a speciality code.
provider.descriptor.namestringNoUse a hospital name.

on_search provider record fields

NABH flag quality

Treat descriptor.flag as information only. Some records may not set this value.

Field pathTypeRule
catalog.providers[].idstringPM-JAY HEM hospital ID.
catalog.providers[].descriptor.namestringHospital name.
catalog.providers[].descriptor.codestringG for Government or P for Private.
catalog.providers[].descriptor.flagbooleanNABH flag, if present.
catalog.providers[].descriptor.short_descstringState empanelment context.
catalog.providers[].descriptor.long_descstringEmpanelment status text.
catalog.providers[].categories[].descriptor.namestringSpeciality name.
catalog.providers[].categories[].descriptor.codeintegerSpeciality code.
catalog.providers[].fulfillments[] type Establishment DatestringHospital establishment year.
catalog.providers[].fulfillments[] type Empaneled DatestringPM-JAY empanelment date.
catalog.providers[].location.gpsstringHospital lat,long.
catalog.providers[].location.addressstringStreet address.
catalog.providers[].location.city.namestringCity name.
catalog.providers[].location.district.namestringDistrict name.
catalog.providers[].location.district.codestringDistrict code.
catalog.providers[].location.state.namestringState name.
catalog.providers[].location.state.codeintegerState code.
catalog.providers[].contact.phonestringHospital phone number.
catalog.providers[].contact.emailstringHospital email.
catalog.providers[].contact.tags.nodalOfficerNumberstringPM-JAY nodal officer number.

Sample payloads

Use one transaction_id for one search flow. The on_search context.transaction_id must match the search context.transaction_id.

search — by state
{
  "context": {
    "domain": "nic2004:85112",
    "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": "dfa04e10-63ec-11ed-9f98-49dd5c7c4d8a",
    "timestamp": "2022-11-14T07:20:54.005277Z",
    "transaction_id": "dfa04e10-63ec-11ed-9f98-49dd5c7c4d8a"
  },
  "message": {
    "intent": {
      "fulfillment": {
        "type": "PMJAYHEM",
        "start": { "time": { "timestamp": "2022-07-22T13:21:41" } },
        "end": { "time": { "timestamp": "2022-07-22T23:59:59" } }
      },
      "item": {
        "descriptor": { "code": "PMJAY", "name": "PMJAY", "flag": false }
      },
      "location": {
        "state": { "name": "ANDHRA PRADESH", "code": "28" }
      }
    }
  }
}

on_search sample

The source has a longer catalog. This sample keeps 1 provider item.

on_search — PM-JAY HEM response
{
  "context": {
    "domain": "nic2004:85112",
    "action": "on_search",
    "consumer_id": "eua-nha",
    "consumer_uri": "<eua-callback-url>",
    "provider_id": "hspa-nha",
    "provider_uri": "https://hspasbx.abdm.gov.in/api/v1/hspa",
    "transaction_id": "dfa04e10-63ec-11ed-9f98-49dd5c7c4d8a",
    "message_id": "<response-message-id>"
  },
  "message": {
    "catalog": {
      "descriptor": {
        "name": "PMJAY HSPA",
        "short_desc": "Pradhan Mantri Jan Arogya Yojana - Hospital Engagement Module"
      },
      "providers": [
        {
          "id": "HOSP27G13867",
          "descriptor": {
            "name": "General Hospital Wardha",
            "code": "G",
            "flag": false
          },
          "categories": [
            { "descriptor": { "name": "Cardiology", "code": 100002 } },
            { "descriptor": { "name": "General Medicine", "code": 100005 } }
          ],
          "fulfillments": [
            { "type": "Establishment Date", "start": { "time": { "timestamp": "1915" } } },
            { "type": "Empaneled Date", "start": { "time": { "timestamp": "2018-09-14 16:03:16.0" } } }
          ],
          "location": {
            "gps": "15.497097,80.048688",
            "address": "37-1-382-6",
            "city": { "name": "ONGOLE" },
            "district": { "name": "PRAKASAM", "code": "517" },
            "state": { "name": "Andhra Pradesh", "code": 28 },
            "country": { "name": "INDIA" }
          },
          "contact": {
            "phone": "9966753790",
            "email": "test@gmail.com",
            "tags": { "nodalOfficerNumber": "9966753790" }
          }
        }
      ]
    }
  }
}

Service-specific masters

Speciality master list

Fetch the full speciality master

The source does not print the full speciality master list. Use the API below to fetch the full list.

CodeSpeciality
100002Cardiology
100005General Medicine

Speciality API

sandbox — fetch PM-JAY specialities
curl --location 'https://apisbeta.nha.gov.in/pmjay/payer/hbp/get/scheme/specialities' \
  --header 'Accept: application/json' \
  --header 'source: internal' \
  --header 'Content-Type: application/json' \
  --header 'pid: 33222' \
  --data '{
    "schemecode": "PMJAY",
    "hosptype": "H"
  }'
production — fetch PM-JAY specialities
curl --location 'https://apisprod.nha.gov.in/pmjay/payer/hbp/get/scheme/specialities' \
  --header 'Accept: application/json' \
  --header 'source: internal' \
  --header 'Content-Type: application/json' \
  --header 'pid: 33222' \
  --data '{
    "schemecode": "PMJAY",
    "hosptype": "H"
  }'

Known limitations

  • Add district or pincode fallback for GPS search.
  • Treat descriptor.flag as optional information.
  • Set a timeout for on_search callbacks.
  • Add client-side pagination for large catalogs.
  • Keep appointment and referral outside Phase 1.
  • Show a PM-JAY portal link for package details.

Onboarding steps

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

Express intent

Contact your NHA point of contact for PM-JAY HEM onboarding.

Complete the form

Submit your organisation details, EUA role, HTTPS callback URL, and public key.

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 PM-JAY HEM 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

  • Do not apply as a third-party HSPA for this service.
  • Use the NHA PM-JAY HEM HSPA as the provider side.

Resources and support

ResourceLink or detail
Key utilitygithub.com/NHA-ABDM/UHI/tree/main/header_generator_utility
Gateway YAMLhttps://uhigatewaysandbox.abdm.gov.in/swagger-docs/v2.0.1/Gateway.yaml
Swagger UIhttps://uhigatewaysandbox.abdm.gov.in/swagger-ui/index.html?urls.primaryName=v2.0.1
UHI reference apphttps://drive.google.com/file/d/1sAs8lIqPu-uMxd6-eM9AOJ2MiWhvikZH/view?usp=sharing
PM-JAY portalhttps://pmjay.gov.in
Onboarding docshttps://abdm.gov.in/uhi/resources/onboarding-documentation
Supportabdm.cons11@nha.gov.in, abdm.cons50@nha.gov.in

Integration test cases

Source category count

The source lists categories A through E only. It does not include a Category F table.

Positive cases

Treat all cases as happy path cases unless the table says otherwise.

Category A — context validation

Case IDTest caseActionPass criteria
TC-A01Valid context fieldsSend search with all mandatory context fields.ACK arrives without error.
TC-A02transaction_id matchCompare search and on_search transaction_id.IDs match exactly.
TC-A03Domain mirrorInspect context.domain in on_search.Value is nic2004:85112.

Category B — search filter validation

Case IDTest caseActionPass criteria
TC-B01State onlySend state.name and state.code.Providers belong to the state.
TC-B02State + districtAdd district.name and district.code.Providers belong to the district.
TC-B03State + specialityAdd category.descriptor fields.Each provider has the speciality.
TC-B04State + facility nameAdd provider.descriptor.name.Results include the input name.
TC-B05State + pincodeAdd address.area_code.Results match the pincode area.
TC-B06State + GPS + radiusAdd GPS and radius fields.Provider GPS falls inside the radius.

Category C — on_search response validation

Case IDTest caseActionPass criteria
TC-C01Callback receiptMonitor consumer_uri after search.Payload arrives before timeout.
TC-C02Provider IDInspect providers[].id.All IDs are non-null strings.
TC-C03Core provider fieldsInspect id, name, GPS, and phone.No required value is empty.
TC-C04Empanelment dateInspect Empaneled Date fulfillment.Timestamp has a value.
TC-C05Establishment dateInspect Establishment Date fulfillment.Timestamp has a value.
TC-C06GPS parseParse providers[].location.gps.Value has 2 decimal numbers.
TC-C07Nodal officer numberInspect contact.tags.nodalOfficerNumber.Value is a numeric string.
TC-C08Speciality categoriesInspect categories[].descriptor fields.Name and code are present.
TC-C09Hospital type codeInspect descriptor.code.Value is one character.

Category D — UX and best practice compliance

Case IDTest caseMethodPass criteria
TC-D01Service accessTest home screen path.User reaches it in 3 taps or fewer.
TC-D02Service labelInspect the feature label.Label says PM-JAY hospital search clearly.
TC-D03Brand footerReview the search screen.UHI, PMJAY, and ABDM appear.
TC-D04GPS searchTest with device GPS.Results match the device area.
TC-D05Manual locationTest state, district, or pincode.Results match the input location.
TC-D06Empty result messageSearch a valid empty area.User sees next steps.
TC-D07Result disclaimerInspect result screen.Disclaimer appears.
TC-D08App categoryAudit navigation.Service appears under a health module.

Category E — edge cases

Case IDTest caseActionPass criteria
TC-E01Large result setSearch a high-density state.App renders the list without crash.
TC-E02Empty catalogSearch an empty area.App shows a fallback message.
TC-E03No on_search before timeoutSimulate an absent HSPA reply.App shows a timeout message.

Sources

  • UHI PM-JAY HEM Service - Integrator Onboarding v1.4