Sunday, May 20, 2012

Metadata Sharing with OpenMRS 1.9

I included some use of the Metadata Sharing module in my end-to-end demonstration last week, but it was partly cheating because I only included Encounter Types and Visit Types in the package, and didn't include Concepts, which haven't yet been shown to work with OpenMRS 1.9.

Hey, one thing at a time.

So I just made a MDS package out of the "Vitals" HTML Form that I used for the screenshots in my last blog post. This includes concepts in it for testing purposes. (Though in practice we'll be writing our forms against MVP/CIEL dictionary codes, so our forms won't actually need to include concepts when we push them to production. We'll be pushing out the updated MVP/CIEL dictionary to our production installations some other way.)

Trying to import that package I ran into two bugs (but only two!):

  1. META-226 - getDeproxiedClass does not work right in OpenMRS 1.9
  2. META-227 - Starting in OpenMRS 1.9 you are not allowed to modify ConceptDatatypes, so we need to stop exporting/importing them
After fixing the first bug, and putting in a quick-hack workaround for the second, I was able to successfully import the MDS package.

I'm glad it was that straightforward, and we're closer than I thought to being able to use MDS with OpenMRS 1.9 for our use case. (To be fair, the database I exported from didn't have any concept mappings on the exported concepts, and I'm pretty sure those would break with a third, more significant, bug. But also to be fair, as long as we can hand-wave and say that we'll be able to update the MVP/CIEL dictionary "some other way", we won't need to deal with this.)


  1. How do install the Kenya EMR metadata? and why can they be found?

  2. Good question! I saw an answer from Darius in this thread:!topic/implementers/xKSNgolkudQ