Stream: conformance
Topic: Validator error for modified binding strength
Noemi Deppenwiese (Aug 16 2019 at 08:41):
Hello,
we created a profile on Specimen and changed the binding strength of collection.fastingStatus
to required. Now, we get the following Validator Error:
Information @ Bundle.entry[6].resource.collection.fastingStatus.ofType(CodeableConcept) (line 240, col24) : Binding for path Bundle.entry[6].resource.collection.fastingStatus.ofType(CodeableConcept) has no source, so can't be checked
it is working when we change the profile differential so the binding
element includes the ValueSet as well as the strength attribute:
{ "id": "Specimen.collection.fastingStatus[x]", "path": "Specimen.collection.fastingStatus[x]", "type": [ { "code": "CodeableConcept" } ], "mustSupport": true, "binding": { "strength": "required", "valueSet": "http://terminology.hl7.org/ValueSet/v2-0916" } }
Is this a Validator Error?
Grahame Grieve (Aug 16 2019 at 13:24):
the validator says that there is no binding.valueSet. So something has gone wrong between what you've pasted above and the validator code. How are you running the validator?
Noemi Deppenwiese (Aug 16 2019 at 13:28):
The pasted JSON above works, it is our original profile generating the error (differential):
{ "id": "Specimen.collection.fastingStatus[x]", "path": "Specimen.collection.fastingStatus[x]", "type": [ { "code": "CodeableConcept" } ], "mustSupport": true, "binding": { "strength": "required" } },
But it should (?) work because the differential only lists differences to the original resource.
Im running the .jar and providing the files locally.
Grahame Grieve (Aug 16 2019 at 13:30):
oh. hmm
Alexander Kiel (Aug 16 2019 at 14:06):
We are running the Validator exactly this way: https://github.com/samply/bbmri-fhir-ig/blob/master/.travis.yml
Grahame Grieve (Aug 16 2019 at 20:25):
yes this is an issue in the current code for the snapshot generator. I haven't looked at that code for a while. I see it doesn't let you change a required binding, but it should. And if you're going from something other than a required binding to a required binding, then this will get ignored if you don't specify a value set>
@Michel Rutten what does your snapshot generator do in this regard?
Alexander Kiel (Aug 17 2019 at 07:40):
@Grahame Grieve Thanks for investigating!
Michel Rutten (Aug 19 2019 at 12:42):
@Grahame Grieve the .NET SnapshotGenerator
allows and handles such a binding constraint. The resulting snapshot will inherit the binding.valueSet
property value from the base/core Specimen
definition, merged with the required binding.strength
constraint as specified by the Specimen
profile diff.
Grahame Grieve (Aug 19 2019 at 12:45):
thx. what do you do if the base has a required binding and it's being overridden?
Michel Rutten (Aug 19 2019 at 13:00):
We decided to keep a clean separation between the responsibilities of the .NET SnapshotGenerator
and the Validator
classes. The SnapGen always tries to produce an output. Specified diff constraints always override matching constraints in the base resource. The SnapGen does not try to validate, however it will emit OperationOutcome
issues for "suspicious" diff constraints. This approach allows Forge to always open a profile and generate a full tree representation, even if it is invalid, so the author can correct any mistakes.
It is up to the validator (and/or Forge) to actually verify the contents of a generated snapshot, i.e. verify if the specified constraints are actually valid with respect to the referenced base profile.
Michel Rutten (Aug 19 2019 at 13:04):
This also keeps the complexity of the SnapshotGenerator
logic down to a reasonable/feasible level, and allows us to develop and test .NET SnapGen and Validator components separately.
Last updated: Apr 12 2022 at 19:14 UTC