← Back to team overview

dhis2-users team mailing list archive

Re: Tracker Indicators not working as expected

 

Hi there,
you want to make an indicator that compares the dates from two different events within the same enrollment. Unfortunately the program indicators is at the moment only capable of comparing data within one event.

Is it a possibility to use the incident date or enrollment date as the admission date? You would be able to create a program indicator that compares these dates with the discharge date of the second program stage. 
> d2:daysBetween(Admission.Date of admission,Discharge.Date of exit)

could be rewritten to:

d2:daysBetween(V{incident_date},#{dataelement for exit date})

to make it perfect you would probably also run a filter so you only count the discharge events. 

Best regards,
Markus

> 1. jun. 2016 kl. 10.56 skrev Sultanahamar Mohammad <sultanm@xxxxxxxxxxxxxxxx>:
> 
> Team,
> 
> We created indicators for a tracker program which calculates the average length of stay.
> We have two stages one for admission and the other for discharge. Admission has a data element for admission date and discharge has got one for discharge date. After this, we have created a indicator which is of Aggregation type average and the indicator being daysbetween discharge date and admission date. We can see the indicator with correct value while filling the tracker data entry form. But in Dataviz app, when we create a chart, it is showing it as 0. We tried other simple indicators which would count the number of events and they are all working fine. We have run Analytics tables also. Could you please let us know on what are we missing.
> 
> Expression description
> d2:daysBetween(Admission.Date of admission,Discharge.Date of exit)
> 
> we have tried the reverse of this expression as well meaning, Discharge date being first argument of the expression above.
> 
> 
> Thanks and Regards,
> Sultan Ahamar.
> _______________________________________________
> 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