|
@ -497,6 +497,8 @@ public class DeviceService {
|
|
|
|
|
|
int bloodPressureBbnormalCount = 0;//血压异常次数
|
|
|
int bloodSuggurBbnormalCount = 0;//血糖异常次数
|
|
|
int stdbloodPressureBbnormalCount = 0;//血压次数
|
|
|
int stdbloodSuggurBbnormalCount = 0;//血糖次数
|
|
|
|
|
|
List<PatientHealthIndex> bloodPressurepatientHealthIndices = new ArrayList<>();
|
|
|
List<PatientHealthIndex> bloodSuggurpatientHealthIndices = new ArrayList<>();
|
|
@ -504,6 +506,14 @@ public class DeviceService {
|
|
|
bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,2);
|
|
|
bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,1);
|
|
|
|
|
|
if(!bloodPressurepatientHealthIndices.isEmpty()){
|
|
|
stdbloodPressureBbnormalCount = bloodPressurepatientHealthIndices.size();
|
|
|
}
|
|
|
|
|
|
if(!bloodSuggurpatientHealthIndices.isEmpty()){
|
|
|
stdbloodSuggurBbnormalCount = bloodSuggurpatientHealthIndices.size();
|
|
|
}
|
|
|
|
|
|
for (PatientHealthIndex index1 : bloodPressurepatientHealthIndices) {
|
|
|
if(index1.getStatus() != null && 1 == index1.getStatus()){
|
|
|
bloodPressureBbnormalCount++;
|
|
@ -535,19 +545,19 @@ public class DeviceService {
|
|
|
//连续5次正常,修改用户为非预警状态
|
|
|
if(StringUtils.isNotBlank(patientdisease)){
|
|
|
if("1".equals(patientdisease)){
|
|
|
if(0 == bloodPressureBbnormalCount && (patient.getStandardStatus() == null || 1 == patient.getStandardStatus())){
|
|
|
if(stdbloodPressureBbnormalCount==5&&0 == bloodPressureBbnormalCount && (patient.getStandardStatus() == null || 1 == patient.getStandardStatus())){
|
|
|
patient.setStandardStatus(0);
|
|
|
//1.4.2加入重点关注逻辑
|
|
|
cancalTrackPatientByDoctor(patientCode);
|
|
|
}
|
|
|
}else if("2".equals(patientdisease)){
|
|
|
if(0 == bloodSuggurBbnormalCount && (patient.getStandardStatus() == null || 1 == patient.getStandardStatus())){
|
|
|
if(stdbloodSuggurBbnormalCount==5&&0 == bloodSuggurBbnormalCount && (patient.getStandardStatus() == null || 1 == patient.getStandardStatus())){
|
|
|
patient.setStandardStatus(0);
|
|
|
//1.4.2加入重点关注逻辑
|
|
|
cancalTrackPatientByDoctor(patientCode);
|
|
|
}
|
|
|
}else if( "1,2".equals(patientdisease) || "2,1".equals(patientdisease)){
|
|
|
if( 0 == bloodSuggurBbnormalCount && 0 == bloodPressureBbnormalCount && (patient.getStandardStatus() == null || 1 == patient.getStandardStatus())){
|
|
|
if(stdbloodSuggurBbnormalCount==5&&stdbloodPressureBbnormalCount==5&&0 == bloodSuggurBbnormalCount && 0 == bloodPressureBbnormalCount && (patient.getStandardStatus() == null || 1 == patient.getStandardStatus())){
|
|
|
patient.setStandardStatus(0);
|
|
|
//1.4.2加入重点关注逻辑
|
|
|
cancalTrackPatientByDoctor(patientCode);
|