HL7 / fhir-ig-publisher

Source code for the IG publisher
Apache License 2.0
69 stars 57 forks source link

Hide Mappings from Differential Table #616

Open atruskot opened 1 year ago

atruskot commented 1 year ago

Based on this discussion.

For some Implementation Guides, it doesn't make sense to have elements appear on the diff table of a profile when the element is only different from the derived structure as a result of a mapping. For example, the following object in the StructureDefinition.differential.element.mapping should not result in adding a new row to the diff table.

{
        "id": "Appointment.cancelationReason.coding.code",
        "path": "Appointment.cancelationReason.coding.code",
        "mapping": [
          {
            "identity": "123",
            "map": "abc"
          }
        ]
},

A new setting for the IG Publisher should be created to avoid confusion on profiles where mappings shouldn't result in having an element show on the diff table.

lmckenzi commented 1 year ago

We think the issue isn't the element showing up in the table, but rather the current table view doesn't tell you what's happened to the element. We propose to add icons or small labels on the differential table if there are changes that have happened that only manifest on the data dictionary page or mappings tab with links to the appropriate section of the appropriate tab. This will ensure that if something shows up on the differential summary table, it's always obvious as to 'why'. (And it may prompt the reader to go look at the other tabs to see what's changed.)

Would making this change address the concern @atruskot?

atruskot commented 1 year ago

@lmckenzi, yes, I definitely that would be a helpful addition and would clarify why an element is showing up.

As a note, the diff table doesn't currently populate many of the existing flags (such as summary, modifier, etc.). If I recall correctly, it currently only displays the must-support and constraint flags. This may be a good time to consider what flags should be displayed on this table.

lmckenzi commented 1 year ago

summary and modifier can't ever be changed, so there wasn't much point in including them in the differential table. Both indicators are locked down in the resource design.

lmckenzi commented 1 year ago

We will add the proposed icons to the summary table to indicate whether there have been changes to data dictionary and/or mapping content that isn't visible from the summary table. The links will have flyovers explaining what they mean and will hyperlink to the appropriate element in the mapping or data dictionary tab.