How to get HIP and care context details while sending consent request from HIU

Dear Support team.

While starting the HIU implementation, as per documentation given at https://sandbox.abdm.gov.in/docs/build_hiu started with api. In that swagger payload,
the below objects are present, i.e HIP and Care contexts of the patient.

How does HIU knows what hospitals the patient visited earlier and what care contexts are attached to the patient ? Documentation doesnt mention these details. When tried with and without hip and care contexts the API is getting success. But on my HRP webhook url callback was not successful in both cases for /consent-requests/on-init api.

fraction of the payload for HIU calling consent init.

“hip”: {
“id”: “ABCD_12345”
},
“careContexts”: [
{
“patientReference”: “ref_tvnb”,
“careContextReference”: “DEMO-16-3_3”
}

Hi @drucare

In consent init API v0.5/consent-requests/init you can pass hip as null in the request body. HIU can only send the Consent request to the patient. Patients can grant consent with linked HIPs. If the patient has given approval for subscriptions request of HIU then /v0.5/subscriptions/hiu/notify API is used by CM to notify an HIU whenever a new care-context is linked or new data is available on an existing linked care-context.

Thanks