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

[2016] Submit forms offline #172

Open
wants to merge 93 commits into
base: dev
Choose a base branch
from

Conversation

viniciusboson
Copy link
Contributor

This feature allows users to save observation forms offline and synchronize them as soon as server connection gets available.
The app will show an alert message in Snackbar whenever it detects that there are unsent forms.
To test this feature, i've disabled the wifi to not be able to access dev.projectbuendia.org or i've simulated a local server always throwing exceptions.
There are three concurrent situations that the application will try to resent the forms:

  1. On observation sync process, just before get all fresh observations
  2. Prior to sent a new observation requested by the user
  3. When unsent form health check detects that there are still pending forms to be submitted.

screenshot_2016-01-22-08-10-47

For further informations, please refer to its documentation

… error handler to stay next to it. No side effects
…comprehend. It was necessary to debug the entire method to know what it was doing. It is much more readable now. No side effects
…call to an already received successListener. So instead of create one, it has just to use the received one
@capnfabs capnfabs self-assigned this Dec 7, 2015
@viniciusboson
Copy link
Contributor Author

@dancunningham: I've raised the submission offline alert. Have you found any error else?
@capnfabs: I got you point. I'm trying to fix this race condition. I coundn't fix it yet but i'm working on that.

capnfabs and others added 20 commits January 25, 2016 10:30
…ncellos-fix-required-fields

Fix Required Fields
…ncellos-enable-patient-like-search

Enable like search.
- The notes panel expanding no longer greys out the chart
- The notes panel is fixed at 60% height
- It's now possible to scroll to the bottom of the patient chart when the notes panel is open, thanks to some layout hackery.
…es-too-agressively

Only refresh the patient chart if something changed after a sync.
- You can set the start date when you first create an order, but not when you edit it.
- Fix the "stop after X days" logic to be a straightforward duration since start date, instead of being the duration from today. This makes a lot more sense now that we're actually displaying the start date.
…-tweaks

Tweaks to View Observations dialog
…oast

Temporarily disable the red network error toast
…t-size

Use BigToast to display the "note submit failed" toast.
…orders

UI support for setting custom start dates on Orders.
capnfabs and others added 3 commits January 28, 2016 17:47
The timestamp for encounters entered with an Xform didn't include a seconds field previously. This meant that if the same form was filled out twice in one minute, there was no guarantee that the most recently set value would be the one displayed on the patient chart.

This change makes the DateTimeWidget in Xforms use the seconds of the current time by default, and then clears the seconds if the value changes. This workaround gets us a lot closer to the behaviour that the user expects.

Fixes projectbuendia#125.
Use dark, ancient magic to ensure that seconds are set for form entries.
@capnfabs capnfabs removed their assignment Mar 27, 2017
@zestyping zestyping changed the title Feature/submit form offline [2015] Submit forms offline Jun 25, 2019
@zestyping zestyping changed the title [2015] Submit forms offline [2016] Submit forms offline Jun 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants