소스 검색

住院门诊接口

lipc 6 년 전
부모
커밋
dbe9d35b51

+ 1 - 1
config-server/src/main/resources/shared/aipt-service-local.yml

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://127.0.0.1:3306/med-s?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://127.0.0.1:3306/med?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: langtong
       # 连接池的配置信息

+ 1 - 1
config-server/src/main/resources/shared/tran-service-local.yml

@@ -7,7 +7,7 @@ spring:
     druid:
       driver-class-name: com.mysql.cj.jdbc.Driver
       platform: mysql
-      url: jdbc:mysql://127.0.0.1:3306/sys-tran?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      url: jdbc:mysql://127.0.0.1:3306/sys-tran-shaoyifu?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
       username: root
       password: langtong
       # 连接池的配置信息

+ 0 - 6
tran-service/pom.xml

@@ -19,12 +19,6 @@
     </parent>
 
     <dependencies>
-        <!-- https://mvnrepository.com/artifact/com.microsoft.sqlserver/sqljdbc4 -->
-        <dependency>
-            <groupId>com.microsoft.sqlserver</groupId>
-            <artifactId>sqljdbc4</artifactId>
-            <version>4.0</version>
-        </dependency>
 
         <!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
         <dependency>

+ 1 - 1
tran-service/src/main/java/com/diagbot/facade/TranDiseaseIcdFacade.java

@@ -57,7 +57,7 @@ public class TranDiseaseIcdFacade extends DiseaseIcdServiceImpl {
      */
     public List<GetDiseaseNameDTO> getDiseaseNames(GetDiseaseNameVO getDiseaseNameVO) {
         Map paramMap = new HashMap<>();
-        paramMap.put("hisDiseaseName", Arrays.asList(getDiseaseNameVO.getHisDiseaseName().split("")));
+        paramMap.put("hisDiseaseName", Arrays.asList(getDiseaseNameVO.getHisDiseaseName().split(",")));
         paramMap.put("hospitalCode", getDiseaseNameVO.getHospitalCode());
         return this.getDiseaseNames(paramMap);
     }

+ 1 - 1
tran-service/src/main/java/com/diagbot/service/impl/MrServiceImpl.java

@@ -54,7 +54,7 @@ public class MrServiceImpl implements MrService {
     @Override
     public String createMr(PushJoinVO pushJoinVO) {
         Date now = DateUtil.now();
-        final Date expireDate = DateUtil.addMinutes(now, 3);
+        final Date expireDate = DateUtil.addMinutes(now, 30);
         pushJoinVO.setCreateTime(now);
         pushJoinVO.setExpireTime(expireDate);
         pushJoinVO.setExpireTimeStr(DateUtil.format(expireDate, "yyyy-MM-dd HH:mm:ss"));

+ 0 - 2
tran-service/src/main/java/com/diagbot/shaoyifu/entity/NLPInputRemote.java

@@ -29,6 +29,4 @@ public class NLPInputRemote {
     private String brjzid; //就诊序号
     private String doctorNo;//医生id
     private String deptId;//科室id
-
-    private String code;
 }

+ 2 - 3
tran-service/src/main/java/com/diagbot/vo/PushJoinVO.java

@@ -64,8 +64,7 @@ public class PushJoinVO {
     private String hosptialDeptCode;
     private String doctorCode;
     private String inquiryCode;
-    private String code;//0病程录 1医嘱 2首程 3大病历 4查阅报告危急值提醒 5开单合理性 6化验静态知识 7辅检静态知识
+    private String code;//门诊 :0 病程录 1 医嘱  7 查阅报告危急值提醒 8 开单合理性 9 化验辅检静态知识
+                        //住院 :2 首程 3 大病历 4 查阅报告危急值提醒 5 开单合理性 6 化验辅检静态知识
 
-    private String lisMrn;//his化验病历号
-    private String pacsMrn;//his辅检病历号
 }

+ 372 - 274
tran-service/src/main/java/com/diagbot/web/InquiryInfoController.java

@@ -3,28 +3,23 @@ package com.diagbot.web;
 import com.alibaba.fastjson.JSONObject;
 import com.diagbot.annotation.SysLogger;
 import com.diagbot.dto.*;
-import com.diagbot.entity.DiseaseIcd;
 import com.diagbot.entity.InputInfo;
-import com.diagbot.vo.LisPacsInfoForDJVO;
 import com.diagbot.facade.*;
-import com.diagbot.shaoyifu.entity.NLPInputRemote;
-import com.diagbot.shaoyifu.entity.UrlOut;
 import com.diagbot.util.DateUtil;
 import com.diagbot.vo.*;
 import io.swagger.annotations.Api;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.transaction.annotation.Transactional;
-import org.springframework.web.bind.annotation.*;
+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 java.net.URLEncoder;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.PreparedStatement;
-import java.sql.ResultSet;
+
 import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -72,7 +67,7 @@ public class InquiryInfoController {
         Boolean a = inquiryInfoFacade.saveInquiryToHis(saveInquiryToHisVO);
         //增加统计功能
         InputInfo inputInfo = new InputInfo();
-        inputInfo.setHospitalCode(saveInquiryToHisVO.getHospitalId().toString());
+        inputInfo.setHospitalCode(saveInquiryToHisVO.getHospitalId() == 1 ? "A001" : "A002");
         inputInfo.setHosptialDeptCode(saveInquiryToHisVO.getHospitalDeptId().toString());
         inputInfo.setDoctorCode(saveInquiryToHisVO.getDoctorId().toString());
         inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
@@ -105,17 +100,17 @@ public class InquiryInfoController {
             StringBuffer sb = new StringBuffer();
             sb.append("0;|0;|");
             //主诉
-            sb.append(a.getContentList().get(0) + "|");
+            sb.append((a.getContentList().get(0) == null ? "" : a.getContentList().get(0)) + "|");
             //现病史
-            sb.append(a.getContentList().get(1) + "|");
+            sb.append((a.getContentList().get(1) == null ? "" : a.getContentList().get(1)) + "|");
             //其他史
-            sb.append(a.getContentList().get(2) + "|");
+            sb.append((a.getContentList().get(2) == null ? "" : a.getContentList().get(2)) + "|");
             //查体
-            sb.append(a.getContentList().get(3) + "|");
+            sb.append((a.getContentList().get(3) == null ? "" : a.getContentList().get(3)) + "|");
             //化验
-            sb.append(a.getContentList().get(4) + "|");
+            sb.append((a.getContentList().get(4) == null ? "" : a.getContentList().get(4)) + "|");
             //辅检
-            sb.append(a.getContentList().get(5) + "|");
+            sb.append((a.getContentList().get(5) == null ? "" : a.getContentList().get(5)) + "|");
             //诊断
             String diagnose = a.getContentList().get(6);
             //diagnose格式 上呼吸道感染(初诊);糖尿病(初诊); 分割成["上呼吸道感染(初诊)","糖尿病(初诊)",""]
@@ -147,7 +142,7 @@ public class InquiryInfoController {
             sb.append("|");
             String dn = diseaseName.substring(0, diseaseName.length() - 3);
             //治疗
-            sb.append(a.getContentList().get(7) + "|");
+            sb.append((a.getContentList().get(7) == null ? "" : a.getContentList().get(7)) + "|");
             //年龄为必须值,通过生日计算
             int age = 0;
             Calendar now = Calendar.getInstance();
@@ -165,18 +160,36 @@ public class InquiryInfoController {
                 }
             }
 
-            String url = "http://192.1.3.116:5446/landscapeMedical.html?" +
-                    /*String url = "http://192.168.1.104:5446/landscapeMedical.html?" +*/
+            /*String url = "http://192.1.3.116:5446/landscapeMedical.html?" +
+             *//*String url = "http://192.168.1.104:5446/landscapeMedical.html?" +*//*
                     "age=" + age +
                     "&diagJson=" + dn +
                     "&lisJson=" + a.getContentList().get(5) +
-                    /*"&pastJson=" + a.getContentList().get(1) +*/
+                    *//*"&pastJson=" + a.getContentList().get(1) +*//*
                     "&otherJson=" + a.getContentList().get(2) +
                     "&pacsJson=" + a.getContentList().get(5) +
                     "&sex=" + (patientInfoDTO.getSex() == 1 ? "男" : "女") +
                     "&symptomJson=" + a.getContentList().get(0) +
                     "&vitalJson=" + a.getContentList().get(3) +
-                    "&hospitalCode=" + hisInquirysForDjVO.getHospitalCode();
+                    "&hospitalCode=" + hisInquirysForDjVO.getHospitalCode();*/
+
+            PushJoinVO pushJoinVO = new PushJoinVO();
+            pushJoinVO.setAge(age);
+            pushJoinVO.setSex(patientInfoDTO.getSex());
+            pushJoinVO.setSymptom(a.getContentList().get(0));
+            pushJoinVO.setVital(a.getContentList().get(3));
+            pushJoinVO.setOther(a.getContentList().get(2));
+            pushJoinVO.setDiseaseName(dn);
+            pushJoinVO.setHosCode(hisInquirysForDjVO.getHospitalCode());
+            String mrId = mrFacade.createMr(pushJoinVO);
+
+            String url = "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=" + hisInquirysForDjVO.getHospitalCode() +
+                    "&plan=1";
             sb.append(url);
             return sb.toString();
         } else {
@@ -187,88 +200,68 @@ public class InquiryInfoController {
     /**
      * @Description:邵逸夫医嘱界面提示窗接口
      * @author:lpc
-     */
+     *//*
     @PostMapping(value = "/get_syf_inquiry")
     @ResponseBody
-    public String getSyfDisease(@RequestBody NLPInputRemote nlpRemote) {
+    public String getSyfDisease(@RequestBody PushJoinVO pushJoinVO) {
         try {
             GetDiseaseNameVO getDiseaseNameVO = new GetDiseaseNameVO();
             StringBuffer dn = new StringBuffer();
-            String mrId ;
-            String url ;
-            String dn1 = "";
-            if (nlpRemote.getDisJson() != null && !"".equals(nlpRemote.getDisJson())) {
-                getDiseaseNameVO.setHisDiseaseName(nlpRemote.getDisJson());
-                getDiseaseNameVO.setHospitalCode(nlpRemote.getHospitalCode());
-                List<GetDiseaseNameDTO> a = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
+            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() + ",");
                     }
-                    dn1 = dn.substring(0, dn.length() - 1);
+                    pushJoinVO.setDiseaseName(a.get(0).getConceptDisName());
+                    pushJoinVO.setDiag(dn.substring(0, dn.length() - 1));
                 }
             }
 
-            PushJoinVO pushJoinVO = new PushJoinVO();
-            pushJoinVO.setAge(nlpRemote.getAge().intValue());
-            pushJoinVO.setSex(Integer.parseInt(nlpRemote.getSexType()));
-            pushJoinVO.setSymptom(nlpRemote.getSymptomJson());
-            pushJoinVO.setVital(nlpRemote.getVitalsJson());
-            pushJoinVO.setOther(nlpRemote.getOtherJson());
-            pushJoinVO.setDiag(dn1);
-            pushJoinVO.setHosCode(nlpRemote.getHospitalCode());
-
-            InputInfo inputInfo = new InputInfo();
-            inputInfo.setHospitalCode(nlpRemote.getHospitalCode());
-            inputInfo.setHosptialDeptCode(nlpRemote.getDeptId());
-            inputInfo.setDoctorCode(nlpRemote.getDoctorNo());
-            inputInfo.setInquiryCode(nlpRemote.getClinicId());
-            inputInfo.setDiseaseName(nlpRemote.getDisJson());
-            inputInfo.setAge(nlpRemote.getAge().intValue());
-            inputInfo.setSexType(nlpRemote.getSexType());
-            inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
-            inputInfo.setRemark("邵逸夫界面提示窗接口");
-            inputInfo.setParamIn(JSONObject.toJSONString(nlpRemote));
 
-            switch (nlpRemote.getCode()) {
+            mrId = mrFacade.createMr(pushJoinVO);
 
-                case "0":
-
-                    mrId = mrFacade.createMr(pushJoinVO);
-
-                    url = "http://127.0.0.1:5446/index.html?" +
-                            "mrId=" + mrId +
-                            "&tipsName=" +
-                            "&tipsType=" +
-                            "showTab=0" +
-                            "&hospitalCode=" + pushJoinVO.getHosCode() +
-                            "&plan=0";
-
-                    inputInfo.setParamOut(url);
-                    inputInfoFacade.saveInputInfo(inputInfo);
-                    return url;
-
-                case "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";
 
-                    url = "http://127.0.0.1:5446/indexHorizontal.html?" +
-                            "mrId=" + mrId +
-                            "&tipsName=" +
-                            "&tipsType=" +
-                            "showTab=0" +
-                            "&hospitalCode=" + pushJoinVO.getHosCode() +
-                            "&plan=1";
+            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";
 
-                    inputInfo.setParamOut(url);
-                    inputInfoFacade.saveInputInfo(inputInfo);
-                    return url;
-
-            }
+            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="*//*
+            *//*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()
@@ -281,7 +274,7 @@ public class InquiryInfoController {
                     + "&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="*//*
+            *//**//*String url2 = "http://192.168.1.104:5446/landscapeMedical.html?lisJson="*//**//*
                     + JSONObject.toJSONString(nlpRemote.getLabsJson())
                     + "&diagJson=" + dn1
                     + "&age=" + nlpRemote.getAge()
@@ -296,16 +289,13 @@ public class InquiryInfoController {
             UrlOut uo = new UrlOut();
             uo.setUrl1(url1.trim());
             uo.setUrl2(url2.trim());
-            String data = JSONObject.toJSONString(uo);*/
-
-            return "暂无推送";
+            String data = JSONObject.toJSONString(uo);*//*
 
         } catch (Exception e) {
             e.printStackTrace();
             return e.getMessage();
         }
-    }
-
+    }*/
 
 
     /**
@@ -357,14 +347,18 @@ public class InquiryInfoController {
      */
     @PostMapping("/getDataService")
     @SysLogger("getDataService")
-    public String getDataService(@RequestBody PushJoinVO pushJoinVO) throws Exception {
+    public RespDTO<String> getDataService(@RequestBody PushJoinVO pushJoinVO) {
         GetDiseaseNameVO getDiseaseNameVO = new GetDiseaseNameVO();
         LisPacsInfoForDJVO lisPacsInfoForDJVO = new LisPacsInfoForDJVO();
         List<LisConfigDTO> lisConfigDTO;
         List<PacsConfigDTO> pacsConfigDTO;
+        List<GetDiseaseNameDTO> a;
         String mrId;
         String url;
+        StringBuffer sb1 = new StringBuffer();//放诊断
+        StringBuffer sb2 = new StringBuffer();//放辅检
 
+        //统计接口
         InputInfo inputInfo = new InputInfo();
         inputInfo.setHospitalCode(pushJoinVO.getHosCode());
         inputInfo.setHosptialDeptCode(pushJoinVO.getHosptialDeptCode());
@@ -372,243 +366,347 @@ public class InquiryInfoController {
         inputInfo.setInquiryCode(pushJoinVO.getInquiryCode());
         inputInfo.setDiseaseName(pushJoinVO.getDiag());
         inputInfo.setAge(pushJoinVO.getAge().intValue());
-        inputInfo.setSexType(pushJoinVO.getSex() == 1 ? "男" : "女");
+        inputInfo.setSexType(pushJoinVO.getSex().toString());
         inputInfo.setTransTime(DateUtil.format(new Date(), DateUtil.DATE_TIME_FORMAT));
         inputInfo.setParamIn(JSONObject.toJSONString(pushJoinVO));
 
+        //疾病转公表
+        if (pushJoinVO.getDiag() != null && !"".equals(pushJoinVO.getDiag())) {
+            getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiag());
+            getDiseaseNameVO.setHospitalCode(pushJoinVO.getHosCode());
+            a = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
+            if (a != null && a.size() != 0) {
+                for (GetDiseaseNameDTO di : a) {
+                    sb1.append(di.getConceptDisName() + ",");
+                }
+                pushJoinVO.setDiseaseName(a.get(0).getConceptDisName());
+                pushJoinVO.setDiag(sb1.substring(0, sb1.length() - 1));
+            } else {
+                pushJoinVO.setDiag("");
+                pushJoinVO.setDiseaseName("");
+            }
+        }
+
+        //结构化验转公表
+        List<LisResult> lrs = pushJoinVO.getLis();
+        if (lrs != null && lrs.size() != 0) {
+            for (int i = 0; i < lrs.size(); i++) {
+                lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
+                lisPacsInfoForDJVO.setMealName(lrs.get(i).getName());
+                lisPacsInfoForDJVO.setItemName(lrs.get(i).getDetailName());
+                lisConfigDTO = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
+                if (lisConfigDTO != null && lisConfigDTO.size() != 0) {
+                    lrs.get(i).setUniqueName(lisConfigDTO.get(0).getUniqueName());
+                }
+            }
+            pushJoinVO.setLis(lrs);
+        }
+
+        //结构辅检转公表
+        List<PacsResult> lpr = pushJoinVO.getPacsList();
+        if (lpr != null && lpr.size() != 0) {
+            for (int j = 0; j < lpr.size(); j++) {
+                lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
+                lisPacsInfoForDJVO.setMealName(lpr.get(j).getName());
+                pacsConfigDTO = pacsConfigFacade.getPacsConfigByNameAndHosCode(lisPacsInfoForDJVO);
+                if (pacsConfigDTO != null && pacsConfigDTO.size() != 0) {
+                    lpr.get(j).setName(pacsConfigDTO.get(0).getUniqueName());
+                    sb2.append(pacsConfigDTO.get(0).getUniqueName() + ":" + lpr.get(j).getResult() + ";");
+                }
+            }
+            pushJoinVO.setPacs(sb2.toString());
+        }
+
+        //化验套餐名转公表
+        if (pushJoinVO.getLisOrder() != null && !"".equals(pushJoinVO.getLisOrder().trim())) {
+            lisPacsInfoForDJVO.setMealName(pushJoinVO.getLisOrder());
+            lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
+            lisConfigDTO = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
+            if (lisConfigDTO != null && lisConfigDTO.size() != 0) {
+                pushJoinVO.setLisOrder(lisConfigDTO.get(0).getUniqueName().substring(0, lisConfigDTO.get(0).getUniqueName().indexOf("--")));
+            } else {
+                pushJoinVO.setLisOrder("");
+            }
+        }
+
+        //辅检套餐名转公表
+        if (pushJoinVO.getPacsOrder() != null && !"".equals(pushJoinVO.getPacsOrder().trim())) {
+            lisPacsInfoForDJVO.setMealName(pushJoinVO.getPacsOrder());
+            lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
+            pacsConfigDTO = pacsConfigFacade.getPacsConfigByNamesAndHosCode(lisPacsInfoForDJVO);
+            if (pacsConfigDTO != null && pacsConfigDTO.size() != 0) {
+                pushJoinVO.setPacsOrder(pacsConfigDTO.get(0).getUniqueName());
+            } else {
+                pushJoinVO.setPacsOrder("");
+            }
+        }
+
         switch (pushJoinVO.getCode()) {
-            //首程推送
+            //门诊 病程录
+            case "0":
+
+                mrId = mrFacade.createMr(pushJoinVO);
+
+                url = "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";
+
+                inputInfo.setParamOut(url);
+                inputInfo.setRemark("邵逸夫门诊病程录推送接口");
+                inputInfoFacade.saveInputInfo(inputInfo);
+                return RespDTO.onSuc(url);
+
+            //门诊 医嘱
+            case "1":
+
+                mrId = mrFacade.createMr(pushJoinVO);
+
+                url = "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";
+
+                inputInfo.setParamOut(url);
+                inputInfo.setRemark("邵逸夫门诊医嘱推送接口");
+                inputInfoFacade.saveInputInfo(inputInfo);
+                return RespDTO.onSuc(url);
+
+            //门诊 查阅报告危急值提醒
+            case "7":
+
+                mrId = mrFacade.createMr(pushJoinVO);
+
+                url = "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" +   //0默认显示治疗方案 1默认显示静态信息
+                        "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                        "&plan=7";
+
+                inputInfo.setRemark("邵逸夫门诊查阅报告危急值提醒接口");
+                inputInfo.setParamOut(url);
+                inputInfoFacade.saveInputInfo(inputInfo);
+                return RespDTO.onSuc(url);
+
+            //门诊 开单合理性
+            case "8":
+
+                if (pushJoinVO.getLisOrder() != null && !"".equals(pushJoinVO.getLisOrder().trim())) {
+
+                    mrId = mrFacade.createMr(pushJoinVO);
+
+                    url = "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" +   //0默认显示治疗方案 1默认显示静态信息
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                            "&plan=8";
+
+                    inputInfo.setRemark("邵逸夫门诊化验开单合理性接口");
+                    inputInfo.setParamOut(url);
+                    inputInfoFacade.saveInputInfo(inputInfo);
+
+                    return RespDTO.onSuc(url);
+
+                } else if (pushJoinVO.getPacsOrder() != null && !"".equals(pushJoinVO.getPacsOrder().trim())) {
+
+                    mrId = mrFacade.createMr(pushJoinVO);
+
+                    url = "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" +   //0默认显示治疗方案 1默认显示静态信息
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                            "&plan=8";
+
+                    inputInfo.setRemark("邵逸夫门诊辅检开单合理性接口");
+                    inputInfo.setParamOut(url);
+                    inputInfoFacade.saveInputInfo(inputInfo);
+                    return RespDTO.onSuc(url);
+                }
+
+                return RespDTO.onError("!");
+
+            //门诊 化验辅检静态知识
+            case "9":
+                if (pushJoinVO.getLisOrder() != null && !"".equals(pushJoinVO.getLisOrder().trim())) {
+
+                    mrId = mrFacade.createMr(pushJoinVO);
+
+                    url = "http://192.1.3.116:5446/indexHorizontal.html?" +
+                            "mrId=" + mrId + //redis保存产生唯一值
+                            "&tipsName=" + pushJoinVO.getLisOrder() +  //静态信息名称(化验项名称、辅捡项名称)
+                            "&tipsType=5" +
+                            "&showTab=1" +
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                            "&plan=9";
+
+                    inputInfo.setRemark("邵逸夫门诊化验静态知识接口");
+                    inputInfo.setParamOut(url);
+                    inputInfoFacade.saveInputInfo(inputInfo);
+                    return RespDTO.onSuc(url);
+
+                } else if (pushJoinVO.getPacsOrder() != null && !"".equals(pushJoinVO.getPacsOrder().trim())) {
+
+                    mrId = mrFacade.createMr(pushJoinVO);
+
+                    url = "http://192.1.3.116:5446/indexHorizontal.html?" +
+                            "mrId=" + mrId + //redis保存产生唯一值
+                            "&tipsName=" + pushJoinVO.getPacsOrder() + //静态信息名称(化验项名称、辅捡项名称)
+                            "&tipsType=6" +
+                            "&showTab=1" +
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                            "&plan=9";
+
+                    inputInfo.setRemark("邵逸夫门诊辅检静态知识接口");
+                    inputInfo.setParamOut(url);
+                    inputInfoFacade.saveInputInfo(inputInfo);
+                    return RespDTO.onSuc(url);
+                }
+                return RespDTO.onError("未传入化验辅检套餐名称!");
+
+            //住院 首程推送
             case "2":
-                getDiseaseNameVO.setHospitalCode(pushJoinVO.getHosCode());
-                getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiag());
-                List<GetDiseaseNameDTO> a = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
-                pushJoinVO.setDiag(a.get(0).getConceptDisName());
 
                 mrId = mrFacade.createMr(pushJoinVO);
 
-                url = "http://127.0.0.1:5446/index.html?" +
-                        "mrId=" + mrId +
-                        "&tipsName=" +
-                        "&tipsType=" +
-                        "&showTab=0" +
-                        "&hospitalCode=" + pushJoinVO.getHosCode() +
-                        "&plan=2";
+                url = "http://192.1.3.116:5446/index.html?" +
+                        "mrId=" + mrId + //redis保存产生唯一值
+                        "&tipsName=" +   //静态信息名称(化验项名称、辅捡项名称)
+                        "&tipsType=" +   //静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
+                        "&showTab=0" +   //0默认显示治疗方案 1默认显示静态信息
+                        "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                        "&plan=2";       //配置方案编号
 
                 inputInfo.setRemark("邵逸夫首程推送接口");
                 inputInfo.setParamOut(url);
                 inputInfoFacade.saveInputInfo(inputInfo);
-                return url;
+                return RespDTO.onSuc(url);
 
-            //大病历推送
+            //住院 大病历推送
             case "3":
-                getDiseaseNameVO.setHospitalCode(pushJoinVO.getHosCode());
-                getDiseaseNameVO.setHisDiseaseName(pushJoinVO.getDiag());
-                List<GetDiseaseNameDTO> b = diseaseIcdFacade.getDiseaseNames(getDiseaseNameVO);
-                pushJoinVO.setDiag(b.get(0).getConceptDisName());
 
                 mrId = mrFacade.createMr(pushJoinVO);
 
-                url = "http://127.0.0.1:5446/index.html?" +
-                        "mrId=" + mrId +
-                        "&tipsName=" +
-                        "&tipsType=" +
-                        "&showTab=0" +
-                        "&hospitalCode=" + pushJoinVO.getHosCode() +
+                url = "http://192.1.3.116:5446/index.html?" +
+                        "mrId=" + mrId + //redis保存产生唯一值
+                        "&tipsName=" +   //静态信息名称(化验项名称、辅捡项名称)
+                        "&tipsType=" +   //静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
+                        "&showTab=0" +   //0默认显示治疗方案 1默认显示静态信息
+                        "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
                         "&plan=3";
                 inputInfo.setRemark("邵逸夫大病历推送接口");
                 inputInfo.setParamOut(url);
                 inputInfoFacade.saveInputInfo(inputInfo);
-                return url;
+                return RespDTO.onSuc(url);
 
-            //查阅报告危急值提醒(视图)
+            //住院 查阅报告危急值提醒
             case "4":
-                if (pushJoinVO.getLisMrn() != null & !"".equals(pushJoinVO.getLisMrn().trim())) {
-                    String username = "u2019_LT";// 数据库用户名
-                    String password = "lt@2019";// 数据库密码
-                    String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";//驱动
-                    String dbUrl = "jdbc:sqlserver://192.1.2.92:1433;DatabaseName=lis";//数据库地址
-                    Connection conn;
-                    Class.forName(driver);
-                    conn = DriverManager.getConnection(dbUrl, username, password);
-                    String sql = "select * from V_LIS_PANICVALUE where MRN = " + pushJoinVO.getLisMrn();
-                    PreparedStatement pst;
-                    pst = conn.prepareStatement(sql);
-                    ResultSet rs = pst.executeQuery();
-
-                    List<LisResult> lrs = new ArrayList<>();
-                    LisResult lisResult = new LisResult();
-                    while (rs.next()) {
-                        lisResult.setName(rs.getString("SPECIMENNAME"));//套餐名
-                        lisResult.setDetailName(rs.getString("CHINNAME"));//化验项名
-                        //判断是否为数字,是则传入value,不是则传入otherValue
-                        if (isNum(rs.getString("NOTES"))) {
-                            lisResult.setValue(Double.valueOf(rs.getString("NOTES")));//值
-                        } else {
-                            lisResult.setOtherValue(rs.getString("NOTES"));//其他结果,包括阴性阳性,文字描述等
-                        }
-
-
-                        if (rs.getString("refhigh") != null) {
-                            if (isNum(rs.getString("refhigh"))) {
-                                lisResult.setMaxValue(Double.valueOf(rs.getString("refhigh")));//值
-                            } else {
-                                lisResult.setMaxValue(0.0);//其他结果,包括阴性阳性,文字描述等
-                            }
-                        } else {
-                            lisResult.setMaxValue(0.0);
-                        }
-
-                        if (rs.getString("reflow") != null) {
-                            if (isNum(rs.getString("reflow"))) {
-                                lisResult.setMinValue(Double.valueOf(rs.getString("reflow")));//值
-                            } else {
-                                lisResult.setMinValue(0.0);//其他结果,包括阴性阳性,文字描述等
-                            }
-                        } else {
-                            lisResult.setMinValue(0.0);
-                        }
-
-                        lisResult.setUnits(rs.getString("jydw"));//单位
-                        lisResult.setSource(1);//数据来源
-                        lrs.add(lisResult);
-                    }
-                    rs.close();
-                    pst.close();
-                    conn.close();
-
-                    for (int i = 0; i < lrs.size(); i++) {
-                        lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
-                        lisPacsInfoForDJVO.setMealName(lrs.get(i).getName());
-                        lisPacsInfoForDJVO.setItemName(lrs.get(i).getDetailName());
-                        lisConfigDTO = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
-                        if(lisConfigDTO.size()!=0){
-                            lrs.get(i).setUniqueName(lisConfigDTO.get(0).getUniqueName());
-                        }
-                    }
-                    pushJoinVO.setLis(lrs);
-
-                } else if (pushJoinVO.getPacsMrn() != null && !"".equals(pushJoinVO.getPacsMrn().trim())) {
-                    String username = "u2019_LT";// 数据库用户名
-                    String password = "lt@2019";// 数据库密码
-                    String driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver";//驱动
-                    String dbUrl1 = "jdbc:oracle:thin:@192.1.2.92:1521:lis";//数据库地址
-                    Connection conn;
-                    Class.forName(driver);
-                    conn = DriverManager.getConnection(dbUrl1, username, password);
-                    String sql = "select * from V_PACS_PANICVALUE where MRN = " + pushJoinVO.getPacsMrn();
-                    PreparedStatement pst;
-                    pst = conn.prepareStatement(sql);
-                    ResultSet rs = pst.executeQuery();
-
-                    PacsResult pacsResult = new PacsResult();
-                    List<PacsResult> lpr = new ArrayList<>();
-                    while (rs.next()) {
-                        pacsResult.setName(rs.getString("SPECIMENNAME"));
-                        pacsResult.setResult(rs.getString("SPECIMENNAME"));
-                        lpr.add(pacsResult);
-                    }
-
-                    rs.close();
-                    pst.close();
-                    conn.close();
-
-                    StringBuffer sb = new StringBuffer();
-                    for (int j = 0; j <= lpr.size(); j++) {
-                        lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
-                        lisPacsInfoForDJVO.setMealName(lpr.get(j).getName());
-                        pacsConfigDTO = pacsConfigFacade.getPacsConfigByNameAndHosCode(lisPacsInfoForDJVO);
-                        if (pacsConfigDTO.size() != 0) {
-                            lpr.get(j).setName(pacsConfigDTO.get(0).getUniqueName());
-                        }
-                        sb.append(pacsConfigDTO.get(0).getUniqueName() + ":" + lpr.get(j).getResult() + ";");
-                    }
-                    pushJoinVO.setPacs(sb.toString());
-
-                }
 
                 mrId = mrFacade.createMr(pushJoinVO);
 
-                url = "http://127.0.0.1:5446/index.html?" +
-                        "mrId=" + mrId +
-                        "&tipsName=" +
-                        "&tipsType=" +
-                        "&showTab=0" +
-                        "&hospitalCode=" + pushJoinVO.getHosCode() +
+                url = "http://192.1.3.116:5446/index.html?" +
+                        "mrId=" + mrId + //redis保存产生唯一值
+                        "&tipsName=" +   //静态信息名称(化验项名称、辅捡项名称)
+                        "&tipsType=" +   //静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
+                        "&showTab=0" +   //0默认显示治疗方案 1默认显示静态信息
+                        "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
                         "&plan=4";
                 inputInfo.setRemark("邵逸夫查阅报告危急值提醒接口");
                 inputInfo.setParamOut(url);
                 inputInfoFacade.saveInputInfo(inputInfo);
-                return url;
+                return RespDTO.onSuc(url);
 
-            //开单合理性
+            //住院 开单合理性
             case "5":
 
-                mrId = mrFacade.createMr(pushJoinVO);
+                if (pushJoinVO.getLisOrder() != null && !"".equals(pushJoinVO.getLisOrder().trim())) {
 
-                url = "http://127.0.0.1:5446/index.html?" +
-                        "mrId=" + mrId +
-                        "&tipsName=" +
-                        "&tipsType=" +
-                        "&showTab=0" +
-                        "&hospitalCode=" + pushJoinVO.getHosCode() +
-                        "&plan=5";
-                inputInfo.setRemark("邵逸夫开单合理性接口");
-                inputInfo.setParamOut(url);
-                inputInfoFacade.saveInputInfo(inputInfo);
-                return url;
+                    mrId = mrFacade.createMr(pushJoinVO);
 
-            //辅检静态知识
+                    url = "http://192.1.3.116:5446/index.html?" +
+                            "mrId=" + mrId + //redis保存产生唯一值
+                            "&tipsName=" +   //静态信息名称(化验项名称、辅捡项名称)
+                            "&tipsType=" +   //静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
+                            "&showTab=0" +   //0默认显示治疗方案 1默认显示静态信息
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                            "&plan=5";
+
+                    inputInfo.setRemark("邵逸夫化验开单合理性接口");
+                    inputInfo.setParamOut(url);
+                    inputInfoFacade.saveInputInfo(inputInfo);
+
+                    return RespDTO.onSuc(url);
+
+                } else if (pushJoinVO.getPacsOrder() != null && !"".equals(pushJoinVO.getPacsOrder().trim())) {
+
+                    mrId = mrFacade.createMr(pushJoinVO);
+
+                    url = "http://192.1.3.116:5446/index.html?" +
+                            "mrId=" + mrId + //redis保存产生唯一值
+                            "&tipsName=" +   //静态信息名称(化验项名称、辅捡项名称)
+                            "&tipsType=" +   //静态信息类型(1-症状,5-化验,6-辅检,7-诊断,8-药品,9-药品大类,10-不良反应,11-药品小类,12-化验公表项,22-指标)
+                            "&showTab=0" +   //0默认显示治疗方案 1默认显示静态信息
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                            "&plan=5";
+
+                    inputInfo.setRemark("邵逸夫辅检开单合理性接口");
+                    inputInfo.setParamOut(url);
+                    inputInfoFacade.saveInputInfo(inputInfo);
+                    return RespDTO.onSuc(url);
+                }
+
+                return RespDTO.onError("未传入当前下达化验辅检套餐名称!");
+
+            //住院 化验辅检静态知识
             case "6":
                 if (pushJoinVO.getLisOrder() != null && !"".equals(pushJoinVO.getLisOrder().trim())) {
-                    lisPacsInfoForDJVO.setMealName(pushJoinVO.getLisOrder());
-                    lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
-                    lisConfigDTO = tranLisConfigFacade.getLisConfigByNamesAndHosCode(lisPacsInfoForDJVO);
-                    pushJoinVO.setLisOrder(lisConfigDTO.get(0).getUniqueName());
 
                     mrId = mrFacade.createMr(pushJoinVO);
 
-                    url = "http://127.0.0.1:5446/index.html?" +
-                            "mrId=" + mrId +
-                            "&tipsName=" + pushJoinVO.getLisOrder() +
+                    url = "http://192.1.3.116:5446/index.html?" +
+                            "mrId=" + mrId + //redis保存产生唯一值
+                            "&tipsName=" + pushJoinVO.getLisOrder() +  //静态信息名称(化验项名称、辅捡项名称)
                             "&tipsType=5" +
                             "&showTab=1" +
-                            "&hospitalCode=" + pushJoinVO.getHosCode() +
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
                             "&plan=6";
 
                     inputInfo.setRemark("邵逸夫化验静态知识接口");
                     inputInfo.setParamOut(url);
                     inputInfoFacade.saveInputInfo(inputInfo);
-                    return url;
+                    return RespDTO.onSuc(url);
 
-                } else if (pushJoinVO.getPacOrder() != null && !"".equals(pushJoinVO.getPacOrder().trim())) {
-                    lisPacsInfoForDJVO.setMealName(pushJoinVO.getPacOrder());
-                    lisPacsInfoForDJVO.setHosCode(pushJoinVO.getHosCode());
-                    pacsConfigDTO = pacsConfigFacade.getPacsConfigByNamesAndHosCode(lisPacsInfoForDJVO);
-                    pushJoinVO.setPacOrder(pacsConfigDTO.get(0).getUniqueName());
+                } else if (pushJoinVO.getPacsOrder() != null && !"".equals(pushJoinVO.getPacsOrder().trim())) {
 
                     mrId = mrFacade.createMr(pushJoinVO);
 
-                    url = "http://127.0.0.1:5446/index.html?" +
-                            "mrId=" + mrId +
-                            "&tipsName=" + pushJoinVO.getPacOrder() +
+                    url = "http://192.1.3.116:5446/index.html?" +
+                            "mrId=" + mrId + //redis保存产生唯一值
+                            "&tipsName=" + pushJoinVO.getPacsOrder() +  //静态信息名称(化验项名称、辅捡项名称)
                             "&tipsType=6" +
                             "&showTab=1" +
-                            "&hospitalCode=" + pushJoinVO.getHosCode() +
-                            "&plan=7";
+                            "&hospitalCode=" + pushJoinVO.getHosCode() + //医院编码
+                            "&plan=6";
 
                     inputInfo.setRemark("邵逸夫辅检静态知识接口");
                     inputInfo.setParamOut(url);
                     inputInfoFacade.saveInputInfo(inputInfo);
-                    return url;
+                    return RespDTO.onSuc(url);
                 }
+                return RespDTO.onError("未传入化验辅检套餐名称!");
         }
-        return "暂无推送";
-
-    }
-
-    public static boolean isNum(String str) {
-        Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
-        return pattern.matcher(str).matches();
+        return RespDTO.onError("传入code无效!");
     }
 
 }

+ 1 - 1
tran-service/src/main/resources/mapper/PatientInfoMapper.xml

@@ -57,7 +57,7 @@
 		d.id_no as patientIdNo,
 		d.birthday as birthday
 		FROM tran_hospital_info a LEFT JOIN tran_hospital_dept b 
-		ON a.`code`=b.hospital_code and b.`status`=1 and b.is_deleted='N' and b.`code`=#{hospitalDeptCode} 	
+		ON a.`code`=b.hospital_code and b.`status`=1 and b.is_deleted='N' and b.`code`=#{hospitalDeptCode}
 		LEFT JOIN tran_doctor_info c 
 		ON b.hospital_code=c.hospital_code and b.`code`=c.hospital_dept_code and c.is_deleted='N' and c.`code`=#{doctorCode}
 		LEFT JOIN tran_patient_info d 

+ 1 - 3
tran-service/src/main/resources/mapper/SysSetMapper.xml

@@ -23,9 +23,7 @@
         SELECT * FROM tran_sys_set
         <where>
             is_deleted = "N"
-            <if test="hospitalCode != null and hospitalCode != '' ">
-                and hospital_code = #{hospitalCode}
-            </if>
+            and FIND_IN_SET(#{hospitalCode},hospital_code)
             <if test="plan != null">
                 and plan = #{plan}
             </if>