Skip to main content

Perform HIP initiated linking

Note: While generating the link-token the user/patient is providing both ABHA_number and ABHA_address, then at the time of linking both must be mandatory.

POST/api/hiecm/hip/v3/link/carecontext

If not one should be mandatory either 'ABHA_number' or 'ABHA_address'.

This API endpoint is used by the Ayushman Bharat Digital Mission (ABDM) system to store care context or health record references. Upon successful validation of the ABHA (Ayushman Bharat Health Account) address and the associated link token, the system securely records the relevant care context information. This process ensures that health records are accurately linked and accessible, facilitating efficient and seamless health information exchange across the network. The API plays a critical role in maintaining the integrity and continuity of patient health records, thereby supporting comprehensive and coordinated care.

Authorizations

Authorizationbearer tokenRequired

The access token from POST /api/hiecm/gateway/v3/sessions, sent with a Bearer prefix.

Headers

REQUEST-IDstringRequired

Unique UUID for track the end to end request transaction

TIMESTAMPstringRequired

Actual time of the request was initiated, ISO 8601 represents date and time by starting with the year, followed by the month, the day, the hour, the minutes, seconds and milliseconds

X-CM-IDstringRequired

Suffix of the consent manager to which the request was intended

X-HIP-IDstringRequired

Identifier of the health information provider to which the request was intended

X-LINK-TOKENstringRequired

JWT Authentication token which was issued by ABDM after successful validation of username and password

Body

abhaNumbernumber

The abha number of the patient. Should be only 14 digit and it allows numeric character like ^\\d{14}$

abhaAddressstringRequired

The abha address of the patient. Should start with Alphanumeric . and _ in the middle and must be ending with @abdm or @sbx also allows alpha numeric character and special characters like ^[a-zA-Z0-9][a-zA-Z0-9_.]+[a-zA-Z0-9]@(abdm|sbx)$

patientobject[]Required
patient.referenceNumberstringRequired

Patient identifier with which patient is registered in the facility/hospital or patient can also pass his abha_address in the reference number. Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$

patient.displaystringRequired

The display text for patient reference(regex:^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$)

patient.careContextsobject[]Required

List of care contexts linked at the HIP end for the identified patient.

patient.careContexts.referenceNumberstringRequired

An identifier of patient's care context created in HIP. A care context is a group of patient's health data (Not the actual health data) and it should be unique for each care-context.Allows alpha numeric character and special characters like ^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$

patient.careContexts.displaystringRequired

The display text for care context reference(regex:^[a-zA-Z0-9_\-@,. "':|()/]{0,255}$)

patient.hiTypesstringRequired

Types of health information document.

One of DiagnosticReportDischargeSummaryHealthDocumentRecordImmunizationRecordOPConsultationPrescriptionWellnessRecordInvoice

patient.countnumberRequired

The count should match with the number of care contexts

Responses

400

Bad Request

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1006 - Bad Request, invalid request Body. May be returned either bare (ABDM-1006) or with a trailing ": " separator (ABDM-1006: ); match on the code itself and tolerate the separator.

error.messagestringRequired
401

Unauthorized

Everything returns 401

codestring

900902 - Unauthorized. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

messagestring
descriptionstring
404

server cannot find the requested resource

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1001 - No data found. May be returned either bare (ABDM-1001) or with a trailing ": " separator (ABDM-1001: ); match on the code itself and tolerate the separator.

error.messagestringRequired
500

Internal Server Error

Error codes for this module

codestring

ABDM-9999 - Unknown exception. May be returned either bare (ABDM-9999) or with a trailing ": " separator (ABDM-9999: ); match on the code itself and tolerate the separator.

messagestring

Callbacks​

  • After this call, ABDM posts This API endpoint is a callback API that will be called by HIE-CM. The response will be received after it is triggered on the HIP side at /api/hiecm/hip/v3/link/carecontext. to /api/v3/link/on_carecontext. Open the callback.