FHIR Chat · Rendering of Examples · IG creation

Stream: IG creation

Topic: Rendering of Examples


view this post on Zulip Saul Kravitz (Nov 01 2021 at 14:15):

One area for future improvement of the IG publisher tool chain is rendering of examples.
For many of our example instances, the default renderings are not helpful to the reader, and require perusal of the JSON to really see the example content. This reduces the pedagogical value of the examples significantly.
We have resorted to workarounds like incorporating FSH-like renderings of the content as a workaround. We suggesting including an optional FSH rendering for each instance (rendered with GoFSH) in the notes section.
Similarly, the functionality of @Eric Haas tools for generating Capability Statement renderings should be incorporated into the publisher.

I have created an issue to record this request -- https://github.com/HL7/fhir-ig-publisher/issues/331.

view this post on Zulip Lloyd McKenzie (Nov 01 2021 at 14:19):

Is GoFSH sufficiently robust now we can reliably throw it against random examples? (We can't make this publishing feature dependent on the source files being maintained in FSH.)

view this post on Zulip Eric Haas (Nov 01 2021 at 14:40):

For many of our example instances, the default renderings are not helpful to the reader,

Is this assertion true for all resource types?

view this post on Zulip Eric Haas (Nov 01 2021 at 14:42):

Assuming these rendering don't requires a knowledge of FSH syntax

view this post on Zulip Saul Kravitz (Nov 01 2021 at 15:34):

@Lloyd McKenzie -- yes, the idea would be to run them against the JSON generated by Sushi since that would flatten all of the rulesets. GoFSH is pretty robust at this stage. I'm going to do the experiment on mCODE. The one issue I've found so far is that GoFSH currently generates aliases for codesystems (since that is helpful if you are going JSON to FSH for an IG). See an example here.

@Eric Haas -- currently you get a partial translation into text or the original JSON. I'm suggesting adding a full translation into FSH as an addition, not an alternative to a 'proper' text rendering. Assuming (as @Lloyd McKenzie asks) that GoFSH is robust, this is a much more scalable approach than hand rolling 'proper' renderings for each profile (including extensions, etc).

view this post on Zulip Eric Haas (Nov 01 2021 at 15:45):

so what is the proposal? another view or a replacement of the narrative view?

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 16:02):

I'd like to explore the idea of having rendering plugins / options.

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 16:03):

If the publisher can send the resources through some procedure and get the output from that procedure, then we woudn't worry about eventual gofsh issues

view this post on Zulip Saul Kravitz (Nov 01 2021 at 16:39):

@Jose Costa Teixeira -- no argument from me re rendering plugins/options..... can you please expand on the "eventual gofsh issues"?

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 16:41):

we don't want tools to be too closely coupled. If gofsh has issues or if it doesn't have a good canonical form of presenting the results, publisher should not worry about that.

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 16:45):

Eric Haas said:

so what is the proposal? another view or a replacement of the narrative view?

@Eric Haas another view, I'd guess?..
(Not that I'm too happy with the narrative view)

view this post on Zulip Lloyd McKenzie (Nov 01 2021 at 16:54):

I think having GoFSH renderings will be useful. I think having templated narratives will, in the end, produce something that's even more human-readable (and also useful for implementation), but that will take more work.

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 17:11):

my point is: Piping stuff through GoFSH could simply be one of the templated narratives

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 17:19):

(or one of the possible views - of which "narrative" is one)

view this post on Zulip Saul Kravitz (Nov 01 2021 at 17:20):

I think @Eric Haas may be asking where on the page the new rendering appears.
In my current effort we are sticking the FSH rendering in the 'notes' section.

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 17:39):

In the approach I propose, the FSH rendering would show up in the "FSH" tab

view this post on Zulip Eric Haas (Nov 01 2021 at 19:13):

toggleable ( same for future YAML tab)?

view this post on Zulip David Pyke (Nov 01 2021 at 19:31):

I'm concerned that if we start having FSH or YAML tabs, people will start to assume that's legal for exchange.

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 19:36):

Eric Haas said:

toggleable ( same for future YAML tab)?

by definition, templates (IMO) would be add-ons. I don't think there was any discussion on whether we'd allow plugins or if everything would be in the base template, in which case they'd have to be toggleable.

view this post on Zulip Jose Costa Teixeira (Nov 01 2021 at 19:41):

Keeping yaml out of the equation:
David Pyke said:

I'm concerned that if we start having FSH or YAML tabs, people will start to assume that's legal for exchange.

FSH would be a rendering. Same as if we have a diagram or any other rendering. I don't see a big additional risk.

view this post on Zulip Grahame Grieve (Nov 01 2021 at 20:40):

honestly, I hate the goFSH example provided in the task. horrible

view this post on Zulip Grahame Grieve (Nov 01 2021 at 20:40):

require perusal of the JSON to really see the example content

So? you say that like it's a bad thing...

view this post on Zulip Grahame Grieve (Nov 01 2021 at 20:41):

however:

  • there's no reason people can't contribute to the rendering code
  • there's no reason you can't make comment about what specifically about the rendering you think could be improved (other than 'show me the json')

view this post on Zulip Grahame Grieve (Nov 01 2021 at 20:42):

there's some tooling constraints here:

  • I'm not adding another dependency to the build tooling beyond java + ruby

view this post on Zulip Grahame Grieve (Nov 01 2021 at 20:43):

note that there's two kind of rendering in the specifications:

  • a hand written rendering of particular resources
  • a generic profile driven renderer.

most negative comments relate to the second, but it's pretty hard to get better. References, in particular, are hard to get right in a generic fashion

view this post on Zulip Jean Duteau (Nov 01 2021 at 20:45):

Saul Kravitz said:

One area for future improvement of the IG publisher tool chain is rendering of examples.
For many of our example instances, the default renderings are not helpful to the reader, and require perusal of the JSON to really see the example content. This reduces the pedagogical value of the examples significantly.
We have resorted to workarounds like incorporating FSH-like renderings of the content as a workaround. We suggesting including an optional FSH rendering for each instance (rendered with GoFSH) in the notes section.
Similarly, the functionality of Eric Haas tools for generating Capability Statement renderings should be incorporated into the publisher.

I have created an issue to record this request -- https://github.com/HL7/fhir-ig-publisher/issues/331.

@Saul Kravitz rather than doing this, why wouldn't you just add your own narrative to your examples. If you don't like the default rendering which is a hard thing to generically create, add your own narrative which will be used in the IG profile pages.

view this post on Zulip Lloyd McKenzie (Nov 01 2021 at 21:15):

YAML tab would require that YAML be a balloted form of expression for FHIR artifacts...
Hand editing narrative is challenging to keep right over time. As example data values evolve, you have to remember to change the narrative too.

view this post on Zulip Grahame Grieve (Nov 01 2021 at 21:25):

I'm ok to improve the rendering, and to invest time in it.

view this post on Zulip Saul Kravitz (Nov 01 2021 at 22:12):

@Jean Duteau Hi Jean, I'm only suggesting to make optional for others what I've done in the past (see Davinci-Plan-Net and what I'm planning to do for mCode (see example ) in the near future (assuming I have time). I think you would agree that the default rendering in the example that shows one of seven genes in a panel does not really illustrate a seven gene panel. That is my motivation, not to take pot shots at anyone or anything. Trying my best to be constructive.

view this post on Zulip Eric Haas (Nov 01 2021 at 22:16):

Lloyd McKenzie said:

YAML tab would require that YAML be a balloted form of expression for FHIR artifacts...
Hand editing narrative is challenging to keep right over time. As example data values evolve, you have to remember to change the narrative too.

... and a FSH tab would require that FSH be a balloted form of expression for FHIR artifacts too right?

view this post on Zulip Lloyd McKenzie (Nov 01 2021 at 22:19):

FSH is a balloted form of expression - for authoring. If we included a tab with it, we'd need to make clear it wasn't for exchange, but that should be doable.

view this post on Zulip Jose Costa Teixeira (Nov 02 2021 at 11:04):

Grahame Grieve said:

I'm ok to improve the rendering, and to invest time in it.

We could allow rendering that doesn't need to live in the same code base - besides the "official". This way, we'd care about the narrative, but allow other renderings. There's not going to be one soup flavour that meets everyone's taste, so we can stick to the basic rendering and allow "plugins".

view this post on Zulip Lloyd McKenzie (Nov 03 2021 at 03:43):

I believe there's now support for liquid templates for narrative?

view this post on Zulip Grahame Grieve (Nov 03 2021 at 03:44):

yes but that's pretty hard work

view this post on Zulip Lloyd McKenzie (Nov 03 2021 at 03:52):

We can push those liquid templates into the 'standard' templates if/when someone decides to do the work for a given resource.

view this post on Zulip Grahame Grieve (Nov 03 2021 at 07:22):

I spent a couple of hours on the automatic rendering for IGs:

view this post on Zulip Grahame Grieve (Nov 03 2021 at 07:24):

image.png

view this post on Zulip Saul Kravitz (Nov 03 2021 at 22:44):

For your consideration:
Here is where I think we are going with mCODE -- http://build.fhir.org/ig/HL7/fhir-mCODE-ig/branches/fshnotes2/artifacts.html#example-example-instances.

The most interesting cases are where there is a big difference between the publisher's rendering and the FSH. This happens for two reasons:
1) The publisher dereferences references to pull in additional information (e.g., bundles). FSH doesn't.
2) Where the default rendering is very limited.

view this post on Zulip Lloyd McKenzie (Nov 03 2021 at 22:57):

Given that narrative is supposed to be targeted at clinicians/patients/other 'normal' humans, I don't see how the FSH is an improvement on what we've got now. The narrative is NOT supposed to convey everything in the instance that might be of interest to developers...

view this post on Zulip Grahame Grieve (Nov 03 2021 at 23:27):

right. that's why I think that the FSH based content is going in the wrong direction. If you want to know that, look at the json

view this post on Zulip Saul Kravitz (Nov 04 2021 at 03:32):

I share your aspiration for the narrative.


Last updated: Apr 12 2022 at 19:14 UTC