Merge Patient data from Multiple Installations Project

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

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

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

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

cc: @dkayiwa , @ssmusoke , @wyclif

The repo is here

cc: @mksd

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

@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>

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

Week 6 status update.

cc: @ssmusoke

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

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

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

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

I think its deleted by the FHIR request,

Should I also copy/borrow that ideology from sync2?

cc: @ssmusoke, @dkayiwa

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

Seventh week update

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

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

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