|
@ -78,7 +78,7 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
|
|
|
" base_service_package_item i, " +
|
|
|
" base_org o " +
|
|
|
"WHERE " +
|
|
|
" sr.id = r.sign_id and sr.patient = '"+patient+"'" +
|
|
|
" sr.id = r.sign_id and sr.status=1 and sr.patient = '"+patient+"'" +
|
|
|
"AND r.service_package_id = i.service_package_id " +
|
|
|
"AND i.del = 1 " +
|
|
|
"and i.org_code = o.code " +
|
|
@ -126,7 +126,7 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
|
|
|
*/
|
|
|
public List<Map<String,Object>> fingServiceItemsByPatientId(String patientId){
|
|
|
String sql = "SELECT DISTINCT i.code,i.name from base_service_package_sign_record sr,base_service_package_record r, " +
|
|
|
" base_service_package_item i where sr.id = r.sign_id and r.service_package_id = i.service_package_id " +
|
|
|
" base_service_package_item i where sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id " +
|
|
|
" and i.del = 1 and sr.`status`=1 and sr.patient = '"+patientId+"' ";
|
|
|
return jdbcTemplate.queryForList(sql);
|
|
|
}
|
|
@ -138,7 +138,7 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
|
|
|
*/
|
|
|
public List<String> fingServiceItemsCodeByPatientId(String patientId){
|
|
|
String sql = "SELECT DISTINCT i.code from base_service_package_sign_record sr,base_service_package_record r, " +
|
|
|
" base_service_package_item i where sr.id = r.sign_id and r.service_package_id = i.service_package_id " +
|
|
|
" base_service_package_item i where sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id " +
|
|
|
" and i.del = 1 and sr.`status`=1 and sr.patient = '"+patientId+"' ";
|
|
|
return jdbcTemplate.queryForList(sql,String.class);
|
|
|
}
|
|
@ -169,7 +169,7 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
|
|
|
public List<Map<String,Object>> fingdDoctorBySignId(String signId,Integer level){
|
|
|
String sql = "SELECT DISTINCT d.id,d.name from base_service_package_sign_record sr,base_service_package_record r, " +
|
|
|
"base_service_package_item i,base_team_member m,base_doctor d " +
|
|
|
"WHERE sr.id = r.sign_id and r.service_package_id = i.service_package_id " +
|
|
|
"WHERE sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id " +
|
|
|
"and i.del = 1 and m.team_code = i.team_code " +
|
|
|
"and m.del = '1' and d.level = " + level+
|
|
|
" and sr.id = '"+signId+"' ";
|
|
@ -216,7 +216,7 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
|
|
|
|
|
|
String filters = " from base_service_package_sign_record sr,base_service_package_record r, " +
|
|
|
"base_service_package_item i,base_team_member m,base_patient p " +
|
|
|
"WHERE sr.id = r.sign_id and r.service_package_id = i.service_package_id " +
|
|
|
"WHERE sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id " +
|
|
|
"and i.del = 1 and m.team_code = i.team_code and p.id = sr.patient " +
|
|
|
"and m.doctor_code = '"+doctorId+"' and m.del = '1' and sr.`status`=1 ";
|
|
|
|
|
@ -248,7 +248,7 @@ public class ServicePackageService extends BaseJpaService<ServicePackageDO, Serv
|
|
|
public int getSignTotal(String doctorId){
|
|
|
String sql = "SELECT COUNT(DISTINCT sr.patient) from base_service_package_sign_record sr,base_service_package_record r, " +
|
|
|
"base_service_package_item i,base_team_member m " +
|
|
|
"WHERE sr.id = r.sign_id and r.service_package_id = i.service_package_id " +
|
|
|
"WHERE sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id " +
|
|
|
"and i.del = 1 and m.team_code = i.team_code " +
|
|
|
"and m.doctor_code = '"+doctorId+"' and m.del = '1' and sr.`status`=1 ";
|
|
|
|