|
@ -114,7 +114,9 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" FROM " +
|
|
|
" wlyy_sign_family t1 " +
|
|
|
" left join " +
|
|
|
" (select patient,label,label_type from wlyy_sign_patient_label_info where label_type = ? and status = 1) t2 " +
|
|
|
" (select patient,label,label_type from wlyy_sign_patient_label_info where patient in " +
|
|
|
" (select patient from wlyy_sign_family where " + (doc.getLevel() == 2 ? "doctor" : "doctor_health") + "='" + doctor + "' and status > 0) " +
|
|
|
" and label_type = ? and status = 1) t2 " +
|
|
|
" on t1.patient = t2.patient " +
|
|
|
" WHERE " +
|
|
|
" t2.patient is null " +
|
|
@ -130,7 +132,8 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" wlyy_sign_family t1, " +
|
|
|
" wlyy_sign_patient_label_info t2 " +
|
|
|
" WHERE " +
|
|
|
" t2.label = ? " +
|
|
|
" t2.patient in (select patient from wlyy_sign_family where " + (doc.getLevel() == 2 ? "doctor" : "doctor_health") + " = '" + doctor + "' and status > 0 ) " +
|
|
|
" AND t2.label = ? " +
|
|
|
" AND t2.label_type = ? " +
|
|
|
" AND t2.status = 1 " +
|
|
|
" AND t1.patient = t2.patient " +
|
|
@ -370,7 +373,9 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" FROM" +
|
|
|
" wlyy_sign_family t1 " +
|
|
|
" left join " +
|
|
|
" (SELECT patient,label,label_type from wlyy_sign_patient_label_info where label_type = ? and status = 1) t2 " +
|
|
|
" (SELECT patient,label,label_type from wlyy_sign_patient_label_info where patient in " +
|
|
|
" (select patient from wlyy_sign_family where " + (doc.getLevel() == 2 ? "doctor" : "doctor_health") + " = '" + doctor + "' and status > 0) " +
|
|
|
" and label_type = ? and status = 1) t2 " +
|
|
|
" on t1.patient = t2.patient " +
|
|
|
" WHERE" +
|
|
|
" t2.patient is null " +
|
|
@ -391,6 +396,7 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" wlyy_sign_patient_label_info t2 " +
|
|
|
" WHERE" +
|
|
|
" t1.patient = t2.patient " +
|
|
|
" AND t2.patient in (select patient from wlyy_sign_family where " + (doc.getLevel() == 2 ? "doctor" : "doctor_health") + " = '" + doctor + "' and status > 0) " +
|
|
|
" AND t2.label = ? " +
|
|
|
" AND t2.label_type = ? " +
|
|
|
" AND t2.status = 1 " +
|
|
@ -630,8 +636,9 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" wlyy_sign_family t1 " +
|
|
|
(StringUtils.isNotEmpty(labelCode) || StringUtils.isNotEmpty(labelType) ?
|
|
|
" join " : " left join ") +
|
|
|
" (select patient,label,label_name,label_type from wlyy_sign_patient_label_info " +
|
|
|
" where status = 1 " +
|
|
|
" (select patient,label,label_name,label_type from wlyy_sign_patient_label_info where patient in" +
|
|
|
" (select patient from wlyy_sign_family where " + (doc.getLevel() == 2 ? "doctor" : "doctor_health") + " = '" + doctor + "' and status > 0) " +
|
|
|
" and status = 1 " +
|
|
|
(StringUtils.isNotEmpty(labelCode) ? " AND label = ? " : "") +
|
|
|
(StringUtils.isNotEmpty(labelType) ? " AND label_type = ? " : "") + ") t2" +
|
|
|
" ON t1.patient = t2.patient " +
|