Просмотр исходного кода

结算单上传中住院天数最小为 1

xiaochan 3 лет назад
Родитель
Сommit
ce3a320dd8

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -91,7 +91,7 @@ public interface UpIdCollectionDao {
             "       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(zk_ward,small_dept)), " + // -- 出院科别
-            "       datediff(day ,b.admiss_date ,b.dis_date) as  act_ipt_days,  " +  // 实际住院天数
+            "       case datediff(day, b.admiss_date ,b.dis_date) when 0 then 1 else datediff(day, b.admiss_date ,b.dis_date) end as act_ipt_days," +  // 实际住院天数
             "       zy_serial_no as biz_sn " +// 业务流水号
             "from batj_ba2 a,zy_inactpatient b " +
             "where a.bah = b.inpatient_no and a.zycs = b.admiss_times " +