Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
DHIS mappings are created in OpenMRS instances to keep information about how period indicator reports are mapped with DHIS data elements. Previously the DHIS connector module had the functionality to export these mapping files but they were not usable in different OpenMRS instances because the mapped period indicator reports are required to be present in the system. Thus this project was proposed to introduce a new feature to bundle up period indicator reports and other underlying reporting metadata with the DHIS mappings on the mapping export and import the same type of bundles back in.
The metadata that is exported with the mappings include,
The cohort queries may belong to the indicator or the dimension or the period indicator report itself if that report indicator is made with a cohort query.
These reporting metadata are ultimately stored inside OpenMRS as serialized objects in the SerializedObjects database table. To provide a solution for the exporting objective, the serialized objects table was queried by making a function in the hibernate implementation file and the content was written into XML files in order for them to be able to be downloadable files.
Another function was written to get the imported XML files as a multipart file and extract it and then convert the XML files into serialized object java data types and pass down to the DAO layer, where another hibernate function has been implemented to save the serialized objects into the corresponding table.