Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weight for age zscore mismatch #1217

Closed
mahalakshme opened this issue Dec 7, 2023 · 7 comments
Closed

Weight for age zscore mismatch #1217

mahalakshme opened this issue Dec 7, 2023 · 7 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Dec 7, 2023

Related ticket: https://avni.freshdesk.com/a/tickets/3216

Steps to reproduce:

  • On doing the following,
select * from jss.individual_phulwari_growth_monitoring where individual_id=1299188 order by id desc;

you will find that the 'Weight for age z-score' is -8.5 for the first encounter visit.

  • But when using these values in the WHO provided anthro software here the value is -6.71
    Image
  • The above discrepancy exists when zscore is less than -3 or greater than 3

Preliminary Analysis:

A different formula is used for calculation of zscore is less than -3 or greater than 3
For the formula check page no:300 in here: 924154693X_eng.pdf or check compute_zscore_adjusted method in the file z-score-helper.R in the repository here

Why this needs to be fixed:

  • For the org in focus though for grading/categorising the severity for the child, the above fix doesn't matter, the org mainly focusses on childern where zscore is less than -3 and hence they need reliable values to understand the improvement, to gain confidence to continue the program and to answer their funders.

Acceptance criteria:

  • Fix according to the above formula. After fixing, the values should be inline with the expected values in the Who anthro analysis.xlsx sheet attached by the client in the ticket.
  • Round the zscore value to 2 digits instead of current one.
@mahalakshme mahalakshme converted this from a draft issue Dec 7, 2023
@mahalakshme mahalakshme moved this from In Analysis to Ready in Avni Product Dec 7, 2023
@mahalakshme mahalakshme moved this from Ready to In Analysis in Avni Product Dec 7, 2023
@vinayvenu
Copy link
Member

It looks like the calculation is slightly different for zscores beyond the -3 SD range (see attached document page 301). This might be the reason for the discrepancies.

I am not sure how important the exact zscore really matters for those beyond the -3 range since there are no real decisions being made at this level from a primary health perspective. Either ways, it is good to correct the calculations and verify that it exactly matches the document for zscores beyond +-3SD

924154693X_eng.pdf

@mahalakshme
Copy link
Contributor Author

@vinayvenu I didn't add 2 decimal points round-off to this story since looks like we have done it intentionally. The comment in our code says Weight/height measurements are available only for the nearest single digit, so the final figure can only have one degree of accuracy. So need to make sure before adding it to a card.

@mahalakshme mahalakshme moved this from In Analysis to Ready in Avni Product Dec 15, 2023
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Dec 15, 2023
@petmongrels petmongrels self-assigned this Dec 15, 2023
petmongrels added a commit to avniproject/avni-health-modules that referenced this issue Dec 15, 2023
@petmongrels
Copy link
Contributor

petmongrels commented Dec 15, 2023

.

@petmongrels petmongrels moved this from In Progress to Hold in Avni Product Dec 19, 2023
@mahalakshme
Copy link
Contributor Author

mahalakshme commented Dec 19, 2023

@petmongrels The below data can be used to test for cases where zscore is greater than 3
For id 1110369 in jss.individual_phulwari_growth_monitoring, existing "Weight for age z-score" value is 8.7, but looks like actual is 11.08
Image

For id 1233198, existing is 11.6, but looks like actual is 27.08
Image

The weight values in the above entries are not realistic/seems wrong. But this should not be an issue to verify the correctness of zscores.

petmongrels added a commit to avniproject/avni-health-modules that referenced this issue Dec 19, 2023
petmongrels added a commit to avniproject/avni-health-modules that referenced this issue Dec 19, 2023
@petmongrels
Copy link
Contributor

it seems this tool uses decimal month age as well, which I haven't implemented - so the numbers are slightly off. but I think it is fine, as the numbers are quite close to adjusted zScores now.

@petmongrels petmongrels moved this from Hold to Code Review Ready in Avni Product Dec 19, 2023
@petmongrels petmongrels moved this from Code Review Ready to In Progress in Avni Product Dec 19, 2023
petmongrels added a commit to avniproject/avni-webapp that referenced this issue Dec 19, 2023
petmongrels added a commit to avniproject/avni-webapp that referenced this issue Dec 19, 2023
petmongrels added a commit to avniproject/rules-server that referenced this issue Dec 19, 2023
…ved it. dependency on specific version of health modules. make test doesnt work because there is a folder by that name.
petmongrels added a commit to avniproject/rules-server that referenced this issue Dec 19, 2023
petmongrels added a commit to avniproject/avni-health-modules that referenced this issue Dec 19, 2023
petmongrels added a commit to avniproject/rules-server that referenced this issue Dec 19, 2023
petmongrels added a commit to avniproject/avni-webapp that referenced this issue Dec 19, 2023
@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Dec 19, 2023
@mahalakshme
Copy link
Contributor Author

mahalakshme commented Dec 19, 2023

@petmongrels how much off it is? The LMS values in WHO website itself is available only for whole months and not for decimal months. I think the same is used in anthro R package which is probably used in anthro WHO calculator exe. wondering we have missed somewhere else like rounding of months? Were the values off for less than -3 as well?

@petmongrels
Copy link
Contributor

petmongrels commented Dec 19, 2023

@mahalakshme
from the example in this story.......
For id 1233198, existing is 11.6, but looks like actual is 27.08.........our actual value now is 27.57

there is nothing in code that I can make out.

petmongrels added a commit to avniproject/avni-health-modules that referenced this issue Dec 20, 2023
@1t5j0y 1t5j0y moved this from Code Review Ready to In Code Review in Avni Product Dec 26, 2023
@1t5j0y 1t5j0y moved this from In Code Review to QA Ready in Avni Product Dec 26, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Dec 27, 2023
@AchalaBelokar AchalaBelokar moved this from In QA to QA Ready in Avni Product Dec 28, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Dec 28, 2023
@AchalaBelokar AchalaBelokar moved this from In QA to QA Ready in Avni Product Dec 28, 2023
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Dec 29, 2023
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants