|
@@ -268,38 +268,38 @@ public class PatientPHRLatestDTO {
|
|
|
public boolean getNeedBloodSugarCheck() {
|
|
|
return needCheckValue(this.bloodSugarCreateDate);
|
|
|
}
|
|
|
+ private boolean isAlarm(String alarmYn, boolean defaultValue) {
|
|
|
+ boolean useDefaultValue = (alarmYn != "Y") && (alarmYn != "N");
|
|
|
+ return useDefaultValue ? defaultValue : (alarmYn == "Y");
|
|
|
+ }
|
|
|
+
|
|
|
public boolean getIsTemperatureWarning() {
|
|
|
- // if (this.temperature == null) return false;
|
|
|
-
|
|
|
- // return this.temperature >= 37.5;
|
|
|
- return this.temperatureAlarmYN == "Y";
|
|
|
+ if (this.temperature == null) return false;
|
|
|
+
|
|
|
+ return isAlarm(this.temperatureAlarmYN, (this.temperature >= 37.5));
|
|
|
}
|
|
|
public boolean getIsBloodPressureWarning() {
|
|
|
- // if (this.systolicBloodPressure == null || this.diastolicBloodPressure == null) return false;
|
|
|
-
|
|
|
- // boolean highBP = this.systolicBloodPressure >= 149 || this.diastolicBloodPressure >= 99;
|
|
|
- // boolean lowBP = this.systolicBloodPressure <= 90 || this.diastolicBloodPressure <= 60;
|
|
|
+
|
|
|
+ if (this.systolicBloodPressure == null || this.diastolicBloodPressure == null) return false;
|
|
|
|
|
|
- // return highBP || lowBP;
|
|
|
- return this.systolicBloodPressureAlarmYN == "Y" || this.diastolicBloodPressureAlarmYN == "Y";
|
|
|
+ boolean systolicWarning = isAlarm(this.systolicBloodPressureAlarmYN, (this.systolicBloodPressure <= 90 || this.systolicBloodPressure >= 149));
|
|
|
+ boolean diastolicWarning = isAlarm(this.diastolicBloodPressureAlarmYN, (this.diastolicBloodPressure <= 60 || this.diastolicBloodPressure >= 99));
|
|
|
+ return systolicWarning || diastolicWarning;
|
|
|
}
|
|
|
public boolean getIsPulseRateWarning() {
|
|
|
- // if (this.pulseRate == null) return false;
|
|
|
-
|
|
|
- // return this.pulseRate <= 55 || this.pulseRate >= 110;
|
|
|
- return this.pulseRateAlarmYN == "Y";
|
|
|
+ if (this.pulseRate == null) return false;
|
|
|
+
|
|
|
+ return isAlarm(this.pulseRateAlarmYN, (this.pulseRate <= 55 || this.pulseRate >= 110));
|
|
|
}
|
|
|
public boolean getIsOxygenSaturationeWarning() {
|
|
|
- // if (this.oxygenSaturation == null) return false;
|
|
|
-
|
|
|
- // return this.oxygenSaturation <= 94;
|
|
|
- return this.oxygenSaturationAlarmYN == "Y";
|
|
|
+ if (this.oxygenSaturation == null) return false;
|
|
|
+
|
|
|
+ return isAlarm(this.oxygenSaturationAlarmYN, (this.oxygenSaturation <= 94));
|
|
|
}
|
|
|
public boolean getIsBloodSugarWarning() {
|
|
|
- // if (this.bloodSugar == null) return false;
|
|
|
-
|
|
|
- // return this.bloodSugar <= 70 || this.bloodSugar >= 200;
|
|
|
- return this.bloodSugarAlarmYN == "Y";
|
|
|
+ if (this.bloodSugar == null) return false;
|
|
|
+
|
|
|
+ return isAlarm(this.bloodSugarAlarmYN, (this.bloodSugar <= 70 || this.bloodSugar >= 200));
|
|
|
}
|
|
|
public boolean getHasTodaySymptom() {
|
|
|
boolean ret = false;
|