|
@ -307,25 +307,28 @@ public class PatientHealthIndexService extends BaseService {
|
|
// 查询病人家庭签约的健康管理师
|
|
// 查询病人家庭签约的健康管理师
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patientCode);
|
|
SignFamily signFamily = signFamilyDao.findByjiatingPatientYes(patientCode);
|
|
String healthDoctorFamily = "";
|
|
String healthDoctorFamily = "";
|
|
String doctotFamily = "";
|
|
|
|
|
|
String doctorFamily = "";
|
|
/*String doctorName = "";
|
|
/*String doctorName = "";
|
|
String doctorOpenID = "";*/
|
|
String doctorOpenID = "";*/
|
|
if (signFamily != null) {
|
|
if (signFamily != null) {
|
|
healthDoctorFamily = signFamily.getDoctorHealth();
|
|
healthDoctorFamily = signFamily.getDoctorHealth();
|
|
doctotFamily = signFamily.getDoctor();
|
|
|
|
if (StringUtils.isNotEmpty(healthDoctorFamily)) {
|
|
|
|
|
|
doctorFamily = signFamily.getDoctor();
|
|
|
|
if (StringUtils.isNotEmpty(healthDoctorFamily) && StringUtils.isNotEmpty(doctorFamily)){
|
|
// 添加到消息接收人列表
|
|
// 添加到消息接收人列表
|
|
|
|
if (doctorFamily.equals(healthDoctorFamily)){
|
|
|
|
System.out.println("-------------健管师和家医同一个人-------------");
|
|
|
|
receivers.add(healthDoctorFamily);
|
|
|
|
}else {
|
|
|
|
System.out.println("-------------健管师和家医不是同一个人-------------");
|
|
|
|
receivers.add(healthDoctorFamily);
|
|
|
|
receivers.add(doctorFamily);
|
|
|
|
}
|
|
|
|
}else if (StringUtils.isNotEmpty(healthDoctorFamily) && StringUtils.isEmpty(doctorFamily)){
|
|
|
|
System.out.println("-------------家医为空-------------");
|
|
receivers.add(healthDoctorFamily);
|
|
receivers.add(healthDoctorFamily);
|
|
/* Doctor doctor = doctorDao.findByCode(healthDoctorFamily);
|
|
|
|
doctorName = doctor.getName();
|
|
|
|
doctorOpenID = doctor.getOpenid();*/
|
|
|
|
}
|
|
|
|
if (StringUtils.isNotEmpty(doctotFamily)){
|
|
|
|
// 添加到消息接收人列表
|
|
|
|
receivers.add(signFamily.getDoctor());
|
|
|
|
/*Doctor doctor = doctorDao.findByCode(signFamily.getDoctor());
|
|
|
|
doctorName = doctor.getName();
|
|
|
|
doctorOpenID = doctor.getOpenid();*/
|
|
|
|
|
|
}else if (StringUtils.isNotEmpty(doctorFamily) && StringUtils.isEmpty(healthDoctorFamily)){
|
|
|
|
System.out.println("-------------健管师为空-------------");
|
|
|
|
receivers.add(doctorFamily);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@ -338,9 +341,9 @@ public class PatientHealthIndexService extends BaseService {
|
|
// 添加到消息接收人列表
|
|
// 添加到消息接收人列表
|
|
receivers.add(healthDoctorTeam);
|
|
receivers.add(healthDoctorTeam);
|
|
}
|
|
}
|
|
if (StringUtils.isNotEmpty(signFamilySS.getDoctor()) && !StringUtils.equals(doctotFamily, signFamilySS.getDoctor())) {
|
|
|
|
|
|
if (StringUtils.isNotEmpty(signFamilySS.getDoctor()) && !StringUtils.equals(doctorFamily, signFamilySS.getDoctor())) {
|
|
// 添加到消息接收人列表
|
|
// 添加到消息接收人列表
|
|
receivers.add(doctotFamily);
|
|
|
|
|
|
receivers.add(doctorFamily);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
List<Message> messages = new ArrayList<Message>();
|
|
List<Message> messages = new ArrayList<Message>();
|
|
@ -573,9 +576,9 @@ public class PatientHealthIndexService extends BaseService {
|
|
} else { //餐前
|
|
} else { //餐前
|
|
if (!checkHealthIndex(NumberUtils.toDouble(value1), maxValueBefore, minValueBefore)) {
|
|
if (!checkHealthIndex(NumberUtils.toDouble(value1), maxValueBefore, minValueBefore)) {
|
|
oldMsgContent += patient.getName() + "血糖异常(" + value1 + "mmol/L)";
|
|
oldMsgContent += patient.getName() + "血糖异常(" + value1 + "mmol/L)";
|
|
if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueAfter ,minValueAfter)==1){
|
|
|
|
|
|
if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueBefore ,minValueBefore)==1){
|
|
msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏高</span>";
|
|
msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏高</span>";
|
|
}else if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueAfter ,minValueAfter)==2){
|
|
|
|
|
|
}else if(checkHealthIndexDetail(NumberUtils.toDouble(value1), maxValueBefore ,minValueBefore)==2){
|
|
msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏低</span>";
|
|
msgContent = "<a>"+patient.getName()+"</a><span style=\"color: #FF4C4C;\">血糖偏低</span>";
|
|
}
|
|
}
|
|
updateStatus(data);
|
|
updateStatus(data);
|