Skip to content

SDC crashes when repeats is false for a choice type question with check-box extension #2661

@MJ1998

Description

@MJ1998

Describe the bug
A question like following will enable mulit-selection but since repeats is false the SDC crashes on selecting the second choice.

{
  "type": "choice",
  "extension": [
    {
      "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
      "valueCodeableConcept": {
        "coding": [
          {
            "system": "http://hl7.org/fhir/questionnaire-item-control",
            "code": "check-box",
            "display": "Check-box"
          }
        ]
      }
    }
  ],
  "linkId": "2",
  "text": "HIV Status",
  "required": true,
  "repeats": false,
  "readOnly": false,
  "answerOption": [
    {
      "valueCoding": {
        "display": "Positive"
      }
    },
    {
      "valueCoding": {
        "display": "Reactive"
      }
    },
    {
      "valueCoding": {
        "display": "Negative/Non Reactive"
      }
    }
  ]
}

Component
SDC library

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Device: [e.g. Pixel4a emulator]
  • Android version: [e.g. Settings -> About phone -> Android version]
  • Build number: [e.g. Settings -> About phone -> Build number]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Would you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    New

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions