FHIR Chat · enableWhen / required depending on calculation · questionnaire

Stream: questionnaire

Topic: enableWhen / required depending on calculation


view this post on Zulip Jose Costa Teixeira (Jun 09 2021 at 07:42):

Can we make a question required from a calculated result from several answers?
e.g. if patient is female and age <60 and BP > x, question 5 becomes mandatory.
or better, if a given function (score) from questions 1, 2 and 4, is above a threshold, then question 5 becomes mandatory

view this post on Zulip Tilo Christ (Jun 09 2021 at 09:04):

Like this example? http://build.fhir.org/ig/HL7/sdc/examples.html#using-enablewhen-enablebehavior-and-enablewhenexpression

view this post on Zulip Jose Costa Teixeira (Jun 09 2021 at 10:04):

perfect, that's it!

view this post on Zulip David Winters (Jun 09 2021 at 11:44):

@Jose Costa Teixeira if you want to see a working example, I have gotten a lot of mileage out of enableWhenExpression in a SMART app I wrote. A working demo can be found here.


Last updated: Apr 12 2022 at 19:14 UTC