Testing MergePatientData Module

Hi all,

More development has been done on the mergepatientdata module. Currently, the module Supports the following resources.

  • Patient
  • Encounter
    1. Obs

What we currently don’t support

  • Visit -This will be soon added. No worries
  • Order -This will also be added soon
  • Diagnosis -Pending…

Testing the module

Without testing the module on a serious/real dataset, I can’t be rest assured that the module actually works as expected. Before continuing with adding support for the rest of the Resources, lets first test what we have at hand.

Could someone with more Patient data want to help me out? Or is there a dump file around?

Source code :- https://github.com/samuelmale/openmrs-module-mergepatientdata

cc: @ssmusoke, @dkayiwa

Try this data set from UgandaEMR Demo server https://www.dropbox.com/s/n9czp7p785wigxw/demodata-v4.4.sql?dl=0

1 Like

Thanks @ssmusoke for this dataset. After executing it, I’m required to login with a User that has 'System Developer ’ role. I tried with the ‘admin’ User but failed on authentication.

Unable to authenticate as a User with the System Developer role. Invalid username or password

I even went ahead and checked in the new db for the admin user’s Password and tried using it but all in vein.

Am looking at such a page

CC: @dkayiwa

use test as the password - sorry forgot to send that over

Cool, it worked

On going ahead with the setup process, I hit upon this error. https://pastebin.com/N5xCJCpd

@ssmusoke Am looking at such a page now :flushed:

CC: @dkayiwa

What is the value for “connection.url” in your runtime properties file?

@dkayiwa My ‘connection.url’ : jdbc:mysql://localhost:3306/server1?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8

Deep investigation in this shows, there is something(I’m not sure what!) thats setting @@sql_mode to ‘NO_ZERO_DATE’. This causes mysql to reject null and ‘000.0.0’ dates. I reset manually to something like ‘ALLOW_INVALID_DATES’ but it works when I myself injects liquibase changesets manually.

Append this to your database connection url and try again (without the quotes) “&zeroDateTimeBehavior=convertToNull”

Same issue persists @dkayiwa

Did you rerun openmrs? What is your current value for “connection.url”?

Yaaa, I restarted my server.

connection.url=jdbc:mysql://localhost:3306/server1?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull

connection.url=jdbc:mysql://localhost:3306/server1?autoReconnect=true&sessionVariables=default_storage_engine%3DInnoDB&useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull

The issue still persists @dkayiwa

Which version of MySQL are you running?

Server version: 5.7.17 MySQL Community Server (GPL)

Can you paste the entire log at pastebin.com?

@dkayiwa here we go https://pastebin.com/0i87Z3D3

When you look at your person_address table, what is the default value for date_created?

Ooops seems this is the culprit. The deafualt value is ‘0000-00-00 00:00:00’ @dkayiwa

1 Like

Can you remove it and try again?