FHIR Chat · Result type of enableWhenExpression? · questionnaire

Stream: questionnaire

Topic: Result type of enableWhenExpression?


view this post on Zulip Paul Lynch (Aug 30 2021 at 23:28):

Is enableWhenExpression's expression supposed to evaluate to a boolean?

view this post on Zulip Brian Postlethwaite (Aug 30 2021 at 23:29):

My expectation is yes.

view this post on Zulip Brian Postlethwaite (Aug 30 2021 at 23:30):

similar to an invariant is what I was assuming.

view this post on Zulip Brian Postlethwaite (Aug 30 2021 at 23:30):

(and planning to implement)

view this post on Zulip Paul Lynch (Aug 30 2021 at 23:33):

An expression can return anything. What should happen if an enableWhenExpression returns 5?

view this post on Zulip Paul Lynch (Aug 30 2021 at 23:33):

Or [true, true]?

view this post on Zulip Brian Postlethwaite (Aug 30 2021 at 23:35):

My expectation is that the expression should have the same considerations as the invariants do

view this post on Zulip Grahame Grieve (Aug 30 2021 at 23:36):

yes I think that's true. Implicit conversion to a boolean as documented

view this post on Zulip 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.

view this post on Zulip 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