Skip to main content

Share a patient's records with the HIU whose QR code was scanned

Is the first step in initiating the health data sharing process. It is invoked by an integrator application (such as any PHR application like ABHA) after scanning the HIU's QR code.

POST/api/hiecm/patient-record/v3/share

The QR code provides the Health Information User (HIU) identifier, which is then used to share the user's profile details and care-context information with the HIE-CM.

The HIE-CM answers 202 Accepted and forwards the request to the HIU as a POST to /api/v3/patient-record/share on the HIU's bridge. The HIU's reply, with the data push URL and encryption key, arrives on the PHR app's /api/v3/patient-record/on-share callback.

Authorizations

Authorizationbearer tokenRequired

JWT access token issued by the ABDM session API after successful validation of client id and secret.

Headers

REQUEST-IDstringRequired

Random UUID, a v4 style guid, unique per request.

TIMESTAMPstringRequired

ISO 8601 timestamp of when the request was initiated.

X-HIU-IDstringRequired

Identifier of the health information user to which the request was intended.

X-CM-IDstringRequired

Suffix of the consent manager to which the request was intended. sbx in the sandbox, abdm in production.

X-AUTH-TOKENstringRequired

JWT access token issued by the PHR service after successful user authentication. If the HIP does not have any role, then it is mandatory.

Body

metaDataobjectRequired

The HIU and the counter the QR code named.

metaData.hiuIdstringRequired

The HIU's identifier, read from the QR code.

metaData.counterIdstringRequired

The counter at the HIU, read from the QR code.

profileobjectRequired

The essential patient details, including ABHA number, ABHA address and the patient's contact address, used for initiating the record share process.

profile.patientobjectRequired
profile.patient.abhaNumberstringnull

The 14 digit ABHA number, or null when the patient has an address only.

profile.patient.abhaAddressstringRequired

The patient's ABHA address.

profile.patient.namestringRequired
profile.patient.genderstringRequired

M, F or O.

profile.patient.dayOfBirthstring
profile.patient.monthOfBirthstring
profile.patient.yearOfBirthstringRequired
profile.patient.addressobjectRequired
profile.patient.address.linestring
profile.patient.address.districtstring
profile.patient.address.statestring
profile.patient.address.pincodestring
profile.patient.phoneNumberstringRequired
sharedRecordCountintegerRequired

Number of records that are to be shared to the health information user (HIU).

consentobjectRequired

The care contexts to share, the permission specifying how the records can be accessed, and the dataEraseAt date until which the data remains accessible.

consent.careContextsobject[]Required
consent.careContexts.patientReferencestringRequired

The patient reference the care context was linked under.

consent.careContexts.careContextReferencestringRequired
consent.permissionobjectRequired
consent.permission.accessModestringRequired

How the HIU may use the records.

One of VIEW

consent.dataEraseAtstringRequired

Until when the data remains accessible to the HIU.

Responses

202

Accepted. The HIE-CM forwards the request to the HIU; the HIU's data push URL and key arrive on the on-share callback.

The callback never arrives

Callbacks​

  • After this call, ABDM posts Receive a patient's share request, as the HIU. to /api/v3/patient-record/share. Open the callback.