← Back to team overview

dhis2-devs team mailing list archive

[Bug 494408] [NEW] Aggregation of totals in data element report tables does not work

 

Public bug reported:

Report tables -> Data element report tables
(only affects data element with categorycombos not set to default)

For data element with categorycombos (dimensions) the aggregation of the
total for the data element in data element report tables is not working.
The total value for a data element does not match the sum of all the
values for the "data element + catoptioncombo" combinations. It is from
it in fact and seem to pick just a few of the catoptioncombos (and it is
not 0 or NULL).

This does not affect the datamart because there all values are raw and
include the catoptioncombo. If you do a manual group by data element
there you can easily find the correct total.

You can all have a look at the online demo under report tables. I have created two tables to illustrate this problem:
1) Malaria morbidity total
2) Malaria morbidity by gender and age

Both tables are for the Sierra Leone orgunit, March 2009 and for the
data element called Morbidity_Malaria.

If you click on the symbol for HTML, Excel or CSV export of the tables
you can see that the total of Malaria cases in Sierra Leone according to
table 1) is 835, and in table 2) you can see that the raw values
(catoptioncombos) are much higher, and although the total is not listed
here (subtotals and total are only seen in the database so far) a rough
calculation I did ended up around 55000 cases of malaria, and clearly
not 835.

I discovered this bug when I was working on a small test database I have so it does not seem to be related to the specific database of SL.
Could it be related to the newly introduced fix to hibernate mapping of catoptions and categories or something like that?

** Affects: dhis2
     Importance: High
         Status: New

** Changed in: dhis2
   Importance: Undecided => Critical

** Changed in: dhis2
   Importance: Critical => Undecided

** Changed in: dhis2
    Milestone: None => 2.0.3

** Changed in: dhis2
   Importance: Undecided => High

-- 
Aggregation of totals in data element report tables does not work
https://bugs.launchpad.net/bugs/494408
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.

Status in DHIS 2 - District Health Information Software: New

Bug description:
Report tables -> Data element report tables
(only affects data element with categorycombos not set to default)

For data element with categorycombos (dimensions) the aggregation of the total for the data element in data element report tables is not working. The total value for a data element does not match the sum of all the values for the "data element + catoptioncombo" combinations. It is from it in fact and seem to pick just a few of the catoptioncombos (and it is not 0 or NULL).

This does not affect the datamart because there all values are raw and include the catoptioncombo. If you do a manual group by data element there you can easily find the correct total. 

You can all have a look at the online demo under report tables. I have created two tables to illustrate this problem:
1) Malaria morbidity total
2) Malaria morbidity by gender and age

Both tables are for the Sierra Leone orgunit, March 2009 and for the data element called Morbidity_Malaria.

If you click on the symbol for HTML, Excel or CSV export of the tables you can see that the total of Malaria cases in Sierra Leone according to table 1) is 835, and in table 2) you can see that the raw values (catoptioncombos) are much higher, and although the total is not listed here (subtotals and total are only seen in the database so far) a rough calculation I did ended up around 55000 cases of malaria, and clearly not 835.

I discovered this bug when I was working on a small test database I have so it does not seem to be related to the specific database of SL.
Could it be related to the newly introduced fix to hibernate mapping of catoptions and categories or something like that?





Follow ups

References