Hi
I have registered Health locker successfully and also i have implemented subscriptions api. I am getting long term token and consent auto approval after approved Health locker request from phr android app. The subscriptions api flow is working.
When i am linking some carecontext through the phr android app. As a Health Locker i am getting notification(/v0.5/subscriptions/hiu/notify) form CM. I am getting carecontext in api /v0.5/subscriptions/hiu/notify. Using this carecontext i am raised consent request and it’s get auto approved but i am getting error when i am calling ‘/v0.5/consents/fetch’
API: /v0.5/consents/fetch
Error: (500) Internal Server Error
Below is json payload
Request : /v0.5/consent-requests/init
{“requestId”:“e41a4283-c649-459f-942d-9325e1e8abbd”,“timestamp”:“2021-02-24T14:32:00.4428605Z”,“consent”:{“purpose”:{“text”:“Self Requested”,“code”:“PATRQT”,“refUri”:""},“patient”:{“id”:“jatin@sbx”,“name”:null},“hip”:{“id”:“driefcasehip”},“hiu”:{“id”:“driefcasehl”},“careContexts”:[{“patientReference”:“jatin@sbx”,“careContextReference”:“DCAR2021022200042”}],“requester”:{“name”:“DRiefcase Health Locker”,“identifier”:{“type”:“Health Locker”,“value”:"",“system”:""}},“hiTypes”:[“Prescription”,“DiagnosticReport”,“OPConsultation”,“DischargeSummary”,“ImmunizationRecord”],“permission”:{“accessMode”:“VIEW”,“dataEraseAt”:“2021-02-25T14:30:00.4428538Z”,“dateRange”:{“from”:“2021-02-23T14:30:00.4428487Z”,“to”:“2021-02-25T14:30:00.4428533Z”},“frequency”:{“unit”:“HOUR”,“value”:“1”,“repeats”:“1”}}}}
Response: /v0.5/consent-requests/on-init
{“requestId”:“fc2400ee-9f87-444e-88ea-6780bd472cba”,“timestamp”:“2021-02-24T14:30:05.702796”,“consentRequest”:{“id”:“d9afb20c-d8d4-49e1-9b9f-3503ff305fb5”},“error”:null,“resp”:{“requestId”:“e41a4283-c649-459f-942d-9325e1e8abbd”}}
v0.5/consents/hiu/notify :
{“requestId”:“50ad41d7-0bfd-4cae-bbe9-177a4502cbd9”,“timestamp”:“2021-02-24T14:30:05.878972”,“notification”:{“consentRequestId”:“d9afb20c-d8d4-49e1-9b9f-3503ff305fb5”,“status”:“GRANTED”,“consentArtefacts”:[{“id”:“dc674c63-30ef-40fe-ab2d-1d3e8b33a413”}]}}
Request: v0.5/consents/fetch
{“requestId”:“3d413486-3c70-4e66-954e-115cef7cbbce”,“timestamp”:“2021-02-24T14:30:01.1777261Z”,“consentId”:“dc674c63-30ef-40fe-ab2d-1d3e8b33a413”}
/v0.5/consents/fetch getting Error (500) Internal Server Error
When i am raised consent request using HIU app the flow is working
Please guide us