android-fhir
android-fhir copied to clipboard
Adding the ability to save QuestionnaireResponse as In Progress
Is your feature request related to a problem? Please describe.
- Currently, when a user exits a form without saving they are only presented with the dialog letting them know that the form content will be discarded.
- We however want to give the user the ability to save the QuestionnaireResponse as
In Progress
instead of discarding the form content.
Describe the solution you'd like
- [ ] Add a boolean
canSaveDraft
to the method launching the Questionnaire.- [ ] This boolean will be
false
by default.
- [ ] This boolean will be
- [ ] If the
canSaveDraft
is set totrue
then the dialog that appears when a user exits the form will update to have 2 options.- [ ] Save Partially -- Allows the user to save the questionnaire partial by setting the QuestionnaireResponse
QuestionnaireResponse.status
property toin progress
, then redirects to the screen before the questionnaire render. - [ ] Discard -- This discards all the inputs on the form and closes the Questionnaire render page, then redirects to the screen before the Questionnaire.
- [ ] Save Partially -- Allows the user to save the questionnaire partial by setting the QuestionnaireResponse
- [ ] If the user clicks save then the current
save
workflow is executed.
Describe alternatives you've considered
- Somehow being able to configure the QuestionnaireResponse
status
based on some configuration when rendering the Questionnaire. We can then use that configuration to define the app behaviour. - The above method will only work for the
In Progress
&complete
statuses. I think we need to cater for all the QuestionnaireResponse statuses.