Reputation: 100906
We have a scenario where we are evaluating the use of FHIR to transfer information on planned encounters from a EHR application (source application) to an internet portal application (destination application). The event that triggers this message transfer is that an encounter is planned, or that an planned encounter is canceled.
Quoting https://www.hl7.org/fhir/messaging.html:
In FHIR messaging, a "request message" is sent from a source application to a destination application when an event happens.
Some questions/issues:
Update
Clarification:
Upvotes: 0
Views: 405
Reputation: 199
We do similar things for our client portal interface. Essentially we have a publishing/subscription service that monitors our internal system for relevant changes, then makes FHIR rest calls to the portal to update it. (Our portal interface is a FHIR Server)
Not quite messaging, but not quite REST/subscription either. As far as our portal is concerned, it is just CRUD.
For me it comes down to where do you want the logic that chooses what needs to be sent and when (and what tools you have available).
Upvotes: 1
Reputation: 21
Sorry, this isn't a yes or a no answer.
I've used used REST+FHIR resource API's for two portal systems - this is to get data from source systems. We also had a similar scenario where we needed to pass data to the portal, we used messaging where a HL7v2 feed existed or we used REST+FHIR resource API where not. Lloyds point about what is appropriate is correct.
I generally respond with a 200 if everything is ok. When I last looked at the spec, the response wasn't specified and it suggested either an OperationOutcome or another resource. I've followed the practices in the book 'REST in Practice' (O'Reilly), so I'd modify the resource sent to me (such as new identifiers or extra data) and return that to the sender.
Upvotes: 1
Reputation: 6803
Messaging is most appropriate mechanism when:
However, you can choose to use messaging for any communication. I.e. No-one will call you non-conformant for choosing to use messaging even if another paradigm might be more 'typical'.
Messages are Bundle resources where the first entry is a MessageHeader. The MessageHeader points to the focal resource(s) using the 'data' element. In this case, the focus would be the Encounter. Additional resources can also be conveyed. Typically you use a profile to provide guidance around what should be included in the bundle vs. not. (element.type.aggregation identifies whether something needs to appear in the bundle or not). The only rule is that when you trace all the relationships between the resources in the bundle, they form a totally connected network. However, the associations can be in either direction. I.e. It's ok to include things that point to the Encounter, not just things the Encounter points to.
Within the Bundle, references can be full URLs, relative URLs (based on the URL of the referencing resource) or UUIDs. You can see an example message here.
For a notification-type message interaction, your response message would typically just contain a MessageHeader whose .response would point to the identifier of the original message hand have code of "ok". In other cases, a message response might contain data. E.g. the results of a create or merge, the response to a query, decision support information, etc.
Upvotes: 1