Instructions for a Bahmni dev environment, targeted at OpenMRS devs

I have been documenting how to set up Bahmni via Docker from the perspective of an OpenMRS developer who wants to start working on the Bahmni application.

At present these instructions are in this google doc. (Soon I will move them into a wiki page on the Bahmni wiki.)

@pascal, FYI, these are more up-to-date than the wiki page you’re looking at, so perhaps we can coordinate ourselves to end up with just a single document.

1 Like

I have moved the contents of my google doc over to https://bahmni.atlassian.net/wiki/x/gIBMAQ

2 Likes

Ah, okay, I was using the wiki yesterday and ran into some issues, so I’ll check out the latest version.

In case I need some more help though, will you or any of the other devs be around for a chat in the next few hours?

Lunch time here, but after that, we meet there!

1 Like

Cool. See you on IRC.

Success!

There are a couple of small issues, which I’ll mention here:

  1. The profiles (e.g. here) are configured to mount the volumes at /var/www, but apache is configured to serve from /var/www/html, so in order to get the Bahmni apps served, I had to make that correction.
  2. The Bahmni apps are served over HTTPS, but access OpenMRS over HTTP. By default, Chrome will prevent these mixed content requests from succeeding. It’s probably worth noting in the docs that you have to click on the shield icon in the address bar and manually allow the request.

The next step for me now is to try to get the Bahmni apps talking to my own OpenMRS implementation and not the Bahmni distribution. I’ll start with just the registration app. Any idea what the minimum set of modules I’ll need in my implementation to use the registration app might be?

Cheers, Pascal

Hi Pascal,

  1. We access Bahmni using https://dockerhost/bahmni/home (assuming you have configured dockerhost in /etc/conf as mentioned in the document)
  2. We have ssl.conf configured in apache that can access OpenMRS using https. the url would be https://dockerhost/openmrs

All the OMODs that are used by bahmni are available at the location ~/bahmni-code/openmrs-distro-bahmni/distro/target/distro. Assuming you built openmrs-distro-bahmni as per the document.

Hi,

So it seems #1 and #2 above are not relevant, I was just doing it wrong. Everything works.

Regarding the modules, I do have them, but I’d just prefer to not have to add 26 modules to my implementation if I just want to use the registration app. I’ll try to figure out what the minimum set of modules is to get just registration working.

Do you know if the bahmnicore module is required for all the apps?

Cheers, Pascal

Hi Pascal, We need bahmnicore module for all the apps (starting with logging into the app). I have tried to lay down the dependency graph of OMODs used in Bahmni.

BahmniEMR Core OMOD
	EMRAPI - org.openmrs.module.emrapi
		Rest Web Services - org.openmrs.module.webservices.rest 
		App Framework Module - org.openmrs.module.appframework 
		Event Module - org.openmrs.event
		Provider Management Module - org.openmrs.module.providermanagement 
			- OpenMRS UI Framework - org.openmrs.module.uiframework 1.8.1
			- UI Library Module - org.openmrs.module.uilibrary 1.5
		Metadata Sharing - org.openmrs.module.metadatasharing 
			- Metadata Mapping - org.openmrs.module.metadatamapping 1.0.1
		Reporting - org.openmrs.module.reporting ${reportingModuleVersion}
			- HTML Widgets - org.openmrs.module.htmlwidgets 1.6.4
			- Calculation - org.openmrs.calculation 1.1
			- Serialization Xstream - org.openmrs.module.serialization.xstream 0.2.7
Address Hierarchy - org.openmrs.module.addresshierarchy
ID Generation - org.openmrs.module.idgen
ID Generation Web Services
Reference Data - org.bahmni.module.reference-data
	- AtomFeed Module - org.ict4h.openmrs.openmrs-atomfeed 2.2
1 Like

Bahmni team (and others), I’ll be helping to lead a team of developers at AMPATH (Eldoret, Kenya) in building a point-of-care system to serve our rural sites. Much of the user-interface and workflows will be specific to our specific health care delivery system. However, I’m certain that there are core modules (e.g. authentication, Openmrs REST WS result representations, form entry) which are likely to be useful across implementations.

If there is interest within the community, I think it would be useful to create a strategy which identifies features/functions (likely to be shareable across implementations) and creates generic conventions i.e. not naming modules ampath-formentry) which supports these core modules.

Please let me know if there’s interest and ideas for moving forward.

1 Like

There has been some discussion about this between @janflowers, @darius and @valvijo. I definitely agree that it would be great to have some generic Angular/front-end modules that could be shared, preferably not tied to any backend OpenMRS modules (especially not implementation-specific ones).

Just for some context, the Mozambican OpenMRS community is currently working on trying to adapt the Bahmni setup for our own use case.

1 Like

Good to know.

In Mozambique, are you using all three components of bahmni or focusing on just openmrs portion? Is your code on github?

We’re only using OpenMRS.

Our code will be on GitHub once we start getting around to customising the Angular modules. So far, most of the work has been done on replacing the Bahmni backend OpenMRS distro with our distro. The code to get that up and running is here: https://github.com/esaude/openmrs-distro-esaude.

Sometime before the end of next I will publish a description of exactly what I had to do to switch out the Bahmni backend.

Hey Jonathan!

Before one of the devs jump in, let me ask you a question: is using Bahmni an option, instead of creating a new UI on top of OpenMRS?

Most likely not but we will take a close look to see if this is possible.

More philosophically, I think it’s unlikely, especially in larger implementations (AMPATH has 100’s of sites and relatively organization specific work-flows), that a common user interface meet organizational needs without significant customization. It’d be a difficult battle to convince an organization to modify it’s workflows to match those recommended by an EMR. It may seem that things are generic but undoubtably, there will be customization required.

I’d be interested to hear how the Mozambique project goes. How well does Bhamni as is work for your implementation? What modules do you see your organization using? What did you want to have work for you but didn’t? What did you not expect to work for you but did?

Ideally, we identify those modules/apps within bhamni which are likely to be useful independent of a particular organization’s work flows and make them generically available. I would be very interested to hear your thoughts on which modules within your code are “generalizable”. I suspect that many of the modules in the commons directory fit that bill.

We’re still in the very early stages of testing Bahmni for our use case. All we’ve done so far is replace the Bahmni OpenMRS backend with our own. We tried pretty hard to only use the very minimal subset of backend (i.e. OpenMRS) modules, but we found quite a lot of interdependence, so at the moment we’re using pretty much all the Bahmni OpenMRS modules in our implementation.

I’m sure as time goes on we’ll be able to tease apart some of these dependencies, but we haven’t attempted that process yet. I’ll try to keep everyone update on what we’re doing.

For those that are interested, the changes I had to make to replace the OpenMRS backend behind Bahmni can be found here.

2 Likes

Hi Pascal, my name is James Mbabazi and I work with Partners In Health as an Implementer. I have a question that’d require your expertise. I am looking into installing bahmni on top of an existing OpenMRS instance and the reason I’d like to do this, is to become more familiar with the bahmni installation thus facilitating its troubleshooting. At the moment, I have not found a documentation explaining bahmni installation in detail for a first time bahmni Implementer. I’ve heard that you have tried this approach and I’d really appreciate if you explain to me how it went and the steps you took to make bahmni work (or if you point me in the right direction) I have installed bahmni using docker, bahmni vagrant box but that is not what I am looking for. I want a bahmni installation from scratch. Thank you and hope to hear from you.

1 Like

I am certainly not the expert, but I will help as best I can. The first think you’ll want to do is join the #bahmni channel on IRC and let @emerson know that you’re going to need some help. He will try to make sure that the true exports like @bharatak and @darius are in the channel to support you :).

Installing Bahmni from scratch is not trivial, but the following two wiki pages should make it slightly easier:

The basic thing you have to understand about Bahmni is that it is a AngularJS (JavaScript) application and associated set of config files. The application and the config files need to be served to the user by a web server like Apache. The web server can be on the same box running Tomcat. The application communicates with OpenMRS using REST. It might be a little tricky to read, but the steps I used to automate the Apache and Bahmni app install can be found here.

In my opinion, the simplest option would be to use my Vagrant box and replace the OpenMRS installation in it with your own (or at least look at the Apache configuration and how all the folders are set up with the JavaScript files and config for Bahmni).

I’ll try to monitor this thread and be available on IRC if you need some more help.

1 Like