The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

WHO::GrowthReference::Table - Lookup height/weight in the WHO growth chart (a.k.a. growth reference, growth standards)

VERSION

This document describes version 0.008 of WHO::GrowthReference::Table (from Perl distribution WHO-GrowthReference-Table), released on 2021-02-27.

SYNOPSIS

 use WHO::GrowthReference::Table qw(get_who_growth_reference);

 # get mean height & weight of a 3-year old girl

 my $res = get_who_growth_reference(gender => "F", dob => time() - 3*365.25*86400);
 # => [200, "OK", {
 #      age => "36.0 month(s)",
 #      height_mean => 95.034, # cm
 #      weight_mean => 13.9,   # kg
 #      height_P01  => ..., # height at 0.1% percentile
 #      height_P1   => ..., # height at 1% percentile
 #      height_Z-3  => ..., # height at -3 SD
 #      height_Z-2  => ..., # height at -2 SD
 #      ...
 #     }]

 # you have a 3.5-year old boy weighing at 14.8kg and with a height of 102cm,
 # calculate the percentiles

 my $res = get_who_growth_reference(gender => "M", dob => time() - 3.5*365.25*86400, weight=>14.8, height=>102);
 # => [200, "OK", {
 #      age => "42.0 month(s)",
 #      height_mean => 99.844, # cm
 #      height_percentile => 70.2, # your boy's height is above world average, about 70.2% of boys of the same age are shorter than your boy
 #      height_zscore => ...,
 #      weight_mean => 15.3,   # kg
 #      weight_percentile => 39.6, # your boy's weight is below world average, about 39.6% of boys of the same age weigh less than your boy
 #      weight_zscore => ...,
 #      height_P01 => ...,
 #      ...
 #      height_potential => ...,
 #      height_potential_Z0 => ...,
 #      weight_potential_10y => ...,
 #      weight_potential_10y_Z0 => ...,
 #     }]

FUNCTIONS

get_who_growth_reference

Usage:

 get_who_growth_reference(%args) -> [status, msg, payload, meta]

Lookup height/weight in the WHO growth chart (a.k.a. growth reference, growth standards).

Caveats:

Currently the z-zcore line values (e.g. height_Z1, height_Z-1, etc) are calculated using linear interpolation.

This function is not exported by default, but exportable.

Arguments ('*' denotes required arguments):

  • age => duration

  • dob => date

  • gender* => str

  • height => float

    Specify height to calculate percentile.

  • now => date

    Assume now is this date, instead of current date.

  • weight => float

    Specify weight to calculate percentile.

Returns an enveloped result (an array).

First element (status) is an integer containing HTTP status code (200 means OK, 4xx caller error, 5xx function error). Second element (msg) is a string containing error message, or 'OK' if status is 200. Third element (payload) is optional, the actual result. Fourth element (meta) is called result metadata and is optional, a hash that contains extra information.

Return value: (any)

HOMEPAGE

Please visit the project's homepage at https://metacpan.org/release/WHO-GrowthReference-Table.

SOURCE

Source repository is at https://github.com/perlancar/perl-WHO-GrowthReference-Table.

BUGS

Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=WHO-GrowthReference-Table

When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.

SEE ALSO

WHO::GrowthReference::GenChart

App::WHOGrowthReferenceUtils

http://www.who.int/childgrowth/standards/en/

AUTHOR

perlancar <perlancar@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2021, 2018 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.