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

Though enable when is false QuestionResponseItem with initial value present in questionnaire response at the time of data extraction. #755

Closed
santosh-pingle opened this issue Aug 25, 2021 · 4 comments · Fixed by #756
Assignees
Labels
P2 Medium priority issue type:bug Something isn't working

Comments

@santosh-pingle
Copy link
Collaborator

Describe the bug
Found a new edge case which is not supported yet by sdk.
If the question item has enablewhen clause, and it also has initial coding value, in that case though enablewhen clause is false question response item with initial coding value present in questionnaire response at the time of data extraction.

Just consider the symptoms question as an example.
Symptoms main question has 4 answer options as checkboxes.
None of the answer options are selected initially.
There are hidden question items with initial coding value and enablewhen clause is false.
Bug = > though enable when is false, question response item with initial coding value present in question response at the time of data extraction.

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.

@santosh-pingle santosh-pingle added the type:bug Something isn't working label Aug 25, 2021
@santosh-pingle santosh-pingle self-assigned this Aug 25, 2021
@santosh-pingle
Copy link
Collaborator Author

Its in progress.

@santosh-pingle
Copy link
Collaborator Author

#625

@jingtang10
Copy link
Collaborator

According to the standard: https://www.hl7.org/fhir/questionnaireresponse.html

When a QuestionnaireResponse references a Questionnaire, all the items in the questionnaire SHOULD be included in the QuestionnaireResponse if they are relevant to the interpretation of the answers, including items of type = display. This might also include items that were >not enabled when the Questionnaire was answered, though of course these will not have answers

It appears that in the case where a questionnaire item is disabled, we have the liberty to choose whether to include the response item (which will have no answers) or simply exclude it from the questionnaire response. given the issues we have run into (questionnaire size) i would advocate for not including them at all for simplicity.

@joiskash joiskash self-assigned this Sep 9, 2021
@joiskash
Copy link
Collaborator

Yes this makes complete sense to me. If there is no answer, then its best to optimize for memory and not include a questionnaireResponse.item with an empty answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Medium priority issue type:bug Something isn't working
Projects
Archived in project
4 participants