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

Fix weight for height z score calculation #1232

Closed
Tracked by #1538
mahalakshme opened this issue Dec 19, 2023 · 10 comments
Closed
Tracked by #1538

Fix weight for height z score calculation #1232

mahalakshme opened this issue Dec 19, 2023 · 10 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Dec 19, 2023

Current status:

weight for length data on WHO website has 2 separate set of standard data based on age. Age is not considered in Avni wflh zscore calculation. Some of the LMS values used are of ages 0 to 2 years and some are of ages 2 to 5 years.

Acceptance criteria:

  • Incorporate age also in wflh calculation in addition to gender and height currently used
  • For LMS values not defined for a particular age - say age > 2 years and height < 65 cm - return undefined

Out of scope:

  • Implementation team need to make sure if rules work as expected - for APF when checked since they use both WFA and WFH can be handled - not an issue.
  • correcting existing data

Impact analysis:

Using of data from 2 to 5 years leads to a higher negative value(more critical grade). Hence mixing of both data would have led some children below 2 years to be categorised as more critical and some children more than 2 years as less critical.

In a couple of values where I applied the formula the difference of zscore between correct and incorrect is .1 to .2. So the children in the border value used in the standard to classify would have impacted.

In a couple of implementations I checked, weight for height is used along with weight for age for categorisation of child status. This would have again reduced the impact of this issue.

Hence we can chose not to correct the existing data for now considering the complexity and its impact.

Testing:

Verify using the tables and charts mentioned here

Old - Ignore:

    • Reasons: We dont differentiate height and length for child in our app. And according to WHO growth computation, The construction of the weight-for-length (45 to 110 cm) and weight-for-height (65 to 120 cm) standards followed a procedure similar to that applied to constructing the length/height-for-age standards (see section 3.1). To fit a single model, 0.7 cm was added to the cross-sectional height values. This was the average difference found between length and height in 1625 children aged 18 to 30 months measured for both length and height. After the model was fitted, the weight-for-length centile curves in the length interval 65.7 to 120.7 cm were shifted back by 0.7 cm to derive the weight- for-height standards corresponding to the height range 65 cm to 120 cm.
    • Across heights, the difference of weights between both tables is only .1 to .3
    • We can display in UI that for these values z-scores are approximate and not accurate.
    • We can always ask for feedback
@mahalakshme mahalakshme converted this from a draft issue Dec 19, 2023
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Dec 19, 2023
@vinayvenu
Copy link
Member

  • Don't we have the Windows package that we can install to figure out test cases?
  • -3SD for WFA girls is around 80 cm. Someone who is 65 cm at this age must be considered out of scope for our calculator
  • What else is being done in the anthro R package?

@mahalakshme
Copy link
Contributor Author

mahalakshme commented Dec 19, 2023

@vinayvenu

  1. In the windows exe application - Anthroplus when I checked yesterday with Taqi, it didn't have weight for height value in the result. It had only WFA, length for age and BMI for age
Screenshot 2023-12-19 at 9 32 36 AM
  1. https://github.com/WorldHealthOrganization/anthro/blob/96e8fe016f4e2ed79eb187f08278b336bafbb7b5/R/z-score-weight-for-lenhei.R#L17 - anthro R package method link - some logic is used to figure out m,l, and s values

@mahalakshme mahalakshme moved this from In Analysis Review to In Analysis in Avni Product Dec 22, 2023
@mahalakshme
Copy link
Contributor Author

mahalakshme commented Jan 3, 2024

@vinayvenu
Not necessarily I see this holds '-3SD for WFA girls is around 80 cm. Someone who is 65 cm at this age must be considered out of scope for our calculator' and we have above such entries in db. consider in JSS individual with id, 57083, - though her age is greater than 4 years, height as per height for age is less than -3 SD. and its WFH zscore is 1.05.

@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Jan 4, 2024
@vinayvenu
Copy link
Member

@mahalakshme lets discuss separately and finalize this story.

@vinayvenu
Copy link
Member

Self note: Potential impact in growth charts

@mahalakshme mahalakshme moved this from In Analysis Review to In Analysis in Avni Product Jan 12, 2024
@mahalakshme mahalakshme moved this from In Analysis to In Analysis Review in Avni Product Apr 3, 2024
@mahalakshme mahalakshme moved this from In Analysis Review to Ready in Avni Product Apr 5, 2024
@himeshr himeshr self-assigned this Apr 8, 2024
@himeshr himeshr moved this from Ready to In Progress in Avni Product Apr 8, 2024
himeshr added a commit to avniproject/avni-health-modules that referenced this issue Apr 8, 2024
himeshr added a commit that referenced this issue Apr 8, 2024
himeshr added a commit to avniproject/rules-server that referenced this issue Apr 8, 2024
himeshr added a commit to avniproject/avni-health-modules that referenced this issue Apr 8, 2024
@himeshr
Copy link
Contributor

himeshr commented Apr 8, 2024

@mahalakshme, the calculated values for wfh zscore do not exactly match the chart.
Even after we use 2 separate tables for ageGroups 0-2 years and 2-5 years, for boys /girls.
Is #1247 complete.? Because, i think the formula used for wfh is not correct for all scenarios and the AC here does not talk about logic correction..

@mahalakshme
Copy link
Contributor Author

@himeshr I think then you can just comment on the differences you see here - just egs. It can be dealt in a separate card.

@himeshr
Copy link
Contributor

himeshr commented Apr 8, 2024

@himeshr I think then you can just comment on the differences you see here - just egs. It can be dealt in a separate card.

okay.. Sample Error scenario examples are as follows:
Reference: https://www.who.int/tools/child-growth-standards/standards/weight-for-length-height

boys => 2 to 5 years
--------------------
((6.5, 68.5).wfh, -3.01); // -3
((7.0, 68.5).wfh, -2.04); // -2
((7.6, 68.5).wfh, -1); // -1
((8.2, 68.5).wfh, -0.06); //0, correct
((9.0, 68.5).wfh, 1.06); // 1
((9.8, 68.5).wfh, 2.04); // 2
((10.7, 68.5).wfh, 3.03); // 3


girls => 0 to 2 years
--------------------
((5.8, 67.0).wfh, -3.01); // -3
((6.3, 67.0).wfh, -2.03); // -2
((6.9, 67.0).wfh, -0.97); // -1
((7.5, 67.0).wfh, -0.04); // 0
((8.3, 67.0).wfh, 1.05); // 1
((9.1, 67.0).wfh, 2.01); // 2
((10.0, 67.0).wfh, 2.96); // 3

girls => 2 to 5 years
--------------------

((6.2, 68.5).wfh, -2.95); // -3
((6.7, 68.5).wfh, -2.02); // -2
((7.3, 68.5).wfh, -1.02); // -1
((8, 68.5).wfh, 0); //0, correct
((8.8, 68.5).wfh, 1.03); // 1
((9.7, 68.5).wfh, 2.05); // 2
((10.7, 68.5).wfh, 3.03); // 3

himeshr added a commit to avniproject/avni-health-modules that referenced this issue Apr 8, 2024
@himeshr himeshr moved this from In Progress to Code Review Ready in Avni Product Apr 10, 2024
himeshr added a commit to avniproject/avni-webapp that referenced this issue Apr 10, 2024
@petmongrels petmongrels moved this from Code Review Ready to In Code Review in Avni Product Apr 10, 2024
@petmongrels petmongrels moved this from In Code Review to QA Ready in Avni Product Apr 10, 2024
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Apr 24, 2024
himeshr added a commit to avniproject/avni-health-modules that referenced this issue Apr 24, 2024
@himeshr
Copy link
Contributor

himeshr commented Apr 24, 2024

For validation check following test cases:
Compare the z-score returned by app with simple table references available here

I. Girls, age 0-2 years
II. Girls, age 2-5 years
III. Boys, age 0-2 years
IV. Boys, age 2-5 years
Weight values corresponding to median, with heights 65, 70, 75

@AchalaBelokar
Copy link

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

4 participants