瀏覽代碼

DRG&DIP接口优化

lighter 2 年之前
父節點
當前提交
a895eb5175
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      src/main/java/thyyxxk/webserver/dao/his/api/forpowersi/drgdip/DrgDipDao.java

+ 2 - 1
src/main/java/thyyxxk/webserver/dao/his/api/forpowersi/drgdip/DrgDipDao.java

@@ -161,7 +161,8 @@ public interface DrgDipDao {
             "hospDischTime=convert(varchar(19),a.dis_date,21), " +
             "insurAreaId=(select d.insuplc_admdvs from t_si_pat_info d where d.pat_no=#{patNo} and d.times=#{times} and d.ledger_sn=#{sn}), " +
             "insurType=(select d.insutype from t_si_pat_info d where d.pat_no=#{patNo} and d.times=#{times} and d.ledger_sn=#{sn}), " +
-            "a.med_type as ttmntTypeCode,a.admiss_times as hsptzdCount, " +
+            "ttmntTypeCode=(select d.med_type from t_si_pat_info d where d.pat_no=#{patNo} and d.times=#{times} and d.ledger_sn=#{sn})," +
+            "a.admiss_times as hsptzdCount, " +
             "disCode=(select d.icd_code from zy_in_diag_yb d where d.inpatient_no=a.inpatient_no and d.admiss_times=a.admiss_times and d.diag_no=1), " +
             "disName=(select d.icd_text from zy_in_diag_yb d where d.inpatient_no=a.inpatient_no and d.admiss_times=a.admiss_times and d.diag_no=1) " +
             "from zy_inactpatient a, a_patient_mi b where a.inpatient_no=#{patNo} and a.admiss_times=#{times} and a.inpatient_no=b.inpatient_no ")