瀏覽代碼

Merge remote-tracking branch 'origin/master'

MarkHuang 4 年之前
父節點
當前提交
9121e4f616

+ 109 - 0
src/main/java/com/diagbot/aggregate/IndicationTestAggregate.java

@@ -0,0 +1,109 @@
+package com.diagbot.aggregate;
+
+import com.diagbot.facade.TestFacade;
+import com.diagbot.vo.TestLineVO;
+import io.github.lvyahui8.spring.annotation.DataConsumer;
+import io.github.lvyahui8.spring.annotation.DataProvider;
+import io.github.lvyahui8.spring.annotation.InvokeParameter;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @Description: 提醒类聚合
+ * @author: zhoutg
+ * @time: 2019/10/16 13:37
+ */
+@Component
+@Slf4j
+public class IndicationTestAggregate {
+
+    @Autowired
+    TestFacade testFacade;
+
+    @DataProvider("testAll")
+    public Map<String, Map<String, Object>> testAll(
+            @InvokeParameter("mapPath") Map<String, String> mapPath,
+            @DataConsumer("t1") Map<String, Map<String, Object>> t1Map,
+            @DataConsumer("t2") Map<String, Map<String, Object>> t2Map,
+            @DataConsumer("t3") Map<String, Map<String, Object>> t3Map,
+            @DataConsumer("t4") Map<String, Map<String, Object>> t4Map) {
+        Map<String, Map<String, Object>> map = new LinkedHashMap<>();
+        if (t1Map != null) {
+            map.putAll(t1Map);
+        }
+        if (t2Map != null) {
+            map.putAll(t2Map);
+        }
+        if (t3Map != null) {
+            map.putAll(t3Map);
+        }
+        if (t4Map != null) {
+            map.putAll(t4Map);
+        }
+        return map;
+    }
+
+    @DataProvider("t1")
+    public Map<String, Object> t1(@InvokeParameter("mapPath") Map<String, String> mapPath) {
+        Map<String, Object> map = new LinkedHashMap<>();
+        MultipartFile file = null;
+        // file = testFacade.getMulFileByPath(mapPath.get("【开单合理性】"));
+        // Map<String, Object> billMap = testFacade.importExcel(file, new TestLineVO());
+        // map.putAll(billMap);
+
+        file = testFacade.getMulFileByPath(mapPath.get("【开单合理性_输血】"));
+        Map<String, Object> billTransfusionMap = testFacade.testIndicationTransfusion(file, new TestLineVO());
+        map.put("【开单合理性_输血】",billTransfusionMap);
+        return map;
+    }
+
+    @DataProvider("t2")
+    public Map<String, Object> t2(@InvokeParameter("mapPath") Map<String, String> mapPath) {
+        Map<String, Object> map = new LinkedHashMap<>();
+        MultipartFile file = testFacade.getMulFileByPath(mapPath.get("【高危药品】"));
+        Map<String, Object> highDrugMap = testFacade.testHighRiskDrugExcel(file, new TestLineVO());
+        map.put("【高危药品】",highDrugMap);
+        return map;
+    }
+
+    @DataProvider("t3")
+    public Map<String, Object> t3(@InvokeParameter("mapPath") Map<String, String> mapPath) {
+        Map<String, Object> map = new LinkedHashMap<>();
+
+        MultipartFile file = testFacade.getMulFileByPath(mapPath.get("【高危手术】"));
+        Map<String, Object> highOperationMap = testFacade.testHighRiskOperationExcel(file, new TestLineVO());
+        map.put("【高危手术】",highOperationMap);
+        return map;
+    }
+
+    @DataProvider("t4")
+    public Map<String, Object> t4(@InvokeParameter("mapPath") Map<String, String> mapPath) {
+        Map<String, Object> map = new LinkedHashMap<>();
+        MultipartFile file = testFacade.getMulFileByPath(mapPath.get("【其他值提醒_化验】"));
+        Map<String, Object> otherLisMap = testFacade.testOtherTipLis(file, new TestLineVO());
+        map.put("【其他值提醒_化验】",otherLisMap);
+
+        file = testFacade.getMulFileByPath(mapPath.get("【其他值提醒_辅检】"));
+        Map<String, Object> otherPacsMap = testFacade.testOtherTipPacs(file, new TestLineVO());
+        map.put("【其他值提醒_辅检】",otherPacsMap);
+
+        file = testFacade.getMulFileByPath(mapPath.get("【其他值提醒_输血】"));
+        Map<String, Object> otherTransfusionMap = testFacade.testOtherTipTransfusion(file, new TestLineVO());
+        map.put("【其他值提醒_输血】",otherTransfusionMap);
+
+        file = testFacade.getMulFileByPath(mapPath.get("【危急值_化验】"));
+        Map<String, Object> criticalMapLis = testFacade.importCriticalLisExcel(file, new TestLineVO());
+        map.put("【危急值_化验】",criticalMapLis);
+
+        file = testFacade.getMulFileByPath(mapPath.get("【危急值_辅检】"));
+        Map<String, Object> criticalMapPacs = testFacade.importCriticalPacsExcel(file, new TestLineVO());
+        map.put("【危急值_辅检】",criticalMapPacs);
+
+        return map;
+    }
+}

+ 1 - 1
src/main/java/com/diagbot/entity/node/YiBaoDiseaseName.java

@@ -33,7 +33,7 @@ public class YiBaoDiseaseName extends BaseNode  {
 	@Relationship(type = "医保疾病名称相关症状", direction = Relationship.OUTGOING)
 	private Set<Symptom> symptoms = new HashSet<>();
 
-	@Relationship(type = "体征相关医保疾病名称", direction = Relationship.INCOMING)
+	@Relationship(type = "医保疾病名称相关体征", direction = Relationship.OUTGOING)
 	private Set<Vital> vitals = new HashSet<>();
 
 	@Relationship(type = "实验室检查相关医保疾病名称", direction = Relationship.INCOMING)

+ 1 - 1
src/main/java/com/diagbot/facade/HighRiskFacade.java

@@ -34,7 +34,7 @@ public class HighRiskFacade {
      */
     public void highRiskFac(IndicationPushVO indicationPushVO, WordCrfDTO wordCrfDTO, IndicationDTO res) {
         // 高风险图谱接口调用
-        HighRiskNeoVO highRiskNeoVO = fillHighRiskNeo(wordCrfDTO);
+        // HighRiskNeoVO highRiskNeoVO = fillHighRiskNeo(wordCrfDTO);
         List<HighRiskNeoDTO> highRiskNeoDTOList = neoFacade.getHighRiskNeo(wordCrfDTO);
         // 规则处理
         // TODO 测试数据开始

+ 2 - 2
src/main/java/com/diagbot/facade/RetrievalFacade.java

@@ -68,7 +68,7 @@ public class RetrievalFacade {
      */
     public RetrievalDTO index(RetrievalVO retrievalVO) {
         RetrievalDTO retrievalDTO = new RetrievalDTO();
-
+        retrievalVO.setInputStr(retrievalVO.getInputStr().trim().toUpperCase());
         switch (retrievalVO.getType()) {
             case 1:
                 retrievalDTO.setLisNames(getLisPacks(retrievalVO.getInputStr()));
@@ -202,7 +202,7 @@ public class RetrievalFacade {
      */
     public List<StaticKnowledgeIndexDTO> staticKnowledgeIndex(StaticKnowledgeIndexVO staticKnowledgeIndexVO) {
         List<StaticKnowledgeIndexDTO> retList = Lists.newLinkedList();
-        String inputStr = staticKnowledgeIndexVO.getInputStr();
+        String inputStr = staticKnowledgeIndexVO.getInputStr().trim().toUpperCase();
         List<Integer> types = staticKnowledgeIndexVO.getTypes();
 
         //TODO 诊断

+ 151 - 101
src/main/java/com/diagbot/facade/TestFacade.java

@@ -9,6 +9,7 @@ import com.diagbot.dto.StandConvertCrfBatchDTO;
 import com.diagbot.dto.StandConvertCrfDTO;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
+import com.diagbot.util.BeanUtil;
 import com.diagbot.util.ExcelUtils;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.RedisUtil;
@@ -17,8 +18,10 @@ import com.diagbot.vo.Drug;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.ItemExt;
 import com.diagbot.vo.StandConvertCrfVO;
+import com.diagbot.vo.TestAllVO;
 import com.diagbot.vo.TestIndicationVO;
 import com.diagbot.vo.TestLineVO;
+import io.github.lvyahui8.spring.facade.DataFacade;
 import org.apache.commons.fileupload.FileItem;
 import org.apache.commons.fileupload.FileItemFactory;
 import org.apache.commons.fileupload.disk.DiskFileItemFactory;
@@ -102,6 +105,14 @@ public class TestFacade {
                         operationOrder.add(operationItem);
                         indicationPushVO.setOperationOrder(operationOrder);
                         break;
+                    case "药品通用名称":
+                        List<Drug> drugOrder = new ArrayList<>();
+                        Drug drug = new Drug();
+                        drug.setName(bean.getStandName());
+                        drug.setUniqueName(bean.getStandName());
+                        drugOrder.add(drug);
+                        indicationPushVO.setDrugOrder(drugOrder);
+                        break;
                     default:
                         continue;
                 }
@@ -109,92 +120,107 @@ public class TestFacade {
 
             if (StringUtil.isNotEmpty(bean.getNeoType())) {
                 switch (bean.getNeoType()) {
-                    // case "1": // 性别
-                    //     if ("男性".equals(bean.getNeoName())) {
-                    //         indicationPushVO.setSex(1);
-                    //     } else if ("女性".equals(bean.getNeoName())) {
-                    //         indicationPushVO.setSex(2);
-                    //     }
-                    //     break;
-                    // case "2": // 化验, 示例:血小板计数,<,50,10^9/L
-                    //     String lisStr = bean.getNeoName();
-                    //     String[] lisArr = lisStr.split(",");
-                    //
-                    //     List<Lis> lisList = new ArrayList<>();
-                    //     Lis lisBean = new Lis();
-                    //     lisBean.setUniqueName(lisArr[0]);
-                    //     lisBean.setName(lisArr[0]);
-                    //     lisBean.setDetailName(lisArr[0]);
-                    //     lisBean.setValue(getValue(lisArr));
-                    //     lisList.add(lisBean);
-                    //     indicationPushVO.setLis(lisList);
-                    //     break;
-                    // case "3": // 临床表现
-                    //     indicationPushVO.setChief(bean.getNeoName());
-                    //     break;
+                    case "1": // 性别
+                        if ("男性".equals(bean.getNeoName())) {
+                            indicationPushVO.setSex(1);
+                        } else if ("女性".equals(bean.getNeoName())) {
+                            indicationPushVO.setSex(2);
+                        }
+                        break;
+                    case "2": // 化验, 示例:血小板计数,<,50,10^9/L
+                        String lisStr = bean.getNeoName();
+                        String[] lisArr = lisStr.split(",");
+
+                        List<Lis> lisList = new ArrayList<>();
+                        Lis lisBean = new Lis();
+                        lisBean.setUniqueName(lisArr[0]);
+                        lisBean.setName(lisArr[0]);
+                        lisBean.setDetailName(lisArr[0]);
+                        lisBean.setValue(getValue(lisArr));
+                        lisList.add(lisBean);
+                        indicationPushVO.setLis(lisList);
+                        break;
+                    case "3": // 临床表现
+                        indicationPushVO.setChief(bean.getNeoName());
+                        break;
                     case "4": //辅助检查描述
                         indicationPushVO.setSymptom("B超:提示" + bean.getNeoName());
                         break;
-                    // case "5": // 诊断
-                    //     List<Item> diag = new ArrayList<>();
-                    //     Item diagItem = new Item();
-                    //     diagItem.setName(bean.getNeoName());
-                    //     diagItem.setUniqueName(bean.getNeoName());
-                    //     diag.add(diagItem);
-                    //     indicationPushVO.setDiag(diag);
-                    //     break;
-                    // case "6": // 服用药品
-                    //     StringBuffer symptom = new StringBuffer("发病来,神志清,精神可,胃纳一般,睡眠可,二便无殊。一直服用");
-                    //     symptom.append(bean.getNeoName()).append("。");
-                    //     indicationPushVO.setSymptom(symptom.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(",");
-                    //     if (vitalArr.length > 1) {
-                    //         if ("收缩压".equals(vitalArr[0]) || "舒张压".equals(vitalArr[0])) {
-                    //             if ("收缩压".equals(vitalArr[0])) {
-                    //                 sbVital.append("血压");
-                    //                 sbVital.append(getValue(vitalArr) + "/100mmHg");
-                    //                 indicationPushVO.setVital(sbVital.toString());
-                    //             } else if ("舒张压".equals(vitalArr[0])) {
-                    //                 sbVital.append("血压");
-                    //                 sbVital.append("100/" + getValue(vitalArr) + "mmHg");
-                    //                 indicationPushVO.setVital(sbVital.toString());
-                    //             }
-                    //         } else {
-                    //             // 其他数值类型
-                    //             sbVital.append(vitalArr[0]);
-                    //             sbVital.append(getValue(vitalArr));
-                    //             sbVital.append(vitalArr[3]);
-                    //             indicationPushVO.setVital(sbVital.toString());
-                    //         }
-                    //     } else {
-                    //         sbVital.append(vitalArr[0]);
-                    //         indicationPushVO.setVital(sbVital.toString());
-                    //     }
-                    //     break;
+                    case "5": // 诊断
+                        List<Item> diag = new ArrayList<>();
+                        Item diagItem = new Item();
+                        diagItem.setName(bean.getNeoName());
+                        diagItem.setUniqueName(bean.getNeoName());
+                        diag.add(diagItem);
+                        indicationPushVO.setDiag(diag);
+                        break;
+                    case "6": // 服用药品
+                        StringBuffer symptom = new StringBuffer("发病来,神志清,精神可,胃纳一般,睡眠可,二便无殊。一直服用");
+                        symptom.append(bean.getNeoName()).append("。");
+                        indicationPushVO.setSymptom(symptom.toString());
+                        break;
+                    case "10": // 禁忌人群
+                        if ("妊娠".equals(bean.getNeoName())) {
+                            List<Item> groupList = new ArrayList<>();
+                            Item group = new Item();
+                            group.setName(bean.getNeoName());
+                            group.setUniqueName(bean.getNeoName());
+                            groupList.add(group);
+                            indicationPushVO.setDiag(groupList);
+                        } else {
+                            continue;
+                        }
+                    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(",");
+                        if (vitalArr.length > 1) {
+                            if ("收缩压".equals(vitalArr[0]) || "舒张压".equals(vitalArr[0])) {
+                                if ("收缩压".equals(vitalArr[0])) {
+                                    sbVital.append("血压");
+                                    sbVital.append(getValue(vitalArr) + "/100mmHg");
+                                    indicationPushVO.setVital(sbVital.toString());
+                                } else if ("舒张压".equals(vitalArr[0])) {
+                                    sbVital.append("血压");
+                                    sbVital.append("100/" + getValue(vitalArr) + "mmHg");
+                                    indicationPushVO.setVital(sbVital.toString());
+                                }
+                            } else {
+                                // 其他数值类型
+                                sbVital.append(vitalArr[0]);
+                                sbVital.append(getValue(vitalArr));
+                                sbVital.append(vitalArr[3]);
+                                indicationPushVO.setVital(sbVital.toString());
+                            }
+                        } else {
+                            sbVital.append(vitalArr[0]);
+                            indicationPushVO.setVital(sbVital.toString());
+                        }
+                        break;
+                    case "14": // 年龄
+                        String[] splitAge = bean.getNeoName().split(",");
+                        indicationPushVO.setAge((int) getValueNum(splitAge));
+                        break;
                     default:
                         continue;
                 }
@@ -490,13 +516,13 @@ public class TestFacade {
             IndicationPushVO indicationPushVO = new IndicationPushVO();
             indicationPushVO.setRuleType("3");
             indicationPushVO.setIdNum(bean.getIdNum());
-            List<Drug> drug = new ArrayList<>();
+            List<Drug> drugOrder = new ArrayList<>();
             Drug item = new Drug();
             item.setUniqueName(bean.getDrugHighRisk());
             item.setName(bean.getDrugHighRisk());
             item.setForm(bean.getDrugForm());
-            drug.add(item);
-            indicationPushVO.setDrug(drug);
+            drugOrder.add(item);
+            indicationPushVO.setDrugOrder(drugOrder);
             indicationPushVOList.add(indicationPushVO);
         }
 
@@ -608,9 +634,9 @@ public class TestFacade {
      * @return
      */
     public double getValueNum(String[] arr) {
-        if ("<".equals(arr[1]) || "≤".equals(arr[1])) {
+        if ("<".equals(arr[1]) || "<".equals(arr[1]) || "≤".equals(arr[1])) {
             return Double.parseDouble(arr[2]) - 1;
-        } else if (">".equals(arr[1]) || "≥".equals(arr[1])) {
+        } else if (">".equals(arr[1]) || "≥".equals(arr[1]) || ">".equals(arr[1])) {
             return Double.parseDouble(arr[2]) + 1;
         }
         return 0.0;
@@ -896,29 +922,44 @@ public class TestFacade {
         indicationPushVO.setOperationOrder(operationOrder);
     }
 
-    public Map testAll() {
+    public Map testAll(TestAllVO testAllVO) {
+        if (StringUtil.isBlank(testAllVO.getPath())) {
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "参数为空,未填写【文件所在路径】");
+        }
+        long start = System.currentTimeMillis();
+        String path = testAllVO.getPath();
         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);
+        Map<String, Object> paramMap = new LinkedHashMap<>();
+        Map<String, String> mapPath = new LinkedHashMap<>();
+        mapPath.put("【危急值_化验】", path + File.separator + "【危急值_化验】.xlsx");
+        mapPath.put("【危急值_辅检】", path + File.separator + "【危急值_辅检】.xls");
+        mapPath.put("【其他值提醒_化验】", path + File.separator + "【其他值提醒_化验】.xlsx");
+        mapPath.put("【其他值提醒_辅检】", path + File.separator + "【其他值提醒_辅检】.xlsx");
+        mapPath.put("【其他值提醒_输血】", path + File.separator + "【其他值提醒_输血】.xlsx");
+        mapPath.put("【高危药品】", path + File.separator + "【高危药品】.xlsx");
+        mapPath.put("【高危手术】", path + File.separator + "【高危手术】.xlsx");
+        mapPath.put("【开单合理性】", path + File.separator + "【开单合理性】.xlsx");
+        mapPath.put("【开单合理性_输血】", path + File.separator + "【开单合理性_输血】.xlsx");
+        paramMap.put("mapPath", mapPath);
+
+        try {
+            map = DataFacade.get("testAll", paramMap, Map.class);
+        } catch (Exception e) {
+            e.printStackTrace();
+            throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "提醒类服务出错" + e.getMessage());
+        }
 
-        file = getMulFileByPath(picPathPacs);
-        Map<String, Object> criticalMapPacs = importCriticalPacsExcel(file, new TestLineVO());
-        map.put("【危急值_辅检】",criticalMapPacs);
+        map.put("总耗时", (System.currentTimeMillis() - start) / 1000.0 + "秒");
         return map;
     }
 
-    private MultipartFile getMulFileByPath(String picPath) {
+    public MultipartFile getMulFileByPath(String picPath) {
         FileItem fileItem = createFileItem(picPath);
         MultipartFile mfile = new CommonsMultipartFile(fileItem);
         return mfile;
     }
 
-    private FileItem createFileItem(String filePath) {
+    public FileItem createFileItem(String filePath) {
         FileItemFactory factory = new DiskFileItemFactory(16, null);
         String textFieldName = "textField";
         int num = filePath.lastIndexOf(".");
@@ -946,4 +987,13 @@ public class TestFacade {
         }
         return item;
     }
+
+    /**
+     * 随机获取0—size之间的一个数值
+     * @param size
+     * @return
+     */
+    public int getRandomNum(int size) {
+        return (int)(Math.random() * size);
+    }
 }

+ 3 - 3
src/main/java/com/diagbot/repository/LisNameNode.java

@@ -180,12 +180,12 @@ public class LisNameNode {
 		List<LisDetailDTO> lislist = new ArrayList<>();
 		LisDetailDTO lisDetailDTO;
 
-		List<LisName> lislt = lisRepository.findByNameContaining(name);
-		lislt.addAll(baseNodeRepository.getLisbyPinYin(name));
+		List<LisName> lislt = lisRepository.findByNameOrPycodeContaininglimit100(name);
+		/*lislt.addAll(baseNodeRepository.getLisbyPinYin(name));
 
 		if (ListUtil.isNotEmpty(lislt) && lislt.size() > 100) {
 			lislt = lislt.subList(0, 100);
-		}
+		}*/
 
 		for (LisName lis : lislt) {
 			lisDetailDTO = new LisDetailDTO();

+ 2 - 2
src/main/java/com/diagbot/repository/LisNameRepository.java

@@ -16,7 +16,7 @@ public interface LisNameRepository extends Neo4jRepository<LisName, Long> {
 
     List<LisName> findByNameIn(List<String> names);
 
-    @Query("MATCH (n:实验室检查名称)-[r]->(b) where n.name contains {name} return n, collect(r), collect(b) limit 100")
-    List<LisName> findByNameContaininglimit100(@Param("name") String name);
+    @Query("MATCH (n:实验室检查名称)-[r]->(b) where n.name contains {name} or (EXISTS(n.拼音编码) AND n.拼音编码 CONTAINS {name}) return n.name, n.拼音编码,collect(r), collect(b) limit 100")
+    List<LisName> findByNameOrPycodeContaininglimit100(@Param("name") String name);
 }
 

+ 19 - 0
src/main/java/com/diagbot/vo/TestAllVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * <p>
+ * 测试开单合理性
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-07-28
+ */
+@Data
+public class TestAllVO implements Serializable {
+
+    private String path;
+}

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

@@ -21,4 +21,6 @@ public class TestLineVO implements Serializable {
 
     // sheet的索引,从0开始
     private int sheetIndex = 0;
+
+    private boolean getOne = false;
 }

+ 4 - 3
src/main/java/com/diagbot/web/TestController.java

@@ -5,6 +5,7 @@ import com.diagbot.dto.StandConvertCrfBatchDTO;
 import com.diagbot.dto.StandConvertCrfDTO;
 import com.diagbot.facade.TestFacade;
 import com.diagbot.vo.StandConvertCrfVO;
+import com.diagbot.vo.TestAllVO;
 import com.diagbot.vo.TestLineVO;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -125,10 +126,10 @@ public class TestController {
         return RespDTO.onSuc(testFacade.testHighRiskProcess(file, testLineVO));
     }
 
-    @ApiOperation(value = "批量测试[zhoutg]", notes = "")
+    @ApiOperation(value = "批量测试[zhoutg]", notes = "参数:目录所在路径,示例:D:\\newSVN\\2020新版CDSS\\05.其他资料\\数据")
     @PostMapping("/testAll")
-    public RespDTO<Map<String, Object>> testAll() {
-        return RespDTO.onSuc(testFacade.testAll());
+    public RespDTO<Map<String, Object>> testAll(TestAllVO testAllVO) {
+        return RespDTO.onSuc(testFacade.testAll(testAllVO));
     }
 }