DHIS2 zscorewfh showing wrong result

In DHIS2 zscorewfh takes 3 inputs (height, weight and gender) but the problem is that, when using DHIS2 mobile app if height and weight is a whole number zscorewfh will be calculated but if a fraction is there zscorewfh returns empty besides when using zscore in website capture app a discrepancy is there between WHO anthro calculator and DHIS2 zscore so is there anybody facing that problem and solved it.

Hi @ahmed_qaid

Which app are you using? Could you share an example with the use case that could be reproduced?

Thank you!

Sorry for late, the problem with android app when using zScoreWFH function is that, if the height is an integer number you’ll get the result but if it is a float number like 63.2 you’ll get nothing I uploaded some pics to let you get the problem.




1 Like

Please share the data element type for the field you are entering the zScore into as well as the program rule expression. (From Maintenance app)

Thank you!


English:

image


And please what about the ‘Program rule details, and program rule expression’:


1 Like

One thing that I would add to the program rule expression is to change it to:
(#{NS Height} != ‘’) && (#{NS Weight} != ‘’) && (#{Gender} != ‘’)

I’m trying to reproduce this issue but I’m getting an error in the console, so I’m asking @tracker-programRules for support…

Program rule that assigns value of a function d2:zScoreWFH(#{Height},#{Weight},#{Gender}) to data element of type Number (and triggers when (#{Height} != ‘’) && (#{Weight} != ‘’) && (#{Gender} != ‘’)), shows this error… can’t read properties of undefined (reading ‘0’)

Hi @ahmed_qaid

I’ve been testing and it seems there is an error in the functions d2:zScoreWFA and d2:zScoreWFH. I’ve created this jira issue, please feel free to add more information in the comment section if needed.

Thank you for your report. The team will try to fix it as soon as possible.

1 Like