Hi @dheerajp
I will share full summary, which i tried with request/response so you get clear idea. I know it might be long post sorry for that.
Below process I followed:
When i create consent request i got below response on callback v0.5/consent-requests/on-init
{
"requestId": "e4c20d2b-2887-4a7a-88b9-d58101973a68",
"timestamp": "2020-11-06T08:48:38.723813",
"consentRequest": {
"id": "4902ab78-2d66-486c-9707-2efdb8485369"
},
"error": null,
"resp": {
"requestId": "d1f2b09c-b5e4-4a5c-b052-07e2757df1c0"
}
}
After that when user grant permission from PHR mobile, got below response as callback api v0.5/consents/hiu/notify
{
"requestId": "c8a7b9dc-4c75-4f36-9102-768399fb845b",
"timestamp": "2020-11-06T08:48:56.196296",
"notification": {
"consentRequestId": "4902ab78-2d66-486c-9707-2efdb8485369",
"status": "GRANTED",
"consentArtefacts": [
{
"id": "eb0e71d4-6471-48fa-92d1-eb9fdab1a127"
}
]
}
}
Then i consume Fetch API using url https://dev.ndhm.gov.in/gateway/v0.5/consents/fetch
with requestbody as below:
{
"requestId": "80fd8a63-ef94-42cd-8934-2859a5d1e4e1",
"timestamp": "2020-11-06T08:49:34.471Z",
"consentId": "eb0e71d4-6471-48fa-92d1-eb9fdab1a127"
}
Note: Here in requestbody i set consentId as consentArtefacts.id which got from above response ( v0.5/consents/hiu/notify)
Now i got response from callback v0.5/consents/on-fetch
{
"requestId": "e4110a4f-ca64-4d26-953f-d3bd3ad42eea",
"timestamp": "2020-11-06T08:49:34.679404",
"consent": {
"status": "GRANTED",
"consentDetail": {
"schemaVersion": "v0.5",
"consentId": "eb0e71d4-6471-48fa-92d1-eb9fdab1a127",
"createdAt": "2020-11-06T08:48:56.168156",
"patient": {
"id": "satinder@sbx"
},
"careContexts": [
{
"patientReference": "12660",
"careContextReference": "12660"
}
],
"purpose": {
"text": "Care Management",
"code": "CAREMGT",
"refUri": ""
},
"hip": {
"id": "139245-01"
},
"hiu": {
"id": "115"
},
"consentManager": {
"id": "sbx"
},
"requester": {
"name": "Dr. Poonam",
"identifier": {
"type": "REGNO",
"value": "MH1001",
"system": "https://www.mciindia.org"
}
},
"hiTypes": [
"OPConsultation"
],
"permission": {
"accessMode": "VIEW",
"dateRange": {
"from": "2020-10-02T05:18:52.261",
"to": "2020-10-31T05:18:52.261"
},
"dataEraseAt": "2020-11-07T08:48:38.609",
"frequency": {
"unit": "HOUR",
"value": 0,
"repeats": 0
}
}
},
"signature": "elOkCjE3QTq1UoXEuVLKMlgI6/NV7HdeiMDVi3fhOW2W6Gn53sXS5bYQLEeZCH+Q2FEMhw8dXqBsSsPcLoTV4ohhXWKXo8OTRQCUHwMmPindfzopz0xU810klDg6ZJO+ELfQV1TwZe1vYmaEWZ85p/+5ZVn77WyE3cnQ1cVDfJzG8IC5xnCbrrdSJU3gDF4yy0U1QCoB1JHNZgWWP4nAT2Eo1cMcKeqGybx0mYKZ37ZFgoTom+5y0iEZIKCuqBnzwKxheA17RGNc7R75sU0ho3wlcrpWEG+850yHVRQCtS82DwR1vvMGFPtJxoF0iXtqqgKSQ/yun1QUHkIGweCHxw=="
},
"error": null,
"resp": {
"requestId": "80fd8a63-ef94-42cd-8934-2859a5d1e4e1"
}
}
Now i consume healthInformationRequest Api using url v0.5/health-information/cm/request
with requestbody as below:
{
"requestId": "993bc7c0-e421-4bc0-8fb3-f932bb675a85",
"timestamp": "2020-11-06T08:50:07.806Z",
"hiRequest": {
"consent": {
"id": "eb0e71d4-6471-48fa-92d1-eb9fdab1a127"
},
"dateRange": {
"from": "2020-10-02T05:18:52.261Z",
"to": "2020-10-31T05:18:52.261Z"
},
"dataPushUrl": "https://cldilstaffweb04.insurancearticlez.com/HIU/api/hiu/patientdata",
"keyMaterial": {
"cryptoAlg": "ECDH",
"curve": "Curve25519",
"dhPublicKey": {
"expiry": "2020-11-06T08:50:07.806Z",
"parameters": "Curve25519/32byte random key",
"keyValue": "MIIBMTCB6gYHKoZIzj0CATCB3gIBATArBgcqhkjOPQEBAiB/////////////////////////////////////////7TBEBCAqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqYSRShRAQge0Je0Je0Je0Je0Je0Je0Je0Je0Je0Je0JgtenHcQyGQEQQQqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq0kWiCuGaG4oIa04B7dLHdI0UySPU1+bXxhsinpxaJ+ztPZAiAQAAAAAAAAAAAAAAAAAAAAFN753qL3nNZYEmMaXPXT7QIBCANCAARNpNg+Fr7lLHKEd1CnnnxRci4VLo0iA26XNQKmpT0h3x+PKsYWHZk/i04Du7AoCHPTOKVS4wRvBGSBWkgUdjXL"
},
"nonce": "EJjILFA/5i+Xb+iH10N5qQKyKWYpik9rOI7BVdyhzjI="
}
}
}
And got callback response from v0.5/health-information/hiu/on-request
{
"requestId": "5f26d789-e360-4aec-88d9-1c05e20b0137",
"timestamp": "2020-11-06T08:50:08.036231",
"hiRequest": {
"transactionId": "6649e6f0-d771-417c-8f20-e5d279408d22",
"sessionStatus": "REQUESTED"
},
"error": null,
"resp": {
"requestId": "993bc7c0-e421-4bc0-8fb3-f932bb675a85"
}
}
But no response from dataPushUrl, i have teseted url set to dataPushUrl from postman , and i am able to post data.