firely-net-sdk icon indicating copy to clipboard operation
firely-net-sdk copied to clipboard

Validator doesn't validate cardinality on extension root

Open MatthijsvdWielen opened this issue 4 years ago • 4 comments

Our validator only applies the rules (for now) that are specified as constraints in fhirpath. It does not validate rules that are formulated text-only.

This causes issues when someone is distributing their extensions to their users a la the FHIR spec in an extensions library, rather than putting them on the profiles.

The spec on this issue says: If the Extension maximum cardinality is 1, then the extension is only allowed once on any element on which it appears. A profile that defines the use of an extension can only make the maximum cardinality 1 (or zero if the minimum cardinality is 0, and the profile constrains another profile that allows the extension).

So when an extension with the cardinality 0..1 is added to a profile twice the validator should pick this up as incorrect.

MatthijsvdWielen avatar Apr 09 '20 13:04 MatthijsvdWielen

@MatthijsvdWielen, I edited the title of your issue: although it is true - it is also too broad. There are tons of textual rules that we don't yet catch - so I focused on the Extension issue that you have documented.

ewoutkramer avatar Apr 14 '20 08:04 ewoutkramer

I think we have agreed offline that the prio for this issue is not too high?

ewoutkramer avatar Apr 14 '20 08:04 ewoutkramer

@ewoutkramer Yes, the customer said they would like to see a solution for this in a "couple of months" but it was not an urgent issue.

MatthijsvdWielen avatar Apr 14 '20 08:04 MatthijsvdWielen

We will implement this in the new Validator.

marcovisserFurore avatar Jul 18 '22 11:07 marcovisserFurore