|
@ -4224,11 +4224,13 @@ public class ImService {
|
|
|
"bop.status as \"payStatus1\" ," +
|
|
|
"op.patient_cancel_value as \"patientCancelValue\" ," +
|
|
|
"op.plan_doctor as \"planDoctor\" ," +
|
|
|
"oh.id as \"hospitalizationId\"," +
|
|
|
"op.patient_cancel_remark as \"patient_cancel_remark\" " +
|
|
|
"FROM wlyy_outpatient op LEFT JOIN wlyy_consult a ON a.relation_code = op.id \n" +
|
|
|
" LEFT join base_business_order_pay bop on bop.relation_code = op.id" +
|
|
|
" LEFT join wlyy_consult_team b on a.id = b.consult" +
|
|
|
" LEFT JOIN base_patient d on op.patient = d.id " +
|
|
|
" LEFT JOIN wlyy_outpatient_hospitalization oh on op.id= oh.outpatient_id " +
|
|
|
" WHERE 1=1 ";
|
|
|
if (status == 1) {
|
|
|
sql += " and op.status = 0 and op.pay_status =1 ";
|
|
@ -4300,6 +4302,8 @@ public class ImService {
|
|
|
sql += " AND op.outpatient_type = 2";
|
|
|
} else if (type.equalsIgnoreCase("28")) {
|
|
|
sql += " AND op.outpatient_type = 4";
|
|
|
} else if(type.equalsIgnoreCase("29")){
|
|
|
sql += " AND op.outpatient_type = 1 and oh.id is not null ";
|
|
|
}else {
|
|
|
sql += " AND op.type in (1,2,3) ";
|
|
|
}
|