The Blueprint

Jayasanka Weerasinghe
3 min readJul 20, 2020

--

This is the seventh week of my GSoC project. Yet another challenging week of my GSoC journey. The major task for this week was completing the import functionality.

The most challenging part was generating the Data Value templates. Let me explain it quickly,

Let’s assume that we need to disaggregate the Number of confirmed cases of Coronavirus by age and gender. (assume there are three age groups) According to the DHIS2, it structured as below,

Now let’s go through all available combinations. A data value template is a combination of Category — Category Option pairs. Data Value templates act as a blueprint when generating the output.

  • Number of cases of confirmed Coronavirus — Gender = Male, Age = Under 20
  • Number of cases of confirmed Coronavirus — Gender = Female, Age = Under 20
  • Number of cases of confirmed Coronavirus — Gender = Male, Age = 20–60
  • Number of cases of confirmed Coronavirus — Gender = Female, Age = 20–60
  • Number of cases of confirmed Coronavirus — Gender = Male, Age = Over 60
  • Number of cases of confirmed Coronavirus — Gender = Female, Age = Over 60

Just think about the above six combinations as six questions. Each question is for a certain time period. It’s simple as a reporter asking from a hospital,

“Could you please tell me the number of under 20 male cases of confirmed Coronavirus for this month?”

OpenMRS is a medical recording system platform that is widely used around the world. A hospital that uses OpenMRS has enough data to provide answers to the above questions. We can create a new report at OpenMRS to find the answers.

Each element of a report called a ‘Report Definition’. All we have to do is map these Report definitions with DHIS2 data value templates. Then we can send those answers to DHIS2 using a special format.

DHIS2 provides only the relationship between Data Elements and Categories. We have to generate the Data Value Templates by generating possible permutations. I used recursion to achieve it. This is the Pull Request:

So far I have completed up to generating Data Value Templates. Next week I’m planning to finish the mapping part.

I have learned so many things within this 7 weeks of time. Thanks, Google Inc. for giving me this wonderful opportunity!

--

--

Jayasanka Weerasinghe
Jayasanka Weerasinghe

Written by Jayasanka Weerasinghe

A professional key presser who turns characters into interesting web things 🙂

No responses yet