...
OpenXDS provides an open-source XDS.b implementation and is fully IHE certified. It may be possible to reuse elements of this project (perhaps as a library) for helping to implement the OpenMRS module, including especially for features such as metadata validation. Further investigation/prototyping is required.
...