Module to assist Platform upgrades from pre-1.10 versions

While here in Kigali as a Jembian, i have written a module that addresses all the requirements of https://wiki.openmrs.org/display/docs/Prepare+for+Upgrading+From+a+Pre-1.10+to+1.10+or+Later+Version The module works for even OpenMRS platforms of version lower than 1.9.x such as 1.6.7 (Rwanda MoH & RBC fork) on which we have tested the module and upgrade. I have updated the Wiki to mention of our work-around for implementers that may have experienced issues while following the Wiki documentation. We hope this will be of help to many struggling and may be fearing to upgrade their instances.

Downloading omod First release is available on github here.

Usage:

  1. The admin of OpenMRS/EMR is required to install the module before upgrading and confirm that it has started successfully.
  2. Then follow the OpenMRS Upgrade steps.

Source Code: Here is the module’s source code repository.

4 Likes

@k_joseph is this just for Orders or for all 1.6.3 installations, as I have about 200 to go, and we had developed a crude work around:

  1. Load a blank installation of 1.11.5
  2. Run an SQL script to copy the data from the 1.6.3 database to the new 1.11.5 database

cc @jmpango @slubwama @carapai

This handles more than orders, all the requirements before running through the upgrade mentioned on that Wiki. Am thinking your workaround would just avoid letting openmrs upgrade as normally which i think may not be too healthy. Am wondering whether you were resolving the issues on that Wiki in your SQL script!!!

In order to use this module for 1.6.3, please fork and change openmrs depended on version to 1.6.3 instead of 1.6.6 at:

Could save you time i guess :slight_smile:

@k_joseph Will run a couple of tests with it and see how far we get. Thanks

1 Like

Does your module include the functionality of the module already linked from that wiki page (this module)? Or do people need to use both?

I guess your module does everything, based on this note on the wiki page:

user only has to install it before upgrading and do nothing else

Do you think the old module should be deprecated?

1 Like

Yes it does, I have actually not tried out that module since i think all it does is help the user to do the mapping himself, my module does the mapping, it goes through all the drug order frequencies and dose units in the database and creates new concepts for them and writes the required mapping file for the user (the other option would be, update the concept dictionary to use added concepts as it has evolved but this the module is not supporting).

@wyclif, @dkayiwa: are the dose units for all other orders and not only drug orders, i had in the first place interpreted it to mean that frequencies and dose units for only drug orders, however in Rwanda we have more dose-units for other orders, are those also meant to mapped?

Dosing instructions (dose, units, route, and frequency) are specific to dosing of medications (i.e., drug orders). The base properties shared by all orders (i.e., in the orders table) apply not only to drugs, but also tests, procedures, referrals, activities, call orders, nursing orders, etc. For example, when you refer someone to a cardiologist, “dosing instructions” are not relevant.

What other types of orders (other than medications) are being dosed in Rwanda?

1 Like

They have units for lab-orders for-example, however i have confirmed that these are managed as concepts which makes me worry not about them. Thanks

I am getting this error when installing the module:

Error while trying to start module
Unable to update data model using liquibase.xml. Module: MoH Before One Eleven Upgrade Module
 ** org.openmrs.module.ModuleFactory.runLiquibase(ModuleFactory.java:776)
 ** org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:549)
 ** org.openmrs.api.context.Daemon$1.run(Daemon.java:58)

I am using OpenMRS Platform 1.9.3

1 Like

can you find the full stack trace from tomcat logs, i can help resolve this for 1.9.x, i had not yet tested in on 1.9.x

could be relevant also for this :slight_smile:

The module was unable to run on 1.6.3 (says it required at least 1.6.7), 1.6.6 (cant recall error but error was not the 1.6.7 requirement) and 1.8.4(error while trying to start module).

You can change the openmrs version to 1.6.3 at:

Please share the log so that i can help you fix the failure

How then would I build the omod file?

Here is the error from installing on 1.8.4

Error while trying to start module
mohbeforeoneelevenupgrade.failedToStart
 ** org.openmrs.module.mohbeforeoneelevenupgrade.MoHBeforeOneElevenUpgradeActivator.startup(MoHBeforeOneElevenUpgradeActivator.java:38)
 ** org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:561)
 ** org.openmrs.api.context.Daemon$1.run(Daemon.java:56)

As you would build any openmrs module omod. fork and clone the repo to make the above change. compile and build omod by running;

mvn clean install

on command line

Please share the whole log, check tomcat logs

INFO - ModuleListController.formBackingObject(266) |2016-04-03 12:51:08,943| Returning 7 modules
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:08,943| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=Manage Modules, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:08,943| Exiting method notifyPrivilegeListeners
Apr 3, 2016 12:51:09 PM liquibase.database.template.JdbcTemplate comment
INFO: Lock Database
Apr 3, 2016 12:51:09 PM liquibase.lock.LockHandler acquireLock
INFO: Successfully acquired change log lock
Apr 3, 2016 12:51:09 PM liquibase.database.AbstractDatabase getRanChangeSetList
INFO: Reading from `liquibasechangelog`
Apr 3, 2016 12:51:09 PM liquibase.database.template.JdbcTemplate comment
INFO: Release Database Lock
Apr 3, 2016 12:51:09 PM liquibase.lock.LockHandler releaseLock
INFO: Successfully released change log lock
Apr 3, 2016 12:51:09 PM liquibase.database.template.JdbcTemplate comment
INFO: Lock Database
Apr 3, 2016 12:51:09 PM liquibase.lock.LockHandler acquireLock
INFO: Successfully acquired change log lock
Apr 3, 2016 12:51:09 PM liquibase.database.template.JdbcTemplate comment
INFO: Release Database Lock
Apr 3, 2016 12:51:09 PM liquibase.lock.LockHandler releaseLock
INFO: Successfully released change log lock
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,130| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: mohbeforeoneelevenupgrade.started value: true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,130| Exiting method saveGlobalProperty
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,146| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: mohbeforeoneelevenupgrade.mandatory value: false, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,146| Exiting method saveGlobalProperty
INFO - MoHBeforeOneElevenUpgradeActivator.startup(36) |2016-04-03 12:51:09,161| Starting MoH Before One Eleven Upgrade Module
WARN - ModuleFactory.startModuleInternal(576) |2016-04-03 12:51:09,161| Error while trying to start module: mohbeforeoneelevenupgrade
org.openmrs.module.ModuleException: mohbeforeoneelevenupgrade.failedToStart
	at org.openmrs.module.mohbeforeoneelevenupgrade.MoHBeforeOneElevenUpgradeActivator.startup(MoHBeforeOneElevenUpgradeActivator.java:38)
	at org.openmrs.module.ModuleFactory.startModuleInternal(ModuleFactory.java:561)
	at org.openmrs.api.context.Daemon$1.run(Daemon.java:56)
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,161| In method AdministrationService.saveGlobalProperty. Arguments: GlobalProperty=property: mohbeforeoneelevenupgrade.started value: false, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,161| Exiting method saveGlobalProperty
INFO - MoHBeforeOneElevenUpgradeActivator.shutdown(46) |2016-04-03 12:51:09,177| Shutting down MoH Before One Eleven Upgrade Module
WARN - OpenmrsUtil.deleteDirectory(943) |2016-04-03 12:51:09,177|    ...could not remove directory: C:\windows\TEMP\1459676889201.openmrs-lib-cache\mohbeforeoneelevenupgrade\lib
WARN - OpenmrsUtil.deleteDirectory(943) |2016-04-03 12:51:09,177|    ...could not remove directory: C:\windows\TEMP\1459676889201.openmrs-lib-cache\mohbeforeoneelevenupgrade
INFO - ModuleListController.formBackingObject(266) |2016-04-03 12:51:09,177| Returning 7 modules
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,177| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=Manage Modules, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,177| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,177| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=View Navigation Menu, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,193| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,193| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=Add Patients, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,193| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,193| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=Add Patients, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,193| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,193| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=View Concepts, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,193| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,193| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=View Administration Functions, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,193| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,193| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=Manage Modules, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,193| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:09,193| In method UserService.notifyPrivilegeListeners. Arguments: User=admin, String=Manage Modules, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:09,193| Exiting method notifyPrivilegeListeners
INFO - LoggingAdvice.invoke(109) |2016-04-03 12:51:15,011| In method UserService.notifyPrivilegeListeners. Arguments: User=null, String=Manage Scheduler, boolean=true, 
INFO - LoggingAdvice.invoke(134) |2016-04-03 12:51:15,011| Exiting method notifyPrivilegeListeners

this doesn’t contain the error log please

That was from stdout.log. Let me send the entire text from that file