|
@ -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)) {
|