Module Update with OpenMRS Add Ons
Week 8 [July 17, 2017 — July 24, 2017]
I spent this week with SysAdmin OWA. Because there are some problems encountered according to the module updates. When User trying to check the module updates, It shows some unexpected error,

My mentor asked me to investigate this problem and find some solutions to avoid this problem.
Here I have used modules.openmrs.org to retrieve the required module information. There is a REST endpoint which can be used to get the module details from the online server. This REST endpoint will give us these following details,
- Module download URL
- Module Name
- Current/Latest version of the Module
- Module Owner/Creator
- Module description
The final REST response will be like this,

REST End point already developed with some different kind of metadata. They have used UID to indicated the module. But for some modules, those defined UID in the REST endpoint was different from actual UID in the system. So when I am trying to get details using actual UID, It’s response to the user as Error. This is the reason for this problem

OpenMRS | Add Ons
OpenMRS Community is going to retire the modules.openmrs.org platform. They are developing OpenMRS Add Ons Platform which can be used instead of modules.openmrs.org.

Adding user’s module to Add Ons for indexing is as easy as creating a pull request! Before they do that, they need to ensure that their module has been hosted on one of the sites that Add Ons currently supports indexing from:
1. Bintray
2. modules.openmrs.org
Once they have confirmed the above prerequisite, they can head over to the Publishing an Add on document on Github which contains a comprehensive list of steps.
Using OpenMRS Add Ons for Updates Purpose
After some discussions about the current UID problem with my mentor Daniel, There is another precious Idea mentioned by Darius in my talk thread. That is using OpenMRS Add Ons platform instead of module.openmrs.org platform.
OpenMRS Add Ons platform already contains some REST Endpoints which are based on module.openmrs.org. It can be used to get information about the modules using moduleID which is similar to the actual module’s package name.
https://addons.openmrs.org/api/v1/{moduleID}But for some modules, I can’t get details for some modules using their package name
I can get details using package name(or UID) for some modules,
- Atlas Module (package : org.openmrs.module.atlas ) — URL : https://addons.openmrs.org/api/v1/addon/org.openmrs.module.atlas
- UI Commons Module (package : org.openmrs.module.uicommons ) — URL :https://addons.openmrs.org/api/v1/addon/org.openmrs.module.uicommons
But I can’t get modules details for this module using package name or UID
- Legacy Module(package name : org.openmrs.module.legacyui ) :
Original URL : https://addons.openmrs.org/api/v1/addon/org.openmrs.module.legacy-ui-module1 - Data Exchange Module (package name : org.openmrs.module.dataexchange)
Original URL : https://addons.openmrs.org/api/v1/addon/org.openmrs.module.data-exchange-module
Here the problem is, They have predefined those UID which is similar to the module’s package name but It differed to some modules. Predefined module data JSON file is given below,
So after some discussions with Darius, He promised to provide another REST endpoint which can be used with actual module package names. The REST endpoint will be like this following,
https://addons.openmrs.org/api/v1/addon?type=OMOD&modulePackage={x}So I am waiting to that REST endpoint to complete the Updates part in SysAdmin OWA.
Follow this talk thread to get more information and discussions about the module update using OpenMRS Add Ons.
