FHIR Chat · calculatedExpression & repeats & editing · questionnaire

Stream: questionnaire

Topic: calculatedExpression & repeats & editing


view this post on Zulip Paul Lynch (Apr 11 2022 at 21:57):

If you have a calculatedExpression that returns multiple values for a item with repeats=true, but readOnly=false, and the user edits one of the values, should the expression stop updates to all of the field values for that item, or just the one that was edited? Note that we do have documentation that a for a repeats=false item, the expression stops updating the field if the user edits it.

view this post on Zulip Lloyd McKenzie (Apr 11 2022 at 22:12):

I think you'd need to, but agree we should make that explicit

view this post on Zulip Paul Lynch (Apr 11 2022 at 22:47):

Whether one has to depends on the UI. For string fields, we repeat those by adding additional rows in the form, so visually each value is in a separate field, and we could allow the user to edit one and still calculate another. Other on the other hand, for list fields, the display text of the selected items is put into "selected items" area, so that seems more like a single (multi-part) value, and it would be confusing to the user to calculate only some of those values. I think our code will be more understandable with just taking a single approach, so I plan to stop applying calculatedExpression to the whole group of of values when one is edited, regardless of the UI.


Last updated: Apr 12 2022 at 19:14 UTC