Selaa lähdekoodia

结算清单质控前先判断是否有医保结算

lighter 2 vuotta sitten
vanhempi
commit
5d76454948

+ 5 - 0
src/main/java/thyyxxk/webserver/controller/casefrontsheet/CaseFrontSheetController.java

@@ -149,4 +149,9 @@ public class CaseFrontSheetController {
     public ResultVo<CodeName> selectSiDiagByBaDiag(@RequestParam("code") String code) {
         return service.selectSiDiagByBaDiag(code);
     }
+
+    @GetMapping("/isMedinsSetl")
+    public ResultVo<String> isMedinsSetl(@RequestParam("patNo") String patNo, @RequestParam("times") Integer times) {
+        return service.isMedinsSetl(patNo, times);
+    }
 }

+ 3 - 0
src/main/java/thyyxxk/webserver/dao/his/casefrontsheet/CaseFrontSheetDao.java

@@ -721,4 +721,7 @@ public interface CaseFrontSheetDao extends BaseMapper<CaseFrontsheetMain> {
 
     @Select("select code,rtrim(name) as name,code2 as ybCode from zd_nation_code where code2 is not null ")
     List<CodeName> selectZdNations();
+
+    @Select("select count(1) from t_si_setlinfo where pat_no=#{patNo} and times=#{times} and revoked=0")
+    int selectSiSetlCount(@Param("patNo") String patNo, @Param("times") int times);
 }

+ 8 - 0
src/main/java/thyyxxk/webserver/service/casefrontsheet/CaseFrontSheetMainService.java

@@ -839,4 +839,12 @@ public class CaseFrontSheetMainService {
         log.info("病案质控:\n参数:{}\n结果:{}", jsonParams, result2);
         return ResultVoUtil.success(result);
     }
+
+    public ResultVo<String> isMedinsSetl(String patNo, Integer times) {
+        int count = dao.selectSiSetlCount(patNo, times);
+        if (count == 0) {
+            return ResultVoUtil.fail(ExceptionEnum.NO_DATA_EXIST, "自费及工伤患者无需进行医保结算单质控。");
+        }
+        return ResultVoUtil.success();
+    }
 }