فهرست منبع

创智接口问题

xiaochan 6 ماه پیش
والد
کامیت
63d21ca490

+ 5 - 0
src/main/java/thyyxxk/webserver/config/envionment/ApiUrl.java

@@ -23,4 +23,9 @@ public class ApiUrl {
      * 定时任务的api
      */
     private String ScheduledApi;
+
+    /**
+     * 创智的drg接口地址
+     */
+    private String drgWebApi;
 }

+ 64 - 0
src/main/java/thyyxxk/webserver/http/drg/DrgWebApi.java

@@ -0,0 +1,64 @@
+package thyyxxk.webserver.http.drg;
+
+import cn.hutool.core.util.StrUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.dtflys.forest.Forest;
+import org.springframework.stereotype.Service;
+import thyyxxk.webserver.config.envionment.ApiUrl;
+import thyyxxk.webserver.entity.vo.DrgGroupTestVO;
+
+@Service
+public class DrgWebApi {
+    private final ApiUrl apiUrl;
+
+    public DrgWebApi(ApiUrl apiUrl) {
+        this.apiUrl = apiUrl;
+    }
+
+    public String localHelpDrgDagns(DrgGroupTestVO drgGroupTestVO) {
+        if (StrUtil.isBlank(apiUrl.getDrgWebApi())) {
+            return "";
+        }
+        return Forest.post(apiUrl.getDrgWebApi() + "/drg_web/localHelp/drg_dagns/list.action")
+                .connectTimeout(3000)
+                .readTimeout(6000)
+                .addBody(drgGroupTestVO)
+                .execute(String.class);
+    }
+
+    public JSONObject drgQuality(JSONObject obj) {
+        if (StrUtil.isBlank(apiUrl.getDrgWebApi())) {
+            return new JSONObject();
+        }
+        return Forest.post(apiUrl.getDrgWebApi() + "/drg_web/drgGroupThird/V2/setListDrg.action")
+                .connectTimeout(3000)
+                .readTimeout(6000)
+                .addBody(obj)
+                .execute(JSONObject.class);
+    }
+
+
+    public JSONObject etlClient(JSONObject obj) {
+        if (StrUtil.isBlank(apiUrl.getDrgWebApi())) {
+            return new JSONObject();
+        }
+        return Forest.post(apiUrl.getDrgWebApi() + "/etlClient/callHisData.action")
+                .connectTimeout(3000)
+                .readTimeout(6000)
+                .addBody(obj)
+                .execute(JSONObject.class);
+    }
+
+    public JSONObject getDrgCaseQualityControlGroup(JSONObject obj) {
+        if (StrUtil.isBlank(apiUrl.getDrgWebApi())) {
+            return new JSONObject();
+        }
+        return Forest.post(apiUrl.getDrgWebApi() + "/drg_web/drgGroupThird/getAllDrgResults.action")
+                .connectTimeout(3000)
+                .readTimeout(6000)
+                .addBody(obj)
+                .execute(JSONObject.class);
+    }
+
+
+}

+ 0 - 27
src/main/java/thyyxxk/webserver/service/externalhttp/DrgWebServices.java

@@ -1,27 +0,0 @@
-package thyyxxk.webserver.service.externalhttp;
-
-import com.alibaba.fastjson.JSONObject;
-import com.dtflys.forest.annotation.JSONBody;
-import com.dtflys.forest.annotation.Post;
-import thyyxxk.webserver.entity.vo.DrgGroupTestVO;
-
-/**
- * @Author:lihong 调用创智 drg第三方接口
- * @Date: 2022/12/8
- * @Description:
- */
-public interface DrgWebServices {
-
-    @Post(url = "http://172.16.32.126:8080/drg_web/localHelp/drg_dagns/list.action", connectTimeout = 3000, readTimeout = 6000)
-    String localHelpDrgDagns(@JSONBody DrgGroupTestVO drgGroupTestVO);
-
-    @Post(url = "http://172.16.32.126:8080/drg_web/drgGroupThird/V2/setListDrg.action", connectTimeout = 3000, readTimeout = 6000)
-    JSONObject drgQuality(@JSONBody JSONObject obj);
-
-    @Post(url = "http://172.16.32.126:8082/etlClient/callHisData.action", async = true, connectTimeout = 3000, readTimeout = 6000)
-    void etlClient(@JSONBody JSONObject obj);
-
-    @Post(url = "http://172.16.32.126:8080/drg_web/drgGroupThird/getAllDrgResults.action", connectTimeout = 3000, readTimeout = 6000)
-    JSONObject getDrgCaseQualityControlGroup(@JSONBody JSONObject obj);
-
-}

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

@@ -26,7 +26,7 @@ import thyyxxk.webserver.entity.inpatient.dismiss.ZyDisYbDiag;
 import thyyxxk.webserver.entity.inpatient.patient.*;
 import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.HuanZheFeiYong;
 import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.XinZhenYiZhu;
-import thyyxxk.webserver.service.externalhttp.DrgWebServices;
+import thyyxxk.webserver.http.drg.DrgWebApi;
 import thyyxxk.webserver.service.hutoolcache.UserCache;
 import thyyxxk.webserver.service.zhuyuanyisheng.emr.EmrServer;
 import thyyxxk.webserver.utils.*;
@@ -45,17 +45,17 @@ public class PatientService {
     private final Routines routines;
     private final YiZhuLuRuDao yiZhuLuRuDao;
     private final EmrServer emrServer;
-    private final DrgWebServices drgHttp;
+    private final DrgWebApi drgWebApi;
     private final UserCache userCache;
 
 
     @Autowired
-    public PatientService(PatientDao dao, Routines routines, YiZhuLuRuDao yiZhuLuRuDao, EmrServer emrServer, DrgWebServices drgHttp, UserCache userCache) {
+    public PatientService(PatientDao dao, Routines routines, YiZhuLuRuDao yiZhuLuRuDao, EmrServer emrServer, DrgWebApi drgWebApi, UserCache userCache) {
         this.dao = dao;
         this.routines = routines;
         this.yiZhuLuRuDao = yiZhuLuRuDao;
         this.emrServer = emrServer;
-        this.drgHttp = drgHttp;
+        this.drgWebApi = drgWebApi;
         this.userCache = userCache;
     }
 
@@ -133,7 +133,7 @@ public class PatientService {
         upload.put("dise_info_list", setDrgDisList(p));
         upload.put("oprt_info_list", setOprtInfoList(p));
 
-        JSONObject res = drgHttp.getDrgCaseQualityControlGroup(upload);
+        JSONObject res = drgWebApi.getDrgCaseQualityControlGroup(upload);
         if (res.getInteger("code") == 0) {
             if (res.getJSONObject("result") != null) {
                 JSONArray groupInfo = res.getJSONObject("result").getJSONArray("group_info");

+ 6 - 9
src/main/java/thyyxxk/webserver/service/medicalinsurance/SetlListUpldService.java

@@ -76,10 +76,10 @@ import thyyxxk.webserver.entity.vo.quality.GroupInfoVO;
 import thyyxxk.webserver.entity.vo.quality.OprtInfoListVO;
 import thyyxxk.webserver.entity.vo.quality.QualityInfoVO;
 import thyyxxk.webserver.entity.vo.quality.SetlBaseInfoVO;
+import thyyxxk.webserver.http.drg.DrgWebApi;
 import thyyxxk.webserver.http.websocket.SocketV2;
 import thyyxxk.webserver.http.websocket.dto.WebSocketByUserCode;
 import thyyxxk.webserver.service.PublicServer;
-import thyyxxk.webserver.service.externalhttp.DrgWebServices;
 import thyyxxk.webserver.service.hutoolcache.*;
 import thyyxxk.webserver.service.inpatient.casefrontsheet.CaseFrontSheetMainService;
 import thyyxxk.webserver.service.inpatient.casefrontsheet.VerifyCaseFrontSheet;
@@ -100,13 +100,10 @@ import java.util.stream.Collectors;
 @Slf4j
 @RequiredArgsConstructor
 public class SetlListUpldService {
-
     private static final int NOT_UPLOADED = 1;
     private static final int UPLOADED = 2;
     private static final int All = 4;
-
     private static final String TOTAL_AMOUNT_CODE = "99";
-
     private static final String RESULT_CODE = "infcode";
     private static final String ERROR_MESSAGE = "err_msg";
     private static final String OUTPUT = "output";
@@ -118,7 +115,6 @@ public class SetlListUpldService {
     private final SendWxInfoService sendWxInfoService;
     private final SiLogDao logDao;
     private final CaseFrontSheetMainService caseFrontSheetMainService;
-    private final DrgWebServices drgWebServices;
     private final AutoUploadBillService autoUploadBillService;
     private final TSetlDeptConfService tSetlDeptConfService;
     private final TUploadDrgGroupService tUploadDrgGroupService;
@@ -129,6 +125,7 @@ public class SetlListUpldService {
     private final NationCache nationCache;
     private final RegionCache regionCache;
     private final RelativeCache relativeCache;
+    private final DrgWebApi drgWebApi;
 
     /**
      * 上传到医保的结算单上传
@@ -1475,7 +1472,7 @@ public class SetlListUpldService {
         upload.put("oprt_info_list", getOprtInfoList(siSetlinfoTemp.getAuditFlag() == null ? zy.getBatjBa4() : zy.getNewBatjBa4(), visitId));
         try {
             log.info("drg分组传参:{}", JSON.toJSONString(upload));
-            JSONObject res = drgWebServices.getDrgCaseQualityControlGroup(upload);
+            JSONObject res = drgWebApi.getDrgCaseQualityControlGroup(upload);
             log.info("drg分组结果:{}", JSON.toJSONString(res));
             if (res.getInteger("code") == 0) {
                 if (res.getJSONObject("result") != null) {
@@ -2055,7 +2052,7 @@ public class SetlListUpldService {
         log.info("调用诊断辅助入参:{}", JSON.toJSONString(drgGroupTestVO));
         String url = "http://172.16.32.126:8080";
         try {
-            String result = drgWebServices.localHelpDrgDagns(drgGroupTestVO);
+            String result = drgWebApi.localHelpDrgDagns(drgGroupTestVO);
             log.info("调用诊断辅助返回结果:{}", result);
             url += result;
         } catch (Exception e) {
@@ -2208,7 +2205,7 @@ public class SetlListUpldService {
      **/
     public ResultVo<List<QualityInfoVO>> drgQualityTest(ZyInactpatient param) {
         List<QualityInfoVO> qualityInfoVOS;
-        SiLog siLog = new SiLog(SiUtil.makeMsgId(), SiFunction.QUALITY_INFO.getCode(),null,
+        SiLog siLog = new SiLog(SiUtil.makeMsgId(), SiFunction.QUALITY_INFO.getCode(), null,
                 TokenUtil.getInstance().getTokenUserId(), null, null, param.getInpatientNo(), param.getAdmissTimes(), param.getLedgerSn(), 1, null);
         try {
             SetlinfoUpld setlinfoUpldInfo = getSetlinfoUpldInfo(param.getInpatientNo(), param.getAdmissTimes(), param.getLedgerSn());
@@ -2300,7 +2297,7 @@ public class SetlListUpldService {
         }
         log.info("质控测算传参:{}", JSON.toJSONString(drgQualityParam));
         JSONObject jsonObject = JSON.parseObject(JSON.toJSONString(drgQualityParam));
-        JSONObject result = drgWebServices.drgQuality(jsonObject);
+        JSONObject result = drgWebApi.drgQuality(jsonObject);
         resultMap.put("result", result);
         resultMap.put("param", drgQualityParam);
         return resultMap;

+ 3 - 4
src/main/java/thyyxxk/webserver/service/zhuyuanyisheng/YiZhuLuRuServer.java

@@ -14,7 +14,6 @@ import org.apache.ibatis.session.SqlSession;
 import org.apache.ibatis.session.SqlSessionFactory;
 import org.jetbrains.annotations.NotNull;
 import org.springframework.stereotype.Service;
-import thyyxxk.webserver.config.envionment.SystemConfig;
 import thyyxxk.webserver.config.envionment.YzConfig;
 import thyyxxk.webserver.config.exception.BizException;
 import thyyxxk.webserver.config.exception.ExceptionEnum;
@@ -38,11 +37,11 @@ import thyyxxk.webserver.entity.zhuyuanyisheng.ZyOrderZk;
 import thyyxxk.webserver.entity.zhuyuanyisheng.dto.doctorAuth.DoctorAuthParams;
 import thyyxxk.webserver.entity.zhuyuanyisheng.vo.doctorAuth.DoctorAuthRest;
 import thyyxxk.webserver.entity.zhuyuanyisheng.yizhuluru.*;
+import thyyxxk.webserver.http.drg.DrgWebApi;
 import thyyxxk.webserver.service.PublicServer;
 import thyyxxk.webserver.service.hutoolcache.ExtraCache;
 import thyyxxk.webserver.service.hutoolcache.UserCache;
 import thyyxxk.webserver.service.inpatient.casefrontsheet.CaseFrontSheetMainService;
-import thyyxxk.webserver.service.externalhttp.DrgWebServices;
 import thyyxxk.webserver.service.medicalinsurance.SiChargeLimitService;
 import thyyxxk.webserver.service.zhuyuanyisheng.yizhuverify.Repel;
 import thyyxxk.webserver.service.zhuyuanyisheng.yizhuverify.YiZhuCheckData;
@@ -66,13 +65,13 @@ import java.util.stream.Collectors;
 public class YiZhuLuRuServer {
     private final YiZhuLuRuDao dao;
     private final PublicServer publicServer;
-    private final DrgWebServices drgWebServices;
     private final CaseFrontSheetMainService caseFrontSheetMainService;
     private final SqlSessionFactory sqlSessionFactory;
     private final SiChargeLimitService siChargeLimitService;
     private final UserCache userCache;
     private final ExtraCache extraCache;
     private final YzConfig yzConfig;
+    private final DrgWebApi drgWebApi;
 
     private final String ITEM = "00";
 
@@ -325,7 +324,7 @@ public class YiZhuLuRuServer {
             JSONObject jsonDrg = new JSONObject();
             jsonDrg.put("visit_id", Collections.singletonList(patientNo));
             jsonDrg.put("scene_type", 1);
-            drgWebServices.etlClient(jsonDrg);
+            drgWebApi.etlClient(jsonDrg);
         } catch (Exception ignored) {
         }
     }

+ 1 - 0
src/main/resources/application-prod.yml

@@ -160,6 +160,7 @@ thyy:
     socket-api: http://172.16.32.160:20922/thyy/api/socket
     scheduled-api: http://localhost:21702/thyy/scheduled/api
     tirdpart-api: http://172.16.32.160:21701/thyy/thirdpart/api
+    drg-web-api: "http://172.16.32.126:8080"
   jcptmobile:
     address: "https://emr.hnthyy.cn:8080"
     agentid: 1000050