How to merge two openemr installations?

ericbringas wrote on Thursday, November 20, 2014:

Hi,

We’ve bee evaulating openemr for a couple of months now and so far so good. But I have two separate installs of openemr. What’s the best way to merge the two into one system?

Also, we are looking to deploy openemr one thing to take into consideration is we may encounter remote locations where there’s no internet connection. So a stand-alone openemr is installed on a laptop. The question is how do we then load the data back to the main openemr install once there’s an internet connection available?

Thanks

sunsetsystems wrote on Thursday, November 20, 2014:

These two questions are similar, and the answer is there’s not a good way at present. One would have to be developed. I think the approach would be to create a feature that exports and imports patient data. There’s probably some useful code in the “Merge Patients” feature that can be borrowed for this.

Rod
http://www.sunsetsystems.com/

blankev wrote on Thursday, November 20, 2014:

If the patient load is not to heavy (Many patients with lots of problems there is the option to run OpenEMR from a USB stick. Actually the only option if you want to synchronize without an Internet connection.
But there is a hurdle to take: How to merge double clients.

In the latest OpenEMR versions there is the option to merge double clients, but than you need to do a renumbering of the client since there is no synchronization option. For the future you can go with the USB stick from one location to the other. Renumbering of the clients will be the hardest part. All clients data (connected tables with client info) also have to be renumbered.

In my rather little experience with running OpenEMR from a USB stick is, it is only slightly slower than running it from hard-disk.

fsgl wrote on Thursday, November 20, 2014:

One possibility which requires no new software is this backup method for Windows.

  1. Clinic A & B back up their respective copies.
  2. Each clinic sends backup to other clinic.
  3. With next backup, Xcopy will add that which is new, synchronizing both copies.

I believe rsync would do the same for Linux devices.

bradymiller wrote on Friday, November 21, 2014:

Hi,

As I recall this was one of the main features that the Peace Corp project was looking for. Perhaps this feature is being worked on as we speak. My thoughts in the past were:

  1. To queue every action in the local instances rather than use the main tables and even run the local OpenEMR off the queues (for example, there are tables that do this in OpenEMR for the offsite OpenEMR demo).
  2. When get internet access run the queued actions on the centralized OpenEMR instance.
  3. At intervals, copy the centralized OpenEMR database/files to the local instance (and then erase the local queue)

But there are likely many ways to go about this issue. If the Peace Corps project is actually active will be curious how and if they pull it off; and hopefully we’d be able to bring it back into OpenEMR.

-brady
OpenEMR

sunsetsystems wrote on Friday, November 21, 2014:

I do recommend a look at the Merge Patients code for anyone considering this. It’s remarkably short and the task discussed here may be easier than expected.

Also I think it’s important to do it in a way that will not break whenever a new table is added to the database; that may require defensive coding as well as good documentation and awareness by those who do code reviews.

Rod
http://www.sunsetsystems.com/

tmccormi wrote on Tuesday, November 25, 2014:

yehsters design for his is based on Master-Master replication design pattern. It’s pretty dang cool