浏览代码

代码修改

LAPTOP-KB9HII50\70708 9 月之前
父节点
当前提交
052510dcfd

+ 1 - 1
svr/svr-visit-behind/src/main/java/com/yihu/jw/hospital/module/health/dao/TrackPatientDao.java

@ -22,7 +22,7 @@ public interface TrackPatientDao extends PagingAndSortingRepository<TrackPatient
    @Query(value= "SELECT DISTINCT a.*\n" +
            "FROM wlyy_track_patient a  \n" +
            "INNER JOIN base_patient b ON a.patient_code=b.id \n" +
            "INNER JOIN wlyy_outpatient c ON b.id=c.patient  \n" +
            "INNER JOIN wlyy_outpatient c ON b.id=c.patient and a.doctor_code=c.doctor \n" +
            "WHERE 1=1\n" +
            "AND c.doctor=?1 \n" +
            "AND a.del=?2 ",nativeQuery = true)

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

@ -302,7 +302,7 @@ public class DoctorSchemeService {
        //1.4.2加入跟踪居民过滤
        if (StringUtils.isNotBlank(trackFlag) && "1".equals(trackFlag)) {
            sql = sql + " INNER JOIN wlyy_track_patient tp ON tp.patient_code = a.id ";
            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 ";
@ -604,7 +604,6 @@ public class DoctorSchemeService {
                "	base_patient a \n" +
                "	INNER JOIN wlyy_outpatient b ON a.id=b.patient\n" +
                "WHERE 1=1\n" +
                "AND a.disease_condition IN('1','2','0')\n" +
                "AND a.disease IN ('1','2','1,2','2,1')\n" +
                "AND b.doctor ='" + doctorcode + "'";
@ -2336,7 +2335,6 @@ public class DoctorSchemeService {
                "left join wlyy_track_patient t on t.doctor_code='"+doctorId+"' and t.patient_code=a.id AND t.del='1' " +
                "WHERE 1=1\n" +
                "AND a.standard_status='1'\n" +
                "AND a.disease_condition IN('1','2','0')\n" +
                "and l.label_name='高血压' " +
                "AND b.doctor ='" + doctorId + "'";
        // 高血压
@ -2346,7 +2344,6 @@ public class DoctorSchemeService {
                "INNER join wlyy_patient_label l on l.patient=a.id AND l.label_type='2' " +
                "left join wlyy_track_patient t on t.doctor_code='"+doctorId+"' and t.patient_code=a.id AND t.del='1' " +
                "WHERE 1=1\n" +
                "AND a.disease_condition IN('1','2','0')\n" +
                "and l.label_name='高血压' " +
                "AND b.doctor ='" + doctorId + "'";
@ -2358,7 +2355,6 @@ public class DoctorSchemeService {
                "left join wlyy_track_patient t on t.doctor_code='"+doctorId+"' and t.patient_code=a.id AND t.del='1' " +
                "WHERE 1=1\n" +
                "AND a.standard_status='1'\n" +
                "AND a.disease_condition IN('1','2','0')\n" +
                "and l.label_name='糖尿病' " +
                "AND b.doctor ='" + doctorId + "'";
        // 糖尿病
@ -2368,7 +2364,6 @@ public class DoctorSchemeService {
                "INNER join wlyy_patient_label l on l.patient=a.id AND l.label_type='2' " +
                "left join wlyy_track_patient t on t.doctor_code='"+doctorId+"' and t.patient_code=a.id AND t.del='1' " +
                "WHERE 1=1\n" +
                "AND a.disease_condition IN('1','2','0')\n" +
                "and l.label_name='糖尿病' " +
                "AND b.doctor ='" + doctorId + "'";
        if(StringUtils.isNotBlank(diseaseCondition)){
@ -2415,7 +2410,6 @@ public class DoctorSchemeService {
                "INNER join wlyy_patient_label l on l.patient=a.id AND l.label_type='2' " +
                "left join wlyy_track_patient t on t.doctor_code='"+doctorId+"' and t.patient_code=a.id AND t.del='1' " +
                "WHERE 1=1\n" +
                "AND a.disease_condition IN('1','2','0') " +
                "AND b.doctor ='" + doctorId + "'";
        if (StringUtils.isNotBlank(labelType)) {
            if ("1".equals(labelType)) {