Merge Patient data from Multiple Installations Project

gsoc2018
Tags: #<Tag:0x00007f88c9e8a7c0>

(Samuel Male) #41

Still about dependencies, I don’t know why some thing small still troubles me :face_with_hand_over_mouth:
and I’m not sure of the java --version the module should depend on. I’m currently running java 1.8.
I’m confused on how to tell maven on which version of java it should compile and build the module. Taking a step to solve my blocker, I modified my properties of my POM. But still get this error.

cc @ssmusoke , @wyclif , @dkayiwa


(Samuel Male) #42

Resolved. Looks like I didn’t have the compiler plugin :smile:


(Samuel Male) #43

After fixing the above, I have again run into some other compilation error.
It looks like this import can’t be resolved by eclipse. On compiling the module with maven, I got this error.
Could I be missing some dependency. Here is my POM
CC: @ssmusoke , @dkayiwa , @mksd


(Samuel Male) #44

Could anyone be in position to help me with my blocker?

cc: @dkayiwa , @ssmusoke , @wyclif


(Samuel Male) #45

The repo is here

cc: @mksd


(Daniel Kayiwa) #46

Add this dependency: https://github.com/openmrs/openmrs-module-xforms/blob/master/omod/pom.xml#L80-L85


(Dimitri R) #47

@samuel34 this specific error is related to a missing dependency on Legacy UI (OMOD I presume) when you depend on Core >= 2.x.

However your POM configuration is not ok: don’t depend on the Ref App distro. Just make sure to depend on the smaller set of necessary dependencies, module by module.

Since this is a time consuming b***ch to go through, I went through it quickly, and I also formatted your POMs while I was at it:

So just copy/paste the raw content from the above Gists and all should be ok.

This in the OMOD POM specifically solved the compilation error:

<dependency>
  <groupId>org.openmrs.module</groupId>
  <artifactId>legacyui-omod</artifactId>
  <version>${legacyuiVersion}</version>
  <scope>provided</scope>
</dependency>

(Samuel Male) #48

Thanks @mksd and @dkayiwa . You saved lots of my time :wink:


(Samuel Male) #49

Week 6 status update.

cc: @ssmusoke


(Samuel Male) #50

Hi ,

I’m getting a challenge to merge the Patient data due to failure of PatientIdentifier Validation. I’m not so sure of how the Check Digit Algorithm works but what I want is to modify the a PatientIdentifier by appending something like ‘#MPD’ on the Existing PatientIdentifier. This would help to differentiate original Patients from those that were merged/imported.

Any thoughts on this

cc: @ssmusoke, @dkayiwa


(Samuel Male) #52

Was this really for me @ssmusoke ! If so the link you provided can’t be accessed.


(Stephen Senkomago Musoke) #53

Why are you changing the value of the identifier? How does the current sync module do it?


(Samuel Male) #54

According to the Testing I have done, if sync2 hits upon such incidence( Trying to add a Resource to a Parent with another existing Resource having the same Identifier) sync2 deletes the old Resource and replaces it with new one. Could this be recommended? @ssmusoke, @dkayiwa


(Samuel Male) #55

I think its deleted by the FHIR request,


(Samuel Male) #56

Should I also copy/borrow that ideology from sync2?

cc: @ssmusoke, @dkayiwa


(Samuel Male) #57

Apart from this, the module can now export and import data using default config. Just gonna implement customized configuration and auditing.


(Samuel Male) #58

Seventh week update


(Samuel Male) #59

I’m planning to persist Audits, but instead of creating more two tables, does it make sense to serialize these fields and store the as texts in just columns in on table

@ssmusoke


(Stephen Senkomago Musoke) #60

@samuel34 I would like to see a high level design on the whole approach as currently it is not clear to me


(Samuel Male) #61

During a given operation(Export/Import), its very possible to hit errors.

Eg,

  • When you try to export data from an Openmrs instance without the required Resource in the DB, this Operation won’t be successful coz there is nothing export
  • When you have wrong config, the Operation won’t be successful.
  • When you try to merge duplicate Resources, the Operation won’t be successful
  • etc…

For a good User Experience, we will need an assessment of what really transpired, why given resources failed to sync, How many Resources where Merged etc…

Audit Domain.

Adding on other Attributes like, Id, Operation, TimeStamp,Status etc… I have

private List<String> resources;//This store all Resources involved in a given operation(Export/Import)

private HashMap<String, List<String>> failureDetails;//Stroes Error messages which are determined by resource name(Key)

Remember we can work with many Resources in one Operation so the above Map maps Error messages to their Resources.

Now peristing these Requires me to have 3 table.

  1. audit_message
  2. resource
  3. error_message

But since these Resource names when serialized form a small String and failureDetails are a form relatively long string but no that long, I don’t think I should create all these tables but rather serialize these two fields to something like a json String and store each into its column rather than rendering tables :smile:

@ssmusoke