Skip to content

Snapshot generator does not merge Element.Id value for element definition properties. #2839

@Rob5045

Description

@Rob5045

Almost all element definition properties have Element as base type. It looks like Element.Extensions is merged for all properties but Element.Id is not merged at all.

Source code: SnapshotGenerator -> ElementDefnMerger.

For example: mergeBinding

snap.StrengthElement = mergePrimitiveElement(snap.StrengthElement, diff.StrengthElement);
snap.DescriptionElement = mergePrimitiveElement(snap.DescriptionElement, diff.DescriptionElement);
snap.ValueSetElement = mergeComplexAttribute(snap.ValueSetElement, diff.ValueSetElement);
snap.Extension = mergeExtensions(snap.Extension, diff.Extension);
snap.Additional = mergeCollection(snap.Additional, diff.Additional, matchExactly);

Example resource:
MyObservation.StructureDefinition.json

The result is that when loading the example resource in Forge the binding.id with value "Test" for the "Observation.category" element is still set to the value 'null' after calling SnapshotGenerator.Generate.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions