Stream: v2 to FHIR
Topic: Resource for HL7v2 Message content+metadata
Tom Pick (Aug 07 2018 at 14:32):
Hi all. I have a requirement to expose via our FHIR API a list of all HL7v2 messages the caller has sent to us (which will include some custom metadata). I'm not sure what resource to use to capture the HL7v2 message itself. At the moment I think I'll have to use Basic, in the absence of anything else. I've considered:
Provenance. I can make this point to the HL7 v2 message as a contributing entity, but I don't think it should represent the message itself. For example - the HL7v2 message processing might fail. In this case, the message still exists, but it is not the provenance of any target data.
AuditEvent. Again, maybe. But really I'd expect the processing of an HL7v2 message to generate multiple AuditEvent instances, but the message itself probably shouldn't actually _be_ an AuditEvent.
Binary. Maybe - but I might not always have the content available and still need to be able to return metadata (in Binary content is mandatory).
DocumentReference. We already use this for clinical documents, and so it doesn't feel right, even though it is an example given in "Use of Provenance to record Import and Transform" section in Provenance docs.
Custom resource? Booo.
I'll have to make progress with a profiled Basic resource I think, but if anyone has any better ideas, or experience of a similar problem, please do shout :)
René Spronk (Aug 07 2018 at 16:56):
See http://www.ringholm.com/docs/04350_mapping_HL7v2_FHIR.htm (3 years old), in your case I'd probably store the v2 message as a Binary which would be referenced from Provenance.
Hmm (upon rereading your post), so you may not have the binary. In that case (and only in that case) a URN: may work (a logical id), or a MessageHeader. But to reference the MessageHeader from a Provenance you'd need an extension, for the MessageHeader is NOT the basis that the FHIR objects where derived from, those are derived from the v2 message. DocumentReference would work as well, v2 can be viewed as a document.
David Hay (Aug 07 2018 at 17:37):
So the requirement is to expose the actual v2 message contents (pipe and hat and all) via a FHIR interface? How about exposing the contents via Binary, maybe with MessageHeader as the 'list' of messages (MH.focus could point to the Binary). Not so sure that v2 is really a Document...
Tom Pick (Aug 07 2018 at 17:49):
Thanks both. I had initially discarded MessageHeader because I thought it was _only_ for FHIR messages (which we're not using yet). But I notice that there are v2 mappings, and the "Scope and Usage" says "This could be used to make an archive of past messages available." Maybe this would be a better fit than I thought. I'm still reluctant to consider it a DocumentReference for my particular use case (but I take the point.)
Tom Pick (Aug 07 2018 at 17:51):
Good point about the MessageHeader not being the actual Provenance.entity, I hadn't thought of that. I can probably go ahead and use a Binary for the raw contents then, which can be optional (focus looks good) if MessageHeader has the metadata.
David Hay (Aug 07 2018 at 18:41):
Yeah - not completely sure if MessageHeader is to be used like this - hopefully Lloyd will comment if we're on the wrong track!
Last updated: Apr 12 2022 at 19:14 UTC