Class PediatricGrowthTrajectory
- java.lang.Object
-
- org.mitre.synthea.world.concepts.PediatricGrowthTrajectory
-
- All Implemented Interfaces:
java.io.Serializable
public class PediatricGrowthTrajectory extends java.lang.Object implements java.io.Serializable
This class provides growth trajectories for individuals between 2 and 20. For a person, starting at age 2, the trajectory will set an age + 1 year BMI. The BMI will be selected by computing the person's current extended BMI Z score. The + 1 year extended BMI Z score will be selected from a normal distribution with a mean that is based on the previous score, correlation between extended BMI Z scores from year to year and difference in mean extended BMI Z scores from year to year.This method uses extended BMI Z Scores, which is a concept under development at CDC. The current growth charts, were not intended to be used beyond the 97th percentile. See: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4528342/
Further, CDC growth chart data is from 1960-1990. CDC defines obesity in children as having a BMI at or above the 95th percentile for sex and age in months: https://www.cdc.gov/obesity/childhood/defining.html However, recent data shows that at least 18.5% of children have obesity: https://www.cdc.gov/obesity/data/childhood.html This oddly means that more than 18.5% of the population have a BMI greater than the 95th percentile.
To account for these issues, this class uses correlations and means gathered from more recent NHANES data: https://wwwn.cdc.gov/nchs/nhanes/Default.aspx
The class also uses extended BMI Z scores. For children with a BMI value less than the 95th percentile, regular Z scores are used. At or above the 95th percentile models BMI values as a half normal distribution with a parameter sigma that is age based. The value for sigma is calculated using a quadratic function with weights obtained by examining NHANES data ADD CITATION ONCE PUBLISHED BY CDC
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
PediatricGrowthTrajectory.Point
A representation of a point in the growth trajectory.static class
PediatricGrowthTrajectory.YearInformation
Container for data on changes between years for BMI information.
-
Field Summary
Fields Modifier and Type Field Description static int
NINETEEN_YEARS_IN_MONTHS
static long
ONE_YEAR
static double
SIGMA_FEMALE_A
static double
SIGMA_FEMALE_B
static double
SIGMA_FEMALE_C
static double
SIGMA_MALE_A
static double
SIGMA_MALE_B
static double
SIGMA_MALE_C
-
Constructor Summary
Constructors Constructor Description PediatricGrowthTrajectory(long personSeed, long birthTime)
Starts a new pediatric growth trajectory.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPoint(int ageInMonths, long timeInSimulation, double bmi)
Adds a point to the end of the trajectory.void
addPointFromPercentile(int ageInMonths, long timeInSimulation, double percentile, java.lang.String sex)
Adds a point to the end of the trajectory.boolean
beforeInitialSample(long time)
Determines whether the given time is before or after the NHANES sample selected as the seed for this growth trajectory.double
currentBMI(Person person, long time)
Provides the BMI for the individual at the supplied time.static double
extendedZScore(double bmi, int ageInMonths, java.lang.String sex, double sigma)
Calculates the extended BMI Z Score.void
generateNextYearBMI(Person person, long time)
Generates a BMI for the person one year later.PediatricGrowthTrajectory.Point
justAfter(long time)
Finds the closest point occurring after the given time.PediatricGrowthTrajectory.Point
justBefore(long time)
Finds the closest point occurring before the given time.static java.util.Map<java.lang.String,PediatricGrowthTrajectory.YearInformation>
loadCorrelations()
Load correlations of extended BMI Z Scores from age year to age year.static double
percentileToBMI(double percentile, int ageInMonths, java.lang.String sex, double sigma)
Uses extended percentiles when calculating a BMI greater than or equal to the 95th percentile.double
reverseWeightPercentile(java.lang.String sex, double heightPercentile)
Given the sex, BMI and height percentile at age 2, calculate the correct weight percentile.static double
sigma(java.lang.String sex, double age)
Calculate the parameter needed to model the half normal distribution for BMI values at or above the 95th percentile.PediatricGrowthTrajectory.Point
tail()
Finds the last point of the growth trajectory.
-
-
-
Field Detail
-
SIGMA_FEMALE_A
public static double SIGMA_FEMALE_A
-
SIGMA_FEMALE_B
public static double SIGMA_FEMALE_B
-
SIGMA_FEMALE_C
public static double SIGMA_FEMALE_C
-
SIGMA_MALE_A
public static double SIGMA_MALE_A
-
SIGMA_MALE_B
public static double SIGMA_MALE_B
-
SIGMA_MALE_C
public static double SIGMA_MALE_C
-
ONE_YEAR
public static long ONE_YEAR
-
NINETEEN_YEARS_IN_MONTHS
public static int NINETEEN_YEARS_IN_MONTHS
-
-
Constructor Detail
-
PediatricGrowthTrajectory
public PediatricGrowthTrajectory(long personSeed, long birthTime)
Starts a new pediatric growth trajectory. Selects a start BMI between 2 and 3 years old by pulling a weighted sample from NHANES.- Parameters:
personSeed
- The person's seed to allow for repeatable randomizationbirthTime
- The time the individual was born in the simulation
-
-
Method Detail
-
reverseWeightPercentile
public double reverseWeightPercentile(java.lang.String sex, double heightPercentile)
Given the sex, BMI and height percentile at age 2, calculate the correct weight percentile.- Parameters:
sex
- of the person to get the weight percentile forheightPercentile
- or the person- Returns:
- the weight percentile the person would have to be in, given their height percentile and BMI
-
generateNextYearBMI
public void generateNextYearBMI(Person person, long time)
Generates a BMI for the person one year later. BMIs are generated based on correlations measured between years of age and differences in mean BMI. This takes into special consideration people at or above the 95th percentile, as the growth charts start to break down.- Parameters:
person
- to generate the new BMI fortime
- current time
-
tail
public PediatricGrowthTrajectory.Point tail()
Finds the last point of the growth trajectory.- Returns:
- the point
-
justBefore
public PediatricGrowthTrajectory.Point justBefore(long time)
Finds the closest point occurring before the given time.- Parameters:
time
- time of interest- Returns:
- Point just before it or null if it doesn't exist
-
justAfter
public PediatricGrowthTrajectory.Point justAfter(long time)
Finds the closest point occurring after the given time.- Parameters:
time
- time of interest- Returns:
- Point just after it or null if it doesn't exist
-
beforeInitialSample
public boolean beforeInitialSample(long time)
Determines whether the given time is before or after the NHANES sample selected as the seed for this growth trajectory.- Parameters:
time
- The time to check- Returns:
- true if the time is before the sample
-
addPoint
public void addPoint(int ageInMonths, long timeInSimulation, double bmi)
Adds a point to the end of the trajectory. It must be at the end of the trajectory, otherwise, it will throw an IllegalArgumentException.- Parameters:
ageInMonths
- for the person at the pointtimeInSimulation
- at the time of the pointbmi
- what the body mass index should be at that point in time
-
addPointFromPercentile
public void addPointFromPercentile(int ageInMonths, long timeInSimulation, double percentile, java.lang.String sex)
Adds a point to the end of the trajectory. It must be at the end of the trajectory, otherwise, it will throw an IllegalArgumentException.Instead of providing a BMI, provide a percentile, which will get converted to a BMI
- Parameters:
ageInMonths
- for the person at the pointtimeInSimulation
- at the time of the pointpercentile
- the percentilesex
- the sex of the individual
-
currentBMI
public double currentBMI(Person person, long time)
Provides the BMI for the individual at the supplied time. If the time provided is beyond the current length of the trajectory, it will generate a new point in the trajectory, if that point will happen before the person is 20 years old.- Parameters:
person
- to get the BMI fortime
- the time at which you want the BMI- Returns:
- a BMI value
-
percentileToBMI
public static double percentileToBMI(double percentile, int ageInMonths, java.lang.String sex, double sigma)
Uses extended percentiles when calculating a BMI greater than or equal to the 95th percentile.- Parameters:
percentile
- BMI percentile {0 - 1}ageInMonths
- of the personsex
- of the personsigma
- age based value to model the extended percentiles- Returns:
- The BMI, offering a different value than the growth charts when above the 95th
-
extendedZScore
public static double extendedZScore(double bmi, int ageInMonths, java.lang.String sex, double sigma)
Calculates the extended BMI Z Score. This is the regular Z Score when below the 95th percentile. Above that, a different, half normal distribution is used to model the values.- Parameters:
bmi
- you want the Z Score forageInMonths
- of the personsex
- of the personsigma
- age based value to model the extended percentiles- Returns:
- the extended Z Score
-
sigma
public static double sigma(java.lang.String sex, double age)
Calculate the parameter needed to model the half normal distribution for BMI values at or above the 95th percentile.- Parameters:
sex
- of the personage
- of the person, precision matters! You probably don't want to pass an integer like value- Returns:
- sigma to use in other calculations
-
loadCorrelations
public static java.util.Map<java.lang.String,PediatricGrowthTrajectory.YearInformation> loadCorrelations()
Load correlations of extended BMI Z Scores from age year to age year.- Returns:
- The correlations keyed by age year
-
-