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

Continuing minor mismatch in WFA zscore #1285

Closed
mahalakshme opened this issue Jan 29, 2024 · 4 comments
Closed

Continuing minor mismatch in WFA zscore #1285

mahalakshme opened this issue Jan 29, 2024 · 4 comments
Assignees

Comments

@mahalakshme
Copy link
Contributor

mahalakshme commented Jan 29, 2024

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

Context:

As part of this and this card, zscore calculation was corrected for new and existing data for the org in focus. But client have raised below 2 issues that were already addressed as part of the above 2 cards:

  • There is still minor mismatch of the WFA zscore values - refer the spreadsheet in the ticket.
  • Not all the WFA zsore values shows with 2 decimal places,

Analysis:

  1. As shared by the client in this sheet, WFA first z-scores for individual with ids 367809, and 1301382 have minor difference with that of the WHO's anthropomentry app.

for id 1301382

Image

for id 367809

Image

  1. For program encounter with id, 2730765, the script for updating WFA zscore is not even run(no update in manual_update_history column).
select individual.id, individual.gender_id, program_encounter.observations, individual.date_of_birth, program_encounter.encounter_date_time, program_encounter.manual_update_history from program_encounter join individual on program_encounter.individual_id = individual.id where program_encounter.id=2730765 and program_encounter.name='Growth Monitoring Visit' order by encounter_date_time desc; 

Acceptance criteria:

  • Address the minor mismatch in WFA zscore in both places(avni-health-modules code, update script for existing values) if exists
  • Make sure script update runs for all program encounters for the existing values for the org in focus
  • Looks like in the places we have with single precision, its because the next decimal no is zero. But -3.40 is considered to be higher precision than -3.4. Hence make sure all WFA values have double precision.
@mahalakshme mahalakshme converted this from a draft issue Jan 29, 2024
@mahalakshme mahalakshme moved this from In Analysis to Ready in Avni Product Jan 29, 2024
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Jan 30, 2024
@petmongrels petmongrels moved this from In Progress to Ready in Avni Product Jan 30, 2024
@petmongrels petmongrels moved this from Ready to In Progress in Avni Product Jan 30, 2024
@petmongrels petmongrels self-assigned this Jan 30, 2024
@petmongrels
Copy link
Contributor

  • the zScores have been updated by the script and the numbers are also matching the new logic
  • regarding mismatch using fractional age doesn't help because the zScore value swings to the other side that is -4.47 goes to -4.56 for WHO score -4.53. Sometimes it swings by the same amount so it is not getting closer to WHO number.
  • from the data where the mismatch has been highlighted it seems that these are all -3 to 3 and we we do not have any adjustment for SD below -3 and +3
  • not sure what can be done in this case to make the data better

@petmongrels petmongrels moved this from In Progress to Code Review Ready in Avni Product Jan 30, 2024
@vinayvenu vinayvenu moved this from Code Review Ready to In Code Review in Avni Product Feb 1, 2024
@vinayvenu
Copy link
Member

A few observations

  1. Our code is based on algorithms and data provided in https://www.who.int/tools/child-growth-standards .
  2. This issue is raised about mismatch from this and an anthro software provided by WHO whose source is not open to be inspected

In this scenario, the only way we can verify correctness is by verifying against the standard itself.

I have provided an open calculation on the spreadsheet. Mistakes can be pointed out either on the data (if it does not match the open standards) or on the algorithm (provided on the spreadsheet), not on another software blackbox. Based on these calculations, the zScore in Avni seems correct.

cc @mahalakshme

@vinayvenu vinayvenu moved this from In Code Review to QA Ready in Avni Product Feb 1, 2024
@mahalakshme
Copy link
Contributor Author

@vinayvenu where is the spreadsheet?

@vinayvenu
Copy link
Member

Updated the spreadsheet that you have in the card description

@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Feb 1, 2024
@AchalaBelokar AchalaBelokar moved this from In QA to QA Ready in Avni Product Feb 2, 2024
@AchalaBelokar AchalaBelokar moved this from QA Ready to In QA in Avni Product Feb 2, 2024
@AchalaBelokar AchalaBelokar moved this from In QA to Done in Avni Product Feb 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