|
@ -92,7 +92,7 @@ public class FollowUpService {
|
|
public PageEnvelop followupPage(String businessType, String businessSource, String startDate, String endDate, String patientName,
|
|
public PageEnvelop followupPage(String businessType, String businessSource, String startDate, String endDate, String patientName,
|
|
String keyName,String followupStatus,String doctorName, Integer page, Integer size){
|
|
String keyName,String followupStatus,String doctorName, Integer page, Integer size){
|
|
String sql = "SELECT DISTINCT f.id,f.patient_name patientName,f.patient_code patientCode,p.photo,p.idcard,p.birthday,p.sex,p.mobile, " +
|
|
String sql = "SELECT DISTINCT f.id,f.patient_name patientName,f.patient_code patientCode,p.photo,p.idcard,p.birthday,p.sex,p.mobile, " +
|
|
"f.doctor_code doctorCode,f.doctor_name doctorName,pl.disease_name businessTypeName,pl.disease businessType, " +
|
|
|
|
|
|
"f.doctor_code doctorCode,f.doctor_name doctorName,pl.disease_name businessTypeName,pl.disease businessType,ip.id itemPlanId, " +
|
|
"h.dept_code deptCode,h.dept_name deptName,f.`status`,date_format(f.followup_date, '%Y-%m-%d %H:%i:%s') followupDate,'诊后康复' businessSource," +
|
|
"h.dept_code deptCode,h.dept_name deptName,f.`status`,date_format(f.followup_date, '%Y-%m-%d %H:%i:%s') followupDate,'诊后康复' businessSource," +
|
|
"date_format(f.followup_plan_date, '%Y-%m-%d %H:%i:%s') followupPlanDate,date_format(pl.create_time, '%Y-%m-%d %H:%i:%s') turnDownDate," +
|
|
"date_format(f.followup_plan_date, '%Y-%m-%d %H:%i:%s') followupPlanDate,date_format(pl.create_time, '%Y-%m-%d %H:%i:%s') turnDownDate," +
|
|
"pl.plan_doctor_name planDoctorName,h2.dept_name turnDownDeptName ";
|
|
"pl.plan_doctor_name planDoctorName,h2.dept_name turnDownDeptName ";
|
|
@ -105,7 +105,13 @@ public class FollowUpService {
|
|
"LEFT JOIN base_doctor_hospital h2 on pl.plan_doctor=h2.doctor_code and h2.del=1 " +
|
|
"LEFT JOIN base_doctor_hospital h2 on pl.plan_doctor=h2.doctor_code and h2.del=1 " +
|
|
"WHERE 1=1 ";
|
|
"WHERE 1=1 ";
|
|
if(StringUtils.isNotBlank(businessType)){
|
|
if(StringUtils.isNotBlank(businessType)){
|
|
filter += " and pl.disease='"+businessType+"' ";
|
|
|
|
|
|
if(businessType.contains(",")){
|
|
|
|
businessType = businessType.replace(",","','");
|
|
|
|
businessType = " in ('"+businessType+"') ";
|
|
|
|
}else {
|
|
|
|
businessType = " = '"+businessType+"' ";
|
|
|
|
}
|
|
|
|
filter += " and pl.disease "+businessType+" ";
|
|
}
|
|
}
|
|
if(StringUtils.isNotBlank(businessSource)){
|
|
if(StringUtils.isNotBlank(businessSource)){
|
|
|
|
|
|
@ -175,7 +181,13 @@ public class FollowUpService {
|
|
"LEFT JOIN base_doctor_hospital h2 on pl.plan_doctor=h2.doctor_code and h2.del=1 " +
|
|
"LEFT JOIN base_doctor_hospital h2 on pl.plan_doctor=h2.doctor_code and h2.del=1 " +
|
|
"WHERE 1=1 ";
|
|
"WHERE 1=1 ";
|
|
if(StringUtils.isNotBlank(businessType)){
|
|
if(StringUtils.isNotBlank(businessType)){
|
|
filter += " and pl.disease='"+businessType+"' ";
|
|
|
|
|
|
if(businessType.contains(",")){
|
|
|
|
businessType = businessType.replace(",","','");
|
|
|
|
businessType = " in ('"+businessType+"') ";
|
|
|
|
}else {
|
|
|
|
businessType = " = '"+businessType+"' ";
|
|
|
|
}
|
|
|
|
filter += " and pl.disease "+businessType+" ";
|
|
}
|
|
}
|
|
if(StringUtils.isNotBlank(businessSource)){
|
|
if(StringUtils.isNotBlank(businessSource)){
|
|
|
|
|