FHIR Chat · Serialising Narrative xhtml · implementers

Stream: implementers

Topic: Serialising Narrative xhtml


view this post on Zulip Damian Murphy (Dec 05 2017 at 13:19):

We appear to have come across a discrepancy in behaviour in some library code that is not resolved by the STU3 FHIR documentation. Specifically, the Narrative element in a Composition resource has Narrative.div which is declared to be XHTML This is intended for display and is carried as XHTML irrespective of whether the Composition is serialised as JSON or as XML. But the examples show the XML serialisation carrying an XHTML namespace binding, but the JSON not doing so.

We've see examples of both depending on which library has been used for serialisation, and which version (DSTU2 or STU3) it originally came from.

I'm inclined to favour that the XHTML namespace declaration be included, since it is part of the formal definition of what you get out of Narrative.div when it is no longer (necessarily) able to benefit from the definition FHIR gives it.

Is there a specification of what this behaviour should be and, if not, can there be ? (Composition is maturity level 2 so presumably there is room for improvement).

view this post on Zulip Grahame Grieve (Dec 05 2017 at 18:59):

it should have a namespace declaration in json. where have you found examples that don't?

view this post on Zulip Damian Murphy (Dec 05 2017 at 22:03):

Here: http://hl7.org/implement/standards/fhir/narrative.html#xhtml though it just says "text" without being specific. One of my team reported its being produced without a namespace declaration, and I'll find out what he was using.

view this post on Zulip Grahame Grieve (Dec 06 2017 at 20:29):

ah yes, so it does. It's making another point, but misses the namespace. I'll fix that


Last updated: Apr 12 2022 at 19:14 UTC