-
Notifications
You must be signed in to change notification settings - Fork 345
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 Cardinality not correctly inherited. #2770
Comments
Ah so we should "calculate" the correct cardinality of the extension element, which I think we do, but maybe not for the use case for the combination of root cardinality and "slice member" cardinality. Is this fixed when the author corrects his "mistake"? Besides, you can argue if it's true that when an extension has a root level min cardinality of 1, automatically the extension slice intro should also be 1. This is different behavior than other slices I believe. Or am I mistaken? |
Unfortunately, fixing the authoring mistake does not solve the issue. It is still rendering the Address.extension as 0..* instead of 1..* |
There is a small side note here https://hl7.org/fhir/elementdefinition.html#interpretation, which says:
Of course, an extension cannot make itself mandatory, but reading this fragment it means that if a profile author uses an extension in a profile, then this cardinality means "the minimum cardinality of the extension within the profile", which boils down to the minimum cardinality of the slice for that extension. I am quite sure we've not covered this exotic corner case. |
Yes, that rule I knew! But that doesn't automatically mean that the extension slice intro should also has a cardinality of 1 right? But maybe this is different for extensions. That would be totally normal for other slices. So maybe we should create custom extension logic here, which I am not a fan off. |
Copied the profile here in case it gets deleted or fixed on simplifier:
|
In the following profile there are a few issues in the profile itself, but the snapshot generated by Simplifier seems incomplete.
The author of this profile has incorrectly set the allowed cardinality for Address.extension:language to 0..1 while the used extension for language has a top level cardinality of 1..1.
Regardless of the profiling errors in the profile Simplifier renders the tree as follows:
The cardinality for the Address.extension:language is rendered correctly as 1..1, however the cardinality for Address.extension should also be rendered as 1..*. Also when uploading this resource without the IG publisher snapshot to Simplifier and downloading it with a Simplifier generated snapshot does not fix the cardinality for Address.extension.
Forge handles this perfectly and updates all incorrect cardinalities.
The text was updated successfully, but these errors were encountered: