lipc před 5 roky
rodič
revize
71935afca9

+ 27 - 0
tran-service/src/main/java/com/diagbot/client/PrecServiceClient.java

@@ -1,7 +1,17 @@
 package com.diagbot.client;
 
 import com.diagbot.client.hystrix.PrecServiceHystrix;
+import com.diagbot.dto.GetInquiryDetailDTO;
+import com.diagbot.dto.HisInquiryDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.vo.GetInquiryDetailVO;
+import com.diagbot.vo.HisInquirysVO;
 import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+
+import javax.validation.Valid;
+import java.util.List;
 
 
 /**
@@ -12,6 +22,23 @@ import org.springframework.cloud.openfeign.FeignClient;
 @FeignClient(value = "prec-service", fallback = PrecServiceHystrix.class)
 public interface PrecServiceClient {
 
+    /**
+     * 对接-历史病历列表
+     *
+     * @param hisInquirysVO
+     * @return
+     */
+    @PostMapping("/inquiryInfo/hisInquirys")
+    RespDTO<List<HisInquiryDTO>> hisInquirys(@RequestBody HisInquirysVO hisInquirysVO);
+
+    /**
+     * 对接-病历详情
+     *
+     * @param getInquiryDetailVO
+     * @return
+     */
+    @PostMapping("/inquiryInfo/getInquiryDetail")
+    RespDTO<GetInquiryDetailDTO> getInquiryDetail(@RequestBody GetInquiryDetailVO getInquiryDetailVO);
 }
 
 

+ 32 - 0
tran-service/src/main/java/com/diagbot/facade/PrecServiceFacade.java

@@ -1,12 +1,44 @@
 package com.diagbot.facade;
 
 import com.diagbot.client.PrecServiceClient;
+import com.diagbot.dto.GetInquiryDetailDTO;
+import com.diagbot.dto.HisInquiryDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.util.RespDTOUtil;
+import com.diagbot.vo.GetInquiryDetailVO;
+import com.diagbot.vo.HisInquirysVO;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
 
+import java.util.List;
+
+@Component
 public class PrecServiceFacade {
 
     @Autowired
     PrecServiceClient precServiceClient;
 
+    /**
+     * 获取历史病历列表
+     *
+     * @param hisInquirysVO
+     * @return
+     */
+    public List<HisInquiryDTO> hisInquirys(HisInquirysVO hisInquirysVO){
+        RespDTO<List<HisInquiryDTO>> hisInquiryDTO = precServiceClient.hisInquirys(hisInquirysVO);
+        RespDTOUtil.respNGDealCover(hisInquiryDTO, "获取历史病历列表失败!");
+        return hisInquiryDTO.data;
+    }
 
+    /**
+     * 获取病例详情
+     *
+     * @param getInquiryDetailVO
+     * @return
+     */
+    public GetInquiryDetailDTO getInquiryDetail(GetInquiryDetailVO getInquiryDetailVO){
+        RespDTO<GetInquiryDetailDTO> getInquiryDetailDTO = precServiceClient.getInquiryDetail(getInquiryDetailVO);
+        RespDTOUtil.respNGDealCover(getInquiryDetailDTO, "获取病历详情失败!");
+        return getInquiryDetailDTO.data;
+    }
 }

+ 0 - 100
tran-service/src/main/java/com/diagbot/web/InquiryInfoController.java

@@ -197,106 +197,6 @@ public class InquiryInfoController {
         }
     }
 
-    /**
-     * @Description:邵逸夫医嘱界面提示窗接口
-     * @author:lpc
-     *//*
-    @PostMapping(value = "/get_syf_inquiry")
-    @ResponseBody
-    public String getSyfDisease(@RequestBody PushJoinVO pushJoinVO) {
-        try {
-            GetDiseaseNameVO getDiseaseNameVO = new GetDiseaseNameVO();
-            StringBuffer dn = new StringBuffer();
-            String mrId;
-            List<GetDiseaseNameDTO> a = new ArrayList<>();
-            if (pushJoinVO.getDiag() != null && !"".equals(pushJoinVO.getDiag())) {
-                getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiag());
-                getDiseaseNameVO.setHospitalCode(pushJoinVO.getHosCode());
-                a = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
-                if (a.size() != 0) {
-                    for (GetDiseaseNameDTO di : a) {
-                        dn.append(di.getConceptDisName() + ",");
-                    }
-                    pushJoinVO.setDiseaseName(a.get(0).getConceptDisName());
-                    pushJoinVO.setDiag(dn.substring(0, dn.length() - 1));
-                }
-            }
-
-
-            mrId = mrFacade.createMr(pushJoinVO);
-
-            String url1 = "http://192.1.3.116:5446/indexHorizontal.html?" +
-                    "mrId=" + mrId + //redis保存产生唯一值
-                    "&tipsName=" +   //静态信息名称(化验项名称、辅捡项名称)
-                    "&tipsType=" +   //静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
-                    "showTab=0" +
-                    "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
-                    "&plan=0";
-
-            String url2 = "http://192.1.3.116:5446/indexHorizontal.html?" +
-                    "mrId=" + mrId + //redis保存产生唯一值
-                    "&tipsName=" +   //静态信息名称(化验项名称、辅捡项名称)
-                    "&tipsType=" +   //静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
-                    "showTab=0" +
-                    "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
-                    "&plan=1";
-
-            UrlOut uo = new UrlOut();
-            uo.setUrl1(url1.trim());
-            uo.setUrl2(url2.trim());
-            String data = JSONObject.toJSONString(uo);
-
-            InputInfo inputInfo = new InputInfo();
-            inputInfo.setHospitalCode(pushJoinVO.getHosCode());
-            inputInfo.setHosptialDeptCode(pushJoinVO.getHosptialDeptCode());
-            inputInfo.setDoctorCode(pushJoinVO.getDoctorCode());
-            inputInfo.setInquiryCode(pushJoinVO.getInquiryCode());
-            inputInfo.setDiseaseName(pushJoinVO.getDiag());
-            inputInfo.setAge(pushJoinVO.getAge().intValue());
-            inputInfo.setSexType(pushJoinVO.getSex().toString());
-            inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
-            inputInfo.setParamIn(JSONObject.toJSONString(pushJoinVO));
-            inputInfo.setParamOut(data);
-            inputInfoFacade.saveInputInfo(inputInfo);
-            return data;
-
-            *//*String url1 = "http://192.1.3.116:5446/index.html?lisJson="
-             *//**//*String url1 = "http://192.168.1.104:5446/landscape.html?lisJson="*//**//*
-                    + JSONObject.toJSONString(nlpRemote.getLabsJson())
-                    + "&diagJson=" + dn1
-                    + "&age=" + nlpRemote.getAge()
-                    + "&sex=" + (Integer.parseInt(nlpRemote.getSexType())==1?"男":"女")
-                    + "&symptomJson=" + URLEncoder.encode(nlpRemote.getSymptomJson(),"utf-8")
-                    + "&pastJson=" + URLEncoder.encode(nlpRemote.getPastJson(),"utf-8")
-                    + "&pacsJson=" + URLEncoder.encode(nlpRemote.getPacsJson(),"utf-8")
-                    + "&vitalJson=" + URLEncoder.encode(nlpRemote.getVitalsJson(),"utf-8")
-                    + "&otherJson=" + URLEncoder.encode(nlpRemote.getOtherJson(),"utf-8")
-                    + "&hospitalCode=" + nlpRemote.getHospitalCode();
-
-            String url2 = "http://192.1.3.116:5446/indexHorizontal.html?lisJson="
-            *//**//*String url2 = "http://192.168.1.104:5446/landscapeMedical.html?lisJson="*//**//*
-                    + JSONObject.toJSONString(nlpRemote.getLabsJson())
-                    + "&diagJson=" + dn1
-                    + "&age=" + nlpRemote.getAge()
-                    + "&sex=" + (Integer.parseInt(nlpRemote.getSexType())==1?"男":"女")
-                    + "&symptomJson=" + URLEncoder.encode(nlpRemote.getSymptomJson(),"utf-8")
-                    + "&pastJson=" + URLEncoder.encode(nlpRemote.getPastJson(),"utf-8")
-                    + "&pacsJson=" + URLEncoder.encode(nlpRemote.getPacsJson(),"utf-8")
-                    + "&vitalJson=" + URLEncoder.encode(nlpRemote.getVitalsJson(),"utf-8")
-                    + "&otherJson=" + URLEncoder.encode(nlpRemote.getOtherJson(),"utf-8")
-                    + "&hospitalCode=" + nlpRemote.getHospitalCode();
-
-            UrlOut uo = new UrlOut();
-            uo.setUrl1(url1.trim());
-            uo.setUrl2(url2.trim());
-            String data = JSONObject.toJSONString(uo);*//*
-
-        } catch (Exception e) {
-            e.printStackTrace();
-            return e.getMessage();
-        }
-    }*/
-
 
     /**
      * 急诊-历史病历列表

+ 41 - 0
tran-service/src/main/java/com/diagbot/web/PrecServiceController.java

@@ -1,8 +1,22 @@
 package com.diagbot.web;
 
+import com.diagbot.annotation.SysLogger;
+import com.diagbot.dto.GetInquiryDetailDTO;
+import com.diagbot.dto.HisInquiryDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.PrecServiceFacade;
+import com.diagbot.vo.GetInquiryDetailVO;
+import com.diagbot.vo.HisInquirysVO;
 import io.swagger.annotations.Api;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.annotations.ApiIgnore;
+
+import javax.validation.Valid;
+import java.util.List;
 
 @RestController
 @RequestMapping("/prec")
@@ -10,5 +24,32 @@ import org.springframework.web.bind.annotation.RestController;
 @SuppressWarnings("unchecked")
 public class PrecServiceController {
 
+    @Autowired
+    private PrecServiceFacade precServiceFacade;
+
+    /**
+     * 获取历史病历列表
+     *
+     * @param hisInquirysVO
+     * @return
+     */
+    @PostMapping("/hisInquirys")
+    @SysLogger("hisInquirys")
+    public RespDTO<List<HisInquiryDTO>> hisInquirys(@Valid @RequestBody HisInquirysVO hisInquirysVO){
+        List<HisInquiryDTO> hisInquiryDTO = precServiceFacade.hisInquirys(hisInquirysVO);
+        return RespDTO.onSuc(hisInquiryDTO);
+    }
 
+    /**
+     * 获取病例详情
+     *
+     * @param getInquiryDetailVO
+     * @return
+     */
+    @PostMapping("/hisInquiryDetail")
+    @SysLogger("hisInquiryDetail")
+    public RespDTO<GetInquiryDetailDTO> getInquiryDetail(@Valid @RequestBody GetInquiryDetailVO getInquiryDetailVO){
+        GetInquiryDetailDTO getInquiryDetailDTO = precServiceFacade.getInquiryDetail(getInquiryDetailVO);
+        return RespDTO.onSuc(getInquiryDetailDTO);
+    }
 }