Browse Source

优化DRG&DIP接口

lighter 2 years ago
parent
commit
6d9539647b

+ 4 - 7
src/main/java/thyyxxk/webserver/controller/api/forpowersi/DrgDipController.java

@@ -270,8 +270,8 @@ public class DrgDipController {
         if (null == params.getPageNumber() || null == params.getPageSize()) {
             return DrgDipResponseFactory.wrongParameters("pageNumber、pageSize不能为空。");
         }
-        if (params.getPageSize() > 300) {
-            return DrgDipResponseFactory.wrongParameters("pageSize允许的最大值为【300】。");
+        if (params.getPageSize() > 1000) {
+            return DrgDipResponseFactory.wrongParameters("pageSize允许的最大值为【1000】。");
         }
         List<HisHsptzdCharge> list = dao.selectHisHsptzdCharge(params.getPatNo(), params.getTimes(),
                 params.getLedgerSn(), params.getPageNumber(), params.getPageSize());
@@ -295,14 +295,11 @@ public class DrgDipController {
         int inHospCount = dao.selectInHospCount(params.getPatNo(), params.getTimes());
         String table = inHospCount == NO_RECORD_EXIST ?
                 OUT_HOSPITAL_DOCTORS_ADVICE : IN_HOSPITAL_DOCTORS_ADVICE;
-        List<HisHsptzdMdclAdvice> list = dao.selectHisHsptzdMdclAdvice(params.getPatNo(), params.getTimes(), table);
+        List<HisHsptzdMdclAdvice> list = dao.selectHisHsptzdMdclAdvice(
+                params.getPatNo(), params.getTimes(), table, params.getVisitId());
         if (list.isEmpty()) {
             return DrgDipResponseFactory.noCorrespondingDataFound();
         }
-        list.forEach(item -> {
-            item.setVisitId(params.getVisitId());
-            item.setPrecrAdviceDept(redis.getDeptName(item.getPrecrAdviceDeptId()));
-        });
         return DrgDipResponseFactory.success(list);
     }
 

+ 11 - 15
src/main/java/thyyxxk/webserver/dao/his/api/forpowersi/drgdip/DrgDipDao.java

@@ -222,34 +222,30 @@ public interface DrgDipDao {
     @Select("select count(1) from yz_act_order where inpatient_no=#{patNo} and admiss_times=#{times}")
     int selectInHospCount(String patNo, int times);
 
-    @Select("select " +
+    @Select("select *," +
+            "precrAdviceDept=(select rtrim(d.name) from zd_unit_code d where d.code=t.precrAdviceDeptId) " +
+            "from (select visitId=#{visitId},rtrim(physician) as precrAdviceDoctorId, " +
             "cast(cast(act_order_no as decimal) as varchar) as mdclAdviceId, " +
             "mdclAdviceType=case when frequ_code='ALWAYS' then '00' else '10' end, " +
-            "rtrim(order_code) as mdclAdviceCode, " +
+            "rtrim(order_code) as mdclAdviceCode,rtrim(modifier) as ceaseAdviceDoctorId, " +
             "mdclAdviceSource=case when order_code='06054' then '3' else " +
             "(case when serial in ('01','99') then 1 else 2 end) end, " +
-            "cast(parent_no as varchar) as mdclAdviceNo, " +
-            "rtrim(order_name) as mdclAdviceContent, " +
-            "dosForms='', " +
-            "rtrim(drug_specification) as stand, " +
-            "rtrim(frequ_code) as hz, " +
-            "drug_weight as dosage, " +
+            "cast(cast(parent_no as decimal) as varchar) as mdclAdviceNo, " +
+            "rtrim(order_name) as mdclAdviceContent,dosForms='',rtrim(drug_specification) as stand, " +
+            "rtrim(frequ_code) as hz,drug_weight as dosage,rtrim(signer) as checkDoctorId, " +
             "dosageUnit=(select d.name from yp_zd_unit d where d.code=drug_weight_unit), " +
             "entiyTime=convert(varchar(19), enter_time, 21),start_time as mdclAdviceStartTime, " +
             "precrAdviceDeptId=(select rtrim(d.dept_code) from a_employee_mi d where d.code=physician), " +
-            "rtrim(physician) as precrAdviceDoctorId, " +
             "precrAdviceDoctor=(select rtrim(d.name) from a_employee_mi d where d.code=physician), " +
             "checkFlag=case when status_flag=1 then 0 else 1 end, " +
-            "rtrim(signer) as checkDoctorId, " +
             "checkDoctor=(select rtrim(d.name) from a_employee_mi d where d.code=signer), " +
-            "confirm_time as precrAdviceCheckTime, " +
+            "confirm_time as precrAdviceCheckTime,end_time as ceaseAdviceTime, " +
             "execStatus=case when status_flag in ('1','2') then 0 else 1 end, " +
-            "end_time as ceaseAdviceTime, " +
-            "rtrim(modifier) as ceaseAdviceDoctorId, " +
             "ceaseAdviceDoctor=(select rtrim(d.name) from a_employee_mi d where d.code=modifier), " +
             "mdclAdviceStatus=case when end_time is null then 1 else 2 end " +
-            "from ${table} where inpatient_no=#{patNo} and admiss_times=#{times}")
-    List<HisHsptzdMdclAdvice> selectHisHsptzdMdclAdvice(String patNo, int times, String table);
+            "from ${table} where inpatient_no=#{patNo} and admiss_times=#{times} " +
+            ") t")
+    List<HisHsptzdMdclAdvice> selectHisHsptzdMdclAdvice(String patNo, int times, String table, String visitId);
 
     @Select("select visitId=pat_no+'_'+cast(times as varchar)+'_'+cast(ledger_sn as varchar), " +
             "mdtrt_id,psn_no,setl_id,insuplc_admdvs from t_si_setlinfo where revoked=0 and setl_type=21 " +

+ 85 - 0
src/main/resources/application-show.yml

@@ -0,0 +1,85 @@
+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
+spring:
+  thymeleaf:
+    cache: false
+  datasource:
+    dynamic:
+      primary: his
+      strict: false
+      datasource:
+        his:
+          url: "jdbc:sqlserver://172.16.32.179:1433;databaseName=thxyhisdb"
+          username: "sa"
+          password:
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+        lis:
+          url: "jdbc:sqlserver://172.16.32.178:1433;databaseName=eLimsCore"
+          username: "sa"
+          password: "hnthxyyy"
+          type: "com.zaxxer.hikari.HikariDataSource"
+          driver-class-name: "com.microsoft.sqlserver.jdbc.SQLServerDriver"
+    hikari:
+      minimum-idle: 10
+      idle-timeout: 180000
+      maximum-pool-size: 30
+      auto-commit: true
+      pool-name: lisDbPool
+      connection-timeout: 30000
+      connection-test-query: select 1
+  jackson:
+    time-zone: Asia/Shanghai
+    date-format: yyyy-MM-dd HH:mm:ss
+  mvc:
+    format:
+      date: yyyy-MM-dd
+      date-time: yyyy-MM-dd HH:mm:ss
+forest:
+  timeout: 0
+  read-timeout: 0
+  log-enabled: false
+  log-request: false
+  log-response-status: false
+  variables:
+    socketCenter: http://localhost:8707/socketApi
+
+mybatis-plus:
+  configuration:
+    map-underscore-to-camel-case: true
+
+execute-scheduled: false
+
+triage-notify-url: http://localhost:8082/triage/roomScreen/pushMsg
+si-tj-url: http://jkglcsx.server.zhongmeihealth.com/openInter
+
+#正式环境
+si-api-url: http://dms.hun.hsip.gov.cn/isp-api/powercsb/1101
+si-access-key: 04eMGRg7beAO6vqwrZiLacV8Uy3jNn7QGDUcBO
+si-secret-key: SK3Oip3a2R3NLz2xm58Mpmi69oFu96KrdKNRKglN
+si-zy-fee-url: http://172.16.32.166:1000
+si-mz-fee-url: http://172.16.32.166:1100/mzFee
+si-injury-fee-url: http://172.16.32.163:2100/siInjury
+si-injury-systm-url: http://172.16.32.163:2000/siInjury
+#thmz-api-url: http://172.16.32.160:81/thmz/api/v1
+
+
+#测试环境
+#si-api-url: http://10.93.30.130:20001/isp-api/powercsb/1101
+#si-access-key: Zgs5jfxaKb86XbCuUzLK9EhFjiQfHR1vydaPzp
+#si-secret-key: SKT2ETMT3XkAYApqh79DCnN9ZjfbQEBMPU0GyLz9
+#si-zy-fee-url: http://localhost:1000
+#si-mz-fee-url: http://localhost:1100/mzFee
+#si-injury-fee-url: http://localhost:2100/siInjury
+#si-injury-systm-url: http://localhost:2000/siInjury
+thmz-api-url: http://172.16.30.22:8089/thmz/api/v1