I believe several of you are developing offline apps. One aspect that may unify these projects is the approach to the offline data model. I’d love to see any documentation you’ve developed for this model.
What underlying technology are you using? sqlite? indexeddb? pouchdb? others?
Do you have documentation on your approach?
Do you have an api?
Would love to hear thoughts on a common approach to this problem.
Much like one could use OpenMRS as a platform and build a customized user interface (via REST) on top of it, I’d love for the community to have available a similar offline platform. This scaled down offline OpenMRS platform would store the data somewhere (perhaps a polyfill mechanism) and provide an api for interacting with the various endpoints.
In our more specific case, we’d likely build an app using ionic + angular.
In angular, we’d load a javascript file like:
<script src="./offline-openmrs.js"></script>
This would provide us the library for retrieving/accessing/locally saving common OpenMRS data like patients, obs, encounters, visits, encounter_types, location, etc.
We could then build on top of this our own angular app which consumed this offline data.
Ideally the offline-openmrs.js file would follow a pseudo rest approach to it’s interaction with the offline data.
In Bahmni we are focussing on creating an end user application with some flexibility to add other applications developed by community. This is available for the online system and the model is quite simple because of very loose coupling with rest of the Bahmni apps. Having said that, we haven’t had anyone else try that yet so there may be issues in this.
For offline, it is lot more involved, as we will have to create a complete platform with API, lifecycle hooks, deployment configurability etc. In our current roadmap we haven’t planned to make Bahmni also an offline platform and this will be a lower priority for us for quite some time. We understand that this is limiting, but given that we have just started developing offline, we are not in position to take this up any time soon. Sorry.