Friday, September 28, 2012

Build a complex OpenMRS system as a team

On this project we're building a set of integrated modules, and we expect all devs to be running nightly builds of them:

  • mirebalais
  • emr
  • pacsintegration
  • patientregistration

We're also depending on other OpenMRS modules that we usually use official released versions of, but occasionally we need nightly/snapshot builds. We're currently using snapshots of idgen (waiting for 2.4) and metadatasharing (waiting on META-264).

We also have quite a few devs working on this project. And this is the first time we really have multiple devs working on multiple interrelated modules. (We've had multiple devs working on a single module, and one dev working on overlapping modules, but this project combines the two!)

The lesson learned:
Don't ask every dev to always be get and build updated code for 4+ maven projects. Instead have the CI server deploy snapshot versions of those modules to a snapshot repo. (We're using the OpenMRS nexus one.)

So, if I'm working on one aspect of the code, I do a "mvn install" and it fails due to a change someone else has made in one of the modules I'm not working on at the moment, I would immediately just try "mvn install -U" (that forces an update of snapshots), and generally that will work.

Friday, September 21, 2012

More CI

Sorry for the lack of updates recently, we've been struggling with a bunch of software integration issues that are really not so interesting to blog about.

But finally, for the first time, we have all our modules in CI, and passing!

What we were hung up on:

We've got a showcase coming up on Tuesday where we want to show both the Patient Registration module, packaged up for Mirebalais, and a proof-of-concept of sending messages to a PACS server, so...back to work!

Thursday, September 13, 2012


One software development best-practice is that the first thing you do on a project is set up Continuous Integration or CI.

The idea is that every time a developer commits any code, all components of the project are built and "integrated" together, tests are run, and any failures are reported. As a result, if I make a change to one part of the project that happens to break a different part, I am notified within minutes, so I can fix it ASAP, before it inconveniences the other developers.

So, on this project we were slightly behind in getting this set up, but we're moving on it now:

Expect to see an automatically-updated demo server soon. It will initially be very boring, since the point is to do CI set up before you have any actual functionality. :-)

PS- As a dev-ops note, when you configure Bamboo to use maven on Ubuntu 12.04, you should set the path to "/usr/share/maven", and not to "/usr", because while both of these have the maven executable at the relative path of "bin/mvn", only the first is the proper maven home directory.

Tuesday, September 11, 2012

Distribution vs Single Installation

A random developer note:

While dicussing CI today, I noticed a key difference between the work I did on the Kenya EMR project, and what we're doing for Mirebalais: Kenya EMR was really about being an OpenMRS distribution, whereas Mirebalais is a single installation.

In Kenya EMR I did a bunch of work around having a maven target that fetched all module dependencies to produce a single zip file that could be distributed to a very large number of servers.

In Mirebalais the point is to use a CI/CD approach to maintain a small number of demo and production servers directly, without the need for a distributable artifact.

Nothing earth-shatteering, just this hadn't occurred to me before.

Saturday, September 8, 2012

Haiti Trip, August 20-24

Two weeks ago, Evan, Neil, Emerson, and I kicked off this project with a launch trip to Haiti.  While Evan has traveled to our Haiti sites many times, it was the first visit for the rest of us.  Brittany Eddy, our Haiti Informatics Project Coordinator, did a wonderful job of accompanying us throughout the visit – arranging tours and interesting conversations with a variety of stakeholders, and ensuring we were fed, rested, and transported around when needed.  Below, I’ve outlined a few of our primary objectives for the trip, explained how we accomplished these objectives, and added in some photos to paint a picture of the experience.

Seeing our sites in action drove home a lot of what I’ve learned at PIH about the immense challenges our colleagues face daily providing high-quality care in rural Haiti.  Observing the determination of our providers and the vibrancy of the communities with which we work set the stage for our team to return to Boston eager to jump into the Project Inception week (photos here, and described by Darius in an earlier post), communicate what we learned with the rest of the group, and begin building our - dare I say it - audacious EMR.


What: Gather context on current service delivery in Haiti
  • Visited two Zanmi Lasante sites - Lacolline Hospital and Cange.  Cange is PIH’s original site, and Lacolline is the site currently managing our patient registration module pilot (keep an eye out for future posts on this project).
  • Engaged in conversations with physicians and nurses about how care currently happens and how patients access our existing hospitals and clinics.

In Action:
Patient registration at Lacolline
Paper archives at Lacolline
Pharmacy window at Cange
Queue for registration at Lacolline

What: Understand expected Mirebalais Hospital patient flows
  • Took an extensive hospital tour with Dr. David Walton.
  • Shot numerous photos and videos of the buildings.
  • Mapped standard patient visit processes to identify data collection points.

In Action
Mirebalais Hospital Tour
Mirebalais Ward

What: Gather clinical requirements
  • Met with physicians, nurses, laboratory technicians, pharmacists, security managers, and administrators about their daily tasks, biggest challenges, and hopes for how an electronic system could support their responsibilities.
  • Considered important clinical indicators reported from our sites.
  • Discussed common scenarios during routine and emergency care in rural Haiti.

In Action:
Pharmacy at Lacolline
Lab at Lacolline

What: Begin prioritization of requirements
  • Gathered feedback on our own synthesis of clinical requirements.
  • Asked stakeholders to choose requirements for our Minimum Viable Product – termed “MVP”
  • Encouraged collaboration and healthy debates over components of the MVP.

In Action:
Lauren Spahn, Naomie Marcelin, Pierre Paul, David Walton, Evan, Emerson, Neil

Thursday, September 6, 2012

Visas and Flights

Two things:

  1. I can't say enough good things about Kayak, but when you're trying to fly SEA-POA-MNL-SEA, you really need a travel agent. :-)
  2. Brazil's "reciprocity" approach to visas is endearing, and I support the concept. But I'd really like to get those hours of visa paperwork back.
Regularly scheduled programming will resume tomorrow. Hopefully we'll have something interesting to say about putting several dependent OpenMRS modules into CI.

Tuesday, September 4, 2012

Dev links

A few links for devs:

Inception (not the movie)

To give a quick picture of where the project stands...

Two weeks ago Evan, Renee, Emerson, and Neil spent a week in Haiti, visiting existing ZL hospitals, as well as the grounds of Mirebalais, meeting staff to develop user personas, and a tentative project road map. I'll let them share more details, including Renee's great video walkthroughs, showing the outpatient and women's health workflows from a patients-eye perspective.

Then we got our whole team together for a week in Boston, to do an "Inception" for the project. You could call it a "quick-start" or a "kick-off" if you prefer. Or you could think of it as...

These people...

Working by day...
And by night...

To produce a lot of sticky notes and index cards...

This week and next are "Iteration 0," as the BAs pull together all this information, and we get our development processes and continuous integration set up. So, expect to see lots of development ramp up in a couple of weeks.

If you really want all the details, watch PIH's github repositories. :-)

Hello, world!

Hello, world!*

Partners In Health and its sister organization Zanmi Lasante are building a state-of-the-art teaching hospital in Haiti, l'Hôpital Universitaire de Mirebalais. As part of our push to bring the highest level of care public facility in Haiti, we are building an OpenMRS-based Electronic Medical Record for the hospital.

The Mirebalais EMR will draw on the PIH informatics team's extensive history building medical record systems for developing countries, as well as recent work on packaging an EMR for I-TECH and the Kenyan Ministry of Health.

Further, to deliver the best possible software product, in the shortest possible time, we are partnering with the Porto Alegre, Brazil office of ThoughtWorks, experts at agile development of custom software with a passion for social justice.

This blog will narrate the software development collaboration, so you'll surely see mockups, screenshots, and code snippets. But we promise to have less nerdy content as well!

* = "Hello, world!" is the prototypical output of the first program you would ever write as a software developer in a new programming language, or framework.