...
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 features such as validation. Futher Further investigation/prototyping is required.
...