FHIR Chat · Examples Tab · IG creation

Stream: IG creation

Topic: Examples Tab


view this post on Zulip Giorgio Cangioli (Mar 28 2019 at 15:56):

@Eric Haas Using your template is there any "easy" way to add an example tab for each profiled resource ...the desire would be that of having displayed in this tab the result of the {% include list-simple-[type]s.xhtml %}.
For the time being I have a single page with all the examples listed linked to the main menu.

view this post on Zulip Eric Haas (Mar 28 2019 at 16:09):

I list the example in the introductory narrative. I will add a new tab and comment out in the layout.

view this post on Zulip Giorgio Cangioli (Mar 28 2019 at 16:30):

thanks a lot

view this post on Zulip Eric Haas (Mar 28 2019 at 17:15):

After spending a bit of time on this- I won't be able to add this tab for now. #1 It is not as easy as I originally thought. #2 having a whole page to list 1-3 examples is overkill.
There is a page that lists all the examples and that could be sorted based on type.

view this post on Zulip Giorgio Cangioli (Mar 28 2019 at 17:46):

Thanks anyway :-).. For the time being I'll follow your approach to add the example list in the narrative.

view this post on Zulip Dusica Bojicic (Mar 29 2019 at 20:36):

We added this functionality to the same template.

You would need to create a template for the examples page (we called it sd-examples.html and it 'reads'' from an example md file)
, and add to .json

"StructureDefinition": { "template-defns": "sd-definitions.html", "template-examples": "sd-examples.html",

This new template should be included in the .json extraTemplates list:

"extraTemplates": ["examples"])

You would also need one examples markdown file for each profiled resource otherwise IG Publisher would throw an error.

view this post on Zulip Giorgio Cangioli (Apr 01 2019 at 16:01):

Thank you Dusica

view this post on Zulip Eric Haas (Apr 10 2019 at 01:16):

I update the IG-Templates2 to provide a way to turn off and on tabs for mappings, definitions, ttl, and xml. You specify what you want to see rendered in the framework/_config.yml file

...
showXML:false  #'true' if want xml tab'
showTTL: false  #'true' if want ttl tab'
showMappings: false  # 'true' if want to display mappings tab'
showDefs: false  # 'true' if want to display Definitions tab'
...

A separate issue is whether these artifacts get created in the first place and that is handled by the definitions file aka ig.json.

still no rendering of individual examples pages in my templates but @Dusica outlines it above. I personally go for less is more approach here and the fewer pages the better and remove all but the json and xml.


Last updated: Apr 12 2022 at 19:14 UTC