growth_standards 4.5.0
growth_standards: ^4.5.0 copied to clipboard
A Dart implementation of various growth standards, WHO, CDC, Fenton, Intergrowth, etc.
Various Growth Standards implementation in Dart #
Example below #
import 'dart:convert';
import 'package:growth_standards/growth_standards.dart';
final birthDay = Date(year: 2022, month: Months.june, date: 30);
const weight = Mass$Kilogram(12.1);
const length = Length$Centimeter(82);
final age = Age.byDate(birthDay);
final gs = GrowthStandard.who.fromBirthTo5Years;
const sex = Sex.male;
void main() {
print(
'Age: ${age.yearsMonthsDaysOfAge.years} Years, ${age.yearsMonthsDaysOfAge.months} Months, ${age.yearsMonthsDaysOfAge.days} Days',
);
// WHO Length-for-Age
final calcLengthForAgeStanding = gs.lengthForAge(
age: age,
lengthHeight: length,
sex: sex,
measure: LengthHeightMeasurementPosition.standing,
);
print('Length-for-age Z-Score: ${calcLengthForAgeStanding.zScore(Precision.two)}');
print('Length-for-age Percentile: ${calcLengthForAgeStanding.percentile(Precision.two)}');
// WHO Weight-for-Age
final calcWeightForAge = gs.weightForAge(
age: age,
weight: weight,
sex: sex,
);
print('Weight-for-age Z-Score: ${calcWeightForAge.zScore(Precision.two)}');
// Fenton 2013 Preterm Growth Chart (sex-specific LMS)
final fentonWeight = GrowthStandard.fenton.weightForAge(
sex: Sex.male,
age: const PostmenstrualAge.completedWeeks(32),
weight: const Mass$Kilogram(1.88),
);
print('Fenton 32w Weight Z-Score: ${fentonWeight.zScore()}');
}