← Back to team overview

dhis2-users team mailing list archive

Re: Cumulative Reporting?

 

Hi Jason,

Happy New Year! Wishing you the best in 2014.

I'm following up on your email below. I'm thinking of going the PL/R route
because I would like to display my cumulative-based report in DHIS rather
than generate it outside of DHIS. I presume that using PL/R, I can write
custom functions within the DHIS database and use them to update a custom
report table that I can use for generating my report from within DHIS. Does
this make sense?

Is there any data dictionary documentation available publicly that
describes all the tables in the DHIS database that I can reference while
writing my custom functions?

Thanks!

Edwin



On Wed, Dec 11, 2013 at 9:54 PM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:

> Hi Eddie,
>
> You certainly could, but there is no way to do this directly with DHIS2 I
> think . You could use windowing functions of Postgresql [0] to calculate
> the cumulative sum, or create your own function with a custom function with
> PL/R which has been described in the documentation outlined here [1]. There
> are various ways to do this in R, either with the base "cumsum" function or
> with more advanced methods in the "timeSeries" package depending on your
> exact needs.
>
> The simplest method however might be to use Excel [2] .
>
> However at the moment, there is no way to do this directly with DHIS2 as
> far as I know. But if others know more direct methods, it would be good to
> know!
>
> Regards,
> Jason
>
>
> [0]
> http://www.postgresonline.com/journal/archives/47-How-to-calculate-Running-Totals-and-Sums-in-SQL.html
> [1] http://www.dhis2.org/doc/snapshot/en/user/html/apcs06.html
> [2]http://support.microsoft.com/kb/214149
>
>
> On Wed, Dec 11, 2013 at 1:50 PM, Edwin Mulwa <eddiemu@xxxxxxxxx> wrote:
>
>> Hi,
>>
>> I would like to create a report that has a field(s) which is a cumulative
>> total calculation involving multiple data elements. For example, I have
>> data elements A and B and I am doing monthly cumulative reporting such that
>> the value for element A in Feb will be the value of A in Jan + the new
>> value for B in Feb, the value for A in March will be the value of A in Feb
>> + the new value for B in March, etc.
>>
>> Can we create such a report in DHIS?
>>
>> Edwin
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

References