LAPTOP-KB9HII50\70708 11 ماه پیش
والد
کامیت
4268dc934e

+ 17 - 3
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/controller/ChronicDiseaseController.java

@ -119,6 +119,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            }
            return write(200, "查询成功", "data", doctorSchemeService.getDoctorSwitchTrackPatient(doctorId));
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -135,6 +136,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            }
            return write(200, "操作成功", "data", doctorSchemeService.setDoctorSwitchTrackPatient(doctorId, state));
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -177,6 +179,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            List<String> result = doctorSchemeService.getPatientsByDiseaseConditionDiseaseDeviceType(null, disease, diseaseCondition, deviceType, doctorId, trackFlag);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -191,6 +194,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            //日志文件中记录异常信息
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -204,6 +208,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            List<DoctorSchemeBloodPressureVO> result = doctorSchemeService.getDoctorSchemeBloodPressureList(doctorcode);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -217,6 +222,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            doctorSchemeService.saveDoctorSchemeBloodPressure(data);
            return write(200, "操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -230,6 +236,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            doctorSchemeService.saveDoctorSchemeBloodSugger(data);
            return write(200, "操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -246,6 +253,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            doctorSchemeService.savePatientScheme(doctorcode, schemecode, type, patientcodes);
            return write(200, "操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -261,6 +269,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            doctorSchemeService.delDoctorScheme(doctorcode, schemecode, type);
            return write(200, "操作成功");
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -275,6 +284,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
        try {
            return write(200, "查询成功", "data", doctorSchemeService.getPatientHealthIndex(patient, startDate, endDate, type));
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -285,6 +295,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
        try {
            return write(200, "查询成功", "data", doctorSchemeService.getTrackPatientInfo(patient));
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }
@ -322,7 +333,8 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
        try {
            return write(200, "查询成功", "data", doctorSchemeService.getBodyInfo(patient, startDate, endDate, page, size));
        } catch (Exception e) {
            return error(-1, e.getMessage());
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
@ -339,7 +351,8 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            }
            return write(200, "查询成功", "data", doctorSchemeService.getTrackPatientCountTitle(doctorId, startDate, endDate));
        } catch (Exception e) {
            return error(-1, e.getMessage());
            e.printStackTrace();
            return error(-1, "查询失败");
        }
    }
@ -356,7 +369,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            return write(200, "查询成功", "data", doctorSchemeService.getTrackPatientServerCount(null, doctorId, startDate, endDate));
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
            return error(-1, "查询失败");
        }
    }
@ -478,6 +491,7 @@ public class ChronicDiseaseController extends EnvelopRestEndpoint {
            HashMap<String, Object> result = doctorSchemeService.getLabelCount(doctorId,diseaseCondition,isTrack,pastWeek);
            return write(200, "查询成功", "data", result);
        } catch (Exception e) {
            e.printStackTrace();
            return error(-1, e.getMessage());
        }
    }

+ 2 - 2
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/service/scheme/DoctorSchemeService.java

@ -296,13 +296,13 @@ public class DoctorSchemeService {
     * @date 2017/9/13 16:23
     */
    public List<String> getPatientsByDiseaseConditionDiseaseDeviceType(String teamCode, Integer disease, String diseaseCondition, Integer deviceType, String doctorcode, String trackFlag) throws Exception {
        String sql = "SELECT  a.id\n" +
        String sql = "SELECT distinct a.id\n" +
                "FROM base_patient a \n" +
                "INNER JOIN wlyy_outpatient b ON a.id=b.patient\n";
        //1.4.2加入跟踪居民过滤
        if (StringUtils.isNotBlank(trackFlag) && "1".equals(trackFlag)) {
            sql = sql + " INNER JOIN wlyy_track_patient tp ON tp.patient_code = a.id and tp.doctor_code=b.doctor";
            sql = sql + " INNER JOIN wlyy_track_patient tp ON tp.patient_code = a.id and tp.doctor_code=b.doctor ";
        }
        if (-1 != deviceType) {
            sql = sql + " LEFT JOIN wlyy_patient_device dev on dev.user = a.id ";