Merge Patient data from Multiple Installations Project

gsoc2018
Tags: #<Tag:0x00007f23d8e0d5c8>

(Samuel Male) #1

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


GSoC 2018 - Merge Patient Data from Multiple Installations - Final Presentation
(Samuel Male) #2

Hi!

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:

(Daniel Kayiwa) #3

Which version of the sync module did you install?


(Stephen Senkomago Musoke) #4

@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


(Samuel Male) #5

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


(Daniel Kayiwa) #6

I thought this is the module that you actually wanted: https://github.com/openmrs/openmrs-module-sync2


(Stephen Senkomago Musoke) #7

@samuel34 Why not the latest snapshot of Sync 2 https://github.com/openmrs/openmrs-module-sync2


(Samuel Male) #8

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?


(Stephen Senkomago Musoke) #9

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


(Samuel Male) #10

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?


(Samuel Male) #11

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


(Samuel Male) #12

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?


(Stephen Senkomago Musoke) #13

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


(Tomasz Mueller) #14

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


(Samuel Male) #15

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”(https://sync2.openmrs.org/openmrs) 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" : "https://sync2.openmrs.org/openmrs",
"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


(Samuel Male) #16

I have just initialized an the repo https://github.com/samuelmale/openmrs-module-mergepatientdata


(Samuel Male) #17

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:


(Samuel Male) #18

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

Could you please clarify this @ssmusoke ?


(Stephen Senkomago Musoke) #19

@samuel34 so how will it work?


(Samuel Male) #20

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, webservices.rest and fhir which basically make up sync2 :slight_smile: