How to create a report with disaggregated data?

Tags: #<Tag:0x00007f0f1ab944e0> #<Tag:0x00007f0f1ab943f0>

Hi all,

Currently, I’m working on my GSoC project with the DHIS2 Reporting module. I need to create a single report using the OpenMRS reporting module which has the following report definitions.

  • Number of cases of confirmed Malaria (Male, Under 20)
  • Number of cases of confirmed Malaria (Female, Under 20)
  • Number of cases of confirmed Malaria (Male, 20–60)
  • Number of cases of confirmed Malaria (Female, 20–60)
  • Number of cases of confirmed Malaria (Male, Over 60)
  • Number of cases of confirmed Malaria (Female, Over 60)

How can I create it using the reporting module?

I tried to do it using Coded Observation Cohort Queries. But I’m not clear about creating disaggregations yet. Could someone guide me on how to create above report?

Note: I added gender and age as an example. There might be many disaggregations. Ex: Gender, Age, diagnosis type, etc.

@akshika47 @dkayiwa @heliostrike @suthagar23 Could you please help me by tagging relevant people to get an answer?

Did you read the full documentation of this module?

Hi @jayasanka, this is the sort of reporting that our OutpatientConsultationReportManager does in Common Reports using CohortCrossTabDataSetDefinition with

  • CodedObsCohortDefinition for the diagnosis rows (see how one row is defined here).
  • AgeCohortDefinition for the age columns (see how one such column is defined here).

The report is actually even a bit more complicated than that since it also does a gender bucketing for each age range.

You can debug/study all this with the test report routine OutpatientConsultationReportManagerTest.

1 Like

Looking closer at your original question, it looks like exactly what you wish to achieve.

One thing though. At the time when we developed this report, diagnoses where recorded as obs, that was before EncounterDiagnosis was introduced in Core 2.2.x. What about your use case, are diagnoses recorded as obs or as encounter diagnoses?

1 Like

Hi @mksd. Thanks for your reply. I will go through it and let you know.

Thanks for the reply @dkayiwa, yes I read the documentation. But I wasn’t clear about creating this sort of disaggregations.

I wanted to create the above report to test disaggregations in the DHIS2 Reporting module. I recorded the diagnosis from the visit page in patient OWA. Is that the correct way to record a diagnosis?

@jayasanka I’m not sure which OWA you refer to, but what version of Core are you using anyway? That would give a strong hint.

1 Like

I’m using v2.3.0.

Btw, this is a screenshot of the UI I mentioned.

That is the Visit Note form that uses the <encounterDiagnoses/> HFE tag. In short those will not be obs but encounter diagnoses.

If we wanted to do things properly, this would require an evolution in the Reporting module to support a new EncounterDiagnosisCohortDefinition, and then adapt the existing report that I pointed you to to combine the new EncounterDiagnosisCohortDefinition + AgeCohortDefinition when running against Core 2.2+.

@mseaton you guys never came across the need to use such cohort definitions yet?