Bladeren bron

结算统计出院诊断修复

lighter 2 maanden geleden
bovenliggende
commit
be212b4b5f
2 gewijzigde bestanden met toevoegingen van 12 en 9 verwijderingen
  1. 1 1
      pom.xml
  2. 11 8
      src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiSetlinfoDao.java

+ 1 - 1
pom.xml

@@ -10,7 +10,7 @@
     </parent>
     <groupId>thyyxxk</groupId>
     <artifactId>web-server</artifactId>
-    <version>13.2.3</version>
+    <version>13.2.4</version>
     <name>web-server</name>
     <description>server for yibao-web</description>
     <properties>

+ 11 - 8
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiSetlinfoDao.java

@@ -60,8 +60,11 @@ public interface SiSetlinfoDao extends BaseMapper<SiSetlinfo> {
 
     @Select("select *,sbjjPay=(select fund_payamt from t_si_setldetail " +
             "where setl_id=a.setl_id and fund_pay_type='650100'), " +
-            "cyzd=case when #{setltype} = '21' then (select isnull(admiss_diag_str, clinic_diag_str) from zy_patient where a.pat_no = inpatient_no and a.times = admiss_times)" +
-            " else (select isnull(icd_text_new, '') from mz_visit_table where a.pat_no = patient_id and a.times = times) end " +
+            "cyzd=case when #{setltype}='21' then " +
+            "(select rtrim(dis_diag_comment) from zy_dis_diag_yb " +
+            "where inpatient_no=a.pat_no and admiss_times=a.times and dis_diag_no=1) " +
+            "else (select isnull(icd_text_new, '') from mz_visit_table " +
+            "where a.pat_no=patient_id and a.times=times) end " +
             "from t_si_setlinfo a " +
             "where setl_type=#{setltype} and revoked=0 and insutype like #{insutype} " +
             "and setl_time>=#{begntime} and setl_time<=#{endtime} ${insuplcAdmdvs}")
@@ -90,9 +93,9 @@ public interface SiSetlinfoDao extends BaseMapper<SiSetlinfo> {
             " select rtrim(t.inpatient_no) as inpatient_no, rtrim(t.admiss_times) as admiss_times, " +
             " z.name as dept, e.name as jobDoctor, t.clinic_diag_str " +
             " from zy_inactpatient t " +
-            " left join zd_unit_code z on t.zk_ward = z.code " +
-            " left join a_employee_mi e on t.refer_physician = e.code " +
-            " where t.inpatient_no = #{item.patNo} and t.admiss_times = #{item.times} " +
+            " left join zd_unit_code z on t.zk_ward=z.code " +
+            " left join a_employee_mi e on t.refer_physician=e.code " +
+            " where t.inpatient_no=#{item.patNo} and t.admiss_times=#{item.times} " +
             " </foreach> " +
             " </script> ")
     List<ZyInactpatient> selectZyPatient(@Param("list") List<SiSetlinfo> list);
@@ -102,9 +105,9 @@ public interface SiSetlinfoDao extends BaseMapper<SiSetlinfo> {
             " select rtrim(t.patient_id) as patNo, t.times, z.name as dept, " +
             " e.name as doctor, t.icd_text_new as zyzd " +
             " from mz_visit_table t " +
-            " left join zd_unit_code z on t.visit_dept_code = z.code " +
-            " left join a_employee_mi e on t.doctor_code = e.code " +
-            " where t.patient_id = #{item.patNo} and t.times = #{item.times} " +
+            " left join zd_unit_code z on t.visit_dept_code=z.code " +
+            " left join a_employee_mi e on t.doctor_code=e.code " +
+            " where t.patient_id=#{item.patNo} and t.times=#{item.times} " +
             " </foreach> " +
             " </script> ")
     List<Map> selectMzPatient(@Param("list") List<SiSetlinfo> list);