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

Merge branch 'master' of https://172.16.32.165/lighter/web-server

xiaochan 2 лет назад
Родитель
Сommit
a4cd1b6cf0

+ 4 - 2
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/SiZyDao.java

@@ -161,7 +161,8 @@ public interface SiZyDao {
                                         @Param("begntime") Date begntime,
                                         @Param("endtime") Date endtime);
 
-    @Select("select a.mdtrt_id,a.psn_no,a.insutype,b.start_time as endtime,b.exec_unit as dscgDeptCodg, " +
+    @Select("select a.mdtrt_id,a.psn_no,a.insutype,b.start_time as endtime, " +
+            "dscgDeptCodg=(select si_caty from zd_unit_code where code=b.exec_unit)," +
             "dscgDeptName=(select rtrim(name) from zd_unit_code where code=b.exec_unit) " +
             "from t_si_pat_info a, yz_act_order b " +
             "where a.pat_no=#{patNo} and a.times=#{times} and a.ledger_sn=#{ledgerSn} " +
@@ -171,7 +172,8 @@ public interface SiZyDao {
                             @Param("times") int times,
                             @Param("ledgerSn") int ledgerSn);
 
-    @Select("select a.mdtrt_id,a.psn_no,a.insutype,b.small_dept as dscgDeptCodg, " +
+    @Select("select a.mdtrt_id,a.psn_no,a.insutype, " +
+            "dscgDeptCodg=(select si_caty from zd_unit_code where code=b.small_dept), " +
             "dscgDeptName=(select rtrim(name) from zd_unit_code where code=b.small_dept) " +
             "from t_si_pat_info a, zy_actpatient b " +
             "where a.pat_no=#{patNo} and a.times=#{times} and a.ledger_sn=#{ledgerSn} " +

+ 4 - 0
src/main/java/thyyxxk/webserver/service/medicalinsurance/SiZyService.java

@@ -426,6 +426,10 @@ public class SiZyService {
         if (null == dscginfo || StringUtil.isBlank(dscginfo.getMdtrtId())) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "此患者没有有效的医保在院信息!");
         }
+        if (StringUtil.isBlank(dscginfo.getDscgDeptCodg())) {
+            return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "出院科室【" +
+                    dscginfo.getDscgDeptName() + "】编码不符合医保字典规范,请联系医保科匹配。");
+        }
         List<SetlDiseinfo> setlDises = dao.selectSetlDises(p.getInpatientNo(), p.getAdmissTimes(), p.getLedgerSn());
         if (null == setlDises || setlDises.isEmpty()) {
             return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "患者医保出院诊断不能为空,请联系医生在病案首页填写。");