Receive the discovered care contexts of 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.
The on-discover API endpoint allows HIUs to receive and process the care contexts associated with a patient. When a request is made to this endpoint, it returns a detailed response containing the patient’s care contexts, transaction details, and any errors that occurred. This ensures that HIUs have the necessary information to manage patient care effectively.
NOTE: In the request body, either 'patient' or 'error' must be included.
In case of success scenario, patient object is mandatory and error object is optional
In case of error scenario, error object is mandatory and patient object is optional
Response is mandatory in both scenarios The access token from POST /api/hiecm/gateway/v3/sessions, sent with a Unique UUID for track the end to end request transaction 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 Identifier of the health information user to which the request was intended 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}$" Display text for patient reference.Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" List of care contexts linked at the HIP end for the identified patient. 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}$" Display text for care context reference. Allows alpha numeric characters and special characters like "^[a-zA-Z0-9_\\-@,. \"':|()/]{0,255}$" The health information type One of The count should match the number of care contexts in the payload The error code and message, if any occurred. ABDM-1001 - No data found. May be returned either bare ( The appropriate error message 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}" Ok Reference number used while linking the health records of the patient. Displayed information about the care context. List of care contexts linked at the HIP end for the identified patient. Reference number used while linking the health records of the patient. Displayed information about the care context. One of Number of health records in the careContext object. Bad Request The error code and message, if any occurred. ABDM-1106 - Duplicate On discovery request. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. Unauthorized 900901 - Invalid Credentials. May be returned either bare or with a trailing ": " separator; match on the code itself and tolerate the separator. Internal Server Error The error code and message, if any occurred.Authorizations
Authorizationbearer tokenRequiredBearer prefix.Headers
REQUEST-IDstringRequiredTIMESTAMPstringRequiredX-HIU-IDstringRequiredBody
transactionIdstringRequiredpatientobject[]Requiredpatient.referenceNumberstringRequiredpatient.displaystringpatient.careContextsobject[]Requiredpatient.careContexts.referenceNumberstringRequiredpatient.careContexts.displaystringRequiredpatient.hiTypestringRequiredDiagnosticReportDischargeSummaryHealthDocumentRecordImmunizationRecordOPConsultationPrescriptionWellnessRecordInvoicepatient.countintegerRequiredcreatedAtstringRequirederrorobjecterror.codestringRequiredABDM-1001) or with a trailing ": " separator (ABDM-1001: ); match on the code itself and tolerate the separator.error.messagestringRequiredresponseobjectRequiredresponse.requestIdstringRequiredResponses
200transactionIdstringpatientobject[]patient.referenceNumberstringpatient.displaystringpatient.careContextsobject[]patient.careContexts.referenceNumberstringpatient.careContexts.displaystringpatient.hiTypestringDiagnosticReportDischargeSummaryHealthDocumentRecordImmunizationRecordOPConsultationPrescriptionWellnessRecordInvoicepatient.countintegercreatedAtstringresponseobjectresponse.requestIdstring400errorobjecterror.codestringRequirederror.messagestringRequired401codestringmessagestringdescriptionstring500timestampnumberRequiredpathstringRequiredstatusintegerRequirederrorstringRequiredrequestIdstringRequired
Where this fits
You produce this callback by calling This API will be invoked by the patient/user from PHR application to discover his/her health records..