As we start thinking about deploying in health zones, we will need to be able to support BHIMA on low bandwidth or even offline connections. It would be nice to seamlessly allow our connections to drop and restart, and support certain operations such as "offline mode" for stock management and patient registration.
To do so, we'll probably need to add a manifest file to store the assets. It looks like we may be able to use a gulp plugin to generate this for us automatically.
It may also require (or as an alternative to the above) us to use ServiceWorkers.
Unfortunately, we are really limited by the fact that we are using an ancient Angularjs version here.
Flip a switch on the settings page that says "Go Offline".
Now, my user will be remembered on the local machine. If I try to log out and log back in, it won't look up the user from the backend, it will just use the local user on my machine, provided the username and hash of the password match.
Assets will be loaded from a manifest file, so we shouldn't need an internet connection to get the JS/HTML/etc.
Cached depots will be available to use, you will be able to record stock consumption against that depot by storing it in an offline cache.
When you go "online" the system will check the offline cache queue and ask you if you want to submit that data to the server.
Data will be submitted as normal, checking errors, etc.
As we start thinking about deploying in health zones, we will need to be able to support BHIMA on low bandwidth or even offline connections. It would be nice to seamlessly allow our connections to drop and restart, and support certain operations such as "offline mode" for stock management and patient registration.
To do so, we'll probably need to add a manifest file to store the assets. It looks like we may be able to use a gulp plugin to generate this for us automatically.
It may also require (or as an alternative to the above) us to use ServiceWorkers.
Unfortunately, we are really limited by the fact that we are using an ancient Angularjs version here.