FHIR Chat · MessageHeader in a Batch? · implementers

Stream: implementers

Topic: MessageHeader in a Batch?


view this post on Zulip Igor Sirkovich (Apr 13 2018 at 19:55):

I'm wondering whether it's allowed to have a MessageHeader resource in a FHIR batch or it can only be used in a message.

We consider creating an alternative mechanism for some pharmacies, which are not able so support REST, to let them submit batches of Medication Dispense resources. We would need to have some metadata in each batch, e.g. source software and version, which can be conveyed in a MessageHeader in case it's allowed in a batch.

view this post on Zulip Lloyd McKenzie (Apr 13 2018 at 21:07):

If MessageHeader were in a batch, it would let you say "Please create/update/delete this MessageHeader instance". And each element in the batch would be produced independently. If you want to send metadata about elements, use Provenance - though you'd probably want to use "transaction" rather than "batch" because you'd want everything to be processed or nothing.

view this post on Zulip Igor Sirkovich (Apr 14 2018 at 02:00):

Thank you Lloyd. I did realize MessageHeader wasn't right for transactions/batches, but still hoped to be wrong :) We would probably create extensions on the bundle, since Provenance doesn't have data elements for software name and version anyway. Also, having a provenance on each resource might be an overkill as we expect hundreds of thousands of resources a day once the system is fully rolled out. We do plan to use a "transaction", but for historical reasons we call it a batch process.

view this post on Zulip Lloyd McKenzie (Apr 14 2018 at 02:59):

If all of the resources were created as a single event, they can have a single Provenance. The software and version would be on the Device the Provenance points to

view this post on Zulip Lloyd McKenzie (Apr 14 2018 at 03:00):

(And the Device could be contained if you don't care about its identity)

view this post on Zulip Igor Sirkovich (Apr 14 2018 at 03:54):

Thank you Lloyd! This is very helpful.

view this post on Zulip David Hay (Apr 16 2018 at 09:23):

And - I don't believe that you can have extensions on a Bundle type anyway... (It inherits from Resource - not DomainResource)...

view this post on Zulip René Spronk (Apr 16 2018 at 11:06):

You could create a Bundle (#1) which contains a MessageHeader which points to a Bundle (#2, also part of Bundle #1). That way you'd associate a MessageHeader with a Bundle.
However, Igor's interest seems to be in the area of Provenance. Provenance.agent.whoReference can be to a Device resource (which also applies to software applications). The Device resource has data elements for name and version. Provenance.agent.role could be used to identify whether the agent is a sender or a reciever of the Bundle.

view this post on Zulip Igor Sirkovich (Apr 16 2018 at 15:27):

Thank you David and Rene. We are still trying to confirm our business requirements. We would need to support both REST and Batch/Transaction submissions of medication dispenses. Ideally, we wouldn't request every pharmacy to include the Provenance and Device resources, but would rather create Provenance internally for received dispenses. However, if software and version are indeed in scope, we would need to find a place for pharmacies to include these data elements in their submissions.


Last updated: Apr 12 2022 at 19:14 UTC