android-fhir icon indicating copy to clipboard operation
android-fhir copied to clipboard

Adding the ability to save QuestionnaireResponse as In Progress

Open dubdabasoduba opened this issue 2 years ago • 0 comments

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. Screenshot_20220914_151214 (copy)
  • 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.
  • [ ] If the canSaveDraft is set to true 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 to in 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.
  • [ ] 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.

dubdabasoduba avatar Sep 14 '22 16:09 dubdabasoduba