|
@ -155,9 +155,12 @@ public class DeviceUploadService {
|
|
|
try{
|
|
|
String patientsql = "select group_concat(label_code) disease from wlyy_patient_label " +
|
|
|
"where patient = '" + patient.getId() + "' and label_type = 2 and (label_code = 1 or label_code = 2) GROUP BY patient";
|
|
|
System.out.println("patientsql==>"+ patientsql);
|
|
|
String patientdisease = jdbcTemplate.queryForObject(patientsql,String.class);
|
|
|
|
|
|
String patientdisease = "";
|
|
|
List<Map<String, Object>> diseases = jdbcTemplate.queryForList(patientsql);
|
|
|
if (diseases.size() > 0) {
|
|
|
patientdisease = (String) diseases.get(0).get("disease");
|
|
|
}
|
|
|
//连续5次体征值正常,则修改为非预警状态;连续5次异常,修改为预警状态-----START
|
|
|
int bloodPressureBbnormalCount = 0;//血压异常次数
|
|
|
int bloodSuggurBbnormalCount = 0;//血糖异常次数
|
|
@ -206,7 +209,6 @@ public class DeviceUploadService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
System.out.println("patientdisease=>"+patientdisease+" stdbloodPressureBbnormalCount=>"+stdbloodPressureBbnormalCount+" bloodPressureBbnormalCount=>"+bloodPressureBbnormalCount);
|
|
|
//连续5次正常,修改用户为非预警状态
|
|
|
if(StringUtils.isNotBlank(patientdisease)){
|
|
|
if ("1".equals(patientdisease)||"3".equals(patientdisease)) {
|