Replacing The Bahmni OpenMRS Backend

Pascal Brandt edited this page Jul 3, 2015 · 3 revisions

Replacing The Bahmni OpenMRS Backend

The eSaude distribution makes use of the AngularJS frontend developed by Bahmni. The first step towards developing the eSaude distro was to replace the OpenMRS backend. This page describes that process.

Some of the changes below were required because the version of OpenMRS that eSaude is using (1.11.3) is newer than the Bahmni version (1.10.2), while others were due to Bahmni metadata dependencies.

The documentation I used to get the Bahmni system up and running initially can be found here. The setup instructions to set up Bahmni on top of an eSaude OpenMRS backend can be found here.

Database Changes

The database schema changes required are all due to the upgrade to OpenMRS 1.11.3. The following changes needed to be made:

  1. Some of liquibase changesets in the bahmni-core module insert into the order_type table. These statements had to be updated to include a value for the mandatory java_class_name column.
  2. The concept_word table has been removed since the introduction of lucene, so all references to the table had to be removed from the bahmni-core module.
  3. The start_date column in the order table was renamed to date_activated, so this had to be corrected in the bahmni-core module liquibase files.

Metadata Changes

The bahmniapps module creates some metadata required for the registration process, so it is necessary to install this module to run the Bahmni frontend.

Concepts

The eSaude database already had concepts called DAYS and LABORATORY, which are also installed by Bahmni. This resulted in some liquibase changesets failing. To resolve this, I removed the duplicate concepts that were not being used on any eSaude forms.

Privileges

The Bahmni registration app needs to make some calls to the OpenMRS API before the user has logged in. It is therefore necessary to assign the GET USERS, GET PROVIDERS and GET LOCATIONS privileges to the anonymous role in OpenMRS.

Locations

At least one location must have the LOGIN LOCATION tag associated with it, else no user will be able to log in.

User

The user that you intend to log in with must be made a provider. If you intend to create patients, the user will also need the ADD PATIENT privilege.

Module Requirements

Some guidance regarding which backend modules are required was given by Bharat on OpenMRS Talk here. The minimum set of additional modules that appear to be required is:

  • appframework-2.1.omod
  • bahmniapps-0.74-SNAPSHOT.omod
  • bahmnicore-omod-0.74-SNAPSHOT.omod
  • emrapi-1.7-SNAPSHOT.omod
  • event-2.1.omod
  • idgen-2.9.1.omod
  • idgen-webservices-1.0.omod
  • openmrs-atomfeed-2.4-SNAPSHOT.omod
  • providermanagement-2.2.omod
  • reference-data-0.74-SNAPSHOT.omod
  • uiframework-3.2.omod
  • uilibrary-1.5.omod
  • webservices.rest-2.10.omod

Java Version

This won't apply to all implementations, but eSaude has a dependency on Java 6, so some modules had to be recompiled to work with Java 6. In some cases minor code changes had to be made to remove Java language features only available from version 7.

Troubleshooting

There is an issue with the Event Module that can cause OpenMRS to silently hang on startup. The answer that Daniel posted on the OpenMRS Answers here resolved the issue.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.