FHIR Chat · FHIR Workflow - Message, Transaction or contained · IG creation

Stream: IG creation

Topic: FHIR Workflow - Message, Transaction or contained


view this post on Zulip Kevin Mayfield (Aug 25 2021 at 05:00):

We are being asked to define a series of FHIR Workflows. This is relatively greenfield area as we haven't defined any national UK standards in any previous versions of HL7 (not exactly true but close)

The rough payload pattern we are seeing is

1..1 focus Resource (for both request and event)
1..* PractitionerRole
1..1 Patient

Each of these payloads will have a create, update and maybe delete. It's roughly CRUD focused around a single resource.

So our options are

  • transaction - we're probably not POSTing direct to a server, it's up to the recipient to decide wether the PractitionerRole or Patient is a POST or PUT. Don't think this is the answer
  • use contained - not FHIR conformant and I think it makes handling the payload more difficult.
  • FHIR Message - this fits but getting lot of push back from technical staff who want a more RESTful approach.

view this post on Zulip Kevin Mayfield (Aug 25 2021 at 05:04):

We've gone down a FHIR Message route but wondering if I can make this more restful. e.g.

Move the POST /$process-message to POST {resource}/$process-message
(with a slim MessageHeader)

view this post on Zulip Kevin Mayfield (Aug 25 2021 at 05:10):

So our current prescription-order message is now sent to

POST /MedicationRequest/$process-message

Wondering also if we should add in CRUD as a parameter. To get something like

POST /MedicationRequest/$process-message?method=create

view this post on Zulip Kevin Mayfield (Aug 25 2021 at 05:50):

Looking at https://build.fhir.org/ig/HL7/davinci-ehrx/exchanging.html

We could swap to batch but we have a definition of the Bundled resources (MessageDefinition). Think we are in a half way house between message and batch?

view this post on Zulip Lloyd McKenzie (Aug 25 2021 at 13:59):

Can you explain how what you're trying to do is distinct from a simple RESTful upsert?

view this post on Zulip Kevin Mayfield (Aug 26 2021 at 07:10):

Sending several resources at once? The answer is FHIR Message but having a lot of push back against this.

view this post on Zulip John Moehrke (Aug 26 2021 at 11:11):

The use of Batch would likely make your RESTful zelots happy. You could profile the Batch so that the contents of the Bundle are well formed. Thus it is just a Bundle full of RESTful interactions. (IHE has a few of these). Now include in that profile of the Batch that the first resource just happens to be a MessageHeader that explains from who the content is from, to who the content should go, and why... and you have everyone happy.

view this post on Zulip Lloyd McKenzie (Aug 26 2021 at 14:54):

If you're trying to create or update multiple resources, you can use FHIR transaction

view this post on Zulip Lloyd McKenzie (Aug 26 2021 at 14:54):

(or batch if they're independent)

view this post on Zulip Kevin Mayfield (Aug 26 2021 at 15:02):

I think this has to be message though, every collection has is for a defined event.
Maybe what I need to do is keep MessageHeader content as small as possible.

view this post on Zulip Lloyd McKenzie (Aug 26 2021 at 15:05):

I don't understand what you mean by "for a defined event". If you're saying "please create X" or "please update X", that's the event and no need for messaging. If you're saying "Event X happened, here's some stuff, do what you feel is appropriate", then either messaging or a custom operation is necessary.

view this post on Zulip Kevin Mayfield (Aug 26 2021 at 15:06):

FHIR workflow like referrals, prescription orders, send documents, etc.

view this post on Zulip Kevin Mayfield (Aug 26 2021 at 15:07):

So it's mostly please do X

view this post on Zulip Lloyd McKenzie (Aug 26 2021 at 15:07):

You can manage that in a pure REST way using Task, but its dependent on being able to query information referenced by the Task.

view this post on Zulip Kevin Mayfield (Aug 26 2021 at 15:09):

Yes we do use Task but the input pattern to workflow manager and then onto recipient is

ServiceRequest/MedicationRequest
Patient
PractitionerRole

view this post on Zulip Lloyd McKenzie (Aug 26 2021 at 16:33):

With pure REST, those would just be references and the workflow manager (and anyone else) would query for them if/when they needed them.

view this post on Zulip Kevin Mayfield (Aug 26 2021 at 16:57):

That does work and opens up several options. Thanks.

Plenty to think about.


Last updated: Apr 12 2022 at 19:14 UTC