Setting up Module Entities for Metadata Mapping & Deploy

I am looking to export integrity checks for the Data Integrity module into a Metadata sharing package, so that it can be distributed to various installations.

What process do I need to follow to be able to export the current integrity check definitions via MDS and deploy them.

It’s quite easy support new types in Metadata Deploy.

Here’s a random example. (This example is in the metadatadeploy module, but you can do this in another module too.)

Adding a new type to Metadata Sharing is more work, and I don’t know offhand if there’s documentation about how to do it or not.

The documentation on the MDS wiki is sparse.

If Data Integrity classes are OpenmrsMetadata then they are most likely visible among types to export when creating a new package.

MDS uses a similar idea of handlers as Metadata Deploy. They are capable of fetching items/persisting items/resolving conflicts/etc. There is OpenmrsMetadataHandler, which tries to do best working with OpenmrsMetadata, but sometimes more handlers are needed. Please see this attempt at supporting ReportingDefinitions.

All possible handler types are listed here. Depending on your model you may need to implement one or more of them. I’m happy to answer any further questions.

@raff You are very right, the class that I want to export already appears in the packages to export - so I will set some data and share it to other models - totally awesome - another gem found in OpenMRS :slight_smile: