250 likes | 428 Views
Android/OpenMRS Forms/Protocols PeerSync. Android/OpenMRS: initial goal. We want applications running on Android phone to save data for use in OpenMRS (for reporting, etc.) Easiest way is to use the same database. Data Model. OpenMRS uses MySQL Android has SQLite3
E N D
Android/OpenMRS: initial goal • We want applications running on Android phone to save data for use in OpenMRS (for reporting, etc.) • Easiest way is to use the same database
Data Model • OpenMRS uses MySQL • Android has SQLite3 • Both SQL databases, transformation possible • We’ve implemented the same data model
OpenMRS API • OpenMRS written in Java. Large, well-organised codebase. • Android applications written in Java (variant). It has been possible to reuse aspects of the OpenMRS codebase. Namely, the API e.g... • Context.getPatientService(patientId)
API benefits • We can write applications using the same vocabulary as OpenMRS – immediately familiar to anyone familiar with OpenMRS code • We leverage lots of good design and implementation work already done. • We exploit logic embedded within the API, e.g. User rights
API has been modified • to remove references to things which don’t run on Android (e.g. Hibernate) • to achieve acceptable performanceon Android (e.g. caching) • Presents maintenance issue as OpenMRS develops new version(s)
Device Hardware • Our experience: runs fine on Google NexusOne, does not run well on HTC Wildfire • Downward price pressure
Forms/Protocols • Android facilitates seamless inter-application communication • Android/OpenMRS defines FormEngine interface to communicate with external Android applications which «execute» forms/protocols, e.g. • ODK Collect (modified) • Mangologic
PeerSync • A synchronization algorithm to permit «units» to synchronize OpenMRS database. • Units may be Android devices, and/or OpenMRS servers (with PeerSync Module installed). • OpenMRS have a «sync module» but algorithm cannot run on device, and assumes parent-child relationships
PeerSync • Does not deal with conflicts (assumes no synchronous working on patient data can cause contradictory information) • Works over • Local network • Bluetooth • Internet
PeerSync • Makes possible multi-station data-sharing in clinic
Or device-device via a local network, with occasional back-up to server (undisturbed by poor connectivity)