Ver código fonte

代码修改

suqinyi 3 meses atrás
pai
commit
00180bf221

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/article/service/BaseMenuManageService.java

@ -1349,7 +1349,7 @@ public class BaseMenuManageService {
    public List findArticleUserStatusList(String doctorCode, String relationCode, String patientName) {
        String sql = " SELECT DISTINCT \n" +
                " TIMESTAMPDIFF(YEAR, d.birthday, CURDATE()) AS age, d.sex,d.photo, c.* \n" +
                " TIMESTAMPDIFF(YEAR, d.birthday, CURDATE()) AS age, d.sex,d.photo, c.*,d.name as 'userName' \n" +
                " FROM wlyy_knowledge_article_dict a " +
                " INNER JOIN base_patient_business b ON a.id=b.relation_code" +
                " INNER JOIN  wlyy_knowledge_article_user c ON a.id=c.relation_code \n" +

+ 1 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/common/service/LabelService.java

@ -318,7 +318,7 @@ public class LabelService {
     */
    public List<Map<String, Object>> findLabelPatientGroupCount(String name, String labelType,String doctorCode) {
        String sql = "SELECT\n" +
                "	DISTINCT a.label_code,a.label_name,count(1) 'labelCount'\n" +
                "	 a.label_code,a.label_name,count(DISTINCT b.id) 'labelCount'\n" +
                "FROM\n" +
                "	wlyy_patient_label a\n" +
                "	INNER JOIN base_patient b ON a.patient=b.id\n" +

+ 2 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/controller/DoctorFollowUpController.java

@ -101,7 +101,7 @@ public class DoctorFollowUpController extends BaseController {
    @ApiOperation(value = "查询居民随访列表")
    public String getListByPatient(
            @RequestParam @ApiParam(value = "居民Code") String patient,
            @RequestParam @ApiParam(value = "医生Code") String doctorCode,
            @ApiParam(name = "doctorCode", value = "医生code") @RequestParam(value = "doctorCode", required = false) String doctorCode,
            @RequestParam @ApiParam(value = "第几页") int page,
            @RequestParam @ApiParam(value = "页大小") int pagesize,
            @RequestParam(value = "type",required = false) @ApiParam(value = "类型:放空为全部,1计划,2记录",defaultValue = "0") String type) {
@ -125,8 +125,7 @@ public class DoctorFollowUpController extends BaseController {
                                 @RequestParam(value = "startTime", required = true) String startTime,
                                 @ApiParam(name = "endTime", value = "结束时间", defaultValue = "2016-12-14 00:00:00")
                                 @RequestParam(value = "endTime", required = true) String endTime,
                                 @ApiParam(name = "page", value = "第几页", defaultValue = "1")
                                 @RequestParam(value = "page", required = true) String page,
                                 @ApiParam(name = "page", value = "第几页", defaultValue = "1") @RequestParam(value = "page", required = true) String page,
                                 @ApiParam(name = "pageSize", value = "每页几行", defaultValue = "10")
                                 @RequestParam(value = "pageSize", required = true) String pageSize) {
        try {

+ 0 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/followup/service/FollowUpService.java

@ -374,16 +374,13 @@ public class FollowUpService {
            }else {
                result = followupDao.findByPatient(patient, pageRequest);
            }
        } else if ("1".equals(type)) {
            //已经开始的就是记录
            if (StringUtils.isNotBlank(doctorCode)){
                result = followupDao.findPlanByPatient(patient,doctorCode, pageRequest);
            }else {
                result = followupDao.findPlanByPatient(patient, pageRequest);
            }
        } else if ("2".equals(type)) {
            //未开始的就是计划
            result = followupDao.findRecordByPatient(patient,doctorCode, pageRequest);
        } else {
            result = followupDao.findByPatient(patient, pageRequest);

+ 14 - 4
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/service/DeviceUploadService.java

@ -27,6 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
import org.springframework.test.context.jdbc.Sql;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
@ -155,7 +156,7 @@ public class DeviceUploadService {
        try{
            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 = '"+patientCode+"' GROUP BY patient";
            System.out.println("patientsql==>"+ patientsql);
            String patientdisease = jdbcTemplate.queryForObject(patientsql,String.class);
            //连续5次体征值正常,则修改为非预警状态;连续5次异常,修改为预警状态-----START
@ -166,13 +167,14 @@ public class DeviceUploadService {
            List<DevicePatientHealthIndex> bloodPressurepatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,2);
            List<DevicePatientHealthIndex> bloodSuggurpatientHealthIndices = patientHealthIndexDao.findByPatientAndTypeByPage(patientCode,1);
            System.out.println("bloodPressurepatientHealthIndices.size()==>"+bloodPressurepatientHealthIndices.size());
            System.out.println("bloodSuggurpatientHealthIndices.size()==>"+bloodSuggurpatientHealthIndices.size());
            if(!bloodPressurepatientHealthIndices.isEmpty()){
                stdbloodPressureBbnormalCount = bloodPressurepatientHealthIndices.size();
                stdbloodPressureBbnormalCount = bloodPressurepatientHealthIndices.size();//血压次数
            }
            if(!bloodSuggurpatientHealthIndices.isEmpty()){
                stdbloodSuggurBbnormalCount = bloodSuggurpatientHealthIndices.size();
                stdbloodSuggurBbnormalCount = bloodSuggurpatientHealthIndices.size();//血糖次数
            }
            for (DevicePatientHealthIndex index1 : bloodPressurepatientHealthIndices) {
@ -186,8 +188,12 @@ public class DeviceUploadService {
                    bloodSuggurBbnormalCount++;
                }
            }
            System.out.println("血压异常次数-bloodPressureBbnormalCount数量==>"+bloodPressureBbnormalCount);
            System.out.println("血糖异常次数-stdbloodSuggurBbnormalCount数量==>"+stdbloodSuggurBbnormalCount);
            //连续3次异常,修改用户为预警状态
            if( (bloodPressureBbnormalCount >=3 || bloodSuggurBbnormalCount >=3)){
                System.out.println("连续3次异常,修改用户为预警状态");
                patient.setStandardStatus(1);
//                setTrackPatientByDoctor(patientCode);
            }else{
@ -196,11 +202,15 @@ public class DeviceUploadService {
                //计算血糖或者血压一周内的异常记录数量
                int errorCount = patientHealthIndexDao.getCountByTimeAndStatus(start,end,1,patientCode);
                if(errorCount >= 5){//超过5次,记为预警状态
                    System.out.println("计算血糖或者血压一周内的异常记录数量-->超过5次,记为预警状态");
                    patient.setStandardStatus(1);
//                    setTrackPatientByDoctor(patientCode);
                }else {
                    System.out.println("计算血糖或者血压一周内的异常记录数量-->没有超过5次");
                }
            }
            System.out.println("patientdisease=>"+patientdisease+"  stdbloodPressureBbnormalCount=>"+stdbloodPressureBbnormalCount+"  bloodPressureBbnormalCount=>"+bloodPressureBbnormalCount);
            //连续5次正常,修改用户为非预警状态
            if(StringUtils.isNotBlank(patientdisease)){
                if("1".equals(patientdisease)){

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

@ -140,9 +140,10 @@ public class PatientHealthIndexService {
            }
        }
        System.out.println("血压异常次数=>"+bloodPressureBbnormalCount+"  血糖异常次数=>"+bloodSuggurBbnormalCount);
        //连续3次异常,修改用户为预警状态
        if ((bloodPressureBbnormalCount >= 3 || bloodSuggurBbnormalCount >= 3)) {
            System.out.println("设置预警了");
            p.setStandardStatus(1);
//            setTrackPatientByDoctor(patientCode);
        } else {
@ -155,7 +156,9 @@ 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)) {
@ -178,7 +181,7 @@ public class PatientHealthIndexService {
            p.setStandardStatus(0);
//            cancalTrackPatientByDoctor(patientCode);
        }
        System.out.println("p.getStandardStatus==>"+p.getStandardStatus());
        patientDao.save(p);
        //连续5次体征值正常,则修改为非预警状态;连续5次异常,修改为预警状态-----END
    }