EHR Data Synchronisation

From PANACeA THIRRA

Jump to: navigation, search

Contents

DATA SYNCHRONISATION

Overview

Users can deploy offline mobile clinics that can later be synchronised with the main database. Data can only be synchronised in one direction, i.e. single master. Multi-master setup is not possible and it introduces data complications that are too risky to implement, especially for Electronic Health Records System. There can be multiple slaves, i.e. offline mobile clinics, that all share the same database although virtually, they are different clinics.

Initially, a copy of the main database is copied to the offline mobile server, e.g. netbook. The netbook will have exactly the same information as the main server, at that point of time. Users can take the netbook to other locations to be used as usual. Over time, the netbook will accumulate patient information that the main server will not have, such as new patients and consultations. These additions are flagged for synchronisation.

Periodically, the offline mobile clinics will be synched back to the master database. All data flagged for synchronisation are exported into XML files. The XML files are used to import the data into the master database.

There may be cases where users continue to use the main online server, while the netbook is being used elsewhere. These information remains on the server and are not exported. As all the new data from the netbook are imported into the master database, the master database has the most complete information for all locations. This updated database is now used as the new master seed file for future deployments.

The prepare for subsequent deployment, the netbooks will now use the new master seed file as its database, making it also the most complete database for the time being. Thus, the databases on the offline mobile servers are temporal by nature.


Preparations

  1. Ensure that all open consultations are closed. Tip: Print Clinic Consultation Report
  2. Add all new users, drugs, locations, etc. that will be used by everyone
  3. Ensure that all synch flags are cleared. Use Admin->Clear Synch Flags
  4. Backup database to be the Master Seed file
  5. On the offline mobile servers, create THIRRA application and restore Master Seed file to new database.
  6. Ensure that the THIRRA application on the netbooks are set to Offline Mode, in the config.php file. The login screen as well as the banners would show the mode.


Periodic Synchronisation

  1. Ensure that all open consultations are closed on the offline mobile servers. Tip: Print Clinic Consultation Report
  2. Upgrade database schema to latest build (same build as online master server)
  3. Export all data in the Admin Section
  4. The XML files are located in the /var/www/xxx_uploads directory where xxx is the application folder name
  5. Copy all the XML files to the online master server's /var/www/XXX_uploads directory
  6. At the online master server, import all the data in the Admin Section, in the exact sequence as suggested
  7. Clear all synch flags. Use Admin->Clear Synch Flags


Caution

The following actions are critical to the success of the offline mobile server:

  1. Create all users, catalogues, drugs, referral centres, georgraphical locations, etc. that are common to all users
  2. Clear all synch flags before creating the Master Seed file
  3. Set the offline mobile server to offline mode


Recommended Practice

  1. Create a new generation of the master database for each synchronisation exercise, for example:
 clinic-002-0 as the master database
 clinic-002-nb1-0 for netbook no.1
 clinic-002-nb2-0 for netbook no.2
 If in the future, there is a need to make changes to the live database, they can be renamed
 clinic-002-1, clinic-002-nb1-1, etc.
 clinic-003-0 to be created from say, clinic-002-3's backup for latest synchronisation exercise
  1. Perform all the synchronisation activity on the same server, so that it is easy to copy the XML files around.
Personal tools