Query regarding to /v0.5/care-contexts/on-discover

Hey @IntegrationSupport
I have a query regarding /v0.5/care-contexts/on-discover, I got a response from /v0.5/care-contexts/discover, but I have to respond to /v0.5/care-contexts/discover as HIP. I saw there is the following body is there
{
“requestId”: “{{$guid}}”,
“timestamp”: “{{timestamp}}”,
“referenceNumber”: “”,
“display”: “Name of patients”,
“careContexts”: [
{
“referenceNumber”: “”,
“display”: “”
}
],
“matchedBy”: [
“MOBILE”
],
“resp”: {
“requestId”: “”
}
}

so I have a question about which care context, which reference number, and which display have to pass to this body. I also refer to webinars but I didn’t find a solution, they pass hardcoded data.

when u add care context using the API:- /v0.5/links/link/add-contexts for a particular patient, there u have passed ref. number and display this same thing u have to pass in on-discover.

1 Like

Ok, I got it, but do we have to store care-context at our end when we create a care-context for patients as HIP?
or anything else. cause there are multiple care-context we can create as HIP.

@ermapsh
Hi
my name is Bhaskar

  1. The integration support team given to for your hip access credentials.
    or
    They not give any hip access credentials.

  2. how can you implementing the
    HIP initiated linking for the patients with DIRECT auth

or

what is the flow for these
HIP initiated linking for the patients with DIRECT auth

https://jwt.io/ Use this jwt website to know information, using ur access token u can see ur role there

just now I am hitting the session id I am putting the access-token in jwt.io

realm_access": {
“roles”: [
“hiu”,
“offline_access”,
“healthId”,
“OIDC”,
“hip”
]
},
or these
“account”: {
“roles”: [
“manage-account”,
“manage-account-links”,
“view-profile”

the roles looks like this

“realm_access”: {
“roles”: [
“hiu”,
“offline_access”,
“healthId”,
“phr”,
“OIDC”,
“hip”
]
},

You completed the HIP initiated linking for the patients with DIRECT auth

What is the flow for
HIP initiated linking for the patients with DIRECT auth

what is the flow for milestone-2 upto discovery can u please tell me

yes, that is HIP’s responsibility to store the care-context details and return those details when discovery call happens using a fuzzy match algorithm.

Hi john can u please help me on these /v0.5/care-contexts/discover

This is my request :
{

“requestId”: “{{$guid}}”,

"timestamp": "{{$isoTimestamp}}",

“transactionId”: “4c07a35d-fa5f-47c4-a8a2-4f9a08141da9”,

“patient”: {

"id": "balasai2906@sbx",

"verifiedIdentifiers": [

  {

    "type": "NDHM_HEALTH_NUMBER",

    "value": "91-1230-6048-1512"

  },

  {

    "type": "MR",

    "value": "+917995354885"

  }

],

"unverifiedIdentifiers": [

  {

    "type": "MR",

    "value": "+917995354885"

  }

],

"name": "KOTAMSETTI BALAVENKATA SAI",

"gender": "M",

"yearOfBirth": 2000

}

}

This is my response :
Access Denied

how did you get that transactionId? because its imp to proceed this API

ermapsh
Hi
I am getting these transactionId by using these

https://dev.abdm.gov.in/gateway/v0.5/users/auth/init

but it was not coming the response it showing Access Denied

Just tell me that what is the flow of you process milestone-2
This is my contact is : 7569453247 call me once

hey bhaskar,
the discover call we dont have to make.
as per HIP yaml : “Request for patient care context discover, made by Gateway intended for a specific HIP. It is expected that HIP will subsequently return either zero or one patient record with (potentially masked) associated care contexts”
when u search the facility name in phr app and then press fetch records then ABDM calls discover

Hi JOHN456123333

my i am thinking u are completed these :

url /v0.5/subscription-requests/cm/init

i am completing these

  1. HIP initiated linking for the patients with mobile number
  2. HIP initiated linking for the patients with demographic details
    After completing these 2 what is the next step can u please suggest me

It depends on you how you use that on-confirm reponse/data, there are three purposes but majorly we use KYC_AND_LINK . KYC means basic information about the given patient and the linking token we use for creating context and linking.

ermapsh :

I am using the KYC_AND_LINK on both i can use

  1. HIP initiated linking for the patients with mobile number - completed
  2. HIP initiated linking for the patients with demographic details - completed

After what is the next step

Hi
john456123333
ermapsh
I am hitting the on-discovery the response will come : 200 accepted
but int web hook it will not showing

which tech stack are u following ?

john456123333

I am following

  1. https://dev.abdm.gov.in/gateway/v0.5/users/auth/init

  2. https://dev.abdm.gov.in/gateway/v0.5/care-contexts/on-discover

    These I am following may be i am thinking its wrong way

And i am not doing or hitting these url :

https://dev.abdm.gov.in/gateway/v0.5/users/auth/notify
https://dev.abdm.gov.in/gateway/v0.5/users/auth/on-notify