Stream: questionnaire
Topic: Result type of enableWhenExpression?
Paul Lynch (Aug 30 2021 at 23:28):
Is enableWhenExpression's expression supposed to evaluate to a boolean?
Brian Postlethwaite (Aug 30 2021 at 23:29):
My expectation is yes.
Brian Postlethwaite (Aug 30 2021 at 23:30):
similar to an invariant is what I was assuming.
Brian Postlethwaite (Aug 30 2021 at 23:30):
(and planning to implement)
Paul Lynch (Aug 30 2021 at 23:33):
An expression can return anything. What should happen if an enableWhenExpression returns 5?
Paul Lynch (Aug 30 2021 at 23:33):
Or [true, true]?
Brian Postlethwaite (Aug 30 2021 at 23:35):
My expectation is that the expression should have the same considerations as the invariants do
Grahame Grieve (Aug 30 2021 at 23:36):
yes I think that's true. Implicit conversion to a boolean as documented
Lloyd McKenzie (Aug 31 2021 at 00:44):
Agree it should evaluate to a boolean. Feel free to submit a change request for us to make this explicit.
Paul Lynch (Aug 31 2021 at 15:40):
The page https://build.fhir.org/ig/HL7/sdc/StructureDefinition-sdc-questionnaire-enableWhenExpression.html actually does say it should evaluate to a boolean (which I missed initially), but doesn't specify what should happen if it doesn't, so I created an change request- FHIR-33295.
Last updated: Apr 12 2022 at 19:14 UTC