FHIR Chat · narrative constraints · implementers

Stream: implementers

Topic: narrative constraints


view this post on Zulip Elliot Silver (Jun 20 2016 at 17:29):

Has anyone considered, either in the base resource or in a profile, constraining the format of the narrative? In particular, I'm thinking about whether ImagingStudy should recommend/require something like "[modality] [procedure type] [accession]". This way, a list of imaging studies from multiple sources would have a similar format, and would list nicely. Details of the actual string aside, is this an appropriate thing to do?

Do we have any expectations for what narratives should looke like? I recognize that Observation and others have such wide use that it is hard to come up with a standard narrative format, but what about for narrower-use resources?

view this post on Zulip Brian Postlethwaite (Jun 20 2016 at 21:20):

For generated narratives, it really doesn't matter as could be re-generated to conform, however for content that is not, maybe not practical.

view this post on Zulip Brian Postlethwaite (Jun 20 2016 at 21:20):

Would like to see it at least considered though.

view this post on Zulip Erich Schulz (Jun 20 2016 at 21:52):

wouldn't middleware that took a structured resource -> text be a better (more flexible/sustainable) solution?

view this post on Zulip Grahame Grieve (Jun 20 2016 at 22:19):

curerntly we have code that generates narratives in several languages, all open source and with permissive licenses. If someone else wanted to package that code into a middleware, or write their own, we think that's a good idea

view this post on Zulip Grahame Grieve (Jun 20 2016 at 22:21):

with regard to the original question: yes, it's been considered, and I've done it for CDA IGs before. HTML is kind of hard to constrain, so people tend to write narrative, but I have done, for instance, there SHALL be a table, there SHALL Be the same number of rows in the table as their are entries in the act as an XPath, But it's really hard to get a useful XPath that's not too restrictive

view this post on Zulip Elliot Silver (Jun 20 2016 at 22:24):

OK. As I was writing my question, the thought came to me that we could easily generate that text from the resource elements and ignore the narrative totally, but I wanted to see what the general approach was.

view this post on Zulip Grahame Grieve (Jun 20 2016 at 22:27):

nearly every resource example in the spec has a generated narrative using that code

view this post on Zulip Grahame Grieve (Jun 20 2016 at 22:28):

but in production, you might not be able to do that - that's why there's a status code with the narrative. If it contains additional information not in the data (sometimes) then you can't ignore the narrative

view this post on Zulip Lloyd McKenzie (Jun 24 2016 at 02:49):

This gets trickier with FluentPath constraints - it doesn't have the same narrative capabilities.

view this post on Zulip Grahame Grieve (Jun 24 2016 at 03:09):

no it has none

view this post on Zulip Lisa Nelson (Jan 17 2020 at 14:00):

@Grahame Grieve , Where can I find the open source code that generates narratives in several languages. can you point me to it?

view this post on Zulip Grahame Grieve (Jan 17 2020 at 19:53):

several languages? I'm not sure what you're referring to?

view this post on Zulip Vassil Peytchev (Jan 17 2020 at 20:08):

From 2016 above:

curerntly we have code that generates narratives in several languages, all open source and with permissive licenses.

view this post on Zulip Grahame Grieve (Jan 17 2020 at 20:21):

wooah. thanks. I guess what I was referring to was: https://github.com/hapifhir/org.hl7.fhir.core/blob/master/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/utils/NarrativeGenerator.java though I'm not exactly sure what I meant by 'multiple langages'


Last updated: Apr 12 2022 at 19:14 UTC