Skip to content

Commit

Permalink
Fixed to prevent checkbox crashes#2661
Browse files Browse the repository at this point in the history
  • Loading branch information
mmanojkmr committed Mar 4, 2025
1 parent cc692a8 commit 9954d2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion catalog/src/main/assets/component_multi_select_choice.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"linkId": "1.0.0",
"text": "What’s the reason for today’s visit?",
"type": "choice",
"repeats": true,
"repeats": false,
"extension": [
{
"url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ internal object CheckBoxGroupViewHolderFactory :
val newAnswers = questionnaireViewItem.answers.toMutableList()
newAnswers +=
QuestionnaireResponse.QuestionnaireResponseItemAnswerComponent().apply {
if(!questionnaireViewItem.questionnaireItem.repeats){
newAnswers.clear()
}
value = answerOption.value
}

Expand Down

0 comments on commit 9954d2d

Please sign in to comment.