Fix StructureMapUtilities failures by updating the StructureMap runtime in R4, R4B, and R5.#2361
Open
jurmous wants to merge 1 commit into
Open
Fix StructureMapUtilities failures by updating the StructureMap runtime in R4, R4B, and R5.#2361jurmous wants to merge 1 commit into
jurmous wants to merge 1 commit into
Conversation
Enhance `StructureMapUtilities` in R4/R4B/R5 to support: - Recursive group resolution in imports. - Type normalization for non-primitive values during property setting. Add comprehensive unit tests for `StructureMapUtilities`, including multi-layer import resolution and backbone element handling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This addresses two related runtime problems:
Extension.value[x]during anonymous backbone supplementationThis issue was identified while investigating the downstream HAPI report
hapifhir/hapi-fhir#7690.Problem
StructureMapUtilities.resolveGroupReference(...)stopped at the first import layer. That meant a map could not invoke a group that existed only in an imported map of an imported map.StructureMapUtilities.processTarget(...)also mishandled some element-model assignments when the produced value was a non-primitive datatype. In practice this broke cases such as assigning aReferenceintoExtension.value[x]while materializing an extension under an anonymously supplemented backbone element.Changes
setProperty(...)on element-model targetsorg.hl7.fhir.r4org.hl7.fhir.r4borg.hl7.fhir.r5Extension.valueReferenceImpact
After this change:
CopyHumanNameresolve correctly through transitive importssrc -> tgt.value = create('Reference') as t then CopyReference(src, t)materialize correctly in the element model for anonymous backbone supplementation scenariosTesting
Added focused regression coverage for R4, R4B, and R5.
References
hapifhir/org.hl7.fhir.core#2360hapifhir/hapi-fhir#7690