← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] HELP with program indicator/report

 

Hi there Georgi,
We do not have a function that does exactly what you asked for, but hopefully we can find a way if we examine the data elements in your stages. Do the stages have a data element that is mandatory, or at least so pivotal that you can sue that data element to determine wether the event should be counted? If so I'd recommend looking at a program indicator with the analytics type enrollment. With this strategy you can make four program indicators that fullfills the explicit requirement for 1, 2, 3 and 4 stages:
Just first stage:
d2:hasValue(#{stage1.dataelement}) && !d2:hasValue(#{stage2.dataelement}) && !d2:hasValue(#{stage3.dataelement}) && !d2:hasValue(#{stage4.dataelement})
Just first and second stage:
d2:hasValue(#{stage1.dataelement}) && d2:hasValue(#{stage2.dataelement}) && !d2:hasValue(#{stage3.dataelement}) && !d2:hasValue(#{stage4.dataelement})
..and so on.

With the above strategy you would find every tracked entity that has followed the expected sequence of events. If you have any requirements for how to count the possible cases that deviates the normal(just stage 1 and 3 for example), the expressions might look different.

If there is no data element that you can use to proxy the presence of events, you will need a new function for checking events regardless of data. In that case, please report this as a Jira issue.

Markus

> 25. aug. 2017 kl. 12.11 skrev Georgi Chakarov <georgi@xxxxxxxxxxxxxxxxxxx>:
> 
> Hello all,
>  
> I have a tracker program with 4 consecutive non-repeatable stages. Each new stage is created after completion of the previous stage.
> I am trying to create a report/program indicator that counts the tracked entities at their latest stage. In other words, I want to know how many tracked entities I have at each stage without double counting.
>  
> For example, I have 10 tracked entities each of them starting at stage I. 2 tracked entities progressed at stage II , 2 progressed at stage III and two progressed at stage IV.
> My report should show (program indicator should calculate) that 4 tracked entities are still at stage I, 2 are in stage II, 2 are in stage III and 2 are in stage IV.
>  
> Do you have any idea how to build this one?
>  
> Georgi
>  
>   
> Georgi Chakarov, CIA | georgi@xxxxxxxxxxxxxxxxxxx <mailto:georgi@xxxxxxxxxxxxxxxxxxx> | +1-647-478-5634 x 104 | LogicalOutcomes c/o Centre for Social Innovation, 720 Bathurst Street, Toronto Canada M5S 2R4 | You may unsubscribe from receiving commercial electronic messages from LogicalOutcomes by emailing info@xxxxxxxxxxxxxxxxxxx <mailto:info@xxxxxxxxxxxxxxxxxxx>
>  
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users <https://launchpad.net/~dhis2-users>
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx <mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~dhis2-users <https://launchpad.net/~dhis2-users>
> More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>