feat: Compute d2:zScore functions with WHO LMS method [DHIS2-22201] - #103
Open
enricocolasante wants to merge 1 commit into
Open
enricocolasante wants to merge 1 commit into
enricocolasante wants to merge 1 commit into
Conversation
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Compute
d2:zScore*functions with the WHO LMS method DHIS2-22201Problem
The z-score functions looked up 7 SD values per row (−3 SD … +3 SD, rounded to 1 decimal) and interpolated linearly between them. This had several issues:
d2:zScoreWFHused the wrong reference between 87 and 110 cm. It used weight-for-length values (meant for children measured lying down) up to 110 cm. When age is unknown, the usual convention is to switch to weight-for-height at 87 cm. Children 87–110 cm tall were compared against a reference 0.1–0.4 kg too light, so their z-scores came out too high.d2:zScoreWFA(28, …, "m")threw an errorChanges
Calculation (
ZScore)z = ((x / M)^L − 1) / (L · S).Double(no float noise), results are rounded to 2 decimals, and0.0is returned instead of-0.0.Tables (
ZScoreTable): each row holds the WHO L, M, S parameters instead of 7 rounded SD values.ZScoreTable.Entry(see the API dump).Behaviour changes
ZScoreTable.Entryis removed andZScoreTable.Lmsis added.Validation
wflanthro,wfhanthro), as packaged with the WHOanthroR package, and WHO's monthly weight-for-age and length/height-for-age tables.