-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Hi,
I've made this little questionnaire to show a strange enableWhen-Behavior, where I don't know if it is working as intended or if it is a faiadashu bug. I can't find anything about this case in the fhir standard. (I used the enableWhen-extension, but the classic enableWhen shows the same behavior)
{"resourceType":"Questionnaire","date":"2025-07-01T09:27:50.792+02:00","item":[{"linkId":"28bb3163-73e9-4e74-a6a6-536dfbec33d8","text":"enableWhen Source","type":"string"},{"linkId":"e4e5c9f3-dc38-4138-a6b1-16739670398a","text":"implicit enableWhen","type":"choice","answerOption":[{"valueString":"a"},{"valueString":"b"},{"valueString":"c"}],"item":[{"extension":[{"url":"http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression","valueExpression":{"language":"text/fhirpath","expression":"exists(%resource.descendants().where(linkId='28bb3163-73e9-4e74-a6a6-536dfbec33d8'))"}}],"linkId":"6ba5c230-10bb-470a-bc42-32cd533ab861","text":"enableWhen Target","type":"display"}]}]}
The questionnaire consists of 3 items: 2 questions (the enableWhen source freetext item and the implicit enableWhen choice item) and a display item (the enableWhen target).
case 1: When I input some text in "enableWhen Source" and select something in "implicit enableWhen" the "enableWhen Target" is display. This is the expected behavior and working.
case 2: But, if I do it the other way round: select something in "implicit enableWhen" and then input some text in "enableWhen Source", the enableWhen target is not shown. I would expect the same behavior as in case 1.
case 3: But then again, if I deselect the choice I made in case 2 the target is shown. I would expect that the target would be displayed after case 2 and then disappear after deselecting the choice in case 3.
It would be very kind of you, if you could tell me if this is intended or a bug or simply out of scope of the standard :-)
kind regards
Dr. Stefan Klose