Stream: implementers
Topic: MessageDefinition - FHIR Document
Kevin Mayfield (Feb 21 2019 at 09:56):
Can a MessageDefinition be used to define contents of a FHIR Document i.e. it consists of
Composition (1..1)
Encounter (1..1)
Patient (1..1)
Kevin Mayfield (Feb 21 2019 at 09:57):
etc.
It's not exactly a message but I may also have a very Encounter message bundle which looks like
MessageHeader (1..1)
Composition (0..1)
Encounter (1..1)
Patient (1..1)
etc
Kevin Mayfield (Feb 21 2019 at 10:01):
It looks possible. What I'm trying to do is show developers what the XYZ FHIR Document should look like (I can show an example bundle but need a simple reference which shows which resources and profiles it consists of)
René Spronk (Feb 21 2019 at 10:30):
Sounds like GraphDefinition to me..
Kevin Mayfield (Feb 21 2019 at 10:38):
I'll look into that but I think that's at a layer down from where I'm looking (I want to understand what the Bundle contents should be)
Kevin Mayfield (Feb 21 2019 at 14:06):
I think my answer is MessageDefinition, I've been misled by some local examples of MessageDefinition.
Lloyd McKenzie (Feb 21 2019 at 15:36):
MessageDefinition is not intended to define documents. MessageDefinition requires an event - which is not relevant for document. It also requires a focus for the event, which again is generally not relevant. GraphDefinition should be all that's required to define a document.
Kevin Mayfield (Feb 22 2019 at 06:47):
Are their examples of a MessageDefinition and resulting message.
Bits I’m not clear on:
I’m presuming MessageDefinition implies a bundle (is it implied this is a message Bundle?)
In that bundle it is implied the first resource is MeassageHeader (or should that be a focus in MD)
If the MessageDefintion refers to a fhir document. Does it have a focus of Bundle or Composition.
(The example I’ve seen uses bundle - which is a fhir document). If it is Bundle, how do I define the second ‘payload’ bundle, another messagedefintion with graph?
I think the example I’ve been looking at is wrong.
Lloyd McKenzie (Feb 22 2019 at 06:50):
If the message's sole purpose is to transmit a FHIR document, the MessageHeader.focus would be a Bundle. The graph definition could have a profile that described the document, but there's not (yet) a way for a GraphDefinition to point to a GraphDefinition for a child bundle. (Messaging isn't super common in FHIR and messages passing around documents is even less common, so there hasn't been a lot of focus on such requirements.)
Kevin Mayfield (Feb 22 2019 at 07:41):
For reuse (the fhir document could rest), it seems I should do a graph for the fhir document.
The graph for the MessageDefinition could refer to this.
Also seems I should link this document graph to the focus element. (I think that’s what the extensions in this example is trying to do https://fhir.nhs.uk/STU3/MessageDefinition/ITK-MH-eDischarge-MessageDefinition-Instance-1)
René Spronk (Feb 22 2019 at 08:00):
@Kevin Mayfield The NHS uses the Composition resource as the focal resource in a message, where the Composition is NOT a document, but just acting as a grouper. See https://vimeo.com/243295695 , at 27:30
Kevin Mayfield (Feb 22 2019 at 08:03):
That confuses me a little, the NHS examples of FHIR Documents do seem to be FHIR documents. Where does the grouper comment come from (I'm including messaging in this comment)
Kevin Mayfield (Feb 22 2019 at 08:06):
e.g. This is a rendered FHIR Document. https://data.developer.nhs.uk/ccri/ed/patient/1172/document/4
actual resource https://data.developer.nhs.uk/ccri-fhir/STU3/Binary/5ba6087037cac60001366b3f
This is an example of what would be referred to in a MessageDefinition.
Kevin Mayfield (Feb 22 2019 at 08:10):
Back to MD, I think I would use a Graph to show how this FHIR document would be built. Is that a correct use of Graph?
René Spronk (Feb 22 2019 at 08:31):
If the message tigger event were to be 'new discharge summary' the focal class would be a Bundle (of type Document).
Kevin Mayfield (Feb 22 2019 at 09:11):
@René Spronk I think I get what you mean. In the wider context NHSD ITK Message it's what you call a grouper and what I was calling payload. For FHIR Documents it does seem to follow standard FHIR messaging (I need to check other event types though)
Kevin Mayfield (Feb 22 2019 at 16:22):
Have been looking at GraphDefintion, done some basic rendering work and it does seem to fit well.
Cheers. Now just need to convince a few people it’s the correct approach
René Spronk (Feb 24 2019 at 09:28):
@Kevin Mayfield be aware though that there are currently no validators (AFAIK) which allow one to validate GraphDefinition. May now that CMS is pushing ADT FHIR messages in the US we'll see some of validators being willing to implement this, this is effectively a necessity for the roll-out of FHIR messaging.
Grahame Grieve (Feb 25 2019 at 01:16):
I
Grahame Grieve (Feb 25 2019 at 01:16):
I'll add it to my to do list for May connectathon
Kevin Mayfield (Feb 25 2019 at 20:09):
Thanks @René Spronk
I’m presuming defining and explaining fhir documents was the main driver for graphdefintion?
Lloyd McKenzie (Feb 25 2019 at 22:01):
It was one, but not necessarily primary. It's also useful for defining queries, for defining collections of data to be exchanged, for defining content to grant access privileges to, and obviously for defining message structures.
Last updated: Apr 12 2022 at 19:14 UTC