FHIR Chat · IG producing ShortHand rendering · IG creation

Stream: IG creation

Topic: IG producing ShortHand rendering


view this post on Zulip John Moehrke (Feb 20 2020 at 15:03):

The IG publisher creates some fantastic renderings of StructureDefinition today... I would like if an additional rendering of the ShortHand could be added. I am finding that 'some' people can grasp shorthand easier than the graphical rendering (some prefer the graphical, especially those that like the additional features that form includes). Yes there will be loss of fidelity, but the graphic rendering we have today somewhat looses fidelity.

view this post on Zulip Chris Moesel (Feb 20 2020 at 15:15):

I think there are two possible approaches to this. One is that IGs produced using Shorthand could publish the source Shorthand in a separate tab. There's some work to make that happen, but it's certainly doable.

The second approach would take any conformance resource (SD, VS, CS) and translate it to a Shorthand representation. This would allow the Shorthand view for IGs not developed using Shorthand. But it's more complex because it requires what we've been calling "Hatchery" -- a tool for translating arbitrary conformance resources to Shorthand. @Rick Geimer did a quick proof-of-concept for this translation at the Connectathon, but I expect a fully working solution will take some time.

view this post on Zulip Lloyd McKenzie (Feb 20 2020 at 16:10):

I absolutely expect this is something we'll have - the question is "when does it make sense to invest the effort?" Shorthand is super new and thus (I presume) at least somewhat unstable. Once we've got something that's balloted (which will also give us a stable version of documentation we can point to), I'd be very much in favor of the publisher both being able to consume shorthand and being able to generate a rendered view of shorthand as one of the views of most (and perhaps all) resources.

view this post on Zulip John Moehrke (Feb 20 2020 at 16:39):

Maturity is indeed a consideration, but I would be more worried about maturity if the IG publisher it-self was already stable. Since the graphic rendering keeps changing, then there should be no reason not to include shorthand... But I am willing to wait for more stability.. I simply wanted to get the idea flowing.

view this post on Zulip John Moehrke (Feb 20 2020 at 16:41):

Including the source shorthand is nice as it can include comments that an automatic translation can't invent... but the source shorthand will have stylistic differences that might be undesirable. -- might want to include in the NPM package the source, but might want the rendering to be consistently done by the IG publisher

view this post on Zulip John Moehrke (Feb 20 2020 at 17:15):

Note for those new to the terms... ShortHand is otherwise know as SUSHI, FSH, etc... https://github.com/FHIR/sushi

view this post on Zulip Jose Costa Teixeira (Feb 20 2020 at 18:41):

Shorthand itself (the language) is still being designed for a few important aspects, I expect it to evolve a bit too. The graphic rendering of the IG is handled in great part by the templates, which are not static - they will evolve. So that is not the same thing - maturity vs "stability"

view this post on Zulip Jose Costa Teixeira (Feb 20 2020 at 18:42):

I think an important milestone is when we can convert from a FHIR resource to FSH.

view this post on Zulip Grahame Grieve (Feb 20 2020 at 20:16):

so some comments:

  • there's not a 1:1 relationship between shorthand source and resource. So I can't just 'add another tab'
  • I can generate shorthand, but there is challenges there, since really good shorthand is insightful about meaning in a way code can't be
  • I'm intending to extend the IG publisher so it natively imports short hand, rather than needing a pre-processing tool, though I'm not sure I'll do that

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

having said all that, I would like to add a short hand representation to the IG publisher

view this post on Zulip Lloyd McKenzie (Feb 20 2020 at 21:21):

I agree that shorthand offers authoring capabilities in terms of ordering, whitespace, etc. that you can't replicate through generation. But for artifacts not authored in shorthand, it's better than nothing. The fact that one shorthand file can define numerous artifacts would be handled by splitting up the shorthand file to define the relevant bits - though things like defined URLs would presumably need to get copied into each file.

view this post on Zulip Rick Geimer (Feb 27 2020 at 20:55):

FYI, ended up calling it fshfood vs. hatchery, but here is my first cut:
https://github.com/lantanagroup/fshfood

view this post on Zulip Rick Geimer (Feb 27 2020 at 20:57):

Currently only works with StructureDefinition resources that have a snapshot

view this post on Zulip Mark Kramer (Feb 27 2020 at 22:56):

But Shorthand is going to address that issue by allowing one-sided cardinality when the differential only has a max or a min (e.g., ..1 or 1..). One our hot fix list right now.


Last updated: Apr 12 2022 at 19:14 UTC