Metadata Sharing Module

Contacts: Rafal Korytkowski, Darius Jazayeri, Piotr Bryk


The Metadata Sharing Module allows all kinds of metadata (concepts, htmlforms, locations, roles, programs, etc.) to be exchanged between different OpenMRS installations. It supports metadata defined in the core as well as in modules provided appropriate handlers are registered. Conflicts between local and incoming metadata can be identified and resolved. The module can be used both through an API and a web interface.

Any dependent metadata will be packaged along with the selected item. For example, if you select a concept which has coded answers, it will package the initial concept along with all the coded answer concepts, class and datatype. If you select an htmlform, it will package the form along with the encounter type, all concepts used on that form, etc.

Release Notes

See release notes in JIRA.

  • Added support for OpenMRS Platform 2.0
  • Dropped support for OpenMRS 1.8.x and below
  • Bug fixes
  • Bug fixes
  • Bug fixes around sharing Concepts
  • Added support for the Facility Data module
  • Added support for Tomcat 7
  • META-297: Unable to import metadata sharing package with Role
  • Support for Publishing/Subscribing Dictionary modules
  • Extracted mapping functionality to the Metadata Mapping module (required module)
  • Bug fixes around importing/exporting concepts
  • Converting concepts between OpenMRS 1.9 and earlier versions
  • Bug fixes related to importing/exporting concepts with mappings in OpenMRS 1.9
  • Added support for concepts in OpenMRS 1.9 (note you need to upgrade to 1.9.1 rev:28634)
  • Improved support for OpenMRS 1.9 in general
  • IMPORTANT UPDATE: Fixes OpenMRS auditing (date_changed, changed_by, etc., did not get updated) and incompatibility with the sync module, which was broken for versions 1.0.3, 1.0.4, 1.0.5. Please update as soon as possible.
  • Sharing Concepts between OpenMRS 1.6 and 1.7/1.8
  • Preserving IDs if possible and requested
  • Custom import modes
  • Subpackages for 1000 items and more
  • Exporting packages on-the-fly
  • Improved search (searching by ids, enhanced performance)
  • Disabling mapping incoming Concepts to local Concepts upon import
  • Finding matching Concepts based on Concept mappings.
  • Creating new versions of metadata packages
  • Publishing/Subscribing to metadata packages through RESTful web services
  • Automatic notifications about package updates
  • Adding mappings of a chosen Concept Source to Concepts upon export 
  • Mapping incoming Concepts to local Concepts upon import
  • Overwriting local metadata with incoming metadata
  • Replacing incoming metadata included in a package with local metadata
  • Validating existing metadata upon export
  • Validating existing and incoming metadata upon import

Planned features:

type key votes priority summary status

Unable to locate Jira server for this macro. It may be due to Application Link configuration.

If you would like to request a new feature which is not listed above, please create an issue in JIRA. Click here (You need to be logged in with your OpenMRS ID).


Download and install the latest version (v1.3).

The module is under heavy development and it is best to use the latest available version with all bug fixes.

Download older versions from the module repository.



This version to work correctly requires OpenMRS 1.9.1, 1.8.4, 1.7.4 or 1.6.6. Packages exported with this version are not backwards compatible. Packages exported with previous versions cannot be imported with this version.


This version will work correctly with the same OpenMRS versions as version 0.9.x. Packages exported with this version are entirely compatible with 0.9.x.


For the module to work correctly you need to run OpenMRS in either of the following versions: 1.6.4 Build 21295+, 1.7.3 Build 21294+, 1.8.1 Build 21293+.

As of the 0.9 version of the module to import/export HtmlForms you need HtmlForm Entry Module in version 1.8 or later.


OpenMRS 1.6.3+ (1.7.x and later were not tested)

In order to import/export HtmlForms you need HtmlForm Entry Module in version 1.7.2.


  1. MySQL error ‘Packet too large’ – set MySQL variable max_allowed_packet=16M details
  2. Import fails with ConcurrentModificationException and the following stack trace:

    SEVERE: Servlet.service() for servlet openmrs threw exception
    	at java.util.HashMap$HashIterator.nextEntry(
    	at java.util.HashMap$
    	at org.openmrs.api.handler.ConceptNameSaveHandler.handle(
    	at org.openmrs.api.handler.ConceptNameSaveHandler.handle(

    It is a known bug in OpenMRS (TRUNK-2428). You need to update OpenMRS and use one of recommended versions (see #Requirements).

  3. Import fails with Column 'concept_name_id' cannot be null:

    Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'concept_name_id' cannot be null
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at sun.reflect.NativeConstructorAccessorImpl.newInstance(
    	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
    	at java.lang.reflect.Constructor.newInstance(
    	at com.mysql.jdbc.Util.handleNewInstance(
    	at com.mysql.jdbc.Util.getInstance(
    	at com.mysql.jdbc.SQLError.createSQLException(
    	at com.mysql.jdbc.SQLError.createSQLException(
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(
    	at com.mysql.jdbc.MysqlIO.checkErrorPacket(
    	at com.mysql.jdbc.MysqlIO.sendCommand(
    	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
    	at com.mysql.jdbc.ConnectionImpl.execSQL(
    	at com.mysql.jdbc.PreparedStatement.executeInternal(
    	at com.mysql.jdbc.PreparedStatement.executeUpdate(
    	at com.mysql.jdbc.PreparedStatement.executeUpdate(
    	at com.mysql.jdbc.PreparedStatement.executeUpdate(
    	at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(
    	... 121 more
    	at org.openmrs.module.metadatasharing.reflection.OpenmrsClassScanner.invokeServiceSaveItem(
    	at org.openmrs.module.metadatasharing.reflection.OpenmrsClassScanner.serviceSaveItem(
    	at org.openmrs.module.metadatasharing.handler.impl.OpenmrsObjectHandler.saveItem(
    	... 53 more

    You need to upgrade OpenMRS to 1.9.1 rev:28634, 1.8.4 rev:28650, 1.7.4 rev:28651, 1.6.6 rev:28652. See TRUNK-3626.

  4. Other known issues which have not been fixed yet:

    type key votes priority summary status

    Unable to locate Jira server for this macro. It may be due to Application Link configuration.

    If you found a bug which is not listed above, please report it in JIRA. Click here (You need to be logged in with your OpenMRS ID).

User's Guide

User's Guide for Metadata Sharing Module

Technical Details

Technical Details for Metadata Sharing Module

Other Resources