Updating the Validation Module

(Samuel Male) #1

Hi all,

We need the Validation module to validate metadata before exporting in using the metadatasharing module. However, the module is in a state were it really confuses.

First of all I pushed PR to add support for platform 2.x.

Looks like what is documented here is in a different branch from master. So what is what?

It really get confusing to implementors of the module. If you have used this module before, how have you handled such cases. Could someone merge this to master?

cc: @wyclif, @ball, @dkayiwa

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

More work is still needed to supporting 2.x.

On trying to Validate Concepts, I hit upon this error.

java.lang.NoSuchMethodError: org.hibernate.SessionFactory.getCurrentSession()Lorg/hibernate/classic/Session;

full log - https://pastebin.com/tjgPNiFJ

cc - @wyclif, @ssmusoke

(Stephen Senkomago Musoke) #3

This is not what we discussed - The assumption that the metadata for the two installations is the same therefore means that you do not have to export the concept metadata. Just the obs with the numeric keys for the concepts

Not sure why you are trying to move the concept metadata too

(Samuel Male) #4

What I understood is this. The mergepatientdata module doesn’t need to export/merge Concepts. But our assumption of Concepts being present(Similar) in the two installation is supported by existance of modules like metadatasharing module.

For instance we have two servers A and B.

Server A

A patient dies and its property ‘causeOfDeath’ is set to a Concept which doesn’t exist in Server B. We use the metadata sharing module to export the Concept ‘causeOfDeath’ to B.

Server B

By the time we import data to this server using the mergepatientdata module, the Concepts are already available.


So what I’m trying to say here is, just to be sure that Server A and Server B Concepts are exactly the same, we should first share the Concepts using the metadatasharing module.

(Samuel Male) #5

Ok @ssmusoke. I understand. But what pushed me to all this is simple. Testing the mergepatientdata module using the dataset you shared. It contains Patients, Encounter, Obs. So I setup another server to which we want to import data to. But this server doesn’t have metadata like Concepts as that from UgandaEMR so I want to first make sure this new Server has those Concepts first. How can I handle such an issue?

(Stephen Senkomago Musoke) #6

My thoughts are, If you are to make any progress, you should separate the two steps.

The criteria for using the module must be that the concepts, identifiers, attributes and other definitions in the source should be available in the destination.

(Samuel Male) #7

Perfect. Thats the criteria. But what I want to see happening is the module merging this data from the UgandaEMR server to another fresh server. But I need to make sure the metadata from UgandaEMR(source) is present in the destination like you said. Like for my testing usecase, how can I achieve this @ssmusoke coz I think testing out this module is important.

(Samuel Male) #8

What am gonna do is to stop testing the module against the dump file you shared since I can’t even load a Patient dashboard. I can’t view a Patient. I get this error on every attempt.

org.openmrs.module.metadatamapping.api.exception.InvalidMetadataTypeException: requested type class org.openmrs.module.metadatamapping.MetadataSet of metadata term mapping 2b910b27-9ba5-4ca9-b56e-1e78953a92dd refers to type null


cc: @ssmusoke, @dkayiwa

(Samuel Male) #9

I have now understood what you meant. I think in the proper way now.