GSoC 2021: Improving Functionalities of DHIS Connector Module - Project Updates

Hi! I have been selected for Google Summer of Code 2021 to work on the project “Improving Functionalities of DHIS Connector”. So I’ll be using this thread for the discussions and updates of the project.

I have scheduled the first weekly meeting for the project on 2021-05-22T11:30:00Z (Link)

Project Details:

  • Name: Improving Functionalities of DHIS Connector Module
  • Primary Mentor: @akshika47
  • Backup Mentor: @k.joseph


  1. Project Proposal: Piumal Rathnayake - GSoC Student Application - Google Docs

  2. Thread used for requirement gathering: GSoC 2021: Improving functionalities of DHIS Connector module

  3. Github repo of the module: GitHub - openmrs/openmrs-module-dhisconnector

  4. Project on GSoC Dashboard:


Welcome to the program @piumal1999! Looking forward to a great Summer of coding :slight_smile:

congrats @piumal1999 i don’t work on Saturday and generally the weekend. if u desperately need me on the call, move it on working days

Oh. I’ll try to change the date and time after this week’s meeting and let you know. Sorry for the inconvenience.

1st Weekly Meeting - 2021-05-22T11:30:00Z

Attendees: @piumal1999 @akshika47 @jayasanka


  • Briefly explained about the project and what I hope to do
  • @akshika47 suggested to find the current OpenMRS implementors who uses both Openmrs and DHIS2
  • And it’ll be better if we can find some kind of local organisation to implement and test the module
  • Discussed about the different technologies used in automation UI and the rest of the module. (Database and file structure etc.)
  • For storing location mappings, the database will be better than the file system.
  • @jayasanka Suggested to study the OpenMRS Reporting module in order to create a proper set of data
  • @jayasanka Suggested to update the Readme file of github repository with the recent updates

Next steps:

  • Finding a way to contact the openmrs implementors who need to integrate it with DHIS2
  • Creating a set of demo data using reporting module
  • Updating the Readme file in github repository
1 Like

2nd Weekly Meeting - 2021-05-29T11:30:00Z

Attendees: @piumal1999 @akshika47


  • Discussed about the updates of last week:
    • Created a dataset in DHIS2 and period indicator report in OpenMRS
    • Created a table for location mappings using the module
    • Gathered a list of openmrs implementors and their contact details using the openmrs atlas
    • Updated the file of the module (couldn’t mention it in the meeting)
  • @akshika47 suggested to use an remote server to run the openmrs instance. So it will be easy to evaluate the progress. No need to add CI/CD
  • @akshika47 suggested to create a proper timeline with specific measurable tasks.
  • It’s better to come up with a blog post about creating datasets and period indicator reports.
  • Discussed about the additional things can be done during the community bonding period

Next steps:

  • Creating a timeline for the entire project according to the priority of each task
  • Write a blog post about dataset and period indicator report creation (work i did last week)
  • Work on a draft email/google form to send to the openmrs implementors to find the users of the module
1 Like

3rd Weekly Meeting - 2021-06-05T11:30:00Z

Attendees: @piumal1999 @akshika47 @jayasanka


  • Reviewed the timeline

  • Discussed about deploying a openmrs instance in a virtual machine for testing

    • Aws and Google cloud had few problems
    • agreed to use digital ocean free trial
  • @piumal1999 did a small demo of 2 location mapping ui layouts

    • Adding location mappings one by one
    • Setting all the mappings at once
    • @akshika47 suggested to create a thread for the design wireframes to get the ideas of others
    • @jayasanka mentioned that there’s location mapping feature in dhis2 reporting module. Need to check that too.
  • @jayasanka suggested to check whether the automation process is working properly

  • Need to test the module with larger reports. Contact the analytics squad

  • Need to validate the relationship between openmrs location and dhis2 org unit

  • Additional: need to arrange a meeting to plan the presentation on DHIS2 Conference

Next steps:

  • Share the wireframes of location mapping UI and get the feedbacks

  • Work on the save/update location mapping functionality

What i already have is a simple period indicator report with only 6 indicators created with dimensions.

Screenshot 2021-06-07 at 13.07.21

Screenshot 2021-06-07 at 13.08.40

It’s better to have a larger period indicator report for future usage. So which squad should I need to contact to request such a report?

cc: @grace

1 Like

2021-06-07T18:30:00Z Update:

I tried to implement the location mapping UI using a layout in this thread . Perviously I was able to create a table in the database to store location-orgunit mappings. Today i tried to implement the basic functionality of location mapping UI, and it was successful.

A small preview (gif):



2021-06-08T18:30:00Z Update:

Had a meeting with @k.joseph to discuss the updates and issues.


  • @piumal1999 Briefly explained the objectives and plan of the project
  • Showed the layouts created for the location mapping UI
  • Showed the preview of location mapping UI which I tested
  • @k.joseph made some suggestions for the new features:
    • Location Mapping:
      • Location and orgunit selection can be added to the create mapping UI to save in the report to dataset mapping file itself if needed. Also can be done as in the proposal.
      • Feel free to update the UI
      • Remove unwanted columns from the location mapping table (created_date, created_by)
      • Use the saved information to autofill the run-reports UI (location and orgunit)
    • User Privileges:
      • No need for a separate privilege for import/export
      • It’ll be better if we can create a privilege for metadata maintenance
    • Automation UI
      • Add enable/disable automation option for every mapping
    • Configure Server UI
      • Can add a status check button
    • Further enhancements
      • mADX support
  • Discussed about creating a test dataset.
  • @k.joseph sent a previous demo video of DHIS Connector module
  • Create tickets for the errors and issue

4th Weekly Meeting - 2021-06-12T11:30:00Z

Attendees: @piumal1999 @akshika47


  • @piumal1999 gave the weekly update:
    • Deployed openmrs in a remote server, so the mentors can see the progress
    • Created a thread with location mapping UI layouts
      • decided to proceed with the layout I already implemented
    • Discussed the things suggested in the call which I had with the secondary mentor @k.joseph
    • Implemented the save/update location mappings feature
  • Implemented location mapping UI takes some time to load
    • Need to optimize the process
  • Create the set of issues in JIRA
    • It’s better to divide the issues into sub-issues
  • Start sending pull requests this week

Next steps:

  • Create issues and send a Pull request this week
  • Optimize the location mapping UI
  • Work on the Run Report UI
    • Get the list of available orgunits of the selected report (dataset) using DHIS API
    • Update the UI according to that

cc: @akshika47 @k.joseph


2021-06-12T18:30:00Z Update

Today I was able to fetch the mapped locations of the Report-DataSet mapping using the DHIS2 API. It was a required thing for the location mapping feature.

  • Every Report to Dataset Mapping consists of and OpenMRS period indicator report and a DHIS2 Dataset
  • Every DHIS2 Dataset have a set of organisation Units
  • I used DHIS2 API to fetch the organisation units list of the DHIS2 Dataset
  • Got the mapped location using the location_mapping table
  • Displayed those in the run reports UI when the report and mapping is selected

Screen Recording 2021-06-14 at 00.29.37


2021-06-16T18:30:00Z Update

Hi, I created an Epic on JIRA for the location mapping feature and added 1 task to that. The task I added was “Generating the required tables for the location mapping feature”

I also created a draft PR for that.

@akshika47 @k.joseph @jayasanka Could you please review the issue and mark it as ‘available for work’.

Btw, I continued testing the Run Reports UI with automated Location-OrgUnit selection.

1 Like

I found that keeping the location UUID in the location_to_orgunit would be useful than keeping the location id in that table because the openmrs rest API works with the location UUID (not the location id). So I tried updating the table, but the reference application crashed for some reason. So I reinstalled the reference application using the SDK, but after that, it keeps throwing exceptions. (It crashes after the initial setup page) error log -

cc: @akshika47 @k.joseph

Update: I think these errors are caused by something wrong with the webModuleApplicationContext.xml of every module

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name '' defined in URL [jar:file:/home/user/openmrs/myserver/.openmrs-lib-cache/!/webModuleApplicationContext.xml]: Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of type 'com.sun.proxy.$Proxy447 implementing org.openmrs.api.OpenmrsService,org.springframework.aop.SpringProxy,org.springframework.aop.framework.Advised,org.springframework.core.DecoratingProxy,,org.springframework.transaction.interceptor.TransactionalProxy' to required type '' for property 'restHelperService';

Update 2: Fortunately I had a copy of module .omod files saved on my pc. I replaced the modules with it and the reference application is working now😅

No need to do that. we can fetch the locationUuid from the location object because we are using hibernate.

Weekly Update - Week 2

From 2021-06-12T18:30:00Z to 2021-06-18T18:30:00Z


Non Related:

  • Had some errors when reinstalling the reference application.
    • I’ll create a thread with the error log

Next week:

  • Create issues for supporting remaining period type
    • We already have a JIRA Epic for extending period support
  • Getting the Pull request merged
  • Send pull request for initiating location mapping UI
  • Try to optimize the location mapping updating functionality
  • Finding a solution for the rest web services API 500 error

cc: @akshika47 @k.joseph

1 Like

2021-06-20T18:30:00Z Update

I created a set of JIRA issues for the Extended Period Support feature. And I added those issues to the “Support all available period types in DHIS2” Epic. All those issues are about extending period support in Automation UI. Also I created a JIRA issue for the task “Initiating the location mapping UI”.


So @akshika47 @k.joseph , could you please check them and mark those as available for work. Let me know if I have to change anything.

I Tested the “Reporting REST throws 500 when getting Evaluated Report Definition” issue on and the issue is in there also. Couldn’t find the reason yet.

And thank you @herbert24 for reviewing my pull request on location mapping database generation. I think it can be merged now. (cc: @akshika47 @k.joseph @jayasanka )

Thank you for the update @piumal1999 !

@k.joseph can you provide me access to the DHIS2 Connector module on Jira?

if possible the Git repo as well.

Thank you!

1 Like

@jayasanka can be of help with jira, it seems you already have github access

Hi, I have created an Issue for initiating the location mapping User interface. It’s for creating the DTOs, and displaying the mapped location-orgUnit sets according to the layout we discussed previously. Could you please mark it as available for work, so i can send the Pull Request.

cc: @akshika47 @k.joseph @jayasanka