What is the callback API for /health-information/cm/request

The callback is not firing.
Please check if there is no issues.

hi @mrobin,
what is the error you are getting? can you paste the error here?

Hey,

We don’t get any Error after calling [Gateway]/v0.5/health-information/cm/request.

We get response --> HTTP/1.1 202 Accepted correlation-id: 288694ca-80a6-4636-8755-39dcdee3ff2c

But the expected callback (health-information/hiu/on-request) is not triggering.

Hey @leelanakka can you able to trace this issue?
I request you to please look into it.

Hi @mrobin,

Could you please share the request body for [Gateway]/v0.5/health-information/cm/request. It will help us to investigate.

Thanks

1 Like

Hi @dheerajp ,
Please find the request payload

{“requestId”:“a6604d64-b79f-42b2-bcde-a278b96770b4”,“timestamp”:“2020-11-04T10:39:38Z”,“hiRequest”:{“consent”:{“id”:“cd633a0b-be8f-495b-81fd-d700a0c45a2d”},“dateRange”:{“from”:“2020-11-04T10:39:38Z”,“to”:“2020-11-10T18:30:00Z”},“dataPushUrl”:“https://dev-hiphiu-ndhm.icliniq.com/v0.5/push-your-data-here",“keyMaterial”:{“cryptoAlg”:“ECDH”,“curve”:“Curve25519”,“dhPublicKey”:{“expiry”:“2020-11-10T18:30:00Z”,“parameters”:"Curve25519/32byte random key”,“keyValue”:“string”},“nonce”:“3fa85f64-5717-4562-b3fc-2c963f66afa6”}}}

Hi @mrobin,

We see that consent id you doesn’t exist, please make sure you are sending the correct consent id.
Please send the consent id which you receive in /consentns/on-fetch API.

Thanks.

Also, please send the correct values for "parameters":"Curve25519/32byte 2 random key","keyValue":"string" Otherwise HIP will not be able to encrypt and send the data.
Please follow section 4. Data request and transfer of this documentation.

Thanks

Hi,

Now we are getting the callback with the following response:
{“requestId”:“0d95e293-de64-4937-94b4-1136e8341ab2”,“timestamp”:“2020-11-06T08:50:43.712003”,“hiRequest”:{“transactionId”:“9ec80e2e-0a40-48ce-8fff-63f463904a60”,“sessionStatus”:“REQUESTED”},“error”:null,“resp”:{“requestId”:“1772d3fd-073f-411e-bae0-680f9c808693”}}

As it mentioned in the 4. Data request and transfer document, the encrypted data will then posted to the dataPushUrl mentioned in the request right? But we dont get any callback to the dataPushUrl.

Please debug the scenario and correct me.

Hi @mrobin,

Could you please paste the request body for v0.5/health-information/cm/request.

Thanks

Hi @dheerajp ,

this is the request body:
{“requestId”:“9be27d9f-661b-4a14-9bb2-df10f4acd599”,“timestamp”:“2020-11-06T12:44:25.000Z”,“hiRequest”:{“consent”:{“id”:“639c0a50-9607-49bd-84ac-6f4cf9892b63”},“dataPushUrl”:“https://dev-hiphiu-ndhm.icliniq.com/v0.5/push-your-data-here",“keyMaterial”:{“cryptoAlg”:“ECDH”,“curve”:“Curve25519”,“dhPublicKey”:{“expiry”:“2020-11-13T12:44:25.000Z”,“parameters”:"Curve25519/32byte random key”,“keyValue”:“aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa”},“nonce”:“3fa85f64-5717-4562-b3fc-2c963f66afa6”}}}

this is the response:
{“requestId”:“0f3deab2-231a-4f76-9b04-c08add093599”,“timestamp”:“2020-11-06T12:44:27.567777”,“hiRequest”:{“transactionId”:“2b703259-afe8-41d6-ba64-6538cac25e47”,“sessionStatus”:“REQUESTED”},“error”:null,“resp”:{“requestId”:“9be27d9f-661b-4a14-9bb2-df10f4acd599”}}

Hi,
We are still not sure why the dataPush url is not triggering, even though the response has a valid transactionId.

Please debug our “transactionId”:“2b703259-afe8-41d6-ba64-6538cac25e47”

thanks,
robin

Hi @mrobin,

The “keyValue”:“aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa” you are sending doesn’t seem to be correct. May I know how did you generate it?

Hi @dheerajp ,
This; i tested with this repeat-a-32byte string; and it create a transaction; but the HIP call back (/v0.5/health-information/notify) is not triggering. It should have triggered right?

Now, we are trying with either of these PHP-Lib’s


Will you folks assist us in develop a counterpart PHP encryption/decryption sample?

“/v0.5/health-information/notify” is not called by gateway, rather by HIP or HIU during the data flow. It is not a callback.

  • HIPs calls the gateway API when it wants to notify the CM post transfer of data to HIU
  • HIU calls the API when it receives the CM and also in case of SUCCESS/ERROR while processing the sent health information.

Hi @angshuonline ,
These details are helpful.

After sending the consent artefacts to [Gateway]/health-information/cm/request I assume that there will be a HIP API gets notified to transfer the data. what is that API?

And we assume [HIP]/v0.5/health-information/hip/request will get notified after the [Gateway]/health-information/cm/request as the health information flow diagram suggest.

But it seems not happening in our case even though we get a transactionId and “sessionStatus”:“REQUESTED" in health-information/hiu/on-request callback.

Is there anything HIU is missing or need to do, so that the HIP API may get triggered to initiate the data transfer?

Please check it.

have you checked whats the status of the consent-artefact?
from HIU make a call to /v0.5/consents/fetch and check whats the status of the consent-artefact. If it expired, then it will not. In case of expiry HIU should have also gotten a API call at /v0.5/consents/hiu/notify

@angshuonline We have got the consent artefact id only after the user granted the consent from the PHR app.

@angshuonline It seems this is a similar issue which is still under investigation.
please check this thread --> Fetch Patient data for HIU