|
@ -1085,8 +1085,12 @@ public class PrescriptionInfoService extends BaseService {
|
|
param.add(endDate + " 23:59:59");
|
|
param.add(endDate + " 23:59:59");
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
pre_sql.append(" AND e.hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
|
|
if("other".equals(hospital)){
|
|
|
|
pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='') ");
|
|
|
|
}else{
|
|
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
}
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(state)) {
|
|
if (StringUtils.isNotBlank(state)) {
|
|
pre_sql.append(" AND pr.status = ? ");
|
|
pre_sql.append(" AND pr.status = ? ");
|
|
@ -1126,8 +1130,12 @@ public class PrescriptionInfoService extends BaseService {
|
|
param.add(endDate + " 23:59:59");
|
|
param.add(endDate + " 23:59:59");
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
pre_sql.append(" AND e.hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
|
|
if("other".equals(hospital)){
|
|
|
|
pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='')");
|
|
|
|
}else{
|
|
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
}
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(state)) {
|
|
if (StringUtils.isNotBlank(state)) {
|
|
pre_sql.append(" AND pr.status = ? ");
|
|
pre_sql.append(" AND pr.status = ? ");
|
|
@ -1174,8 +1182,22 @@ public class PrescriptionInfoService extends BaseService {
|
|
//
|
|
//
|
|
Doctor d = doctorDao.findByCode(doctor);
|
|
Doctor d = doctorDao.findByCode(doctor);
|
|
if (d != null && StringUtils.isNotBlank(d.getHospital())) {
|
|
if (d != null && StringUtils.isNotBlank(d.getHospital())) {
|
|
String h = d.getHospital().substring(0, 8);
|
|
|
|
String sql = "SELECT h.`code`,h.`name` FROM dm_hospital h WHERE h.`code` LIKE '%" + h + "%' ";
|
|
|
|
|
|
//String h = d.getHospital().substring(0, 8);
|
|
|
|
// String sql = "SELECT h.`code`,h.`name` FROM dm_hospital h WHERE h.`code` LIKE '%" + h + "%' ";
|
|
|
|
String sql = " SELECT " +
|
|
|
|
" e.patient_hospital_name AS name, " +
|
|
|
|
" e.patient_hospital_code AS code " +
|
|
|
|
" FROM " +
|
|
|
|
" wlyy_prescription_expressage e " +
|
|
|
|
" WHERE " +
|
|
|
|
" ( " +
|
|
|
|
" e.accept_code = '"+doctor+"' " +
|
|
|
|
" OR e.expressage_code = '"+doctor+"' " +
|
|
|
|
" ) " +
|
|
|
|
" AND e.patient_hospital_code IS NOT NULL " +
|
|
|
|
" AND e.patient_hospital_code <> '' " +
|
|
|
|
" GROUP BY " +
|
|
|
|
" e.patient_hospital_code ";
|
|
List<Map<String, Object>> hs = jdbcTemplate.queryForList(sql);
|
|
List<Map<String, Object>> hs = jdbcTemplate.queryForList(sql);
|
|
rs.put("hospitals", hs);
|
|
rs.put("hospitals", hs);
|
|
} else {
|
|
} else {
|
|
@ -1367,8 +1389,12 @@ public class PrescriptionInfoService extends BaseService {
|
|
param.add(endDate + " 23:59:59");
|
|
param.add(endDate + " 23:59:59");
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
|
|
if("other".equals(hospital)){
|
|
|
|
pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='')");
|
|
|
|
}else{
|
|
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
}
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(state)) {
|
|
if (StringUtils.isNotBlank(state)) {
|
|
pre_sql.append(" AND pr.status = ? ");
|
|
pre_sql.append(" AND pr.status = ? ");
|
|
@ -1409,8 +1435,12 @@ public class PrescriptionInfoService extends BaseService {
|
|
param.add(endDate + " 23:59:59");
|
|
param.add(endDate + " 23:59:59");
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
if (StringUtils.isNotBlank(hospital)) {
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
|
|
if("other".equals(hospital)){
|
|
|
|
pre_sql.append(" AND (e.patient_hospital_code IS NULL OR e.patient_hospital_code ='')");
|
|
|
|
}else{
|
|
|
|
pre_sql.append(" AND e.patient_hospital_code = ? ");
|
|
|
|
param.add(hospital);
|
|
|
|
}
|
|
}
|
|
}
|
|
if (StringUtils.isNotBlank(state)) {
|
|
if (StringUtils.isNotBlank(state)) {
|
|
pre_sql.append(" AND pr.status = ? ");
|
|
pre_sql.append(" AND pr.status = ? ");
|