Explorar o código

Merge remote-tracking branch 'origin/master'

MarkHuang %!s(int64=4) %!d(string=hai) anos
pai
achega
42e5d49b77

+ 23 - 9
src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -26,6 +26,7 @@ import com.diagbot.repository.YiBaoDiseaseNode;
 import com.diagbot.repository.YiBaoDiseaseRepository;
 import com.diagbot.repository.YiBaoOperationNameNode;
 import com.diagbot.repository.YiBaoOperationNameRepository;
+import com.diagbot.util.EntityUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.vo.RetrievalVO;
 import com.diagbot.vo.StaticKnowledgeIndexVO;
@@ -34,6 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @Description:
@@ -113,7 +115,7 @@ public class RetrievalFacade {
     public List<String> getLisPacks(String name) {
 
         LisSetNode lisPackNode = new LisSetNode();
-        List<String> lisPacklist = lisPackNode.getLISPackNameListLimit100(name, lisSetRepository);
+        List<String> lisPacklist = lisPackNode.getLISPackNameList(name, lisSetRepository);
 
         return lisPacklist;
     }
@@ -125,7 +127,7 @@ public class RetrievalFacade {
     public List<LisDetailDTO> getLis(String name) {
 
         LisNameNode lisNode = new LisNameNode();
-        List<LisDetailDTO> lislist = lisNode.getLisDetailListLimit100(name, lisRepository);
+        List<LisDetailDTO> lislist = lisNode.getLisDetailList(name, lisRepository);
 
         return lislist;
     }
@@ -137,7 +139,7 @@ public class RetrievalFacade {
     public List<String> getPACSs(String name) {
 
         PacsNameNode pacsNode = new PacsNameNode();
-        List<String> pacslist = pacsNode.getPACSNameListLimit100(name, pacsRepository);
+        List<String> pacslist = pacsNode.getPACSNameList(name, pacsRepository);
 
         return pacslist;
     }
@@ -149,7 +151,7 @@ public class RetrievalFacade {
     public List<DiseaseInfoDTO> getDiseases(String name) {
 
         YiBaoDiseaseNode yiBaoDiseaseNode = new YiBaoDiseaseNode();
-        List<DiseaseInfoDTO> diseaselist = yiBaoDiseaseNode.getDiseaseNameListLimit100(name, icdDiseaseRepository);
+        List<DiseaseInfoDTO> diseaselist = yiBaoDiseaseNode.getDiseaseNameList(name, icdDiseaseRepository);
 
         return diseaselist;
     }
@@ -161,7 +163,7 @@ public class RetrievalFacade {
     public List<DrugInfoDTO> getMedicines(String name) {
 
         MedicineNode medicineNode = new MedicineNode();
-        List<DrugInfoDTO> medslist = medicineNode.getMedicineListLimit100(name, medicineRepository);
+        List<DrugInfoDTO> medslist = medicineNode.getMedicineList(name, medicineRepository);
 
         return medslist;
     }
@@ -173,7 +175,7 @@ public class RetrievalFacade {
     public List<OperationInfoDTO> getOperations(String name) {
 
         YiBaoOperationNameNode operationNode = new YiBaoOperationNameNode();
-        List<OperationInfoDTO> opslist = operationNode.getOperationListLimit100(name, operationRepository);
+        List<OperationInfoDTO> opslist = operationNode.getOperationList(name, operationRepository);
 
         return opslist;
     }
@@ -259,6 +261,18 @@ public class RetrievalFacade {
                 }
             }
         }
+        //合并检验套餐
+        Map<String, List<StaticKnowledgeIndexDTO>> lisSetMap
+                = EntityUtil.makeEntityListMap(lisSetRetList, "name");
+        Map<String, List<StaticKnowledgeIndexDTO>> lisSetRelatecLisMap
+                = EntityUtil.makeEntityListMap(lisSetRelatecLisRetList, "name");
+        for (Map.Entry<String, List<StaticKnowledgeIndexDTO>> entry : lisSetRelatecLisMap.entrySet()) {
+            if (lisSetMap == null
+                    || lisSetMap.size() == 0
+                    || !lisSetMap.containsKey(entry.getKey())) {
+                lisSetRetList.add(entry.getValue().get(0));
+            }
+        }
         //TODO 检验明细
         lisList = lisRepository.findByNameContaining(inputStr);
 
@@ -301,7 +315,7 @@ public class RetrievalFacade {
             retList.addAll(disRetList);
             retList.addAll(drugRetList);
             retList.addAll(lisSetRetList);
-            retList.addAll(lisSetRelatecLisRetList);
+            //retList.addAll(lisSetRelatecLisRetList);
             retList.addAll(lisRetList);
             retList.addAll(pacsRetList);
             retList.addAll(operationRetList);
@@ -313,10 +327,10 @@ public class RetrievalFacade {
                 retList.addAll(drugRetList);
             }
             if (types.contains(3)) {
-                //检索的套餐
+                //套餐
                 retList.addAll(lisSetRetList);
                 //明细关联出的套餐
-                retList.addAll(lisSetRelatecLisRetList);
+                //retList.addAll(lisSetRelatecLisRetList);
                 //明细
                 retList.addAll(lisRetList);
             }

+ 96 - 48
src/main/java/com/diagbot/facade/TestFacade.java

@@ -11,6 +11,7 @@ import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.util.ExcelUtils;
 import com.diagbot.util.ListUtil;
+import com.diagbot.util.RedisUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.Drug;
 import com.diagbot.vo.IndicationPushVO;
@@ -24,6 +25,7 @@ import org.apache.commons.fileupload.disk.DiskFileItemFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
 
 import java.io.File;
 import java.io.FileInputStream;
@@ -46,6 +48,8 @@ public class TestFacade {
     IndicationFacade indicationFacade;
     @Autowired
     StandConvertServiceClient standConvertServiceClient;
+    @Autowired
+    RedisUtil redisUtil;
 
     /**
      * 开单项数据测试
@@ -53,6 +57,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> importExcel(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -127,9 +132,9 @@ public class TestFacade {
                     // case "3": // 临床表现
                     //     indicationPushVO.setChief(bean.getNeoName());
                     //     break;
-                    // case "4": //辅助检查描述
-                    //     indicationPushVO.setSymptom("B超:提示" + bean.getNeoName());
-                    //     break;
+                    case "4": //辅助检查描述
+                        indicationPushVO.setSymptom("B超:提示" + bean.getNeoName());
+                        break;
                     // case "5": // 诊断
                     //     List<Item> diag = new ArrayList<>();
                     //     Item diagItem = new Item();
@@ -143,11 +148,27 @@ public class TestFacade {
                     //     symptom.append(bean.getNeoName()).append("。");
                     //     indicationPushVO.setSymptom(symptom.toString());
                     //     break;
-                    case "7" : // 药品过敏原
-                        StringBuffer pastStr = new StringBuffer("");
-                        pastStr.append("有“").append(bean.getNeoName()).append("”过敏。");
-                        indicationPushVO.setPasts(pastStr.toString());
-                        break;
+                    // case "7" : // 药品过敏原
+                    //     StringBuffer pastStr = new StringBuffer("");
+                    //     if ("药品通用名称".equals(bean.getDrugType())) {
+                    //         pastStr.append("有“").append(bean.getNeoName()).append("”过敏。");
+                    //         indicationPushVO.setPasts(pastStr.toString());
+                    //     } else if ("药品类别".equals(bean.getDrugType())) {
+                    //         List<String> drugList = (List<String>)redisUtil.get("药品分类_" + bean.getNeoName());
+                    //         if (ListUtil.isNotEmpty(drugList)) {
+                    //             for (String s : drugList) {
+                    //                 pastStr = new StringBuffer("");
+                    //                 IndicationPushVO indicationPushCopy = new IndicationPushVO();
+                    //                 BeanUtil.copyProperties(indicationPushVO, indicationPushCopy);
+                    //                 pastStr.append("有“").append(s).append("”过敏。");
+                    //                 indicationPushCopy.setPasts(pastStr.toString());
+                    //                 indicationPushCopy.setMsg("过敏药品【" + s + "】");
+                    //                 indicationPushVOList.add(indicationPushCopy);
+                    //             }
+                    //         }
+                    //         continue;
+                    //     }
+                    //     break;
                     // case "12": // 体征
                     //     StringBuffer sbVital = new StringBuffer();
                     //     String[] vitalArr = bean.getNeoName().split(",");
@@ -181,7 +202,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "2");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "2", start);
         return map;
     }
 
@@ -191,6 +212,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> testIndicationTransfusion(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -247,7 +269,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "2");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "2", start);
         return map;
     }
 
@@ -257,6 +279,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> testHighRiskOperationExcel(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -279,7 +302,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "3");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "3", start);
         return map;
     }
 
@@ -289,6 +312,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> testOtherTipLis(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -325,7 +349,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "4");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "4", start);
         return map;
     }
 
@@ -335,6 +359,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> testOtherTipPacs(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -392,7 +417,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "4");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "4", start);
         return map;
     }
 
@@ -402,6 +427,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> testOtherTipTransfusion(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -441,7 +467,7 @@ public class TestFacade {
             }
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "4");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "4", start);
         return map;
     }
 
@@ -451,6 +477,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> testHighRiskDrugExcel(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -473,7 +500,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "3");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "3", start);
         return map;
     }
 
@@ -483,6 +510,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> importCriticalLisExcel(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -522,7 +550,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "1");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "1", start);
         return map;
     }
 
@@ -532,6 +560,7 @@ public class TestFacade {
      * @param file
      */
     public Map<String, Object> importCriticalPacsExcel(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -553,7 +582,7 @@ public class TestFacade {
             indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = getDebugMap(indicationPushVOList, "1");
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "1", start);
         return map;
     }
 
@@ -632,6 +661,7 @@ public class TestFacade {
      * @return
      */
     public Map<String, Object> testHighRiskProcess(MultipartFile file, TestLineVO testLineVO) {
+        long start = System.currentTimeMillis();
         List<IndicationPushVO> indicationPushVOList = new ArrayList<>();
         List<TestIndicationVO> data = ExcelUtils.importExcelMultiSheets(file, 0, 1, testLineVO.getSheetIndex(), TestIndicationVO.class);
         for (TestIndicationVO bean : data) {
@@ -798,25 +828,7 @@ public class TestFacade {
             //  indicationPushVOList.add(indicationPushVO);
         }
 
-        Map<String, Object> map = new LinkedHashMap<>();
-        List<String> msg = new ArrayList<>();
-        List<String> errMsg = new ArrayList<>();
-        for (IndicationPushVO indicationPushVO : indicationPushVOList) {
-            try {
-                IndicationDTO indicationDTO = indicationFacade.indicationFac(indicationPushVO);
-                if (ListUtil.isEmpty(indicationDTO.getHighRiskList())) {
-                    msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配" + indicationPushVO.getMsg());
-
-                }
-            } catch (Exception e) {
-                System.out.println(e.getMessage());
-                errMsg.add(indicationPushVO.getIdNum() + "行出错了");
-            }
-        }
-        map.put("总条数", indicationPushVOList.size() + "条");
-        map.put("出错条数", msg.size() + "条");
-        map.put("出错信息", msg);
-        map.put("程序报错", errMsg);
+        Map<String, Object> map = getDebugMap(indicationPushVOList, "3", start);
         return map;
     }
 
@@ -827,7 +839,7 @@ public class TestFacade {
      * @param ruleType
      * @return
      */
-    public Map getDebugMap(List<IndicationPushVO> indicationPushVOList, String ruleType) {
+    public Map getDebugMap(List<IndicationPushVO> indicationPushVOList, String ruleType, long start) {
         Map<String, Object> map = new LinkedHashMap<>();
         List<String> msg = new ArrayList<>();
         List<String> errMsg = new ArrayList<>();
@@ -837,22 +849,26 @@ public class TestFacade {
                 switch (ruleType) {
                     case "1":
                         if (ListUtil.isEmpty(indicationDTO.getCriticalValList())) {
-                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配,"
+                                    + (StringUtil.isNotBlank(indicationPushVO.getMsg()) ? indicationPushVO.getMsg() : ""));
                         }
                         break;
                     case "2":
                         if (ListUtil.isEmpty(indicationDTO.getBillMsgList())) {
-                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配。"
+                                    + (StringUtil.isNotBlank(indicationPushVO.getMsg()) ? indicationPushVO.getMsg() : ""));
                         }
                         break;
                     case "3":
                         if (ListUtil.isEmpty(indicationDTO.getHighRiskList())) {
-                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配。"
+                                    + (StringUtil.isNotBlank(indicationPushVO.getMsg()) ? indicationPushVO.getMsg() : ""));
                         }
                         break;
                     case "4":
                         if (ListUtil.isEmpty(indicationDTO.getOtherList())) {
-                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配");
+                            msg.add("第【" + indicationPushVO.getIdNum() + "】行未匹配。"
+                                    + (StringUtil.isNotBlank(indicationPushVO.getMsg()) ? indicationPushVO.getMsg() : ""));
                         }
                         break;
                     default:
@@ -867,6 +883,7 @@ public class TestFacade {
         map.put("出错条数", msg.size() + "条");
         map.put("出错信息", msg);
         map.put("程序报错", errMsg);
+        map.put("执行时间", (System.currentTimeMillis() - start) / 1000.0 + "秒");
         return map;
     }
 
@@ -879,21 +896,52 @@ public class TestFacade {
         indicationPushVO.setOperationOrder(operationOrder);
     }
 
-    private FileItem createFileItem(File file) {
-        String fieldName = "textField";
+    public Map testAll() {
+        Map<String, Object> map = new LinkedHashMap<>();
+        String picPathLis ="D:\\newSVN\\2020新版CDSS\\05.其他资料\\数据\\【危急值_化验】.xlsx";
+        String picPathPacs ="D:\\newSVN\\2020新版CDSS\\05.其他资料\\数据\\【危急值_辅检】.xls";
+        MultipartFile file = null;
+
+        file = getMulFileByPath(picPathLis);
+        Map<String, Object> criticalMapLis = importCriticalLisExcel(file, new TestLineVO());
+        map.put("【危急值_化验】",criticalMapLis);
+
+        file = getMulFileByPath(picPathPacs);
+        Map<String, Object> criticalMapPacs = importCriticalPacsExcel(file, new TestLineVO());
+        map.put("【危急值_辅检】",criticalMapPacs);
+        return map;
+    }
+
+    private MultipartFile getMulFileByPath(String picPath) {
+        FileItem fileItem = createFileItem(picPath);
+        MultipartFile mfile = new CommonsMultipartFile(fileItem);
+        return mfile;
+    }
+
+    private FileItem createFileItem(String filePath) {
         FileItemFactory factory = new DiskFileItemFactory(16, null);
-        FileItem item = factory.createItem(fieldName, "text/plain", true, file.getName());
+        String textFieldName = "textField";
+        int num = filePath.lastIndexOf(".");
+        String extFile = filePath.substring(num);
+        FileItem item = factory.createItem(textFieldName, "text/plain", true,
+                "MyFileName" + extFile);
+        File newfile = new File(filePath);
         int bytesRead = 0;
         byte[] buffer = new byte[8192];
-        try {
-            FileInputStream fis = new FileInputStream(file);
+        try
+        {
+            FileInputStream fis = new FileInputStream(newfile);
             OutputStream os = item.getOutputStream();
-            while ((bytesRead = fis.read(buffer, 0, 8192)) != -1) {
+            while ((bytesRead = fis.read(buffer, 0, 8192))
+                    != -1)
+            {
                 os.write(buffer, 0, bytesRead);
             }
             os.close();
             fis.close();
-        } catch (IOException e) {
+        }
+        catch (IOException e)
+        {
             e.printStackTrace();
         }
         return item;

+ 37 - 78
src/main/java/com/diagbot/repository/LisNameNode.java

@@ -1,14 +1,28 @@
 package com.diagbot.repository;
 
-import com.diagbot.dto.*;
-import com.diagbot.entity.node.*;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.dto.BillNeoDTO;
+import com.diagbot.dto.CriticalNeoDTO;
+import com.diagbot.dto.LisBillNeoDTO;
+import com.diagbot.dto.LisDetailDTO;
+import com.diagbot.dto.NeoEntityDTO;
+import com.diagbot.dto.NodeNeoDTO;
+import com.diagbot.entity.node.Gender;
+import com.diagbot.entity.node.Group;
+import com.diagbot.entity.node.LisCritical;
+import com.diagbot.entity.node.LisName;
+import com.diagbot.entity.node.LisSet;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.NeoUtil;
 import com.diagbot.util.StringUtil;
 import com.diagbot.vo.CriticalNeoVO;
-import com.diagbot.biz.push.entity.Lis;
 
 import java.math.BigDecimal;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
 
 public class LisNameNode {
 
@@ -18,7 +32,7 @@ public class LisNameNode {
 		NodeInfo nodeInfo;
 
 		Gender gender = lis.getGender();
-		if (null!=gender) {
+		if (null != gender) {
 			nodeInfo = new NodeInfo();
 			nodeInfo.setName(gender.getName());
 			nodeInfo.setTypeval(Constants.gender);
@@ -156,7 +170,6 @@ public class LisNameNode {
 	}
 
 
-
 	/**
 	 * 获取化验细项名称列表
 	 */
@@ -168,71 +181,21 @@ public class LisNameNode {
 		LisDetailDTO lisDetailDTO;
 
 		List<LisName> lislt = lisRepository.findByNameContaining(name);
-
-		for (LisName lis: lislt) {
-			lisDetailDTO = new LisDetailDTO();
-			nodename = lis.getName();
-			lisDetailDTO.setUniqueName(nodename);
-
-
-			if (null!=lis.getMaxval()) {
-				max = lis.getMaxval();
-			}
-
-			if (null!=lis.getMinval()) {
-				min = lis.getMinval();
-			}
-
-			if (StringUtil.isNotBlank(lis.getUnit())) {
-				unit = lis.getUnit();
-			}
-
-			if (lis.getLissets().size()>0) {
-				List<LisSet> lissetlist = new ArrayList<>(lis.getLissets());
-				for (LisSet lisset : lissetlist) {
-					lisDetailDTO = new LisDetailDTO();
-					nodename = lis.getName();
-					lisDetailDTO.setUniqueName(nodename);
-					lisDetailDTO.setName(lisset.getName());
-					lisDetailDTO.setMaxValue(lis.getMaxval());
-					lisDetailDTO.setMinValue(lis.getMinval());
-					lisDetailDTO.setUnits(lis.getUnit());
-					lislist.add(lisDetailDTO);
-				}
-			}
-			else {
-				lisDetailDTO.setName(nodename+"(套餐)");
-				lislist.add(lisDetailDTO);
-			}
+		if (ListUtil.isNotEmpty(lislt) && lislt.size() > 100) {
+			lislt = lislt.subList(0, 100);
 		}
 
-
-		return lislist;
-	}
-
-	/**
-	 * 获取化验细项名称列表
-	 */
-	public List<LisDetailDTO> getLisDetailListLimit100(String name, LisNameRepository lisRepository) {
-		String nodename, unit;
-		Double min, max;
-
-		List<LisDetailDTO> lislist = new ArrayList<>();
-		LisDetailDTO lisDetailDTO;
-
-		List<LisName> lislt = lisRepository.findByNameContainingLimit100(name);
-
-		for (LisName lis: lislt) {
+		for (LisName lis : lislt) {
 			lisDetailDTO = new LisDetailDTO();
 			nodename = lis.getName();
 			lisDetailDTO.setUniqueName(nodename);
 
 
-			if (null!=lis.getMaxval()) {
+			if (null != lis.getMaxval()) {
 				max = lis.getMaxval();
 			}
 
-			if (null!=lis.getMinval()) {
+			if (null != lis.getMinval()) {
 				min = lis.getMinval();
 			}
 
@@ -240,7 +203,7 @@ public class LisNameNode {
 				unit = lis.getUnit();
 			}
 
-			if (lis.getLissets().size()>0) {
+			if (lis.getLissets().size() > 0) {
 				List<LisSet> lissetlist = new ArrayList<>(lis.getLissets());
 				for (LisSet lisset : lissetlist) {
 					lisDetailDTO = new LisDetailDTO();
@@ -252,9 +215,8 @@ public class LisNameNode {
 					lisDetailDTO.setUnits(lis.getUnit());
 					lislist.add(lisDetailDTO);
 				}
-			}
-			else {
-				lisDetailDTO.setName(nodename+"(套餐)");
+			} else {
+				lisDetailDTO.setName(nodename + "(套餐)");
 				lislist.add(lisDetailDTO);
 			}
 		}
@@ -264,7 +226,6 @@ public class LisNameNode {
 	}
 
 
-
 	/**
 	 * 获取化验细项危急值
 	 */
@@ -305,13 +266,13 @@ public class LisNameNode {
 								agemax = Integer.parseInt(agerange[1]);
 							}
 
-							if (age>=agemin && age<=agemax) {
+							if (age >= agemin && age <= agemax) {
 								NodeNeoDTO nodeNeoDTO = new NodeNeoDTO();
 
 								BigDecimal min = (StringUtil.isNotBlank(lisCritical.getMinval()))
-										?(new BigDecimal(lisCritical.getMinval())):null;
+										? (new BigDecimal(lisCritical.getMinval())) : null;
 								BigDecimal max = (StringUtil.isNotBlank(lisCritical.getMaxval()))
-										?(new BigDecimal(lisCritical.getMaxval())):null;
+										? (new BigDecimal(lisCritical.getMaxval())) : null;
 
 								nodeNeoDTO.setMin(min);
 								nodeNeoDTO.setMax(max);
@@ -326,8 +287,7 @@ public class LisNameNode {
 					}
 				}
 			}
-		}
-		catch (Exception ex) {
+		} catch (Exception ex) {
 			ex.printStackTrace();
 		}
 
@@ -345,7 +305,7 @@ public class LisNameNode {
 		try {
 			List<LisName> lisres = lisRepository.findByNameIs(name);
 
-			if (lisres!= null && lisres.size()>0) {
+			if (lisres != null && lisres.size() > 0) {
 				LisName lis = lisres.get(0);
 
 				for (String key : props.keySet()) {
@@ -366,8 +326,7 @@ public class LisNameNode {
 
 				neoEntityDTO = fillNeoDTO(lis, keys);
 			}
-		}
-		catch (Exception ex) {
+		} catch (Exception ex) {
 			ex.printStackTrace();
 		}
 
@@ -381,14 +340,14 @@ public class LisNameNode {
 		String val;
 
 		neoEntityDTO.setName(lis.getName());
-		for (String key:keys) {
+		for (String key : keys) {
 			val = "";
-			switch(key) {
+			switch (key) {
 				case "最大值":
-					val = (lis.getMaxval()==null)?"":String.format("%.2f",lis.getMaxval());
+					val = (lis.getMaxval() == null) ? "" : String.format("%.2f", lis.getMaxval());
 					break;
 				case "最小值":
-					val = (lis.getMinval()==null)?"":String.format("%.2f", lis.getMinval());
+					val = (lis.getMinval() == null) ? "" : String.format("%.2f", lis.getMinval());
 					break;
 				case "单位":
 					val = lis.getUnit();

+ 0 - 4
src/main/java/com/diagbot/repository/LisNameRepository.java

@@ -3,7 +3,6 @@ package com.diagbot.repository;
 import com.diagbot.entity.node.LisName;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
-import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -14,9 +13,6 @@ public interface LisNameRepository extends Neo4jRepository<LisName, Long> {
 
     List<LisName> findByNameContaining(String name);
 
-    @Query("MATCH (n:实验室检查名称) where n.name contains {name} return n limit 100 ")
-    List<LisName> findByNameContainingLimit100(@Param("name") String name);
-
     @Query("MATCH (n:实验室检查) RETURN DISTINCT(KEYS(n))")
     List<List<String>> getKeys();
 

+ 16 - 32
src/main/java/com/diagbot/repository/LisSetNode.java

@@ -3,12 +3,15 @@ package com.diagbot.repository;
 import com.diagbot.dto.BillNeoDTO;
 import com.diagbot.dto.LisBillNeoDTO;
 import com.diagbot.dto.NeoEntityDTO;
-import com.diagbot.dto.NodeNeoDTO;
-import com.diagbot.entity.node.*;
+import com.diagbot.entity.node.Gender;
+import com.diagbot.entity.node.LisSet;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.NeoUtil;
 
-import java.math.BigDecimal;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 public class LisSetNode {
 
@@ -18,7 +21,7 @@ public class LisSetNode {
 		NodeInfo nodeInfo;
 
 		Gender gender = lisset.getGender();
-		if (null!=gender) {
+		if (null != gender) {
 			nodeInfo = new NodeInfo();
 			nodeInfo.setName(gender.getName());
 			nodeInfo.setTypeval(Constants.gender);
@@ -124,7 +127,7 @@ public class LisSetNode {
 
 			lisSetlist = lisSetRepository.findByNameIs(lissetname);
 
-			if (lisSetlist != null && lisSetlist.size()>0) {
+			if (lisSetlist != null && lisSetlist.size() > 0) {
 				lisBillNeoDTO = LisPacktoLISDTO(lisSetlist.get(0));
 			}
 
@@ -137,7 +140,6 @@ public class LisSetNode {
 	}
 
 
-
 	/**
 	 * 获取化验套餐名称列表
 	 */
@@ -148,27 +150,10 @@ public class LisSetNode {
 
 		List<LisSet> lisSetlist = lisPackRepository.findByNameContaining(name);
 
-		for (LisSet lisSet : lisSetlist) {
-			nodename = lisSet.getName();
-			if (!lispacklist.contains(nodename)) {
-				lispacklist.add(nodename);
-			}
+		if (ListUtil.isNotEmpty(lisSetlist) && lisSetlist.size() > 100) {
+			lisSetlist = lisSetlist.subList(0, 100);
 		}
 
-
-		return lispacklist;
-	}
-
-	/**
-	 * 获取化验套餐名称列表
-	 */
-	public List<String> getLISPackNameListLimit100(String name, LisSetRepository lisPackRepository) {
-		String nodename;
-
-		List<String> lispacklist = new ArrayList<>();
-
-		List<LisSet> lisSetlist = lisPackRepository.findByNameContainingLimit100(name);
-
 		for (LisSet lisSet : lisSetlist) {
 			nodename = lisSet.getName();
 			if (!lispacklist.contains(nodename)) {
@@ -191,7 +176,7 @@ public class LisSetNode {
 		try {
 			List<LisSet> lisSetres = lisPackRepository.findByNameIs(name);
 
-			if (lisSetres!= null && lisSetres.size()>0) {
+			if (lisSetres != null && lisSetres.size() > 0) {
 				LisSet lisSet = lisSetres.get(0);
 
 				for (String key : props.keySet()) {
@@ -212,8 +197,7 @@ public class LisSetNode {
 
 				neoEntityDTO = fillNeoDTO(lisSet, keys);
 			}
-		}
-		catch (Exception ex) {
+		} catch (Exception ex) {
 			ex.printStackTrace();
 		}
 
@@ -227,10 +211,10 @@ public class LisSetNode {
 		String val = "";
 
 		neoEntityDTO.setName(lisSet.getName());
-		for (String key:keys) {
-			switch(key) {
+		for (String key : keys) {
+			switch (key) {
 				case "最大值":
-					val = String.format("%.2f",lisSet.getMaxval());
+					val = String.format("%.2f", lisSet.getMaxval());
 					break;
 				case "最小值":
 					val = String.format("%.2f", lisSet.getMinval());

+ 0 - 4
src/main/java/com/diagbot/repository/LisSetRepository.java

@@ -3,7 +3,6 @@ package com.diagbot.repository;
 import com.diagbot.entity.node.LisSet;
 import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
-import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -14,9 +13,6 @@ public interface LisSetRepository extends Neo4jRepository<LisSet, Long> {
 
     List<LisSet> findByNameContaining(String name);
 
-    @Query("MATCH (n:实验室检查套餐名) where n.name contains {name} return n limit 100 ")
-    List<LisSet> findByNameContainingLimit100(@Param("name") String name);
-
     @Query("MATCH (n:实验室检查套餐) RETURN DISTINCT(KEYS(n))")
     List<List<String>> getKeys();
 

+ 3 - 24
src/main/java/com/diagbot/repository/MedicineNode.java

@@ -2,6 +2,7 @@ package com.diagbot.repository;
 
 import com.diagbot.dto.*;
 import com.diagbot.entity.node.*;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.NeoUtil;
 
 import java.math.BigDecimal;
@@ -68,30 +69,10 @@ public class MedicineNode {
 
         List<Medicine> medicines = medicineRepository.findByNameContaining(name);
 
-        for (Medicine med : medicines) {
-            drugInfoDTO = new DrugInfoDTO();
-            nodename = med.getName();
-
-            drugInfoDTO.setName(nodename);
-            medslist.add(drugInfoDTO);
+        if (ListUtil.isNotEmpty(medicines) && medicines.size() > 100) {
+            medicines = medicines.subList(0, 100);
         }
 
-
-        return medslist;
-    }
-
-
-    /**
-     * 获取药品商品名称列表
-     */
-    public List<DrugInfoDTO> getMedicineListLimit100(String name, MedicineRepository medicineRepository) {
-        String nodename;
-
-        List<DrugInfoDTO> medslist = new ArrayList<>();
-        DrugInfoDTO drugInfoDTO;
-
-        List<Medicine> medicines = medicineRepository.findByNameContainingLimit100(name);
-
         for (Medicine med : medicines) {
             drugInfoDTO = new DrugInfoDTO();
             nodename = med.getName();
@@ -103,7 +84,5 @@ public class MedicineNode {
 
         return medslist;
     }
-
-
 }
 

+ 0 - 5
src/main/java/com/diagbot/repository/MedicineRepository.java

@@ -1,9 +1,7 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.Medicine;
-import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
-import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -14,9 +12,6 @@ public interface MedicineRepository extends Neo4jRepository<Medicine, Long> {
 
     List<Medicine> findByNameContaining(String name);
 
-    @Query("MATCH (n:药品通用名称) where n.name contains {name} return n limit 100 ")
-    List<Medicine> findByNameContainingLimit100(@Param("name") String name);
-
     List<Medicine> findByNameIn(List<String> names);
 }
 

+ 3 - 21
src/main/java/com/diagbot/repository/PacsNameNode.java

@@ -14,6 +14,7 @@ import com.diagbot.entity.node.OralMedicine;
 import com.diagbot.entity.node.PacsDescribe;
 import com.diagbot.entity.node.PacsName;
 import com.diagbot.entity.node.Vital;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.NeoUtil;
 
 import java.util.ArrayList;
@@ -188,28 +189,10 @@ public class PacsNameNode {
         List<String> pacslist = new ArrayList<>();
 
         List<PacsName> pacslt = pacsRepository.findByNameContaining(name);
-
-        for (PacsName pacs : pacslt) {
-            pacsname = pacs.getName();
-            if (!pacslist.contains(pacsname)) {
-                pacslist.add(pacsname);
-            }
+        if (ListUtil.isNotEmpty(pacslt) && pacslt.size() > 100) {
+            pacslt = pacslt.subList(0, 100);
         }
 
-
-        return pacslist;
-    }
-
-    /**
-     * 获取辅检名称列表
-     */
-    public List<String> getPACSNameListLimit100(String name, PacsNameRepository pacsRepository) {
-        String pacsname;
-
-        List<String> pacslist = new ArrayList<>();
-
-        List<PacsName> pacslt = pacsRepository.findByNameContainingLimit100(name);
-
         for (PacsName pacs : pacslt) {
             pacsname = pacs.getName();
             if (!pacslist.contains(pacsname)) {
@@ -217,7 +200,6 @@ public class PacsNameNode {
             }
         }
 
-
         return pacslist;
     }
 }

+ 0 - 5
src/main/java/com/diagbot/repository/PacsNameRepository.java

@@ -1,9 +1,7 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.PacsName;
-import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
-import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -14,9 +12,6 @@ public interface PacsNameRepository extends Neo4jRepository<PacsName, Long> {
 
     List<PacsName> findByNameContaining(String name);
 
-    @Query("MATCH (n:辅助检查名称) where n.name contains {name} return n limit 100 ")
-    List<PacsName> findByNameContainingLimit100(@Param("name") String name);
-
     List<PacsName> findByNameIn(List<String> names);
 }
 

+ 3 - 26
src/main/java/com/diagbot/repository/YiBaoDiseaseNode.java

@@ -8,6 +8,7 @@ import com.diagbot.entity.node.GuoLinICD_10Code;
 import com.diagbot.entity.node.PathwayName;
 import com.diagbot.entity.node.YiBaoDiseaseName;
 import com.diagbot.entity.node.YiBaoICD_10Code;
+import com.diagbot.util.ListUtil;
 import com.diagbot.vo.NeoPushVO;
 
 import java.util.ArrayList;
@@ -252,34 +253,10 @@ public class YiBaoDiseaseNode {
 		List<DiseaseInfoDTO> diseaseInfoDTOList = new ArrayList<>();
 
 		List<YiBaoDiseaseName> diseases = diseaseRepository.findByNameContaining(name);
-
-		for (YiBaoDiseaseName dis : diseases) {
-			icdname = dis.getName();
-			if (!dislist.contains(icdname)) {
-				dislist.add(icdname);
-				DiseaseInfoDTO diseaseInfoDTO = new DiseaseInfoDTO();
-				diseaseInfoDTO.setName(icdname);
-				if (!dis.getYibaoicd_10codes().isEmpty()) {
-					diseaseInfoDTO.setIcd10Code(dis.getYibaoicd_10codes().iterator().next().getName());
-				}
-				diseaseInfoDTOList.add(diseaseInfoDTO);
-			}
+		if (ListUtil.isNotEmpty(diseases) && diseases.size() > 100) {
+			diseases = diseases.subList(0, 100);
 		}
 
-		return diseaseInfoDTOList;
-	}
-
-	/**
-	 * 获取疾病名称列表
-	 */
-	public List<DiseaseInfoDTO> getDiseaseNameListLimit100(String name, YiBaoDiseaseRepository diseaseRepository) {
-		String icdname;
-
-		List<String> dislist = new ArrayList<>();
-		List<DiseaseInfoDTO> diseaseInfoDTOList = new ArrayList<>();
-
-		List<YiBaoDiseaseName> diseases = diseaseRepository.findByNameContainingLimit100(name);
-
 		for (YiBaoDiseaseName dis : diseases) {
 			icdname = dis.getName();
 			if (!dislist.contains(icdname)) {

+ 0 - 5
src/main/java/com/diagbot/repository/YiBaoDiseaseRepository.java

@@ -1,9 +1,7 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.YiBaoDiseaseName;
-import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
-import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -14,9 +12,6 @@ public interface YiBaoDiseaseRepository extends Neo4jRepository<YiBaoDiseaseName
 
     List<YiBaoDiseaseName> findByNameContaining(String name);
 
-    @Query("MATCH (n:医保疾病名称) where n.name contains {name} return n limit 100 ")
-    List<YiBaoDiseaseName> findByNameContainingLimit100(@Param("name") String name);
-
     List<YiBaoDiseaseName> findByNameIn(List<String> names);
 }
 

+ 28 - 40
src/main/java/com/diagbot/repository/YiBaoOperationNameNode.java

@@ -2,10 +2,24 @@ package com.diagbot.repository;
 
 
 import com.alibaba.fastjson.JSONObject;
-import com.alibaba.fastjson.TypeReference;
 import com.diagbot.biz.push.entity.Item;
-import com.diagbot.dto.*;
-import com.diagbot.entity.node.*;
+import com.diagbot.dto.BillNeoDTO;
+import com.diagbot.dto.HighRiskNeoDTO;
+import com.diagbot.dto.NodeNeoDTO;
+import com.diagbot.dto.OperationBillNeoDTO;
+import com.diagbot.dto.OperationInfoDTO;
+import com.diagbot.dto.WordCrfDTO;
+import com.diagbot.entity.node.ClinicalFinding;
+import com.diagbot.entity.node.ConflictDevice;
+import com.diagbot.entity.node.Disease;
+import com.diagbot.entity.node.Gender;
+import com.diagbot.entity.node.Group;
+import com.diagbot.entity.node.Lis;
+import com.diagbot.entity.node.MedAllergen;
+import com.diagbot.entity.node.OralMedicine;
+import com.diagbot.entity.node.PacsDescribe;
+import com.diagbot.entity.node.Vital;
+import com.diagbot.entity.node.YiBaoOperationName;
 import com.diagbot.enums.TypeEnum;
 import com.diagbot.model.label.PacsLabel;
 import com.diagbot.model.label.VitalLabel;
@@ -27,7 +41,7 @@ public class YiBaoOperationNameNode {
         NodeInfo nodeInfo;
 
         Gender gender = operation.getGender();
-        if (null!=gender) {
+        if (null != gender) {
             nodeInfo = new NodeInfo();
             nodeInfo.setName(gender.getName());
             nodeInfo.setTypeval(Constants.gender);
@@ -140,7 +154,7 @@ public class YiBaoOperationNameNode {
 
             List<YiBaoOperationName> operations = opRepository.findByNameIs(opname);
 
-            if (null!=operations && operations.size()>0) {
+            if (null != operations && operations.size() > 0) {
                 opBillNeoDTO = YiBaoOperationtoOperationDTO(operations.get(0));
                 billNeoDTO.setOperationBillNeoDTO(opBillNeoDTO);
             }
@@ -161,30 +175,10 @@ public class YiBaoOperationNameNode {
         OperationInfoDTO opInfoDTO;
 
         List<YiBaoOperationName> operations = operationRepository.findByNameContaining(name);
-
-        for (YiBaoOperationName op : operations) {
-            opInfoDTO = new OperationInfoDTO();
-            nodename = op.getName();
-
-            opInfoDTO.setName(nodename);
-            opslist.add(opInfoDTO);
+        if (ListUtil.isNotEmpty(operations) && operations.size() > 100) {
+            operations = operations.subList(0, 100);
         }
 
-
-        return opslist;
-    }
-
-    /**
-     * 获取手术操作名称列表
-     */
-    public List<OperationInfoDTO> getOperationListLimit100(String name, YiBaoOperationNameRepository operationRepository) {
-        String nodename;
-
-        List<OperationInfoDTO> opslist = new ArrayList<>();
-        OperationInfoDTO opInfoDTO;
-
-        List<YiBaoOperationName> operations = operationRepository.findByNameContainingLimit100(name);
-
         for (YiBaoOperationName op : operations) {
             opInfoDTO = new OperationInfoDTO();
             nodename = op.getName();
@@ -193,12 +187,10 @@ public class YiBaoOperationNameNode {
             opslist.add(opInfoDTO);
         }
 
-
         return opslist;
     }
 
 
-
     /**
      * 获取高危手术和操作数据
      */
@@ -220,15 +212,14 @@ public class YiBaoOperationNameNode {
 
             if (ListUtil.isNotEmpty(operations)) {
                 operation = operations.get(0);
-                if (null!=operation.getOpgrade() && operation.getOpgrade().trim().length()>0) {
+                if (null != operation.getOpgrade() && operation.getOpgrade().trim().length() > 0) {
                     opgrade = operation.getOpgrade().trim();
                     if (opgrade.equals("3") || opgrade.equals("4")) {
                         highRiskNeoDTO.setIsHighrisk(true);
                         highRiskNeoDTO.setHighLevel(opgrade);
                         highRiskNeoDTO.setType(Constants.shoushu);
                         highRiskNeoDTOS.add(highRiskNeoDTO);
-                    }
-                    else if (opgrade.equals("2")) {
+                    } else if (opgrade.equals("2")) {
                         highRiskNeoDTO = isHighRisk(wordCrfDTO, operation, highRiskNeoDTO);
                         if (null != highRiskNeoDTO) {
                             highRiskNeoDTOS.add(highRiskNeoDTO);
@@ -256,7 +247,7 @@ public class YiBaoOperationNameNode {
             JSONObject ageobj = jobj.getJSONObject("年龄");
 
             nodeNeoDTO = NeoUtil.jsontoNodeNeoDTO("年龄", ageobj);
-            if (null!=wordCrfDTO.getAge()) {
+            if (null != wordCrfDTO.getAge()) {
                 int age = wordCrfDTO.getAge();
                 match = CoreUtil.compareNum(nodeNeoDTO, age);
                 if (match) {
@@ -274,7 +265,7 @@ public class YiBaoOperationNameNode {
                 nodeNeoDTO = NeoUtil.jsontoNodeNeoDTO(key, vitalobj.getJSONObject(key));
                 res = CoreUtil.compareVital(nodeNeoDTO, vitalLabel);
 
-                if ((Boolean)res.get("flag")) {
+                if ((Boolean) res.get("flag")) {
                     nodeNeoDTO.setVal(res.get("msg").toString());
                     nodeNeoDTO.setTermtype(TypeEnum.vital.getName());
                     highRiskNeoDTO.getFactor().add(nodeNeoDTO);
@@ -332,19 +323,16 @@ public class YiBaoOperationNameNode {
                 }
             }
 
-            if (highRiskNeoDTO.getFactor().size()>0) {
+            if (highRiskNeoDTO.getFactor().size() > 0) {
                 highRiskNeoDTO.setType(TypeEnum.operation.getName());
             }
-        }
-        catch (Exception ex) {
+        } catch (Exception ex) {
             ex.printStackTrace();
-        }
-        finally {
+        } finally {
             return highRiskNeoDTO;
         }
 
     }
 
 
-
 }

+ 0 - 5
src/main/java/com/diagbot/repository/YiBaoOperationNameRepository.java

@@ -1,9 +1,7 @@
 package com.diagbot.repository;
 
 import com.diagbot.entity.node.YiBaoOperationName;
-import org.springframework.data.neo4j.annotation.Query;
 import org.springframework.data.neo4j.repository.Neo4jRepository;
-import org.springframework.data.repository.query.Param;
 
 import java.util.List;
 
@@ -14,8 +12,5 @@ public interface YiBaoOperationNameRepository extends Neo4jRepository<YiBaoOpera
 
     List<YiBaoOperationName> findByNameContaining(String name);
 
-    @Query("MATCH (n:医保手术和操作名称) where n.name contains {name} return n limit 100 ")
-    List<YiBaoOperationName> findByNameContainingLimit100(@Param("name") String name);
-
     List<YiBaoOperationName> findByNameIn(List<String> names);
 }

+ 2 - 2
src/main/java/com/diagbot/rule/DrugRule.java

@@ -42,9 +42,9 @@ public class DrugRule {
         if (ListUtil.isNotEmpty(drugList) && ListUtil.isNotEmpty(inputList)) {
             List<String> allDrug = new ArrayList<>();
             for (NodeNeoDTO nodeNeoDTO : drugList) {
-                if ("服用药品".equals(nodeNeoDTO.getTermtype()) || "药物过敏原".equals(nodeNeoDTO.getTermtype())) {
+                if ("药品".equals(nodeNeoDTO.getTermtype())) {
                     allDrug.add(nodeNeoDTO.getName());
-                } else if ("药品解剖学类别".equals(nodeNeoDTO.getTermtype())){
+                } else if ("药品类别".equals(nodeNeoDTO.getTermtype())){
                     String drugType = nodeNeoDTO.getName();
                     List<String> drugRedis = (List<String>)redisUtil.get(RedisEnum.drugType.getName() + drugType);
                     if (ListUtil.isNotEmpty(drugRedis)) {

+ 2 - 0
src/main/java/com/diagbot/vo/TestIndicationVO.java

@@ -245,4 +245,6 @@ public class TestIndicationVO implements Serializable {
     private String ageAll;
     @Excel(name="规则")
     private String ruleText;
+    @Excel(name="药品类型")
+    private String drugType;
 }

+ 5 - 0
src/main/java/com/diagbot/web/TestController.java

@@ -125,5 +125,10 @@ public class TestController {
         return RespDTO.onSuc(testFacade.testHighRiskProcess(file, testLineVO));
     }
 
+    @ApiOperation(value = "批量测试[zhoutg]", notes = "")
+    @PostMapping("/testAll")
+    public RespDTO<Map<String, Object>> testAll() {
+        return RespDTO.onSuc(testFacade.testAll());
+    }
 }