|
@ -326,11 +326,9 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
//慢病管理
|
|
|
sql = "SELECT " +
|
|
|
" DISTINCT t1.* " +
|
|
|
" FROM wlyy_sign_family t1 " +
|
|
|
" FROM wlyy_sign_family t1 " +
|
|
|
" LEFT JOIN wlyy_patient p on p.code = t1.patient "+
|
|
|
" RIGHT JOIN wlyy_sign_patient_label_info t2 on t2.patient = t1.patient ";
|
|
|
if(StringUtils.isNotBlank(diseaseCondition)) {
|
|
|
sql = sql + " LEFT JOIN wlyy_patient p on p.code = t1.patient ";
|
|
|
}
|
|
|
sql = sql + " WHERE t2.label = ?";
|
|
|
|
|
|
if(StringUtils.isNotBlank(diseaseCondition)) {
|
|
@ -342,7 +340,7 @@ public class SignPatientLabelInfoService extends BaseService {
|
|
|
" AND t1.patient = t2.patient " +
|
|
|
" AND (t1.doctor = ? or t1.doctor_health = ?)" +
|
|
|
" AND t1.status > 0 " +
|
|
|
" AND t1.admin_team_code = ? order by t1.openid desc,convert(t1.name using gbk) ";
|
|
|
" AND t1.admin_team_code = ? order by p.standard_status DESC ,p.disease_condition DESC,t2.label DESC,t1.openid DESC ,convert(t1.name using gbk) ";
|
|
|
if(StringUtils.isNotBlank(diseaseCondition)) {
|
|
|
args = new Object[]{labelCode, diseaseCondition, labelType, doctor, doctor, teamCode};
|
|
|
}else{
|