Merge Patient data from Multiple Installations Project

Hi all!
I would like to use this thread for all this project communications, asking questions and discussing blockers around the project.

cc @dkayiwa and @ssmusoke


As part of the project resource, I have tried playing around with the sync module and looking at its APIs. But its like am uncertain with installing the module. I tried installing it on standalone and reference application 2.7.0 and I hit this error on installation.

I think the first step would be coming up with a module name ('id'). I personally thought of :-
  • openmrs-module-mergepatientdata
  • openmrs-module-mpd

    @ssmusoke and @dkayiwa , Any thoughts in regards to this? and could you please help me with my blocker :slight_smile:

Which version of the sync module did you install?

@samuel34 Welcome to the project and thank you for starting this thread.

I had a couple of thoughts and I am hoping that @tmueller can chip in here on leveraging the Sync module

  1. Use the Sync 2 module as a foundation for this project

  2. Implement the merging of patient data as a “batch dump” to optimize this for slow internet connections

  3. Look to dump the “sync data” into a zip file on a facility, then import it into the master (which will really work for slow connections)

You can start with a new module with a plan to merge these features into sync later

I’m using 1.4. But I think this supports platform 1.9.* according to this POM

I thought this is the module that you actually wanted:

@samuel34 Why not the latest snapshot of Sync 2

1 Like

Hi @ssmusoke

Will I need to refactor sync2 code but implementing this is the new module , OR?

What exactly do you mean by a “batch dump”, Your meaning mass dumping merge-able patient data to the parentNode using something like an external drive?

How do we intend to transfer the zipped data? Is it through a configured network?

Will the module later depend on sync?

Create a new module that depends on sync

Sync currently does not work with existing data - only works with new data, and the existing data is a required feature

Create encrypted zip file, download it to a flash drive, take it to a new computer, unencrypt and load it … This will come later

Yes it has to - the idea is that once you are done this code will have to be integrated into the sync module

1 Like

I have installed sync 2 on two servers but failed to get any resources around configuring the sync2. (Parent-Child Nodes). Could @tmueller or any other person be in position to help me out?

Hi there!

If someone could direct me how to configure the sync2 config.json file. I don’t have a solid understanding of some the fields in the “general” param.

  {"general" : {
"parentFeedLocation" : "http://localhost:8081/openmrs",
"localFeedLocation" : "http://localhost:8080/openmrs",
"localInstanceId" : null,
"persistSuccessAudit" : true,
"persistFailureAudit" : true },"push" : {
"enabled" : true,
"schedule" : 12,
"classes" : [ {}.....]}}

cc @tmueller , @dkayiwa , @mksd

By the way which module name/id should give the module. I’m creating the module now but not sure whether I create it as my public repo and later it will be extended to the OpenMRS repo, OR?

Keep it in your public repo, call it openmrs-module-mergepatientdata and the module id mergepatientdata.

I hope you are using the OpenMRS SDK to create a module so that all the pieces are in place

Longer names are always better and more understandable than short ones

Hi @samuel34,

parentFeedLocation - url of the parent sync instance

localFeedLocation - url of the local instance

localInstanceId - id of the local instance

persistSuccessAudit - determines whether successful Sync operation is saved in audit logs

persistFailureAudit - determines whether failed Sync operation is saved in audit logs

Do you need any more info about the config file?

Regards, Tomasz

Cool stuff :wink:

I had never used the sync2 module before but its great by its works. However, I have played around it using the the 4 demo sync2 servers available. I have faced the challenge of configuring “sync2”( server to be a child of my local server (http://localhost:8080/openmrs) . However sync has failed to sync data from sync4 to my local server. Could the problem be with my config?
SYC4 config

"general" : {
"parentFeedLocation" : "http://localhost:8080/openmrs",
"localFeedLocation" : "",
"localInstanceId" : "sync2",
"persistSuccessAudit" : true,
"persistFailureAudit" : true


Local server config

"general" : {
"parentFeedLocation" : "",
"localFeedLocation" : "http://localhost:8080/openmrs",
"localInstanceId" : "localhost:8080",
"persistSuccessAudit" : true,
"persistFailureAudit" : true


cc @tmueller

I have just initialized an the repo GitHub - samuelmale/openmrs-module-mergepatientdata: OpenMRS module that is a solution to un consistent internet connections to some OpenMRS implementations using the current OpenMRS SYNC module. It merges patient data which isn't currently implemented in the sync module.

sync2 uses FHIR and REST modules for its RESTful operations. Since we are currently not implementing stuff via REST models, I think we don’t need to depend on the above two modules.
@ssmusoke and @dkayiwa what do you have to say about the above :slight_smile:

According to @dkayiwa , this implementation shouldn’t depend on sync.

Could you please clarify this @ssmusoke ?

@samuel34 so how will it work?

According to my little understanding on this. Sync uses an atomfeed mechanism to provide resource updates to configured servers. But for this module, we are making a tool that will actually carry a bunch of data from one OpenMRS instance to another using drives. Its actually a solution to sync implementations that don’t have their old Patient data synced since sync syncs only new Encounters or Transactions made when its running.
So I was thinking that implementing this doesn’t depend on atomfeeds, and fhir which basically make up sync2 :slight_smile: