Quellcode durchsuchen

异步调用drg分组

xiaochan vor 2 Jahren
Ursprung
Commit
8f436c9efb

+ 1 - 1
pom.xml

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

+ 6 - 0
src/main/java/thyyxxk/webserver/controller/inpatient/PatientController.java

@@ -1,5 +1,6 @@
 package thyyxxk.webserver.controller.inpatient;
 
+import com.alibaba.fastjson.JSONObject;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -35,6 +36,11 @@ public class PatientController {
         return service.getPatientInfo(inpatientNo);
     }
 
+    @PostMapping("/getDrgPatInfo")
+        public ResultVo<JSONObject> getDrgPatInfo(@RequestBody Patient p) {
+        return service.getDrgPatInfo(p);
+    }
+
     @GetMapping("/getDisPatient")
     public ResultVo<Patient> getDisPatient(@RequestParam("patNo") String patNo,
                                            @RequestParam("times") Integer times) {

+ 1 - 1
src/main/java/thyyxxk/webserver/dao/his/zhuyuanyisheng/YiZhuLuRuDao.java

@@ -1146,7 +1146,7 @@ public interface YiZhuLuRuDao {
             "WHERE a.pattern_code = #{code} " +
             "  and isnull(a.group_no, '00') = '00' " +
             "  and a.order_code = b.order_code " +
-            "  and b.order_type not in ('B','C','D')  " +
+            "  and b.order_class not in ('B','C','D')  " +
             "UNION " +
             "SELECT                 cast(cast(act_order_no as decimal) as varchar) id," +
             "                       act_order_no,  " +

+ 0 - 1
src/main/java/thyyxxk/webserver/service/dictionary/EmrDataMaintenanceServer.java

@@ -101,7 +101,6 @@ public class EmrDataMaintenanceServer {
             for (Map<String, Object> item : listMap) {
                 fieldConversion(item);
             }
-            log.info("数据:{}", JSON.toJSONString(listMap));
             if (ListUtil.isBlank(listMap)) {
                 return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION, "sql没问题,但是没得数据。");
             }

+ 4 - 4
src/main/java/thyyxxk/webserver/service/inpatient/PatientService.java

@@ -83,7 +83,6 @@ public class PatientService {
             }
         }
         setExpenseInformation(data);
-        setDrgPatInfo(data);
         return ResultVoUtil.success(data);
     }
 
@@ -115,8 +114,7 @@ public class PatientService {
         return data;
     }
 
-
-    private void setDrgPatInfo(Patient p) {
+    public ResultVo<JSONObject> getDrgPatInfo(Patient p) {
         BaseInfo bf = new BaseInfo();
         bf.setVisitId(p.getInpatientNo() + "_" + p.getAdmissTimes() + "_" + p.getLedgerSn())
                 .setGend(p.getSex().toString())
@@ -145,12 +143,14 @@ public class PatientService {
                     p.setGroupInfoBl(item.getString("bl"));
                     p.setGroupInfoProfit(item.getString("profit"));
                     p.setGroupInfoFeeStand(item.getString("fee_stand"));
-
+                    return ResultVoUtil.success(item);
                 }
             }
         }
+        return ResultVoUtil.success(null);
     }
 
+
     private List<DiseInfoList> setDrgDisList(Patient p) {
         List<DiseInfoList> list = new ArrayList<>();
         JSONObject emrJs = emrServer.getEmrPatientData(p.getInpatientNo(), p.getAdmissTimes());

+ 8 - 6
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -1,5 +1,6 @@
 package thyyxxk.webserver.service.zhuyuanyisheng;
 
+import cn.hutool.core.thread.ThreadUtil;
 import cn.hutool.core.util.StrUtil;
 import cn.hutool.extra.spring.SpringUtil;
 import com.alibaba.fastjson.JSONObject;
@@ -306,7 +307,11 @@ public class YiZhuLuRuServer {
             sqlSession.close();
         }
 
-        getThis().drgOrderUpdate(patInfo.getInpatientNo() + "_" + patInfo.getAdmissTimes() + "_" + patInfo.getLedgerSn());
+
+        ThreadUtil.execAsync(() -> {
+            drgOrderUpdate(patInfo.getInpatientNo() + "_" + patInfo.getAdmissTimes() + "_" + patInfo.getLedgerSn());
+        });
+
         sendAMessageToTheNurse(param, userCode, patInfo, "新增医嘱");
         return ResultVoUtil.success(ExceptionEnum.SUCCESS_AND_NOTIFICATION);
     }
@@ -337,21 +342,18 @@ public class YiZhuLuRuServer {
         }
     }
 
-
     /**
      * 在开医嘱时 drg 需要调用一下这个接口
      *
      * @param patientNo 患者id
      */
-    @Async
     public void drgOrderUpdate(String patientNo) {
         try {
             JSONObject jsonDrg = new JSONObject();
             jsonDrg.put("visit_id", Collections.singletonList(patientNo));
             jsonDrg.put("scene_type", 1);
-            JSONObject js = drgWebServices.etlClient(jsonDrg);
-        } catch (Exception e) {
-            e.printStackTrace();
+            drgWebServices.etlClient(jsonDrg);
+        } catch (Exception ignored) {
         }
     }
 

+ 7 - 0
src/main/resources/application.yml

@@ -1,5 +1,12 @@
 server:
   port: 8706
+  tomcat:
+    uri-encoding: utf-8
+    threads:
+      min-spare: 20
+      max: 800
+    accept-count: 200
+    max-connections: 10000
   servlet:
     encoding:
       charset: utf-8