|
@@ -88,7 +88,7 @@ public interface UpIdCollectionDao {
|
|
|
" adm_caty = (select rtrim(si_caty) from zd_unit_code where code = b.small_dept), " + // -- 入院科别
|
|
|
" refldept_dept = (select rtrim(si_caty) from zd_unit_code where code = b.zk_ward), " + //--转科科别
|
|
|
" b.dis_date as dscg_time, " + // -- 出院时间
|
|
|
- " dscg_caty = (select rtrim(si_caty) from zd_unit_code where code=isnull(isnull(zk_dept,zk_ward),small_dept)), " + // -- 出院科别
|
|
|
+ " dscg_caty = (select rtrim(si_caty) from zd_unit_code where code=isnull(zk_ward,small_dept)), " + // -- 出院科别
|
|
|
" datediff(day ,b.admiss_date ,b.dis_date) as act_ipt_days, " + // 实际住院天数
|
|
|
" zy_serial_no as biz_sn " +// 业务流水号
|
|
|
"from batj_ba2 a,zy_inactpatient b " +
|
|
@@ -230,8 +230,8 @@ public interface UpIdCollectionDao {
|
|
|
"rtrim(a.pat_no) pat_no,a.times,ledger_sn,psn_name,gend,brdy,insutype,psn_type,mdtrt_id,setl_id,setl_time, " +
|
|
|
" a.med_type,medfee_sumamt,fund_pay_sumamt, " +
|
|
|
" acct_pay,psn_cash_pay,clr_optins,clr_optins_name = (select name from t_region where code=clr_optins), " +
|
|
|
- " outDeptName=(select rtrim(name) from zd_unit_code where code=small_dept)," +
|
|
|
- " rtrim(small_dept) as out_dept, " +
|
|
|
+ " outDeptName=(select rtrim(name) from zd_unit_code where code=isnull(zk_ward,small_dept))," +
|
|
|
+ " rtrim(isnull(zk_ward,small_dept)) as out_dept, " +
|
|
|
" setl_list_id,datediff(day ,b.admiss_date ,b.dis_date) as act_ipt_days,b.operation,b.dec_type," +
|
|
|
" id,req_op_id,rtrim(req_op_name) req_op_name,req_op_date,req_remark," +
|
|
|
"audit_staff,audit_name,audit_date,audit_remark,audit_flag," +
|
|
@@ -255,7 +255,7 @@ public interface UpIdCollectionDao {
|
|
|
"</foreach>" +
|
|
|
"</if>" +
|
|
|
"<if test=\"outDepts.size > 0 and outDepts != null \">" +
|
|
|
- "and small_dept in " +
|
|
|
+ "and isnull(zk_ward,small_dept) in " +
|
|
|
"<foreach collection='outDepts' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
"#{item} " +
|
|
|
"</foreach>" +
|
|
@@ -336,7 +336,7 @@ public interface UpIdCollectionDao {
|
|
|
"</foreach>" +
|
|
|
"</if>" +
|
|
|
"<if test=\"outDepts.size > 0 \">" +
|
|
|
- "and small_dept in " +
|
|
|
+ "and isnull(zk_ward,small_dept) in " +
|
|
|
"<foreach collection='outDepts' item='item' index='index' open='(' close=')' separator=','>" +
|
|
|
"#{item} " +
|
|
|
"</foreach>" +
|
|
@@ -597,4 +597,4 @@ public interface UpIdCollectionDao {
|
|
|
@Select("select job_nurse as code,name = (select rtrim(name) from a_employee_mi where code = job_nurse ) from batj_ba2 where zyh = #{patNo} and zycs = #{times} ")
|
|
|
GetDropdownBox zeRenHuShi(@Param("patNo") String patNo,
|
|
|
@Param("times") Integer times);
|
|
|
-}
|
|
|
+}
|