FHIR Chat · questionnaire-calculatedExpression => readOnly? · questionnaire

Stream: questionnaire

Topic: questionnaire-calculatedExpression => readOnly?


view this post on Zulip Paul Lynch (Dec 03 2018 at 16:06):

If a question's value is set by questionnaire-calculatedExpression, should that necessarily mean the field is readOnly (regardless of whether readOnly was set)?

If it does not, and calculatedExpression contains a FHIRPath expression, then potentially any data on the form could be referenced by the calculatedExpression, which means the calculatedExpression would need to be run as soon as any other field was changed. If the user has edited the field with the calculatedExpression, their change would be overwritten-- unless we add a rule that prevents calculatedExpression from running on edited fields.

view this post on Zulip Grahame Grieve (Dec 03 2018 at 21:35):

@Lloyd McKenzie

view this post on Zulip Brian Postlethwaite (Dec 03 2018 at 21:44):

That seems like a reasonable assumption to me. But I do like to be explicit in my questionnaire designs.
(I might add that as a custom validation rule in my server)

view this post on Zulip Paul Lynch (Dec 03 2018 at 23:24):

We do have a demo form here in which the user can edit a field that is calculated. An example would be a form with weight, height and BMI, where the user still has the option of entering a known BMI value if weight and height are unknown. (A rather unlikely example, but perhaps a more likely one exists).

view this post on Zulip Lloyd McKenzie (Dec 10 2018 at 22:24):

We don't have questionniare-calculatedExpression. We have questionnaire-initialExpression. If the element isn't read only and the user changes it, then the element won't be calculated anymore. But agree we should make that explicit in the spec. Can you submit a change request?

view this post on Zulip Paul Lynch (Dec 10 2018 at 23:15):

Then what is this: http://hl7.org/fhir/2018Sep/extension-questionnaire-calculatedexpression.html ?

view this post on Zulip Paul Lynch (Dec 10 2018 at 23:31):

@Lloyd McKenzie I see it was moved to the SDC IG but I don't see anything about it being dropped. Without questionnaire-calculatedExpression, how would one do BMI or score calculations?

view this post on Zulip Lloyd McKenzie (Dec 10 2018 at 23:46):

initialExpression

view this post on Zulip Lloyd McKenzie (Dec 10 2018 at 23:46):

And if you don't want the user to tweak them, make them readOnly

view this post on Zulip Astrid Corinna Wolff (Dec 11 2018 at 07:55):

For me, there seems to be a substantial difference between questionnaire-initialExpression and questionnaire-calculatedExpression:

http://hl7.org/fhir/2018Sep/extension-questionnaire-initialexpression.html
= Initial value is only calculated at the time the QuestionnaireResponse is first generated.

http://hl7.org/fhir/2018Sep/extension-questionnaire-calculatedexpression.html
= Calculated value is updated as other answers in the QuestionnaireResponse are filled in.

view this post on Zulip Lloyd McKenzie (Dec 11 2018 at 15:55):

My bad. calculatedExpression got moved to SDC. I'm not totally clear on why initialExpression didn't move too. @Grahame Grieve Is this something I can still fix?

view this post on Zulip Paul Lynch (Dec 11 2018 at 16:30):

Can you submit a change request?

#GF19753

view this post on Zulip Grahame Grieve (Dec 11 2018 at 21:55):

what exactly do you want to fix?

view this post on Zulip Lloyd McKenzie (Dec 11 2018 at 22:15):

Move questionnaire-initialExpression extension to SDC too

view this post on Zulip Grahame Grieve (Dec 12 2018 at 00:00):

ok

view this post on Zulip Lloyd McKenzie (Dec 12 2018 at 03:38):

ok = yes, I can still make that change?

view this post on Zulip Grahame Grieve (Dec 12 2018 at 04:26):

yes


Last updated: Apr 12 2022 at 19:14 UTC