main
1/// Static provider of warn values for ages.
2///
3/// source: https://pressbooks.library.torontomu.ca/vitalsign/chapter/blood-pressure-ranges/ (last access: 14.11.2023)
4class BloodPressureWarnValues {
5 BloodPressureWarnValues._create();
6
7 /// URL from which the information was taken.
8 static String source = 'https://pressbooks.library.torontomu.ca/vitalsign/chapter/blood-pressure-ranges/';
9
10 /// Returns the default highest (safe) diastolic value for a specific age.
11 static int getUpperDiaWarnValue(int age) { // TODO: units
12 if (age <= 2) {
13 return 70;
14 } else if (age <= 13) {
15 return 80;
16 } else if (age <= 18) {
17 return 80;
18 } else if (age <= 40) {
19 return 80;
20 } else if (age <= 60) {
21 return 90;
22 } else {
23 return 90;
24 }
25 }
26
27 /// Returns the default highest (safe) systolic value for a specific age.
28 static int getUpperSysWarnValue(int age) {
29 if (age <= 2) {
30 return 100;
31 } else if (age <= 13) {
32 return 120;
33 } else if (age <= 18) {
34 return 120;
35 } else if (age <= 40) {
36 return 125;
37 } else if (age <= 60) {
38 return 145;
39 } else {
40 return 145;
41 }
42 }
43}