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

Implement Z-Score Calculation for Children Under 5 Based on WHO Growth Standards #3700

Open
6 tasks
AnnieMungai opened this issue Jan 22, 2025 · 2 comments
Open
6 tasks

Comments

@AnnieMungai
Copy link
Contributor

AnnieMungai commented Jan 22, 2025

Describe the feature request.
We need the Job Aids App to calculate z-scores for children under 5 using WHO growth standards. The z-score will help assess a child's nutritional status by comparing weight and height to standard WHO reference values. The calculation should assess the 3 key growth indicators:

  • Weight-for-age (WAZ)
  • Height-for-age (HAZ)
  • Weight-for-height (WHZ)

The app should:

  • Take age(in months), weight (kgs), height(cm), and sex (male/Female) as inputs.
  • Compare these values against WHO standards.
  • Calculate z-scores for key growth indicators.
  • Classify the child as normal, underweight, stunted, wasted, or overweight.

Interpretation of z-scores

Z-Score Range WAZ (Weight-for-Age) HAZ (Height-for-Age) WHZ (Weight-for-Height)
Above +2 Overweight Tall for Age Overweight
Between +2 and -2 Normal Growth Normal Growth Normal Growth
Between -2 and -3 Underweight Stunted Moderately Wasted
Below -3 Severely Underweight Severely Stunted Severely Wasted

Acceptance criteria

  • Users can input age, weight, height, and sex.
  • The application can pull WHO reference values and compare with the child's input values. for comparison.
  • The app can calculate z-scores for key indicators.
  • The system categorizes the child’s status as Normal, Underweight, Stunted, or Overweight.
  • Handles errors correctly - and shows the error messages.
  • Z-score interpretation is shown on the questionnaires with the descriptions of what is means for the users (see description tables

References
https://www.who.int/tools/child-growth-standards/standards

Implementation plan (For Engineers)
The plan for implementing the solution e.g. via a description or a check list for the various ordered tasks that will need to be completed.
i.e. Describe how you intend to solve the problem

@f-odhiambo
Copy link
Contributor

Short version: Z Score is a measure to check if the baby is growing normally or abnormally. It is usually measured by taking the head circumference length and weight of the baby

  1. We used CQL as it was a robust way for referencing the z score table which we converted into basic resources so that they are read as FHIR resources
  2. At the moment CQL library execution is broken on the ain and we are trying to look for a fix - BLOCKED (edited)
  3. You could use FHIRPath but it would just be used for calculation/formula not referencing the tables, in the issue you shared the clinician is doing a manual entry and not a computed one
  4. Here are some tables https://www.who.int/tools/child-growth-standards/standards/length-height-for-age
  5. Here is how we converted them https://github.com/onaio/fhir-resources/tree/main/zeir_zambia/z-score-tables
  6. This is how we computed https://github.com/onaio/fhir-resources/blob/main/zeir_zambia/library/growth_monitoring/cql/ComputeZScore-1.0.0.cql

Blocker on current main branch
We are unable to reference the Library resource that contains the CQL evaluation based on the latest workflow manager library artifacts with an error ... Stacktrace screenshot attached

Image

@FikriMilano
Copy link
Collaborator

We can possibly do this in FHIRPath + X-FHIR Query:

After understanding how Z-Score and CQL works, in the case of a Z-score score result needs to be displayed in a form, I feel it's possible to write the calculation in FHIRPath expression + X-FHIR Query.

X-FHIR Query:
Basic resource (the WHO tables) can be searched w X-FHIR Query while inside a form by using variable extension.

FHIRPath:

  1. Gets the input of height, weight, age, gender from the fields
  2. A condition to use which Basic resource to use, based on age and gender
  3. Search the right row (L,M,S value of Z-score) fron the Basic resource, based on height or weight
  4. Get the L,M,S value from the searched row
  5. Calculate the Z-score formula based on the L,M,S, height or weight
  6. A logic to interpret the Z-score if it's within the normal, underweight or overweight

This solution only applies for Z-score result that needs to be processed while user is still opening the form (without submission).

cc @f-odhiambo

Recording on how Z-score and CQL works https://drive.google.com/file/d/1CYSY1igKDspy6fm1QplxXSGj-TxE08km/view?usp=drivesdk

Todo: @FikriMilano to try this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants