Stream: questionnaire
Topic: Questionnaire item response and disabled questionnaire item
santosh pingle (Sep 02 2021 at 17:10):
Hi All,
Need your input on whether Questionnaire response should contain answer of disabled questionnaire item?
Though the questionnaire item was disabled, answer was added to the response. Because of this, we were not able to differentiate whether the answer was for an enabled question.
So we decided to remove the answer from the questionnaire response if the questionnaire item gets disabled, and once it gets enabled just add an initial value as an answer to the response if present until user inputs it.
But then initial value get added over user input once it enabled.
Consider this edge case
Questionnaire item has an initial value, and the user also inputs it. If it gets disabled then the answer gets removed from the response (as per fix), but if it gets enabled again then the initial answer gets added as we already removed answer which was user input.
Can you please suggest here?
cc: @Jing Tang
Lloyd McKenzie (Sep 02 2021 at 17:22):
Best practice is to retain the answers until the QuestionnaireResponse changes to a status of 'complete' but retain them until then. That way if an element previously populated becomes re-enabled due to subsequent answers or revision of previous ones, the data the user filled in isn't lost. However, once complete, the only items that should have answers are those that are enabled.
Jing Tang (Sep 03 2021 at 09:04):
Perfect - thanks @Lloyd McKenzie
Last updated: Apr 12 2022 at 19:14 UTC