Skip to main content

Initiate the linking of care contexts for a patient

Hosted by the HIP/HIU, not by ABDM. ABDM calls this endpoint at the callback URL registered for your bridge, so the path below is relative to that URL.

POST/api/v3/hip/link/care-context/init

The init API endpoint facilitates the initial linking of care contexts to a patient’s ABHA address. When a request is made to this endpoint, it returns a response containing the transaction ID, ABHA address, patient details, and any errors encountered. This ensures that patient care contexts are accurately linked and managed within the healthcare system.

Note: Incase of success, HIP will get the patient details in the callback. In case of failure, HIP will get the error response in the callback.

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-HIP-IDstringRequired

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

Body

transactionIdstringRequired
abhaAddressstringRequired

A patient identifier with which patient is registered in the facility/hospital.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$"

patientobject[]Required
patient.referenceNumberstringRequired

A patient identifier with which patient is registered in the facility/hospital. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$"

patient.displaystringRequired

The display text of patient.Allows alpha numeric characters and special characters like "^[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).Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\-@,. ()/:\\]{0,255}$"

patient.careContexts.displaystringRequired

The display of care context.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$"

patient.hiTypestringRequired

The health information type

One of DiagnosticReportDischargeSummaryHealthDocumentRecordImmunizationRecordOPConsultationPrescriptionWellnessRecordInvoice

patient.countinteger

The count should match the number of care contexts in the payload

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

The appropriate error message

Responses

200

Ok

transactionIdstring
abhaAddressstring
patientobject[]
patient.referenceNumberstring

Reference number used while linking the health records of the patient.

patient.careContextsobject[]

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

patient.careContexts.referenceNumberstring

Reference number used while linking the health records of the patient.

patient.hiTypestring

One of DiagnosticReportDischargeSummaryHealthDocumentRecordImmunizationRecordOPConsultationPrescriptionWellnessRecordInvoice

patient.countinteger

Number of health records in the careContext object.

400

Bad Request

Error codes for this module

errorobject

The error code and message, if any occurred.

error.codestringRequired

ABDM-1104 - Duplicate Init request. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator.

error.messagestringRequired
401

Unauthorized

Everything returns 401

codestring

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

messagestring
descriptionstring
500

Internal Server Error

Error codes for this module

timestampnumberRequired
pathstringRequired
statusintegerRequired
errorstringRequired

The error code and message, if any occurred.

requestIdstringRequired

The request id that was passed.Allows alpha numeric characters and special characters like "^[0-9a-fA-F]{8}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{4}\\b-[0-9a-fA-F]{12}"

Where this fits​

Answer this callback by calling As a result of the initialization, HIP has to generate a unique reference-number in the link object which is called as link-reference-number and it has to trigger a OTP (token) to the patient's mobile number that is present with the HIP/HMIS/LIMS which will be provided back to HIP for validation during confirm request flow..