M4 Enrol: facilities and professionals
Milestone 4 is the registries milestone, also called the NHPR. A healthcare professional registers on the HPR and is issued an HPID. A health facility onboards to the HFR and is issued a facility ID.
Neither registry moves a health record. They establish who the professional is and what the facility is, so every record flow has a verified provider behind it.
In short
- M2 and M3 need a facility ID in production. M4 is the API route to one. The NHPR portal is the other, and a product that registers its facilities there by hand never builds M4.
- The HPR comes first. Facility onboarding needs an HPR token, which needs a person with an HPID.
- A facility ID has the form
INplus 10 characters. An HPID is 14 digits. - Expect to correct a host or two. Several published samples show the production host while describing sandbox behaviour.
These pages cover the shape of M4 and the endpoints that are named. They are not yet a step by step guide to building it.
What M4 covers
| Area | What it produces | Who it is for |
|---|---|---|
| HPID creation | A 14 digit HPID, issued after Aadhaar authentication | A doctor, nurse, pharmacist or facility manager |
| Register professional | A full HPR profile: qualifications, council registration, current work | The same professional, after the HPID exists |
| Facility onboarding | A facility ID on the HFR, in the form IN plus 10 characters | A hospital, clinic, lab, imaging centre, pharmacy or blood bank |
| Bridge linkage | A link between a facility ID and one or more bridges, each marked HIP or HIU | A facility whose software is going live |
| Search and master data | Facility search, nearby search, and the code lists every other call needs | Anyone building either of the above |
Who needs it
- Facilities going live. Without a facility in the HFR and a bridge linked to it, you cannot share as a HIP or fetch as an HIU. If you have built M2 Attach or M3 Retrieve, M4 is the step in front of production.
- Professionals registering. An HPID is a verified identity in ABDM. Three categories are open today: doctor, nurse and pharmacist. Others come later.
- Software acting for others. An HMIS or practice management product can drive these calls for its own customers.
How the two halves connect
The HPR comes first, twice over. Creating an HPID returns an hprToken, which
the register professional call carries in its payload. Onboarding a facility
needs an HPR token in the header of the create calls, generated from an HPR ID
and password. So facility onboarding usually starts with a person getting an
HPID.
Build it with an agent
Hand M4 to the agent you already use, as one file it loads once. Install it, or open it there in one click.
Certification
M4 has no certification step of its own. One exit process covers the whole integration, run once, after every milestone your role needs works end to end. See Going live for the four steps and what each one asks of you. The cases you are certified against are in M4 testing use cases.
The journey, one diagram per flow
Milestone 4 of ABDM has four journeys:
- A professional gets an HPID.
- That professional's HPR profile is registered against the HPID. The identity and the profile are two jobs, not one.
- A facility manager onboards a facility to the HFR.
- A facility links its bridges, so it can publish records as the HIP and fetch them as the HIU through its software.
This page shows the order of calls in each. Field lists are on the operations and fields page.
These diagrams follow the published order of steps.
Journey 1: create an HPID for a professional
The professional authenticates against Aadhaar on a hosted page. Your system never handles the Aadhaar number or OTP: it handles the transaction ID and redirects to a URL the HPR service returns, valid for five minutes. After that, call generate Aadhaar link again.
Then the mobile number
Step 13 decides what happens next. An existing HPID means the professional is already registered: log them in and skip the rest of this journey. A returning professional can also skip Aadhaar entirely and log in by mobile OTP or by password. Both routes are in M4 operations and fields.
No HPID means you confirm the mobile number before creating one, by a fast path or a slow one. Send it encrypted: fetch the public certificate from /v4/int/api/v1/auth/cert, encrypt with RSA/ECB/PKCS1Padding, send the encrypted value.
Create HPID returns an hprToken. Keep it: the register professional call needs it.
Journey 2: register the professional on the HPR
The HPID is an identity, not a profile. Registering the professional adds qualifications, council registration and current work. It needs the hprToken journey 1 returned.
Two documents are mandatory, the degree certificate and the registration certificate. A proof of work certificate is mandatory too when the professional works for government, or for both government and private.
Register professional takes codes, not names. Fetch council, course, college, university, state, district and language from the master APIs first.
Journey 3: a facility onboards to the HFR
Onboarding is one search, three writes and a submit, each write adding a layer of detail. Stop before submit and the facility stays in draft, invisible to ABDM.
The first write, basic facility information, returns a tracking ID. That is the facility's identity for the rest of the sequence, and what you pass as the facility ID on every later update.
What each write call carries
| Call | What it captures |
|---|---|
| Basic facility information | Name, ownership, system of medicine, facility type and subtype, address with LGD codes, contact details, board and building photographs, opening hours |
| Additional information | Whether it has a pharmacy, blood bank, dialysis centre, cath lab, diagnostic lab or imaging centre, plus scheme identifiers such as ABPMJAY, Rohini, ECHS and CGHS |
| Detailed information | Specialities per system of medicine, bed and ventilator counts, and the pharmacy, blood bank, diagnostic and imaging sections that apply to this facility type |
| Submit facility | The tracking ID and an optional source of information. Moves the facility out of draft |
Which fields are mandatory in detailed information depends on the facility type, the type of service and the system of medicine. A diagnostic laboratory, imaging centre, blood bank or pharmacy sends no medical infrastructure counts at all.
A facility can also verify by OTP
A second, shorter path serves government programmes: send an OTP to the contact number registered against a facility ID, then validate it.
Journey 4: linking bridges to a facility
A facility ID alone does not make records flow. The facility has to be linked to a bridge, each link marked HIP or HIU. One facility can have several, and one bridge serves as many facilities as you link to it. What is set once for your integration and what is set per facility is in one bridge, many facilities.
The HIP name is what a patient sees in their ABHA or PHR app when they search for this hospital. Three rules apply: 15 characters or fewer, no special characters, and unique for every bridge on a facility. The worked example builds the name from the hospital name plus the bridge name.
A facility with a facility ID and a linked HIP bridge can do the M2 work, linking care contexts and sharing records. With a linked HIU bridge it can do the M3 work, requesting consent and fetching records. M4 is the registration step in front of either flow outside sandbox.
Next: M4 operations and fields.
Next
- The registration journeys as diagrams: the journey below.
- The base URLs and the operation list: M4 API reference.
- Every call with its parameters and codes: M4 operations and fields.
- The patient side of all four: P1 Identity and profile.
- Take your integration to production: Go live.