Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot generator inadvertedly removing base's Slicing.Discriminator #1229

Closed
abelenthoven opened this issue Jan 29, 2020 · 0 comments
Closed

Comments

@abelenthoven
Copy link

If a base profile contains a sliced element with a discriminator, deriving from this profile and not setting a discriminator there removes the discriminator in the snapshot.
In essence, this problem originates in the CopyTo method of ElementDefinition.SlicingComponent. The snapshot generator uses this method to merge the base and derived profile elements by cloning the base element and then using CopyTo to merge the derived element onto the base. CopyTo checks whether the derived Discriminator list is , which it never is since the Discriminator property (like all FHIR POCO list properties) is lazily initialized with a list. Because of that, the existing Discriminator list is replaced by an empty one from the derived element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants