浏览代码

在院查询报表中添加转科科室和入院诊断

xiaochan 3 年之前
父节点
当前提交
189d9761f0

+ 10 - 4
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiQueryDao.java

@@ -558,23 +558,29 @@ public interface SiQueryDao {
     Date selectRegisterDate(@Param("patNo") String patNo);
 
     @Select("<script>" +
-            "select                     rtrim(a.inpatient_no)     inpatient_no," +
+            "select                     " +
+            "                rtrim(a.inpatient_no)     inpatient_no," +
             "                a.admiss_times," +
             "                rtrim(name)               name," +
             " refer_physician_name = (select rtrim(name) from a_employee_mi where code = refer_physician)," +
             " small_dept_name      = (select rtrim(name) from zd_unit_code where code = small_dept)," +
+            "                           zk_ward, " +
+            "    zk_ward_name         = (select rtrim(name) " +
+            "                            from zd_unit_code " +
+            "                            where code = zk_ward)," +
             " responce_type_name   = (select rtrim(name) from zy_zd_responce_type where code = responce_type)," +
             "                total_charge," +
             "                sex," +
-            "                rtrim(c.dis_diag)         dis_diag," +
-            "                rtrim(c.dis_diag_comment) dis_diag_comment," +
+            "                rtrim(c.icd_code)         dis_diag," +
+            "                rtrim(c.icd_text) dis_diag_comment," +
             "                certno," +
             "                insuplc_admdvs, " +
             " insuplc_admdvs_name  = isnull((select name from t_region where code = insuplc_admdvs), " +
             "                       (select name from t_si_admdvs where code = insuplc_admdvs))" +
             "from zy_actpatient a " +
             "left join t_si_pat_info b on (a.inpatient_no = b.pat_no and a.admiss_times = b.times) " +
-            "left join zy_dis_diag_yb c on (a.inpatient_no = c.inpatient_no and a.admiss_times = c.admiss_times and c.dis_diag_no = 1) " +
+            "left join zy_in_diag_yb c on (a.inpatient_no = c.inpatient_no and a.admiss_times = " +
+            "c.admiss_times and c.diag_no = 1) " +
             "where  " +
             "setl_id is null and b.mdtrt_id is not null " +
             "<if test=\"startTime !=null and startTime != '' \">" +

+ 0 - 1
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -1073,7 +1073,6 @@ public class SetlListUpldService {
         SetlinfoUpld mzPatient = dao.mzPatInfo(patNo, times);
         EntityCopy.Copy(dao.mzJieSuanXinXi(patNo, times), mzPatient);
         upldCollection.setSetlinfo(mzPatient);
-//        upldCollection.getSetlinfo().setHiNo("43000020100030823694");
         mzPatient.setMedcasno(patNo + "_" + times);
         upldCollection.setOpspdiseinfo(dao.diagnosisOfMenterSDisease(patNo, times, ledgerSn));
         mzPatient.setHsorg("长沙市医疗保障事务中心");