← Back to team overview

dhis2-devs team mailing list archive

Re: New aggregation operators

 

Hi Seid,
This request has come up a few times, in slightly different forms.
Currently, there is no such operator, although it would be useful. How we
have handled it in other implementations is through the use of a custom
script which would populate an additional data element (for instance *Number
of adults and children who are currently on ART - **First Line Regimen
(Last observed) ) *and populate this with the last observed data for a
given time period. The script could be automated to run regularly, so that
the data was always up to date with the last observed value So, if you are
looking at yearly data, you would look back over the last year, and
determine which value had been observed "last", and use this to populate
your new data element (which would have a period type of year).

You would probably need to use a combination of SQL queries combined with
some scripting language (Python, NodeJS, R, etc) to pull the required data
and then submit it back through the API.

Regards,
Jason


On Fri, Oct 9, 2015 at 9:29 AM, Seid Hussein <seid.hisp@xxxxxxxxx> wrote:

> Hi all,
>
> We have a peculiar aggregation need here. I don't know if any other
> country uses it or it is only Ethiopia but here it is.
>
> Consider this data element which is collected monthly:
>
> *Number of adults and children who are currently on ART - **First Line
> Regimen *
>
> When analyzing data for a year, the last month's data shall always be
> taken rather than the summation or average of the data values.
>
> There are a few data elements like this we  capture every month.
>
>
> However, the current aggregation operators cannot handle this. The max and
> the min operators may be the closest ones to handle this (for data that
> increases and decreases over time respectively).
>
> Would it be possible to add one more aggregation operator that always
> takes the last period's value when the aggregation is across periods and
> when it is hierarchically it sums the last period's values of each captured
> data.
>
> Regards,
>
>
> Seid,
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Jason P. Pickering
email: jason.p.pickering@xxxxxxxxx
tel:+46764147049

References