As part of the OpenHIE initiative, OpenMRS will be able to support the parsing of CDA documents into OpenMRS domain objects.
However, we are yet to identify the best approach to support the parsing of OpenMRS domain objects into a CDA document.
In 2012, OpenMRS introduced the HL7 Query module, which allows users to export OpenMRS data in the form of hl7 v2 data. The hl7 messages are generated based on groovy templates, which are created by administrators, and populated with data based on requests made by users.
Given that OpenMRS is taking steps towards supporting HL7 v3, there is benefit in developing an alternative module which uses a similar approach to generate CDA documents based on the user's requests.