FHIR Chat · IG Publisher (1.8) -- Truncated Differential Tables? · implementers

Stream: implementers

Topic: IG Publisher (1.8) -- Truncated Differential Tables?


view this post on Zulip Chris Moesel (Feb 14 2017 at 15:24):

I'm using the IG Publisher jar to attempt to produce documentation for a set of profiles and extensions. It seems the the generated XHTML Differential Tables are not correct. For every profile, the Differential Table only has ONE entry (usually the first extension in the profile) -- and that is it. If you look at the XHTML Snapshot Table, it looks right (multiple extensions, etc) -- so I'm not sure why the Differential Table is not.

I'm using the igpublisher.jar from the 1.8 release (on a Mac). How should I go about debugging this? I'd like to figure out what is throwing it off!

view this post on Zulip Lloyd McKenzie (Feb 14 2017 at 17:08):

Is the differential right in the profile XML/JSON?

view this post on Zulip Chris Moesel (Feb 14 2017 at 18:34):

@Lloyd McKenzie set me in the right direction. I inspected the JSON and XML more closely, comparing it to working ones, and realized that I was not putting the root element for the SD in the differential. I think I was under the impression that the differential only had to have those things that are different -- but it appears that if an element is in the differential, its ancestor elements must also be in the differential (even if they haven't changed). So obviously that means the root element must be there, but also any backbone elements if you are including one of their children as a differential.

view this post on Zulip Chris Moesel (Feb 14 2017 at 18:36):

Once I fixed that, it worked as expected. Unfortunately, the igpublisher didn't produce any errors in the qa.html reflecting this problem. Perhaps that's something that can be checked and reported against in future versions of the igpublisher?

view this post on Zulip Lloyd McKenzie (Feb 14 2017 at 18:38):

@Chris Moesel I think the root is the only element that must be there. I don't remember off the top of my head why. But agree that build tool should certainly yell if it isn't. Can you submit a change request?

view this post on Zulip Chris Moesel (Feb 14 2017 at 18:48):

Sure. The root is sufficient if you only add/override things at the root of the resource, but if you go into a nested structure, it seems you need to include the intermediate path definition there too.

For example, I override cardinality of Encounter.participant.individual to 1..1. If I put the element for Encounter.participant.individual in the differentials, but don't put an Encounter.participant element in too, then the publisher does not show the participant.individual element in the Differential Table.

view this post on Zulip Bryn Rhodes (Feb 14 2017 at 19:09):

It seems like there might be an issue with recursive element definitions then as well, and I'm guessing that's the issue that @Lee Surprenant ran into the other day.

view this post on Zulip Grahame Grieve (Feb 14 2017 at 19:32):

for spreadsheets you must include all the intermediate paths. I have no plans to fix this.

view this post on Zulip Grahame Grieve (Feb 14 2017 at 19:33):

if you edit structure definitions in some other way, you do not need to include all the intermediate paths

view this post on Zulip Lloyd McKenzie (Feb 14 2017 at 20:48):

@Grahame Grieve Do you still need the root if you're authoring the XML directly?

view this post on Zulip Grahame Grieve (Feb 14 2017 at 20:54):

in principle you shouldn't, but you might...

view this post on Zulip Chris Moesel (Feb 15 2017 at 03:25):

@Grahame Grieve I'm building the IGs using JSON StructureDefinitions that I've generated myself. My experience is that you do need the root element and you do need the intermediate paths (just like you describe for spreadsheets).

view this post on Zulip Chris Moesel (Feb 15 2017 at 03:27):

Without the root element, the IG Publisher generates a Differential Table containing only the first element in the differential. Without intermediate paths, the IG Publisher generates a Differential Table missing any nested elements that don't have the intermediate path included in the differential.

view this post on Zulip Grahame Grieve (Feb 15 2017 at 03:29):

well, you could create a task prompting me to get to investigating these issues and fixing them. in theory, they shouldn't be required

view this post on Zulip Chris Moesel (Feb 15 2017 at 03:52):

I'll file this in the tracker tomorrow. I'm just trying to ensure that there isn't any user error on my part before I file a bug!


Last updated: Apr 12 2022 at 19:14 UTC