Stream: IG creation
Topic: mapping from IG listed first
John Moehrke (May 12 2021 at 12:47):
Is there a way to get the structureDefinition mapping from an IG to be rendered first? For example I am working on an IG on DocumentReference, and have a mapping coming from my IG that I want to be shown before all the mapping from the FHIR core.
John Moehrke (May 12 2021 at 17:53):
@Lloyd McKenzie @Jose Costa Teixeira is there a way to do this? Is this something I should create an IG jira ticket for?
John Moehrke (May 12 2021 at 17:54):
I would also be happy to have my IG not include the mappings from FHIR core
Jose Costa Teixeira (May 12 2021 at 17:56):
The tab can be done. I was thinking of adding this to the IG's parameters (which tab to show before), and then possibly (?) reordering the tabs (or removing the unwanted tabs).
Jose Costa Teixeira (May 12 2021 at 17:57):
we can change the IHE template (easier), and/or we can add this feature in the IHE IG (later)
John Moehrke (May 12 2021 at 18:02):
it would be nice to have... I would be happy to try it out in IHE
John Moehrke (May 12 2021 at 18:03):
seems @Elliot Silver is also expressing interest beyond IHE.. so it might be useful elsewhere too
Lloyd McKenzie (May 12 2021 at 18:37):
I think there's a way to turn off mappings that you don't want, but don't remember off the top of my hear how...
John Moehrke (May 12 2021 at 19:12):
oh, that would be great.
John Moehrke (May 12 2021 at 19:15):
anyone know this secret? @Eric Haas ?
Lloyd McKenzie (May 12 2021 at 19:43):
I've dug through the code and the places I'd have exected the functionality to be, it isn't. I can't even find issues requesting it, though I'm pretty sure it was talked about at some point.
Eric Haas (May 12 2021 at 20:04):
I only know how to turn off the tab. I don't recall tinkering with the mapping order
the mapping template has this line:
{%include {{[type]}}-{{[id]}}-maps.xhtml%}
which means it is created by the publsher and I don't a see a standard parameter to fix. You could create your own table an display it in the intro /notes or in the narrative section.
Jose Costa Teixeira (May 12 2021 at 20:29):
changing this in the template is possible. but it will mean change quite a few files, which is why I was thinking of parametrizing it: in that case we only have to write the code once and it become easy for the templates to change it
John Moehrke (May 12 2021 at 21:19):
yes please. I am here to be your test and prototype
Lloyd McKenzie (May 12 2021 at 21:44):
I'd expect it to change in the publisher, not the template...
Jose Costa Teixeira (May 12 2021 at 22:55):
"changing this" : the tab order / suppression
Jose Costa Teixeira (May 12 2021 at 22:56):
mappings I have no clue
Grahame Grieve (May 13 2021 at 01:54):
I think this needs work in the IG publisher, and I have'n't done it.
John Moehrke (May 13 2021 at 01:55):
should I record a jira ticket, github issue, or just wish upon a shooting star?
Grahame Grieve (May 13 2021 at 02:24):
that'd be a github issue
John Moehrke (May 13 2021 at 13:47):
done https://github.com/HL7/fhir-ig-publisher/issues/260
Eric Haas (May 13 2021 at 15:02):
Just put your mapping somewhere else and suppress the mapping tabs and call it a day who looks at those default mappings anyway .. I dont
Lloyd McKenzie (May 13 2021 at 15:46):
Newcomers will - and what we generate should be useful and relevant. Also we want consistency across igs
Jose Costa Teixeira (May 13 2021 at 15:58):
(FWIW, just re-read and I think i misread the OP or mixed different topics - the changes in the template would only be about which tab would be seen first, but I don't think this is the topic we're discussing. Sorry for confusing. Shouldn't reply at dinner time...)
Elliot Silver (May 13 2021 at 16:12):
I started to file this as a comment on the Jira ticket, but it probably deserves a bit of discussion first.
Yes, Jose, this is about ordering (or suppression) of mappings within the mappings tab, not which tab opens by default.
My feeling is that the ordering/suppression of is similar to the snapshot vs differential display of the structure. Sometimes I am focused on what the new mappings are; sometimes I want to know all the mappings.
If I have an implementation of Patient, I have already reviewed the Patient-level mappings and decided which were relevant for my use. When I add support for CA Baseline Patient, I will be more interested in what the new mappings are. I feel it is unlikely that previously ignored Patient-level mappings will affect my profile implementation.
If nothing else, being able to order, or changing the default order of mappings to include the most recently defined mappings first (i.e., sorting parent resource mappings lower) would be helpful.
Thinking wider, why don't we have snapshot vs differential for other views? Perhaps I'd like to see only new/modified element definitions, not repeats of parent resource definitions.
John Moehrke (May 13 2021 at 16:31):
I added a github issue https://github.com/HL7/ig-template-base/issues/155
Jose Costa Teixeira (May 13 2021 at 16:33):
Elliot Silver said:
Thinking wider, why don't we have snapshot vs differential for other views? Perhaps I'd like to see only new/modified element definitions, not repeats of parent resource definitions.
Are you suggesting that our rendered Diff should not be only between base resource and current profile, but possibly also between current-1 and current, or current and last validated, or current and version X?
Lloyd McKenzie (May 13 2021 at 16:34):
I don't know we'd want to drive it purely from what's in the differential. You might inherit things from a parent profile you still want exposed - or even from the base resource. What I don't get is having different requirements per profile within an IG.
Jose Costa Teixeira (May 13 2021 at 16:35):
Elliot Silver said:
If nothing else, being able to order, or changing the default order of mappings to include the most recently defined mappings first (i.e., sorting parent resource mappings lower) would be helpful.
there seems to be an assumption there - most recent are the children, or all the children are done after all parents are done. How reliable is it?
Jose Costa Teixeira (May 13 2021 at 16:36):
Elliot's description made me think of a Diff tab with a dropdown (Diff to what? - base profile, previous version...)
Jose Costa Teixeira (May 13 2021 at 16:37):
(which I don't know if it's sensible or feasible)
John Moehrke (May 13 2021 at 16:37):
My main goal is to give an IG author a way to make the mapping defined in that IG to be more prominent.
John Moehrke (May 13 2021 at 16:37):
diff is not a priority (although diff in the SD is... just not diff in the mapping)
Jose Costa Teixeira (May 13 2021 at 16:52):
Right, and I think that makes sense
Elliot Silver (May 13 2021 at 16:53):
Jose Costa Teixeira said:
Are you suggesting that our rendered Diff should not be only between base resource and current profile, but possibly also between current-1 and current, or current and last validated, or current and version X?
No, I'm thinking only between current profile and base resource.
Differences between builds, or between release 1 and 2 of a profile is a whole other issue.
Jose Costa Teixeira said:
there seems to be an assumption there - most recent are the children, or all the children are done after all parents are done. How reliable is it?
My use of "recent" meant most derived, i.e. not from a parent, rather than any notion of time, although in general, I would expect more derived profiles are predominantly done after parents.
Lloyd McKenzie said:
I don't know we'd want to drive it purely from what's in the differential. You might inherit things from a parent profile you still want exposed - or even from the base resource. What I don't get is having different requirements per profile within an IG.
No, I didn't mean drive it from the differential, I meant that just as we have use for snapshots and differentials for the structure, I see it as entirely plausible to have a "show me all" and "show me profile content only" view on both mappings and definitions.
I agree, a per-IG setting seems sufficient, unless every profile includes all options, just like the structure tab lets you swap between differential and snapshot.
John Moehrke said:
My main goal is to give an IG author a way to make the mapping defined in that IG to be more prominent.
diff is not a priority (although diff in the SD is... just not diff in the mapping)
Agree. I'm not suggesting showing changes to existing mappings, just showing profile-defined maps first, before base structure maps.
Lloyd McKenzie (May 13 2021 at 17:02):
My intention is that we'll have a "data dictionary" view with tabs just like the full profile view has tabs. The differential view would show only what's changed by the differential - so that would show you new/different mappings. I think the mappings tab should just show what's relevant to implementers of that IG - suppressing and re-ordering, but doing it the same across all profiles. However, if we stick it in the config, I guess it could vary for logical models vs. extensions vs. regular profiles.
Sarah Gaunt (May 13 2021 at 23:19):
I'd like to see an IG page that shows all the mappings defined in that IG. Might not be something everybody wants though - I had planned to just write a script to pull all the mappings out and create a page (or ask @Sean McIlvenna to put it in Trifolia at some point). But if enough people wanted it maybe it could be automatically created...
Lloyd McKenzie (May 13 2021 at 23:39):
So columns for profile, element path, target spec, mapping text?
Lloyd McKenzie (May 13 2021 at 23:39):
Do you want that rendered or as a CSV for Excel?
Sarah Gaunt (May 13 2021 at 23:41):
Yes!
Both... (you didn't think you could ask a question like that and NOT get a "both" answer, right?!)
Sarah Gaunt (May 13 2021 at 23:44):
Is that actually what you were referring to with the "data dictionary" view? It would be all profiles in the IG?
Lloyd McKenzie (May 13 2021 at 23:44):
I'm trying to figure out why someone would want the HTML page if they had the ability to grab the Excel
Lloyd McKenzie (May 13 2021 at 23:45):
No - data dictionary would be on a per profile basis. It's what the definition page is now
Sarah Gaunt (May 13 2021 at 23:47):
Honestly, I'd be happy with either. I think not having to download something and being able to see it right there rendered in the IG is good. Like we have mappings to fields on the Birth and Death certificates - they are really things that need to be in the IG, you wouldn't necessarily want to download them to Excel. But it would be great to see them all in one place.
Lloyd McKenzie (May 14 2021 at 02:22):
I suspect that seeing all the artifacts listed in alphabetic order by name or id with no ability to sort or filter would be more frustrating than useful. I can't imagine it being helpful except as a download. Can you submit an issue against the publisher for this? It should be relatively straight-forward to produce.
Sarah Gaunt (May 14 2021 at 02:53):
Okie dokie...
Grahame Grieve (May 14 2021 at 03:04):
ok well,to get things going, the next IG publisher will produce a new fragment StructureDefinition-{id}-maps-diff.xhtml
which will be the same as StructureDefinition-{id}-maps.xhtml
but only have what's in the diff. I don't think that this will solve the problem, but I want some feedback on this from IG authors before investing more time
Last updated: Apr 12 2022 at 19:14 UTC