FHIR Chat · V2 Formatted Text to FHIR Narrative · implementers

Stream: implementers

Topic: V2 Formatted Text to FHIR Narrative


view this post on Zulip Angus Millar (May 13 2020 at 04:37):

Hi guys, I'm looking for any advice about how to treat text from a HL7 V2 message which needs to be preserved and passed over in FHIR resources. What I have is pathology report display text with tabular information, think 'Liver Functions Test' report or 'Full Blood Count' Report in a HL7 V2 ORU message. Yet, I don't have a display OBX segment with a PDF but rather a series of HL7 V2 DSP segment which is nothing more than a string of text where each DSP segment is a new line, I do realise this is not standard for ORU message, a series of txt OBX segments would be much the same problem. I do not have control of the source of the V2 messages.
How do I preserve the white space that represented the tabular information in a text narrative of a FHIR resource?
Or should I be using a Binary resource and some Mime-Type to achieve this?
Can I use the PRE tag in the XHTML of the FHIR narrative?
I can try and use HTML Table or List to try an achieve the same outcome, but it will be very difficult as the content will be dynamic, some times it might not be tabular and other times, it will be difficult and potentially unsafe.
I feel the easiest and safest if the <pre> tag.
Have others dealt with this problem?

view this post on Zulip Lloyd McKenzie (May 13 2020 at 04:49):

You can convert the whitespace in the DSP into XHTML for the narrative. It takes a bit of work, but it's possible. You'd need to use more than just <pre/> unless there's no other FT markup in the text (and you can count on it staying that way).

view this post on Zulip Angus Millar (May 13 2020 at 05:35):

So Lloyd, is the <pre> acceptable in the FHIR Narrative? The narrative page in the R4 spec is silent on its use: http://hl7.org/fhir/R4/narrative.html#Narrative

view this post on Zulip Lloyd McKenzie (May 13 2020 at 05:36):

Absolutely. It's not 'active' and it's part of the XHTML spec

view this post on Zulip Angus Millar (May 13 2020 at 05:38):

Yes true, I think its use will solve my issue. There is no other FT markup see so all I worry about it the preservation of whitespace, which <pre> should solve. Thanks


Last updated: Apr 12 2022 at 19:14 UTC