NAME

Medical::Growth::NHANES_2000::Base - Shared infrastructure for Medical::Growth::NHANES_2000

SYNOPSIS

# Patient evaluation
my $handle = Medical::Growth->measure_class_for( system => 'NHANES_2000',
                                                 age_group => 'Infant',
                                                 sex => 'Female', 
                                                 measure => 'Length for Age');
my $pctile = $handle->pct_for_value($wt, $age);
my $z_score = $handle->z_for_value($wt, $age);

# Build 50th percentile line
foreach my $age (24 .. 240) {
  $plotter->plot_point($age, $handle->value_for_pct(50, $age));
}

# Implementing a measure class
package Medical::Growth::NHANES_2000:Weight_for_Height::Child;
use Moo::Lax;
extends 'Medical::Growth::NHANES_2000::Base';

DESCRIPTION

This class provides the shared machinery to calculate the relationship of a patient's anthropometric values to the NHANES 2000 norms (see Medical::Growth::NHANES_2000 for further explanation of these norms, as well as information on how to retrieve a measurement class).

EVALUATING PATIENT DATA

Once you have identified the right measure class, you may call any of these methods as either class methods or via an object instance created via new. (The latter approach doesn't add anything substantive, as measure class objects in this system don't carry any extra state; it's just a question of style.)

z_for_value($value, $index)

Returns the Z score for the growth measurement $value (what would be the Y value on a growth chart) relative to the group of children having the same $index (what would be the X value on a growth chart). For example, to find out how a child's weight compares to others of the same age, you would pick the appropriate Weight_for_Age measure class, and pass the weight in kg as $value and the age in months as $index.

If $index is out of range for the measurement class (e.g. you try to measure a teenager against an Infant measurement class), returns undef. Otherwise, returns the Z-score produced using the L, M, and S parameters from the Box-Cox model for the the particular value $index.

pct_for_value($value, $index)

Similar to "z_for_value", but returns a percentile rather than a Z score. See "z_to_pct" in Statistics::Standard_Normal for details of the conversion.

value_for_z($z_score, $index)

Returns the measurement value that would produce a Z score of $z_score for a child with index value $index. For example, a Weight_for_Age measure class would return the weight that would correspond to $z_score among children of age $index.

If $index is out of range for the measurement class (e.g. you try to measure a teenager against an Infant measurement class), returns undef. Otherwise, returns the value produced using the L, M, and S parameters from the Box-Cox model for the the particular value $index.

value_for_pct($pctile, $index)

Similar to "value_for_z", but returns the measurement value that corresponds to the $pctile percentile.

lookup_LMS($index)

Returns the Box-Cox L, M, and S parameters for children with index value $index in this measurement class (e.g. age for a Weight_for_Age measure class, height for a Weight_for_Height measure class).

If $index is less than the minimum index or more than the maximum index value for the measure class, returns undef or an empty list.

If $index falls between two values in the NHANES data tables, linear interpolation is used to estimate L, M, and S.

EXPORT

None.

SEE ALSO

Medical::Growth, http://www.cdc.gov/growthcharts

DIAGNOSTICS

Any message produced by an included package, as well as

Type error for LMS parameters (F)

A subclass tried to load a set of L, M, and S parameters in the wrong way.

BUGS AND CAVEATS

Are there, for certain, but have yet to be cataloged.

VERSION

version 1.00

AUTHOR

Charles Bailey <cbail@cpan.org>

COPYRIGHT AND LICENSE

Copyright 2012-2014 Charles Bailey.

This software may be used under the terms of the Artistic License or the GNU General Public License, as the user prefers.

ACKNOWLEDGMENT

The code incorporated into this package was originally written with United States federal funding as part of research work done by the author at the Children's Hospital of Philadelphia.