# Threshold values or composite scores using predictors

Posted on behalf of Tabu Tshibambula

In my program i have seven norms for checking if health status is reach or not and for each norm a threshold is apply as below
Norms Threshold value
Norm 1 50%
Norm 2 80%
Norm 3 80%
Norm 4 80%
Norm 5 60%
Norm 6 70%
Norm 7 50%

Assessment of each norm is done through data element calculation, my question about how can I use d2: condition to evaluation if all norm reach they threshold in unique formula like below:
NB: that exemple is just for one norm
d2:condition(‘Visite Post Certification.Puits proteges * 100 / Visite Post Certification.Menages interviewes + Visite Post Certification.Source amenagee * 100 / Visite Post Certification.Menages interviewes + Visite Post Certification.Eau du robinet * 100 / Visite Post Certification.Menages interviewes + Visite Post Certification.Borne Fontaine * 100 / Visite Post Certification.Menages interviewes >= 80’,1,0)
I want to know if the following expression is acceptable with dhis2
d2: condition(‘Nom1>=50, Norm2>=80, Norm3>=80, Norm4>=80, Norm5>=60, Norm6>70,Norm7>=70’,1,0)
is it possible to return string in d2: condition as below?
d2: condition(‘Nom150, Norm2>=80, Norm3>=80, Norm4>=80,Norm5>= >=60,Norm6>70,Norm7>=70’,”Maintien”,”Perte”)

Hi Tabu,

I would recommend using predictors for this. Steps outlined below:

1. Create a new aggregate data element for each of your norm’s with aggregation type to sum
2. Create a new predictor for each of the norm’s
a. put in your exact formula ad you have defined it above. Put “IF” instead of “d2 condition”. Here is an example: IF(#{wF85Ye1ZHrZ} == #{chAbRNgZ1Qd},1,0)
b. set sequential and annual sample count to zero
c. assign the predictor to the corresponding data element.