You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
139 lines
3.5 KiB
Dart
139 lines
3.5 KiB
Dart
/// The vital signs result of a scan.
|
|
class VitalSign {
|
|
final double heartRate;
|
|
final double spo2;
|
|
final double ibi;
|
|
final double? stress;
|
|
final double? stressScore;
|
|
final double? respiratoryRate;
|
|
final double? hrvSdnn;
|
|
final double? hrvRmssd;
|
|
final double? temperature;
|
|
final String? bloodPressure;
|
|
final double? bloodPressureSystolic;
|
|
final double? bloodPressureDiastolic;
|
|
final double? facialSkinAge;
|
|
final double? bloodAlcohol;
|
|
final double? bloodSugar;
|
|
final String? version;
|
|
|
|
const VitalSign(
|
|
this.heartRate,
|
|
this.spo2,
|
|
this.ibi,
|
|
this.stress,
|
|
this.stressScore,
|
|
this.respiratoryRate,
|
|
this.hrvSdnn,
|
|
this.hrvRmssd,
|
|
this.temperature,
|
|
this.bloodPressure,
|
|
this.bloodPressureSystolic,
|
|
this.bloodPressureDiastolic,
|
|
this.facialSkinAge,
|
|
this.bloodAlcohol,
|
|
this.bloodSugar,
|
|
this.version);
|
|
|
|
factory VitalSign.fromMap(Map map) {
|
|
return VitalSign(
|
|
map['heartRate'],
|
|
map['spo2'],
|
|
map['ibi'],
|
|
map['stress'],
|
|
map['stressScore'],
|
|
map['respiratoryRate'],
|
|
map['hrvSdnn'],
|
|
map['hrvRmssd'],
|
|
map['temperature'],
|
|
map['bloodPressure'],
|
|
map['bloodPressureSystolic'],
|
|
map['bloodPressureDiastolic'],
|
|
map['facialSkinAge'],
|
|
map['bloodAlcohol'],
|
|
map['bloodSugar'],
|
|
map['version']);
|
|
}
|
|
}
|
|
|
|
/// The cardiovascular risks result of a scan.
|
|
class CardiovascularRisks {
|
|
final double generalRisk;
|
|
final double coronaryHeartDisease;
|
|
final double congestiveHeartFailure;
|
|
final double intermittentClaudication;
|
|
final double stroke;
|
|
|
|
const CardiovascularRisks(this.generalRisk, this.coronaryHeartDisease,
|
|
this.congestiveHeartFailure, this.intermittentClaudication, this.stroke);
|
|
|
|
factory CardiovascularRisks.fromMap(Map map) {
|
|
return CardiovascularRisks(
|
|
map['generalRisk'],
|
|
map['coronaryHeartDisease'],
|
|
map['congestiveHeartFailure'],
|
|
map['intermittentClaudication'],
|
|
map['stroke']);
|
|
}
|
|
}
|
|
|
|
/// The covid risk result of a scan.
|
|
class CovidRisk {
|
|
final double covidRisk;
|
|
|
|
const CovidRisk(this.covidRisk);
|
|
|
|
factory CovidRisk.fromMap(Map map) {
|
|
return CovidRisk(map['covidRisk']);
|
|
}
|
|
}
|
|
|
|
/// The health risks result of a scan.
|
|
class HealthRisks {
|
|
final CardiovascularRisks? cardiovascularRisks;
|
|
final CovidRisk? covidRisk;
|
|
final String version;
|
|
|
|
const HealthRisks(this.cardiovascularRisks, this.covidRisk, this.version);
|
|
|
|
factory HealthRisks.fromMap(Map map) {
|
|
return HealthRisks(
|
|
map['cardiovascularRisks'] != null
|
|
? CardiovascularRisks.fromMap(map['cardiovascularRisks'])
|
|
: null,
|
|
map['covidRisk'] != null ? CovidRisk.fromMap(map['covidRisk']) : null,
|
|
map['version']);
|
|
}
|
|
}
|
|
|
|
/// The holistic analysis result of a scan.
|
|
class HolisticAnalysis {
|
|
final double? generalWellness;
|
|
final double? bmi;
|
|
final double? absi;
|
|
final double? cardiacWorkload;
|
|
final double? pulseRespiratoryQuotient;
|
|
final double? waistToHeightRatio;
|
|
final String? version;
|
|
|
|
const HolisticAnalysis(
|
|
this.generalWellness,
|
|
this.bmi,
|
|
this.absi,
|
|
this.cardiacWorkload,
|
|
this.pulseRespiratoryQuotient,
|
|
this.waistToHeightRatio,
|
|
this.version);
|
|
|
|
factory HolisticAnalysis.fromMap(Map map) {
|
|
return HolisticAnalysis(
|
|
map['generalWellness'],
|
|
map['bmi'],
|
|
map['absi'],
|
|
map['cardiacWorkload'],
|
|
map['pulseRespiratoryQuotient'],
|
|
map['waistToHeightRatio'],
|
|
map['version']);
|
|
}
|
|
}
|