-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfenton_preterm_example.dart
More file actions
48 lines (41 loc) · 1.47 KB
/
Copy pathfenton_preterm_example.dart
File metadata and controls
48 lines (41 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// ignore_for_file: avoid_print
import 'package:growth_standards/growth_standards.dart';
void main() {
print('====================================================');
print(' Fenton 2025 Preterm Growth Standards (22 to 50 Weeks)');
print('====================================================\n');
final fenton = GrowthStandard.fenton;
final pma = PostmenstrualAge.completedWeeks(32); // 32 weeks Postmenstrual Age
const sex = Sex.female;
// 1. Fenton Preterm Weight-for-Age
final fentonWeight = fenton.weightForAge(
sex: sex,
age: pma,
weight: Mass$Kilogram(1.85),
);
print(
'1. Fenton Weight (32w PMA): Z = ${fentonWeight.zScore()} SD | P = ${fentonWeight.percentile()}%',
);
// 2. Fenton Preterm Length-for-Age
final fentonLength = fenton.lengthForAge(
sex: sex,
age: pma,
lengthHeight: Length$Centimeter(42.0),
);
print(
'2. Fenton Length (32w PMA): Z = ${fentonLength.zScore()} SD | P = ${fentonLength.percentile()}%',
);
// 3. Fenton Preterm Head Circumference-for-Age
final fentonHc = fenton.headCircumferenceForAge(
sex: sex,
age: pma,
measurementResult: Length$Centimeter(29.5),
);
print(
'3. Fenton Head Circumference (32w PMA): Z = ${fentonHc.zScore()} SD | P = ${fentonHc.percentile()}%',
);
// Export Fenton Chart Graphics
print('\nGenerating Fenton Preterm SVG Growth Chart...');
fentonWeight.saveSvg('doc/samples/fenton_preterm_girl.svg');
print('Saved Fenton chart to doc/samples/');
}