1.7.0 • Published 10 months ago

who-growth v1.7.0

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

who-growth

JS library to calculate WHO child growth standards

How to use

import { Calculator } from './src/Calculator/Calculator.js';
import { Patient } from './src/Patient/Patient.js';

const patient = new Patient({
    name: "John Doe",
    birthDate: "2019-01-01",
    weight: 10,
    height: 0.7,
    bmi: 10,
    sex: "Male"
})

const result = Calculator.load("Percentile", patient).calculateBMIForAge();
//Return "P1"

Step-by-step:

  1. Instantiate a new Patient The Patient should have name, birthDate, weight, height, sex. Those date are required and needed to calculate the WHO data. You can see more about the Patient Class on the documentation bellow.
import { Patient } from './src/Patient/Patient.js';

const patient = new Patient({
    name: "John Doe",
    birthDate: "2019-01-01",
    weight: 10,
    height: 0.7,
    sex: "Male"
})
  1. Choose a Calculator Once you already have the patient, you need to choose a Calculator in order to retrieve the desired result. There is two types of calculators: ZScore and Percentile. To instantiate a Calculator, you have to pass the type of the calculator and the Patient. For example: you want to get the Weight-for-Height ZScore for a patient:
import { Calculator } from './src/Calculator/Calculator.js';
const patient = new Patient({
    name: "John Doe",
    birthDate: "2019-01-01",
    weight: 10,
    height: 0.7,
    sex: "Male"
})

//Instantiate a ZScore calculator
const patientCalculator = Calculator.load("ZScore", patient);

//Perform calculation
const result = patientCalculator.calculateWeightForHeight();
  1. Done!

How to Install

Use cases

  1. Calculate the WHO child growth Percentile and Z-Score based on the WHO website data

User Guide

Available Calculators Types

  • Z-Score
  • Percentile

Available Calculators Operations

  • Weight-for-Age
  • Height/Length-for-Age
  • Weight-for-Height/Length
  • BMI-for-Age

Documentation

Patient Class

Calculator Class

Resources

The WHO resources of this project is from the official WHO page (https://www.who.int/tools/child-growth-standards/standards). The values is available in the XLSX format and this project uses it on the resources/WHODocuments folder.

Contributions

Feel free to contribute with the project. Create PR's improvements on the project!

1.7.0

10 months ago

1.6.0

10 months ago

1.5.0

10 months ago

1.4.0

10 months ago

1.3.0

10 months ago

1.2.0

10 months ago

1.1.0

10 months ago

1.0.0

10 months ago