LAPTOP-KB9HII50\70708 11 kuukautta sitten
vanhempi
commit
c45b7154e4

+ 1 - 1
common/common-entity/src/db/2024.sql

@ -78,7 +78,7 @@ INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict
INSERT INTO `base`.`wlyy_hospital_sys_dict` (`id`, `saas_id`, `dict_name`, `dict_code`, `dict_value`, `py_code`, `sort`, `hospital`, `create_time`, `create_user`, `create_user_name`, `update_time`, `update_user`, `update_user_name`, `img_url`, `model_name`) VALUES ('patient_lable_disease_type11', NULL, 'patient_lable_disease_type', '11', '其他疾病', NULL, '11', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '居民标签_疾病类型');
CREATE TABLE `wlyy_patient_label_log` (
     `id` int NOT NULL AUTO_INCREMENT,,
     `id` int NOT NULL AUTO_INCREMENT,
     `patient` varchar(50) DEFAULT NULL,
     `doctor` varchar(50) DEFAULT NULL,
     `doctor_name` varchar(50) DEFAULT NULL,

+ 3 - 11
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/service/PatientHealthIndexService.java

@ -17,7 +17,6 @@ import com.yihu.jw.message.dao.MessageDao;
import com.yihu.jw.message.service.MessageService;
import com.yihu.jw.message.service.WxMessageUtil;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.restmodel.patient.PatientVO;
import com.yihu.jw.util.common.CommonUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.entity.ServiceException;
@ -99,13 +98,12 @@ public class PatientHealthIndexService {
        //患者信息
        BasePatientDO p = patientDao.findById(patientCode).orElse(null);
        PatientVO patient = new PatientVO();
        String patientsql = "select group_concat(label) disease from wlyy_sign_patient_label_info " +
                "where label_type = 3 and status=1 and (label = 1 or label = 2) and patient = '" + p.getId() + "' GROUP BY patient";
        String patientsql = "select group_concat(label_code) disease from wlyy_patient_label " +
                "where patient = '" + p.getId() + "' and label_type = 2 and (label_code = 1 or label_code = 2)  GROUP BY patient";
        String patientdisease = "";
        List<Map<String, Object>> diseases = jdbcTemplate.queryForList(patientsql);
        if (diseases != null && diseases.size() > 0) {
        if (diseases.size() > 0) {
            patientdisease = (String) diseases.get(0).get("disease");
        }
@ -140,10 +138,8 @@ public class PatientHealthIndexService {
            }
        }
        System.out.println("血压异常次数=>"+bloodPressureBbnormalCount+"  血糖异常次数=>"+bloodSuggurBbnormalCount);
        //连续3次异常,修改用户为预警状态
        if ((bloodPressureBbnormalCount >= 3 || bloodSuggurBbnormalCount >= 3)) {
            System.out.println("设置预警了");
            p.setStandardStatus(1);
//            setTrackPatientByDoctor(patientCode);
        } else {
@ -156,9 +152,6 @@ public class PatientHealthIndexService {
//                setTrackPatientByDoctor(patientCode);
            }
        }
        System.out.println("patientdisease=>"+patientdisease);
        System.out.println("stdbloodPressureBbnormalCount=>"+stdbloodPressureBbnormalCount);
        System.out.println("bloodPressureBbnormalCount=>"+bloodPressureBbnormalCount);
        //连续5次正常,修改用户为非预警状态
        if (StringUtils.isNotBlank(patientdisease)) {
            if ("1".equals(patientdisease)) {
@ -181,7 +174,6 @@ public class PatientHealthIndexService {
            p.setStandardStatus(0);
//            cancalTrackPatientByDoctor(patientCode);
        }
        System.out.println("p.getStandardStatus==>"+p.getStandardStatus());
        patientDao.save(p);
        //连续5次体征值正常,则修改为非预警状态;连续5次异常,修改为预警状态-----END
    }