|
@@ -152,10 +152,15 @@ public interface YbStatDao {
|
|
|
YbStatResult selectYbStatRatioTotal(@Param("beginTime") String beginTime, @Param("endTime") String endTime, @Param("setlType") String setlType);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType " +
|
|
|
+ "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType," +
|
|
|
+ "rtrim(isnull(zd2.dis_diag_comment, zd1.dis_diag_comment)) as mainDiagnosis, rtrim(isnull(ss2.ssmc, ss1.ssmc)) as mainOperation " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"left join zy_dept_code z on zy.small_dept = z.code " +
|
|
|
+ "left join zy_dis_diag_yb zd1 on (zd1.inpatient_no = a.pat_no and zd1.admiss_times = a.times and zd1.dis_diag_no = '1') " +
|
|
|
+ "left join zy_dis_diag_yb_modify zd2 on (zd2.inpatient_no = a.pat_no and zd2.admiss_times = a.times and zd2.dis_diag_no = '1') " +
|
|
|
+ "left join batj_ba4 ss1 on (ss1.zyh = a.pat_no and ss1.zycs = a.times and ss1.ssxh = '1') " +
|
|
|
+ "left join batj_ba4_modify ss2 on (ss2.zyh = a.pat_no and ss2.zycs = a.times and ss2.ssxh = '1') " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
|
"<if test=\"insuplcAdmdvs != null and insuplcAdmdvs.size > 0 \">" +
|
|
|
" and a.insuplc_admdvs in " +
|
|
@@ -181,10 +186,15 @@ public interface YbStatDao {
|
|
|
@Param("med_type") List<String> med_type);
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType " +
|
|
|
+ "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType, " +
|
|
|
+ "rtrim(isnull(zd2.dis_diag_comment, zd1.dis_diag_comment)) as mainDiagnosis, rtrim(isnull(ss2.ssmc, ss1.ssmc)) as mainOperation " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"left join zy_dept_code z on zy.small_dept = z.code " +
|
|
|
+ "left join zy_dis_diag_yb zd1 on (zd1.inpatient_no = a.pat_no and zd1.admiss_times = a.times and zd1.dis_diag_no = '1') " +
|
|
|
+ "left join zy_dis_diag_yb_modify zd2 on (zd2.inpatient_no = a.pat_no and zd2.admiss_times = a.times and zd2.dis_diag_no = '1') " +
|
|
|
+ "left join batj_ba4 ss1 on (ss1.zyh = a.pat_no and ss1.zycs = a.times and ss1.ssxh = '1') " +
|
|
|
+ "left join batj_ba4_modify ss2 on (ss2.zyh = a.pat_no and ss2.zycs = a.times and ss2.ssxh = '1') " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
|
"and a.insuplc_admdvs != '439900' and a.insuplc_admdvs like '43%' and a.insuplc_admdvs not like '4301%' and a.med_type != '2102' " +
|
|
|
"</script>")
|
|
@@ -192,10 +202,15 @@ public interface YbStatDao {
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType " +
|
|
|
+ "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType, " +
|
|
|
+ "rtrim(isnull(zd2.dis_diag_comment, zd1.dis_diag_comment)) as mainDiagnosis, rtrim(isnull(ss2.ssmc, ss1.ssmc)) as mainOperation " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"left join zy_dept_code z on zy.small_dept = z.code " +
|
|
|
+ "left join zy_dis_diag_yb zd1 on (zd1.inpatient_no = a.pat_no and zd1.admiss_times = a.times and zd1.dis_diag_no = '1') " +
|
|
|
+ "left join zy_dis_diag_yb_modify zd2 on (zd2.inpatient_no = a.pat_no and zd2.admiss_times = a.times and zd2.dis_diag_no = '1') " +
|
|
|
+ "left join batj_ba4 ss1 on (ss1.zyh = a.pat_no and ss1.zycs = a.times and ss1.ssxh = '1') " +
|
|
|
+ "left join batj_ba4_modify ss2 on (ss2.zyh = a.pat_no and ss2.zycs = a.times and ss2.ssxh = '1') " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
|
"and a.insuplc_admdvs != '439900' and a.insuplc_admdvs not like '43%' " +
|
|
|
"</script>")
|
|
@@ -203,10 +218,15 @@ public interface YbStatDao {
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
|
- "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType " +
|
|
|
+ "select a.*, rtrim(zy.small_dept) as deptId, rtrim(z.name) as psnCertType, " +
|
|
|
+ "rtrim(isnull(zd2.dis_diag_comment, zd1.dis_diag_comment)) as mainDiagnosis, rtrim(isnull(ss2.ssmc, ss1.ssmc)) as mainOperation " +
|
|
|
"from t_si_setlinfo a " +
|
|
|
"left join zy_inactpatient zy on (zy.inpatient_no = a.pat_no and zy.admiss_times = a.times) " +
|
|
|
"left join zy_dept_code z on zy.small_dept = z.code " +
|
|
|
+ "left join zy_dis_diag_yb zd1 on (zd1.inpatient_no = a.pat_no and zd1.admiss_times = a.times and zd1.dis_diag_no = '1') " +
|
|
|
+ "left join zy_dis_diag_yb_modify zd2 on (zd2.inpatient_no = a.pat_no and zd2.admiss_times = a.times and zd2.dis_diag_no = '1') " +
|
|
|
+ "left join batj_ba4 ss1 on (ss1.zyh = a.pat_no and ss1.zycs = a.times and ss1.ssxh = '1') " +
|
|
|
+ "left join batj_ba4_modify ss2 on (ss2.zyh = a.pat_no and ss2.zycs = a.times and ss2.ssxh = '1') " +
|
|
|
"where a.revoked=0 and a.setl_type=#{setlType} and a.setl_time>=#{beginTime} and a.setl_time<=#{endTime} " +
|
|
|
"and a.insuplc_admdvs != '439900' and a.insuplc_admdvs like '43%' and a.insuplc_admdvs not like '4301%' and a.med_type = '2102' " +
|
|
|
"</script>")
|