Sfoglia il codice sorgente

只有drg的才需要审核,其他的直接可以上传

lihong 2 anni fa
parent
commit
d5cdc98e33

+ 5 - 3
src/main/java/thyyxxk/webserver/dao/his/medicalinsurance/UpIdCollectionDao.java

@@ -85,6 +85,7 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
             "                     a.addr_zip_code                              as poscode /* 邮编*/,\n" +
             "                     (select wjw_code from zd_nation_code where code = a.nation)          as naty/*民族*/,\n" +
             "                     a.contact_name                               as coner_name/*联系人姓名*/,\n" +
+            "a.birth_date,a.age,"+
             "                     (select rtrim(yb_code)\n" +
             "                      from zy_zd_relative_code\n" +
             "                      where code = a.contact_relation)            as patn_rlts /*与患者的关系*/,\n" +
@@ -120,7 +121,7 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
             "                         when '-' then 0\n" +
             "                         else a.new_born_weight\n" +
             "                         end                                    as nwb_bir_wt/*新生儿体重*/,\n" +
-            "a.birth_date brdy , a.age gend,"+
+            "    a.birth_date brdy , a.age , a.sex gend,"+
             "    resp_nurs_code = (select rtrim(yb_code)\n" +
             "                      from a_employee_mi\n" +
             "                      where a_employee_mi.code = isnull(a.duty_nurse,b.job_nurse)) /*责任护士*/,\n" +
@@ -347,7 +348,7 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
             "select " +
             "row_number() over (order by setl_time) as rowNumber," +
             "rtrim(a.pat_no) pat_no,a.age,a.times,ledger_sn,psn_name,gend,brdy,insutype,psn_type,mdtrt_id,setl_id,setl_time, " +
-            "       a.med_type,medfee_sumamt,fund_pay_sumamt, b.dis_date," +
+            "       a.med_type,medfee_sumamt,fund_pay_sumamt, b.dis_date, a.hi_paymtd," +
             "       acct_pay,psn_cash_pay,clr_optins,clr_optins_name = (select name from t_region where code=clr_optins), " +
             "       outDeptName=(select rtrim(name) from zd_unit_code where code=isnull(zk_ward,small_dept))," +
             "       rtrim(isnull(zk_ward,small_dept)) as out_dept," +
@@ -992,5 +993,6 @@ public interface UpIdCollectionDao extends BaseMapper<SetlinfoUpld> {
             )
     List<SiSetlinfoTemp> getQualityPass(String firstDate);
 
-
+    @Select(" select  count(1) from    t_case_frontsheet_main where bah=#{inpatientNo} and admiss_times = #{admissTimes}")
+    Integer queryCountTCaseFrontsheetMain(@Param("inpatientNo") String inpatientNo, @Param("admissTimes") Integer admissTimes);
 }

+ 5 - 0
src/main/java/thyyxxk/webserver/entity/querydata/SiSetlinfoTemp.java

@@ -392,6 +392,11 @@ public class SiSetlinfoTemp implements Serializable {
      * 已上传可以修改提醒
      */
     private String uploadUpdateReminder;
+    /**
+     * 支付方式 1-按日期 2-单病种 3-按病种分值 4-基本诊断相关分组(DRG
+     * 5-按床日 6-按人次 9-其他
+     */
+    private Integer hiPaymtd;
 
     private List<PayinfoUpld> payinfo;
     private List<OpspdiseinfoUpld> opspdiseinfo;

+ 26 - 3
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -139,6 +139,11 @@ public class SetlListUpldService {
      * @throws Exception 错误
      */
     public ResultVo<String> upldSetlList(String patNo, Integer times, Integer ledgerSn,boolean checkFlag) throws Exception {
+        //这里签收表可能没有数据,先效验下病案首页
+        ZyInactpatient param = new ZyInactpatient();
+        param.setInpatientNo(patNo);
+        param.setAdmissTimes(times);
+        sheetVerification(param);
         ResultVo<UpldCollection> upldCollection = getUploadInfo(patNo, times, ledgerSn);
         if(checkFlag){
             checkUploadCondition(patNo, upldCollection,times);
@@ -664,7 +669,7 @@ public class SetlListUpldService {
         }
         boolean checkFlag = isCheckFlag();
         boolean checkAuditFlag = isCheckAuditFlag();
-        if(checkAuditFlag){
+        if(checkAuditFlag && isDrghiPaymtd(param.stream().map(obj->obj.getHiPaymtd()).collect(Collectors.toList()))){
             List<String> visitIds = param.stream().map(obj -> obj.getPatNo() + obj.getTimes()).collect(Collectors.toList());
             List<Integer> auditFlags = dao.listSetlModifyReq(visitIds);
             if (ListUtil.notBlank(auditFlags)) {
@@ -731,9 +736,9 @@ public class SetlListUpldService {
             if (ListUtil.isBlank(list)) {
                 return ResultVoUtil.fail(ExceptionEnum.LOGICAL_ERROR, "没有要上传的信息。");
             }
-            boolean checkFlag = isCheckFlag();
             boolean checkAuditFlag = isCheckAuditFlag();
-            if(checkAuditFlag){
+            //只有drg的需要审核,其他不用
+            if(checkAuditFlag  && isDrghiPaymtd(list.stream().map(obj->obj.getHiPaymtd()).collect(Collectors.toList()))){
                 // 只有全部为审核通过的数据才能上传
                 boolean isAllAuditPass = list.stream().allMatch(obj -> obj.getAuditFlag() != null && obj.getAuditFlag() == 1);
                 if (!isAllAuditPass) {
@@ -748,6 +753,20 @@ public class SetlListUpldService {
         return ResultVoUtil.success();
     }
 
+    /**
+     * @description:是否有drg支付数据
+     * @author: lihong
+     * @date: 2023/1/28 15:52
+     * @param: hiPaymtds
+     * @return: boolean
+     **/
+    private boolean isDrghiPaymtd(List<Integer> hiPaymtds){
+        if(ListUtil.notBlank(hiPaymtds)){
+           return hiPaymtds.stream().anyMatch(obj -> "4".equals(obj));
+        }
+        return false;
+    }
+
     /**
      * 发送医保上传的错误信息
      *
@@ -2119,6 +2138,10 @@ public class SetlListUpldService {
         sheetOverview.setTimes(param.getAdmissTimes());
         sheetOverview.setInOutFlag(2);
         ResultVo<Map<String, List<CodeName>>> mapResultVo = caseFrontSheetMainService.sheetVerification(sheetOverview);
+        Integer count = dao.queryCountTCaseFrontsheetMain(param.getInpatientNo(), param.getAdmissTimes());
+        if(ListUtil.isBlank(mapResultVo.getData().get("force")) && count < 1){
+            throw new BizException(ExceptionEnum.LOGICAL_ERROR,"病案首页签收表没有数据,请去病案首页操作打印正反面!");
+        }
         return mapResultVo;
     }
     /**