0

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:

  • First of all: Is the use of FHIR messaging suitable for this scenario?
  • If I understand the FHIR website correctly, the source application should send a "Bundle" to the destination application. Correct?
  • The destination application needs various information on the scheduled encounter, such as the location and the referral request. Am I correct in assuming that these "extra" information elements should also be in the bundle, and that the "main" element should somehow reference these elements ?
  • How should the main element reference the extra elements? Is there an XML example that shows "intra-bundle" references?
  • If I read the spec correctly, the destination application is supposed to send a response message back. What should this response bundle contain to indicate that the message is received OK?

Update

Clarification:

  • The source application does not have a FHIR REST endpoint.
  • We have decided to push the information from the source application to the destination application (not pull)

3 Answers 3

1

Messaging is most appropriate mechanism when:

  • You want to pass a number of resources as a single package
  • You don't need the overhead of a document (table of contents, tight rules over rendering)
  • There's a potential need for asynchronous communication and/or for routed communication
  • You want to do something more complex than simple CRUD operations
  • You want to use transports other than HTTP

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.

1
  • How about containing referenced object directly, inline in the parent/owner object? Does FHIR support that?
    – codeape
    Feb 2, 2016 at 14:12
1

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.

1
  • Using a pull pattern is not an option in our case, I've updated the question.
    – codeape
    Jan 20, 2016 at 22:10
1

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.