my question is following:
If one sets up a Subscription with rest-hook method and without payload:
“header”: [“Authorization: Bearer secret-token-abc-123”]
then the “Server sends a POST request with no body to the nominated URL”
Question is then how does the client know what Subscription is this notification about - for what patient and what observation type? The nominated URL in this example is a base URL without giving a clue. It is also not defined in spec if the Subscription local ID ( that is returned in Location header by the HTTP POST response from initial ) is passed somewhere in the empty POST request.
I can come up with 2 options how to make this work
- Server adds a Location header to POST request when notifying client. The client knows what search criteria corresponds to each subscription and thus figure out what type of observation of what patient has a new value. Problem with this seems to be that Location header is not meant to be used in POST requests, but in responses only.
- The nominated callback URL in the channel endpoint element contains same search parameters as in criteria
so how should this be implemented, any more options - or have I overlooked something in the specification already supports this?