Skip to content

Missing answers misleading behavior of enabledWhen in repeatable groups #19

@ruscoder

Description

@ruscoder

In repeatable group, if one questions depends on another and this answer is missing, it uses value from another repeatable group item

Example:

resourceType: Questionnaire
id: test-repeatable-group-1
status: draft
item:
  - linkId: group
    type: group
    repeats: true
    item:
      - linkId: first
        type: string
        text: first
      - linkId: second
        type: string
        text: second
        enableWhen:
          - question: first
            operator: =
            answerString: ok
      
meta:
  profile:
    - https://emr-core.beda.software/StructureDefinition/fhir-emr-questionnaire
  extension:
    - url: ex:createdAt
      valueInstant: '2025-05-29T15:22:50.345605Z'
  1. Add two repeatable group items
  2. Fill the first group item (or the second) with ok
  3. Observe both group items shows the second
  4. It disappears if item exists

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions