Closed eric-jahn closed 4 years ago
"I know there is config in the pom.xml for SMTP and some other config for the subscription notifications. "
great example: https://1up.health/dev/doc/fhir-subscription
Currently working on criteria evaluation. 90% of the task is complete. Will target to finish this by tomorrow.
Complete. Verified, rolled-out to production. Working with customer on end to end testing. No action items at this point. Closing the issue
Commit ID # https://github.com/servinglynk/hslynk-open-source/commit/82a91f65c1e13a7e7a3795096dd94ebe812e2449 API documentation : https://docs.hslynk.com/?urls.primaryName=Subscription%20Service%20API
related #852 Use this pub/sub API (following it strictly) to receive notifications of changes in a person's chronic homelessness status: https://www.hl7.org/fhir/subscription.html .
We may have to modify the API signature somewhat to accomplish this, if the specification does not have a way to convey the chronic homelessness status boolean.
I think that one key element of our implementation is to specify what the search criterion for "chronic homelessness" is, in the subscription request body.
from the url above: "The criteria are Search strings that have the same interpretation as if they were appended to the base URL and submitted using the REST API. Note that the search criteria are applied to the new value of the resource. The consequence of this is that there is no notification when a resource is deleted, or when a resource is updated so that it no longer meets the criteria."
With regard to that statement, the base URL and appended part for retrieving the chronic homelessness element would be, for 2020 HMIS,
. And then within that response is the "chronicHomeless" data element boolean.
So then the request to subscribe would look something like: { "resourceType": "Subscription", "criteria": "v2020/clients/{clientid}/enrollments/{enrollmentid}?chronicHomeless=1&_format=json", "channel": { "type": "rest-hook", "endpoint": "https://somesubcriber.com/on-result", "header": "Authorization: Bearer secret-token-abc-123" } }
And then the asynchronous published responses would be an notification declaring that there is some data to retrieve: this consists of a POST message to alert the subscriber that new results are available - POST https://somesubcriber.com/on-result and the body would consist of: { "resourceType¨: "enrollment" "endpoint": "channel": { "endpoint": "https://hslynk.com/rest/v2020/clients/{clientid}/enrollments/{enrollmentid}", } } .
...and then the subscriber would call the normal GET https://hslynk.com/rest/v2020/clients/{clientid}/enrollments/{enrollmentid} endpoint, to retrieve the new client enrollments where the client with {clientid} is chronically homeless.