Details
-
Change Request
-
Resolution: Persuasive with Modification
-
Medium
-
Structured Data Capture (SDC) (FHIR)
-
current
-
FHIR Infrastructure
-
Using Expressions
-
5.1
-
-
Paul Lynch/Brian Postlethwaite: 5-0-0
-
Correction
-
Compatible, substantive
Description
https://build.fhir.org/ig/HL7/sdc/expressions.html#variable says, "It is not allowed to define variable names that are already reserved by the base specification or by other variables in the questionnaire." This seems to say that a variable name cannot appear more than once in a Questionnaire.
However, https://build.fhir.org/ig/HL7/sdc/expressions.html#use-of-the-expression-type, under "name", says, " However, overriding a name in a descendant element is NOT an error... and is in fact a common occurrence in modular forms."
These two conflict, and should be harmonized.
I am of the opinion that variables in a descendant element can override the value of ancestor element (for that descendant element and its descendants). This has been implemented in LHC-Forms.
I also agree with the wording on the same page that says, "If there is a [launchContext|https://build.fhir.org/ig/HL7/sdc/expressions.html#launchContext] extension called 'patient' and then on the same item there's also a [variable|https://build.fhir.org/ig/HL7/sdc/expressions.html#variable] extension also named 'patient', that would be an error". However, the sentence before that needs a small change:
"Collisions between names that are defined more than once within the same containing element will be treated as an error."
should become:
"Collisions between names that are defined more than once on the same element will be treated as an error."