Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect FHIR implementation of multiple-choice (checkbox) questions #23

Closed
jonathan-reisdorf opened this issue Jun 18, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@jonathan-reisdorf
Copy link

Describe the bug
In FHIR questionnaires, questions that support more than one answer need to be marked with "repeats": true.
Currently, the differentiation between radio button questions vs. checkbox questions is done by using either the choice or open-choice type, but the latter is meant for a different use case:
Like with choice questions, for open-choice there is a fixed list of possible answer options, but additionally a free-text field is supposed to be provided. (That is what distinguishes it from choice questions)

Expected behavior
The backend does not send questionnaires with items of type open-choice, but instead with type choice and sends an additional property "repeats": true. The frontend distinguishes radio button questions (single-choice) vs. checkbox (multiple-choice) by looking at the repeats property. If it is absent or false, radio buttons are rendered for choice questions.

Additional context

https://www.hl7.org/fhir/codesystem-item-type.html#item-type-open-choice

https://www.hl7.org/fhir/questionnaire-definitions.html#Questionnaire.item.repeats

@jonathan-reisdorf jonathan-reisdorf added the bug Something isn't working label Jun 18, 2021
@GolexPrime
Copy link
Contributor

Could someone please have a look at the changes made in update-open-choice? The repeats property should be supported now by choices as well as open-choices. The latter now comes with its own additional text-input element.

@GolexPrime
Copy link
Contributor

Should be addressed with 1fb3f56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants