Hi I am trying to create consent request using the Api ‘v0.5/consent-requests/init’. I am getting response 202 Accepted but CM and Gateway is not call my callback Api on-init.
What we are doing wrong / missing here please guide us
Below is my Request
{“requestId”:“8f57d557-06a8-453a-b2a8-9fec4b892738”,“timestamp”:“2020-10-12T16:00:05.8908247Z”,“consent”:{“purpose”:{“text”:null,“code”:“PUBHLTH”,“refUri”:null},“patient”:{“id”:“jatin@sbx”},“hip”:{“id”:null},“hiu”:{“id”:“DHPL_1894624”},“requester”:{“name”:“Mann”,“identifier”:{“type”:"",“value”:"",“system”:""}},“hiTypes”:[“Condition”],“permission”:{“accessMode”:“VIEW”,“dataEraseAt”:“2020-10-12T15:57:05.8878244Z”,“dateRange”:{“from”:“2018-01-11T11:06:32.760Z”,“to”:“2020-02-11T11:06:32.760Z”},“frequency”:{“unit”:“HOUR”,“value”:“1”,“repeats”:“0”}}}}
Hi Jatin, I am using webhook.site which was showed in the demo to receive the callbacks. I am also sending the same request using postman and getting a 202 Accepted. Also i am receiving a callback though the callback request contains error message and i have raised a new forum for that. But as you mentioned you are not getting callback as well then maybe your endpoint is not registered correctly. I am not sure but can you make sure that you have registered the endpoint correctly. And if you are using your own private endpoint then you need to implement the on-init api and other apis on the endpoint to receive callbacks.
Hi Harshal, Thanks for reply
We are already registered our endpoint (uatndhm.driefcase.com) with sandbox and also we have implemented all the callback api at our registered endpoint. As you mentioned endpoint is not registered correctly so How do i checked it is registered correctly or not? Is there any steps / method to check our endpoint registered or not?
Please guide us.
Thanks
and also @jatin, I can see that your endpoint is http and you’ve updated as https. please verify that too.
once you have your site at https, it should be working fine
Hi Leelanakka, Thanks for reply
I have checked following api via the postman, Below is request and response,
Request: GET
https://uatndhm.driefcase.com/sessions
{
“username”:“Mann”,
“password”:“admin@123”
}
Response:
{“accessToken”:“bearer
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1bmlxdWVfbmFtZSI6Ik1hbm4iLCJyb2xlIjoiRG9jdG9yIiwiaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvd3MvMjAwNS8wNS9pZGVudGl0eS9jbGFpbXMvYXV0aGVudGljYXRpb24iOiJUcnVlIiwibmJmIjoxNjAyODQ4NzAwLCJleHAiOjE2MDI4NDkzMDAsImlhdCI6MTYwMjg0ODcwMH0.qChd3fivs6aOCQO_isxMavvaHjK9iDYURTMnbEWxNKg”}
Request: POST
https://uatndhm.driefcase.com/consent-requests
{
“consent”: {
“patient”: {
“id”: “jatin@sbx”
},
“purpose”: {
“code”: “PUBHLTH”
},
“hiTypes”: [
“Condition”
],
“permission”: {
“dateRange”: {
“from”: “2018-01-11T11:06:32.760Z”,
“to”: “2020-02-12T11:06:32.760Z”
},
“dataEraseAt”: “2020-10-15T11:06:32.760Z”
}
}
}
Response: 202 Accepted
HiType = condition? thats not a valid HIType for NDHM.
Please check https://sandbox.ndhm.gov.in/docs/apis for valid HiType
Also what you posted seems to be your internal API. This is not the API contract for consent-request to Gateway -> CM.
Hi Angsu, Thanks for reply
Now i am able to create consent request and also get response from sandbox.
Thanks
Hi,
How do i upload document in my account?
Thanks
Also i am trying to upload document in my account using below link,
https://emrbeta.ndhm.gov.in/
But when i entered my health id : 42-1231-5670-1302 it’s says invalid health id.
is there any other link to upload the document in my account?
i have created new Health id jatinlad@ndhm and also upload some document using below link,
https://emrbeta.ndhm.gov.in/
I have downloaded apk from https://sandbox.ndhm.gov.in/docs/phr_app which is for use for @sbx health id
Please tell us which mobile app we want to use for @ndhm sufix health id so i can grant request.
Hi, now it is working
thanks
Hi,
I have called api ‘v0.5/consents/fetch’ and getting response 202 Accepted but it’s not call callback API ‘/v0.5/consents/on-fetch’
Below is Request
https://dev.ndhm.gov.in/gateway/v0.5/consents/fetch
Request body:
{
“requestId”:“9280e8b3-e51d-486c-88f5-0504a96eed40”,
“timestamp”:“2020-10-17T09:12:57.0995349Z”,
“consentId”:“c4ea2016-34c6-431b-86db-331e636d975a”
}
‘/v0.5/consents/hiu/notify’ Response
json:{“requestId”:“d5dc94cc-e206-44cb-b5ae-b0f631a81b41”,“timestamp”:“2020-10-17T09:59:13.85572”,“notification”:{“consentRequestId”:“32c1fe58-46e6-45b1-aa5c-cf7f17a0fd65”,“status”:“GRANTED”,“consentArtefacts”:[{“id”:“1ca960ad-e715-4a28-a1df-69723c72b02c”}]}}
Request
https://dev.ndhm.gov.in/gateway/v0.5/consents/fetch
Call Fetch API:{“requestId”:“d5dc94cc-e206-44cb-b5ae-b0f631a81b41”,“timestamp”:“2020-10-17T09:59:13.2187089Z”,“consentId”:“1ca960ad-e715-4a28-a1df-69723c72b02c”}
solved now its working
Hi Jatin,
As i can see you have implemented HIU inplementations, can you help me with the create-consent request. I am sending the request, and below is the body:
{
“requestId”: “{{$guid}}”,
“timestamp”: “{{timestamp}}”,
“consent”: {
“purpose”: {
“text”: “Care Management”,
“code”: “CAREMGT”,
“refUri”: “”
},
“patient”: {
“id”: “harshal@sbx”
},
“hiu”: {
“id”: “I3S_130747”
},
“requester”: {
“name”: “i3system”,
“identifier”: {
“type”: “”,
“value”: “”,
“system”: “”
}
},
“hiTypes”: [
“OPConsultation”,
“DischargeSummary”,
“Prescription”
],
“permission”: {
“accessMode”: “VIEW”,
“dateRange”: {
“from”: “2018-01-11T11:06:32.760Z”,
“to”: “2020-02-12T11:06:32.760Z”
},
“dataEraseAt”: “2020-10-22T11:06:32.760Z”,
“frequency”: {
“unit”: “HOUR”,
“value”: 1,
“repeats”: 0
}
},
“hip”: {
“id”: “”
}
}
}
I am getting 202 accepted for this, i am also receiving callback “/consent-requests/on-init” in this callback body i am getting error message as below:
{
“requestId”: “848cae74-9954-4d6f-b991-b55e7a81b785”,
“error”: {
“code”: 2500,
“message”: “Unknown error occurred”
},
“resp”: {
“requestId”: “0f607e91-3d2f-4cbd-b39f-4da586d69627”
},
Can you check if i am doing something wrong
Hi,
Have you created harshal@sbx patient at below webapp
https://emrsbx.ndhm.gov.in/.
And also add some record for that patient for hiTypes which you used in consent request api.
you used hiTypes is
“hiTypes”: [
“OPConsultation”,
“DischargeSummary”,
“Prescription”
],
Hello,
init request is raised but getting 500 internal server error ,please check for request id
1a34e7e9-40da-4bae-b4eb-02947c9b0d83
I am also trying to register new end point url but getting 500 internal server error.
before It was working fine
Kindly look in to this issue
Thank you