-
Notifications
You must be signed in to change notification settings - Fork 347
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 calculates invalid max cardinality for extensions #1981
Comments
Unfortunately, the SDK team does not maintain the snapshot generator anymore since 2022-02-20. We are contemplating restoring the original situation where the Forge team was responsible for its maintenance 🤣 |
As of 2022-02-20 I have secretly joined the Simplifier team! |
As per response from Ardon this problem is a showstopper for the upcoming Forge 28.0 release. |
Since the show must go on, I'll flag this issue. |
I am browsing the release notes between 3.4 and 3.6, but I have not seen a smoking gun yet. But we will find it :) |
Why is the "1" expected? I followed the link to the issue in Forge, but that only contains a screenshot, so it was not clear to me what is actually wrong with it. |
The extension has a cardinality of 0..1 so when you use it in a profile the "base element" should have a cardinality of 0..1 as well. However after the snapshot generator does its thing, it has a cardinalty of 0..* (see the unit test in the branch https://github.com/FirelyTeam/firely-net-sdk/tree/forge/FOR-611). When you run this unit test from the 3.4.0 branch it is green. When run from 3.8.0 it is red. |
I found the culprit. The PR #1826 changed this behavior and @ewoutkramer already warned for that: #1826 (comment). The proposed solution (the higher one of the |
A bug has been reported for Forge:
https://firely.atlassian.net/browse/FOR-611
When adding a new extension to a profile, save it and reload it, the max cardinality is set to "*" while "1" is expected.
I have created a unit test in this branch (based on 3.8.0 R4 release) to reproduce the problem:
https://github.com/FirelyTeam/firely-net-sdk/tree/forge/FOR-611
The expected behavior is that the BaseElement and derived element contains the correct max cardinality.
FHIR Version: R4 (may apply to other versions as well)
SDK Version: 3.6.0 and newer (works as expected in version 3.4.0!)
The text was updated successfully, but these errors were encountered: