-
Notifications
You must be signed in to change notification settings - Fork 59
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
MVP drafting feature #3541
Comments
this looks like a good mvp, some questions:
|
Good question. I would prioritize a UI update for forms that are displayed in the child's profile, e.g. task-related forms. While there are some forms stored in the overflow menu that might need drafting, they are less likely. The types of forms that are typically accessed in the overflow menu are ones that:
No, if you open a draft form and exit the draft, you get the same 3 options as if you're in a new form: cancel, save as draft, and discard.
|
If you do that, then you sync, is the expected behavior that a draft you discarded also disappears from other devices when they resync their drafts? That seems reasonable. There might be an edge case where User A discards a draft and it's status is set to deleted and User B, completes and submits a draft so it's status is set to completed, we will have to confirm how this is handled by the FHIR API. |
I had tried to describe non-repeatable forms here, but maybe the wording isn't so clear? I've edited the description to restrict it to those in the profile view. Feel free to edit for further clarity.
Good point on potential conflicts. That's not unique to saving of drafts (can happen due to offline work with new forms and editing of forms too), but we do need to come up with basic rules for how they are handled so it doesn't lead to app crashes or ANRs. |
Looks good, the wording on non-repeatable was clear, change was to add in profile view, thank you. |
Initial Scoping on Implementation Plan After initial code review here are my findings Adding Config
{
"trigger": "ON_CLICK",
"workflow": "LAUNCH_QUESTIONNAIRE",
"questionnaire": {
"id": "2b56ce61-6e33-4d40-8edb-7f273cb358dd",
"title": "{{ questionnaire.title.anc.profile }}",
"saveButtonText": "{{ submit }}",
"setPractitionerDetails": true,
"setOrganizationDetails": true,
"saveDraft": true,
"resourceIdentifier": "@{patientId}"
}
}
PS. Everything else after this does not exist Populate
UI/UX
Assumptions
|
Open Questions from grooming with @Rkareko
|
@f-odhiambo A suggested approach for this using a
|
Please note that discard and cancel have 2 different functions. Discard = discard the draft. Cancel = go back to the form to continue editing. |
Hi @joyce-x-chen unfortunately we can not have an alert dialog with more than 3 buttons to accommodate adding a cancel I wanted to let you know that we’re currently focusing on the heavy lifting of the code for the button. Once that’s done, we’ll revisit the button press functions and make sure everything aligns with your design preferences. We’ll also keep your concerns in mind and try to avoid any changes to the SDK to minimize any potential impact on the overall implementation. Thanks for your patience! 😊 PS. Cancel also introduces a new scope that may get a life of its own. @Rkareko Check if we can be able to add a cancellable property to the alert dialog to take care of the cancel scenario |
@Rkareko
We need to update the docs to show a clear distinction on how draft vs edit works |
@joyce-x-chen @f-odhiambo we have designs here on how we would like the feature to work. We will definitely need all 3 CTAs.
|
Thanks so much @f-odhiambo @Rkareko @HenryRae.
To clarify - I was suggesting "discard" to mean discard the entire (draft) form. I do see the value of a "discard changes" option (which would return the draft to the state it was in before the person opened the in-progress form), but then we'd have to find another way to provide the user with the option to discard the entire form. Since we don't want to create a register of in-progress forms for the MVP, there's no "delete" option elsewhere at the moment. If we have to choose between "discard changes" and "discard form", and "discard changes" and "cancel", I think discard form is more valuable. Alternatively, could we add an X button to represent cancel (go back to form to resume editing - no discarding of newly input data)? Good point though on clarifying whichever we settle on. The label needs to be more specific - i.e. "discard form" or "discard changes" rather than simply "discard."
I thought cancel is an existing functionality in OpenSRP apps if you try to back out of a form. The current options are "Cancel" and "Discard." The new one would be "Save draft." Here is a screenshot from PATH EIR: |
Oh never mind @HenryRae I see you've gone above and beyond and suggested more functionalities within the task button! I wasn't even considering this for an MVP implementation. But if there is another way to delete draft, then I like the option of "discard changes" when pressing the back button for an in-progress form. Just not sure how much LOE this adds from an engineering perspective 🙂 |
CC @Rkareko |
These 3 are a must have, for users that are trying to leave an open form.
The options while opening a saved draft i.e open draft, delete draft and cancel, it's fine to drop all them. This means, when someone clicks on a saved draft, we open the draft directly without showing the dialog. When they try to leave the form without submitting, we resurface the same options when saving draft i.e save draft, discard form, cancel. |
|
I'm not sure if this is supposed to be a bug or we should not do this use case in the first place. Re-open a completed form, do some changes, and then save as draft; is not working:
See this recording (the bug starts at 0:26) |
Thanks @FikriMilano. That appears to be a bug, because you should not be able to open a completed form (that would be editing, not drafting). You should only be able to open and edit forms that have been saved as a draft. However, I observed a missing UI change - after the draft is submitted the first time (as well as any subsequent time), the task should appear as yellow with the in-progress icon as in Henry's designs here cc: @Rkareko @f-odhiambo. Do we need a separate issue for the UI changes? |
Next steps from the Engage project standup:
|
@HenryRae would you be ok with us maintaining the + sign for the " in progress" task status (represented by yellow) instead of using the circular progress icon? Most of the time, the circular progress icon isn't an action button and it's more straightforward to maintain the + button (SDK default). Thank you cc: @rowo |
We are testing this in Engage and it's looking really good! @FikriMilano pointed out that we will need a small code change to update the task status to draft (Task.IN_PROGRESS). We wanted to clarify the implementation approach chosen, as there had been 2 options discussed:
Henry approved the basic option
From @madrinekariuki's thorough testing,, it appears as though perhaps we have implemented only "discard changes" when leaving the form. This means there is no way to discard a draft. Was this intended? |
@joyce-x-chen cc @f-odhiambo The current implementation on FHIR core main implements the |
Thanks for the clarification @Rkareko. I didn't realize we are going with the Advanced option! Right now, the option for leaving a form is "discard changes" and not "discard form." But that is ok if we are going to add "discard form" from the profile view later. cc: @MargaretNjenga |
@joyce-x-chen can we use the edit icon instead? Link to icon |
Great idea @HenryRae! @FikriMilano could we use this icon for in-progress? |
Describe the feature request
A few clients, including SID, Columbia, and PAHO have expressed interest in being able to save a draft of a form that is in progress.
Currently, there are two possible outcomes with a form:
The scope of an MVP feature could be:
Not in scope of the MVP
Example use cases
Acceptance criteria
Implementation plan (For Engineers)
status
=in-progress
The text was updated successfully, but these errors were encountered: