Stream: conformance
Topic: Validation: Primitive Data Type with Required Binding - Elem
Richard Ettema (Jul 12 2021 at 23:35):
I'm pretty sure I know the answer to this but wanted to double-check. When validating (Java Validation Engine) a resource that has a primitive data type of 'code' where that coded value has a 'required' binding strength to its ValueSet and that code element cardinality is 0..1 and has a null value (not defined) but has an extension, the Validation Engine throws the following error:
"No code provided, and a code is required from the value set"
My question is - should the presence of the extension allow for the code element to be valid?
I believe the answer is "no" because of the 'required' binding but where do I find that in the specification? The Terminologies page definition of the Required binding states the following about "when profiling resources":
The other place where this is used is when profiling resources, and there is agreement within a context of use that a specified set of codes are the only ones that can be used. In these cases, the data type SHALL contain one of the values in the value set.
Does that satisfy this requirement?
The example I have is an Observation with the following effectiveTiming definition:
"effectiveTiming" : {
"repeat" : {
"dayOfWeek" : [ null ],
"_dayOfWeek" : [ {
"extension" : [ {
"url" : "http://hl7.org/fhir/StructureDefinition/data-absent-reason",
"valueCode" : "masked"
} ]
} ]
}
},
The Timing.repeat.dayOfWeek matches the criteria given above. Per my question above, is this valid or is the generated error correct?
Thanks.
Lloyd McKenzie (Jul 13 2021 at 01:45):
A required binding must be met for the element to be present at all. You can't evade it with an extension or any other mechanism.
Richard Ettema (Jul 13 2021 at 12:53):
@Lloyd McKenzie Thanks for the confirmation. That's what I thought.
Last updated: Apr 12 2022 at 19:14 UTC