I started this week with a working import and export feature with me. But the persisted objects just didn’t work because I was trying to convert them back into original java objects and then use metadata sharing module to save them in the database. This method wasn’t working because when we take a serialized object get the serialized data and convert them back into their original type it doesn’t covert the custom object attributes but just keep them as transient objects. So when these objects are persisted in openMRS they are again converted back into serialized objects. I realized I’m just taking the objects on a lil detour but they anyways end up in the same type in the database level. So without using metadata sharing module or definition services I created a DAO method inside DHIS connector to persist the imported objects as they are without converting them twice back into the same type and it worked. Now it’s working perfecly. I sent a PR with the changes I made and currently it is under review.
DCM 51 Implement sharing DHIS mappings with metadata function- OpenMRS Issues
Powered by a free Atlassian Jira open source license for OpenMRS. Try Jira - bug tracking software for your team.
DCM-51 Implement share DHIS mappings with metadata feature by Gravewalker666 · Pull Request #43 ·…
Purpose fix [DCM-51] Implement sharing DHIS mappings with metadata function Approach Include related metadata as XML…
Here’s a lil demo video on how it works now.
Catcha!! See ya next week, Bye bye