Stream: implementers
Topic: IG publisher: links from tree view to definitions
Martin von Siebenthal (Jan 15 2018 at 13:00):
Hi, @Eric Haas et al.! Another difference between IG sampler and the FHIR svn examples seems to be that the IG sampler examples have links from the tree view in diff and snapshot to the definitions, whereas when I ran the FHIR svn tests\ig30 I don't get links. See screenshot. How are these links generated? Can I control if how they are generated?
Martin von Siebenthal (Jan 15 2018 at 13:05):
other screenshotLinksFromTreeViewToDef2.PNG
Grahame Grieve (Jan 15 2018 at 23:17):
they should always be generated
Lloyd McKenzie (Jan 16 2018 at 00:38):
Well, they should only be generated if the IG designer wants to include the data dictionary view. If they don't, then the hyperlinks would be problematic.
Eric Haas (Jan 16 2018 at 00:38):
What Grahame is saying is that the definitions fragment and page should is always generated if you are using the out of the box example. ( unless you tell the ig-pub not to) Your ig.json files defines the sd definitions template which will produce the page. So for ig-sampler I have a template called sd-definitions.html which "_includes" this fragment into the template. In the ig.json file you instruct the SD resource to create a Definitions page like this:
.... }, "StructureDefinition": { "template-base": "sd.html", "template-defns": "sd-definitions.html", "template-mappings": "sd-mappings.html" },
But to get the links on the content tree to work - I found that you need to explicitly define the defns fragment for each SD resource like this as well (actually you don't need the base defined just the defns) :
... }, "StructureDefinition/template-basic": { "base": "StructureDefinition-template-basic.html", "defns": "StructureDefinition-template-basic-definitions.html" }, ...
I guess should make a tracker for that but since I automated the ig.json file creation I forgot about it...
Eric Haas (Jan 16 2018 at 00:41):
@Lloyd McKenzie I keep the links but have dropped the separate tab to reduce the amount of information. I'm seeing what reviewer's thinks of it and whether they even miss it...
Eric Haas (Jan 16 2018 at 00:46):
If you look at the IG-Sampler you will notice I am a big fan of _includes and markdown. In the near future I'll refactor it some more to get rid of most of the remaining html and all those html wrappers.
Martin von Siebenthal (Jan 16 2018 at 08:33):
Wow, thank you so much! I am so impressed with the great support you provide! For the FHIR svn tests\ig30 based example I could make it work by simply doing the second part, i.e. give explicit defns in the control file:
"StructureDefinition/mypatient": {
"base": "profile-sd-mypatient.html",
"defns": "profile-sd-mypatient-dict.html"
},
and adding a page with only the StructureDefinition-mypatient-dict.xhtml.
That is with definitions on a separate page, which is perfectly fine for me. I could not make it link to the dict included on the same page because this generates hrefs like profile-sd-mypatient.html#Patient.identifier where the target name is not unique and would not jump to the dict section but within the diff or snapshot section. never mind. thanks again!
Last updated: Apr 12 2022 at 19:14 UTC