🐛 Bug report: Missing enableWhenBehavior
for items with multiple enableWhen
, resulting in incorrect questionnaire behaviour when used with Spezi
#64
Labels
bug
Something isn't working
Description
The FHIR spec says that "If there are more than one enableWhen, enableBehavior must be specified".
However, this is not the case for questionnaires created using phoenix; by default adding multiple
enableWhen
s does not also add anenableBehavior
field. The field is only added once the user changes the "at least one condition / all conditions must be fulfilled" radio button.Reproduction
enableBehavior
field for the item.Expected behavior
the behaviour should follow the specification
Additional context
This is actually kinda bad, because the default selection in the UI is for the
any
option, whereas ResearchKitOnFHIR currently defaults missingenableBehavior
fields to.all
, meaning that if a user were to create a conditional question using the website, with the intention of requiring any of the conditions to be true, saw that option already selected, exported the questionnaire without changing this option, and then imported the JSON into Spezi, it would result in an incorrect questionnaire behaviour (requiring all conditions to be true instead of just a single one).Code of Conduct
The text was updated successfully, but these errors were encountered: