Conversation
…n error if a mapping conflicts with one on the parent.
2e6f520 to
6a342d7
Compare
cmoesel
left a comment
There was a problem hiding this comment.
I'm changing my mind on one thing we discussed. Let me know what you think!
|
@cmoesel I've updated this to reflect the changes we talked about this morning. Hopefully the test description is a bit more clear, but all the new test descriptions are long, so I can try to reword them if they're still confusing. 27184ab makes it so that any inherited mapping that has additional or changed comments will add that field to the 29b5a6b just re-orders the tests so the test that checks for an error comes last in this group. The diff got confusing when I reordered it, so I just spit it into it's own commit so I could keep better track of the changes. |
cmoesel
left a comment
There was a problem hiding this comment.
It works! (No, I'm not actually surprised).
I ran GoFSH on US Core and then ran SUSHI master on the GoFSH results and this PR's branch on the GoFSH results. When I compared, there were differences: master created duplicate mappings in the SDs, but this PR's branch did not. So, that's GOOD!
ngfreiter
left a comment
There was a problem hiding this comment.
Yep, this is looking good to me.
This PR adds support for adding rules to existing
Mappings on StructureDefinitions (CIMPL-583).On master, if you were to make a
Mappingthat has the sameidas one that is already on the Parent of the Profile you are adding the mapping to, SUSHI will add a duplicate Mapping at the top level of the StructureDefinition and will also add any rules. This PR makes it so that you can add aMappingthat has the sameidas one already on the SD and add rules. As long as any specified metadata matches what is on the existingMapping, no metadata will be added to the SD but any rules on theMappingwill be added to the SD. If there is any metadata specified on theMappingthat does not match what is on the Mapping on the SD, an error will be logged and no rules will be added.I had also intended to include fixes for the two things @cmoesel pointed out here, but after looking at the original US Core SDs, these changes seem to be caused by the caret value rules GoFSH was creating since we were accessing indexes in arrays in the differential. I believe all the mapping information should be the same as the original US Core SDs.