firely-net-sdk
firely-net-sdk copied to clipboard
Validation of StructureDef should check wether a fixed code is in the valueset with allowed values.
Is your feature request related to a problem? Please describe. We want to catch a possible authoring error where someone picks a fixed code that is not in the valueset with allowed values. So far we have done nothing in that regard. When we validate a StructureDefinition, we validate the StructureDefinition against...StructureDefinition. And there currently is no invariant that validates the fixed value against the bound valueset.
Currently this is picked up at instance level. For example see this project: valueinvaluesetcheck.zip https://simplifier.net/ValueInValueSetCheck/~introduction
Describe the solution you'd like This has to be picked up in the validation of the StructureDefinition. We could certainly add it as a manually-built additional check. But to give you another example: we don't validate the aggregated cardinalities of the slices against the total cardinality either. And many more. This would fit in with the QA approach that Simplifier has started as well.
Additional context Started on Zullip: https://chat.fhir.org/#narrow/stream/179166-implementers/topic/.5BValidation.5D.20fixedCode.20against.20required.20valueSet.20binding