Open ekigamba opened 2 years ago
Sounds good, if the datetime changes, can't we do re-check w/o relogin?
We can definitely do a recheck without relogin.
The rough idea is that we block the UI while the device get's the latest GPS and we confirm that the date is correct. Incase the date is wrong, then we'd prevent interaction until the date is corrected.
I think we can build on a solution for this for the following cases:
Can we do the gps check in the background unless it's been past some threshold since last check and then we have it be a blocking step in p2p.
I wonder how easy it is to acquire a gps signal in the environment this will be used
We can do it in the background, however we ran a bigger risk if we allow the user to continue interacting with the app(not p2p) when the device date and time is wrong.
New records/updates will be saved with the wrong date/time and this can cause unintended effects during p2p sync, data reporting, scheduling and incorrect data.
Given that GPS signals might be hard to acquire, we can ask the guys in Liberia to test this out next time they are in the field. It was reported that the users in Liberia might leave the devices off and out-of-battery for a couple of days.
We can see if there's a better solution to this?
That sounds good, we'll need to find a balance, but blocking or requiring some kind of admin override makes sense when the user has manually changed the date.
are there system default modals for the GPS / network date and time sync?
@HenryRae There are some system default modals that would be created but the user needs to be informed that the blocking process is ongoing. For us to enable GPS, the user might be requested for location permissions and to turn on GPS. After the permissions have been given and location enabled, the app waits until it receives an accurate location + time. The process while retrieving the time from network is a bit different because it will be a process controlled by the app and therefore no system modals.
So does this mean you don't need modal design from us? @ekigamba
@HenryRae For now, we will just need a page to block user ineraction and explain what is happening
Does something like this make sense? Nothing much user can do besides:
what do you think? cc: @ekigamba @rowo
@HenryRae Yea, this is fine :+1:
STEPS
Whenever:
confirm the date time
confirm the date time
flag to false. If not, we provide the correct date/time and request the user to change itLOE: 2 FTE days
is this only after login? and if p2p is enabled?
This is before login. I believe that it should be a FHIR Core issue also. We previously had this on OpenSRP and it would force you to login via internet when the date/time changed. Currently, I believe it maintains data integrity in the app. I also believe it's going to be needed in Liberia where this brought up as a possible issue.
if the user background the app will the timer still work?
Possibly not. I assume this almost similar to closing the app
if the user closes the app will the timer still work?
No, the user will have to repeat the same process until the flag is reset. The time is stopped after the correct date/time is set. It's purpose is to prevent retrieving the date/time from the network/GPS again to confirm the user entered the correct date/time once back from the date/time settings page
k, the other factor with Liberia is that many users will never have access to the internet, so we wouldn't want this to block them from being able to use the app.
Yea, we'll be using a combination GPS and cell network
Is cell network required? I'm not sure if they'll have access to that when it's in use, but I don't think so. @AnnieMungai do you know?
Sorry, we will use either that is available, since this is to be used across FHIR Core, we can implement both since cell network will be faster inside buildings/structures. Liberia version might quickly switch to GPS if cell network is not available
@pld @ekigamba confirming that network connection is not available. The phones do not have sim cards, and the network connection is not reliable.
Sources of date/time in selection order
The https://worldtimeapi.org/ API will be useful since it is fast, will work even during development and devices inside health facilities with neither SIM cards and poor GPS reception due to buildings.
@AnnieMungai do you have a sense of how long it takes to get a gps fix in the areas healthcare workers are working? is this something we do in VTS?
@pld we are currently not collecting GPS data on VTS. It is not easy to get a GPS fix in CHW areas of operation. It was abandoned as it proved to be difficult to obtain- there is a lot of forest cover and heavy clouds.
OK, so @ekigamba what alternatives do we have in a situation where there's no cell network, no internet, and no GPS availability?
OK, so @ekigamba what alternatives do we have in a situation where there's no cell network, no internet, and no GPS availability?
We can have an override code that enables the supervisor to ignore this page for the specific case(boot or system date-time change). We can also request the user to confirm that the date is correct after a boot but not force the check through internet, GPS or cell network.
This is the workflow:
During the date-time check, we can use either internet, GPS or network. I believe this issue affects FHIR Core because we have a number of FHIR Resource fields that are automatically populated with the device's date/date-time and will also spiral to make reporting inaccurate
@ekigamba @pld Currently, on VTS the device is connected to the internet before deployment (for the initial sync). The time/date is set to update automatically when the phone is being set up (it is part of the deployment checklist). If need be, and when the device is in the field with no internet connectivity, the device time can be updated manually if the time is off (this is only an edge case and is generally discouraged). cc @dubdabasoduba
@HenryRae
sorry, didn't get you right on the second request @ekigamba
sorry, didn't get you right on the second request @ekigamba
@HenryRae We already know the correct date and time and therefore need to suggest this to the user
if we do, we can't automatically adjust it? Do we just show the correct time to the user and request them to confirm it or update to the new time?
@HenryRae We cannot. We need to show the correct time and request the user update it to the correct date and time.
@ekigamba wondering how date and time will be updated with the lock apps used on FHIR apps like eCBIS. cc: @dubdabasoduba LINK to design draft
@ekigamba wondering how date and time will be updated with the lock apps used on FHIR apps like eCBIS. cc: @dubdabasoduba LINK to design draft
@HenryRae most locking apps provide a way to unblock some settings. eCBIS has a setting to unblock the date. I think the date also affected something on VTS so they already figured out how to unblock just that.
We are using the lastUpdated time for P2P sync. This value is generated by the device. Because of the above we need to take the device date seriously. I think we should consider using GPS and network to get the latest date everytime the user logs-in so that the date is up-to-date. We should also force relogin/date-recheck when the date/time changes
LOE: 2 FTE days