Parcourir la source

Merge branch 'dev/ruleNew20210727' into develop

zhoutg il y a 3 ans
Parent
commit
c0ae2821a0

+ 49 - 46
src/main/java/com/diagbot/facade/CommonFacade.java

@@ -406,8 +406,8 @@ public class CommonFacade {
         //        // 3、开单辅检项目
         //        CoreUtil.setPropertyList(wordCrfDTO.getPacsOrder(), "name", "uniqueName", map.get(StandConvertEnum.pacs.toString()));
 
-//        CoreUtil.setUninameFromDetail(wordCrfDTO.getLis(), "detailName");
-//        CoreUtil.setUninameFromDetail(wordCrfDTO.getLisOrder(), "name");
+        //        CoreUtil.setUninameFromDetail(wordCrfDTO.getLis(), "detailName");
+        //        CoreUtil.setUninameFromDetail(wordCrfDTO.getLisOrder(), "name");
         lisGetAndSet(wordCrfDTO);
         pacsGetAndSet(wordCrfDTO);
 
@@ -439,7 +439,7 @@ public class CommonFacade {
      * 类型,疾病: disease,症状: symptom,手术和操作:operation,药品: drug,实验室检查:lis,辅助检查:pacs, 辅助检查:vital"
      *
      * @param standConvert
-     * @return Map<String,Map<String,String>> -->Map<类型, Map<原始词, 标准词>>
+     * @return Map<String , Map < String , String>> -->Map<类型, Map<原始词, 标准词>>
      */
     public Map<String, Map<String, String>> standConvertCrf(StandConvert standConvert) {
         Map<String, Map<String, String>> map = new LinkedHashMap<>();
@@ -664,25 +664,25 @@ public class CommonFacade {
                 .distinct()
                 .collect(Collectors.toList());
 
-//        Map<String, Map<String, Long>> configMap = new LinkedHashMap<>();
+        //        Map<String, Map<String, Long>> configMap = new LinkedHashMap<>();
         if (ListUtil.isNotEmpty(operationList)) {
-//            configMap = tranOperationConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), operationList, null);
+            //            configMap = tranOperationConfigFacade.getConfigMap(wordCrfDTO.getHospitalId(), operationList, null);
             Map<String, Map<String, Map<String, List<String>>>> operstionMap = mappingConfigFacade.groupByHisNameWithName(operationList, ConceptTypeEnum.Operation.getKey(), wordCrfDTO.getHospitalId());
             // 1、主诉手术
-//            setListProperty(wordCrfDTO.getChiefLabel(), "operations", "standName", configMap);
-            setListProperty(wordCrfDTO.getChiefLabel(), "operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
+            //            setListProperty(wordCrfDTO.getChiefLabel(), "operations", "standName", configMap);
+            setListProperty(wordCrfDTO.getChiefLabel(), "operations", ConceptTypeEnum.Operation.getKey(), "StandName", operstionMap);
             // 2、现病史手术
-//            setListProperty(wordCrfDTO.getPresentLabel(), "operations", "standName", configMap);
-            setListProperty(wordCrfDTO.getPresentLabel(),"operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
+            //            setListProperty(wordCrfDTO.getPresentLabel(), "operations", "standName", configMap);
+            setListProperty(wordCrfDTO.getPresentLabel(), "operations", ConceptTypeEnum.Operation.getKey(), "StandName", operstionMap);
             // 3、既往史手术
-//            setListProperty(wordCrfDTO.getPastLabel(), "operations", "standName", configMap);
-            setListProperty(wordCrfDTO.getPastLabel(),"operations", ConceptTypeEnum.Operation.getKey(),"StandName",operstionMap);
+            //            setListProperty(wordCrfDTO.getPastLabel(), "operations", "standName", configMap);
+            setListProperty(wordCrfDTO.getPastLabel(), "operations", ConceptTypeEnum.Operation.getKey(), "StandName", operstionMap);
             // 4、结构化手术
-//            setListProperty(wordCrfDTO, "operation", "uniqueName", configMap);
-            setListProperty(wordCrfDTO, "operation", ConceptTypeEnum.Operation.getKey(),"UniqueName",operstionMap);
+            //            setListProperty(wordCrfDTO, "operation", "uniqueName", configMap);
+            setListProperty(wordCrfDTO, "operation", ConceptTypeEnum.Operation.getKey(), "UniqueName", operstionMap);
             // 5、手术
-//            setListProperty(wordCrfDTO, "operationOrder", "uniqueName", configMap);
-            setListProperty(wordCrfDTO, "operationOrder", ConceptTypeEnum.Operation.getKey(),"UniqueName",operstionMap);
+            //            setListProperty(wordCrfDTO, "operationOrder", "uniqueName", configMap);
+            setListProperty(wordCrfDTO, "operationOrder", ConceptTypeEnum.Operation.getKey(), "UniqueName", operstionMap);
             // 6、选中手术
             if (wordCrfDTO.getOperationName() != null &&
                     StringUtil.isNotBlank(wordCrfDTO.getOperationName().getName()) &&
@@ -702,10 +702,10 @@ public class CommonFacade {
         List<String> pacsList = new ArrayList<>();
         // 1、结构化
         CoreUtil.addList(pacsList, CoreUtil.filterUniqueList(wordCrfDTO.getPacs()));
-//        // 2、开单
+        //        // 2、开单
         CoreUtil.addList(pacsList, CoreUtil.filterUniqueList(wordCrfDTO.getPacsOrder()));
         PacsLabel pacsLabel = wordCrfDTO.getPacsLabel();
-        if(pacsLabel != null){
+        if (pacsLabel != null) {
             pacsList = pacsLabel.getItem().stream()
                     .map(x -> x.getName())
                     .collect(Collectors.toList());
@@ -713,9 +713,9 @@ public class CommonFacade {
 
         if (ListUtil.isNotEmpty(pacsList)) {
             Map<String, Map<String, Map<String, List<String>>>> pacsMap = mappingConfigFacade.groupByHisNameWithName(pacsList, ConceptTypeEnum.Pacs.getKey(), wordCrfDTO.getHospitalId());
-            setListProperty(wordCrfDTO, "pacs", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
-            setListProperty(wordCrfDTO, "pacsOrder", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
-            setListProperty(pacsLabel, "item", ConceptTypeEnum.Pacs.getKey(),"UniqueName",pacsMap);
+            setListProperty(wordCrfDTO, "pacs", ConceptTypeEnum.Pacs.getKey(), "UniqueName", pacsMap);
+            setListProperty(wordCrfDTO, "pacsOrder", ConceptTypeEnum.Pacs.getKey(), "UniqueName", pacsMap);
+            setListProperty(pacsLabel, "item", ConceptTypeEnum.Pacs.getKey(), "UniqueName", pacsMap);
         }
     }
 
@@ -729,7 +729,7 @@ public class CommonFacade {
         List<String> lisHisNameList = Lists.newArrayList();
         // 【所有化验】
         List<Lis> lisList = wordCrfDTO.getLis();
-        if(ListUtil.isNotEmpty(lisList)){
+        if (ListUtil.isNotEmpty(lisList)) {
             lisHisNameList.addAll(lisList
                     .stream()
                     .filter(i -> StringUtil.isNotBlank(i.getName()) || StringUtil.isNotBlank(i.getUniqueName()))
@@ -742,7 +742,7 @@ public class CommonFacade {
                 .collect(Collectors.toList());
         if (ListUtil.isNotEmpty(lisHisNameList)) {
             Map<String, Map<String, Map<String, List<String>>>> lisConfigMap = mappingConfigFacade.groupByHisNameWithName(lisHisNameList, ConceptTypeEnum.LisPack.getKey(), wordCrfDTO.getHospitalId());
-            setListProperty(wordCrfDTO, "lis", ConceptTypeEnum.LisPack.getKey(),"UniqueName",lisConfigMap);
+            setListProperty(wordCrfDTO, "lis", ConceptTypeEnum.LisPack.getKey(), "UniqueName", lisConfigMap);
         }
 
     }
@@ -761,9 +761,9 @@ public class CommonFacade {
         ReflectUtil.setProperty(obj, listProperty, newList);
     }
 
-    public <T> void setListProperty(Object obj, String listProperty,Integer type,String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
+    public <T> void setListProperty(Object obj, String listProperty, Integer type, String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
         Object tList = CoreUtil.getFieldValue(obj, listProperty);
-        List<T> newList = convertStandName((List) tList,type, propertyName,configMap);
+        List<T> newList = convertStandName((List) tList, type, propertyName, configMap);
         ReflectUtil.setProperty(obj, listProperty, newList);
     }
 
@@ -825,7 +825,7 @@ public class CommonFacade {
      * @param <T>
      * @return
      */
-    public <T> List<T> convertStandName(List<T> list,Integer type,String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
+    public <T> List<T> convertStandName(List<T> list, Integer type, String propertyName, Map<String, Map<String, Map<String, List<String>>>> configMap) {
         List<T> retList = new ArrayList<>();
         if (ListUtil.isEmpty(list)) {
             return list;
@@ -839,7 +839,7 @@ public class CommonFacade {
                     continue;
                 }
 
-//                String uniqueName = item.getClass().getMethod("getUniqueName").invoke(item).toString();
+                //                String uniqueName = item.getClass().getMethod("getUniqueName").invoke(item).toString();
 
                 String uniqueName = ReflectUtil.getProperty(item, "uniqueName");
                 if (StringUtil.isNotBlank(uniqueName) && !"StandName".equals(propertyName)) {
@@ -848,7 +848,7 @@ public class CommonFacade {
                 }
 
                 String hisDetailName = "";
-                if(type.equals(ConceptTypeEnum.LisPack.getKey())) {
+                if (type.equals(ConceptTypeEnum.LisPack.getKey())) {
                     hisDetailName = ReflectUtil.getProperty(item, "detailName");
                     if (StringUtil.isBlank(hisDetailName)) {
                         hisDetailName = "";
@@ -864,7 +864,7 @@ public class CommonFacade {
                                     for (String form : thirdEntry.getValue()) {
                                         T o = (T) item.getClass().newInstance();
                                         BeanUtil.copyProperties(item, o);
-                                        Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
+                                        Method setUniqueName = o.getClass().getMethod("set" + propertyName, String.class);
                                         setUniqueName.invoke(o, thirdEntry.getKey());
                                         Method setForm = o.getClass().getMethod("setForm", String.class);
                                         setForm.invoke(o, form);
@@ -873,7 +873,7 @@ public class CommonFacade {
                                 } else {
                                     T o = (T) item.getClass().newInstance();
                                     BeanUtil.copyProperties(item, o);
-                                    Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
+                                    Method setUniqueName = o.getClass().getMethod("set" + propertyName, String.class);
                                     setUniqueName.invoke(o, thirdEntry.getKey());
                                     retList.add(o);
                                 }
@@ -884,7 +884,7 @@ public class CommonFacade {
                             for (String stdName : standNames) {
                                 T o = (T) item.getClass().newInstance();
                                 BeanUtil.copyProperties(item, o);
-                                Method setUniqueName = o.getClass().getMethod("set"+propertyName, String.class);
+                                Method setUniqueName = o.getClass().getMethod("set" + propertyName, String.class);
                                 setUniqueName.invoke(o, stdName);
                                 retList.add(o);
                             }
@@ -894,7 +894,11 @@ public class CommonFacade {
                     }
                 } else {
                     if (propertyName.equals("UniqueName")) {
-                        BeanUtils.copyProperty(item, "uniqueName", name);
+                        if (StringUtil.isNotBlank(hisDetailName)) {
+                            BeanUtils.copyProperty(item, "uniqueName", hisDetailName);
+                        } else {
+                            BeanUtils.copyProperty(item, "uniqueName", name);
+                        }
                     }
                     retList.add(item);
                 }
@@ -1082,11 +1086,11 @@ public class CommonFacade {
         getPacsStruct(pacsLabel, wordCrfDTO.getPresentLabel().getPacsLabel());
         //结构化pacs
         List<com.diagbot.biz.push.entity.Pacs> pacs = wordCrfDTO.getPacs();
-        if(ListUtil.isNotEmpty(pacs)){
-            pacs.forEach(p ->{
+        if (ListUtil.isNotEmpty(pacs)) {
+            pacs.forEach(p -> {
                 Item item = new Item();
-                item.setName(p.getName()==null?"":p.getName());
-                item.setUniqueName(p.getUniqueName()==null?"":p.getUniqueName());
+                item.setName(p.getName() == null ? "" : p.getName());
+                item.setUniqueName(p.getUniqueName() == null ? "" : p.getUniqueName());
                 pacsLabel.getItem().add(item);
             });
         }
@@ -1122,8 +1126,8 @@ public class CommonFacade {
         if (ListUtil.isNotEmpty(res.getDisease())) {
             for (Pacs pacs : res.getDisease()) {
                 Item item = new Item();
-                item.setName(pacs.getName()==null?"":pacs.getName());
-                item.setUniqueName(pacs.getStandName()==null?"":pacs.getStandName());
+                item.setName(pacs.getName() == null ? "" : pacs.getName());
+                item.setUniqueName(pacs.getStandName() == null ? "" : pacs.getStandName());
                 pacsResList.add(item);
             }
         }
@@ -1163,18 +1167,17 @@ public class CommonFacade {
      *
      * @param lises
      * @param lisList
-     *
      */
     public void getLisStruct(List<com.diagbot.model.entity.Lis> lises, List<Lis> lisList) {
         if (ListUtil.isNotEmpty(lises)) {
-                lises.stream().forEach(x -> {
-                    String bigName = x.getBigItem().getName();//大项名
-                    String detailName = x.getName();//小项名
-                    String value = x.getPd().getValue();
-                    String unit = x.getPd().getUnit();
-                    String standName = x.getStandName();
-                    lisList.add(getLis(bigName,detailName,value,unit,standName));
-                });
+            lises.stream().forEach(x -> {
+                String bigName = x.getBigItem().getName();//大项名
+                String detailName = x.getName();//小项名
+                String value = x.getPd().getValue();
+                String unit = x.getPd().getUnit();
+                String standName = x.getStandName();
+                lisList.add(getLis(bigName, detailName, value, unit, standName));
+            });
         }
     }
 

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

@@ -312,6 +312,6 @@ public class KlDiagnoseDetailFacade {
         String pateern = "([1-9]\\d*\\.?\\d*)|(0\\.\\d*[1-9])";
         String content = formulas.stream().collect(Collectors.joining(","));
         //获取公式中的编码
-        return RegexUtil.getRegexDatas(content, pateern);
+        return RegexUtil.getRegexDataAll(content, pateern);
     }
 }

+ 32 - 12
src/main/java/com/diagbot/rule/GroupRule.java

@@ -6,9 +6,11 @@ import com.diagbot.dto.RuleBaseDTO;
 import com.diagbot.dto.RuleSimpleDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.util.CoreUtil;
+import com.diagbot.util.ListUtil;
 import com.diagbot.util.MsgNewUtil;
 import com.diagbot.util.RegexUtil;
 import com.diagbot.util.StringUtil;
+import com.google.common.collect.Lists;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Component;
 
@@ -80,9 +82,11 @@ public class GroupRule {
         String menstrual = wordCrfDTO.getMenstrual(); // 月经史
         String marriage = wordCrfDTO.getMarriage(); // 婚姻
         String marital = wordCrfDTO.getMarital();// 婚育史
+        String pasts = wordCrfDTO.getPasts(); // 既往史
         boolean flag = false;
         String regex = "";
         String regex2 = "";
+        List<String> groupList = Lists.newArrayList(); // 分组信息
         List<String> nameList = CoreUtil.getSplit(ruleBaseDTO.getBaseLibName());
         for (String name : nameList) {
             switch (name) {
@@ -135,23 +139,39 @@ public class GroupRule {
                         flag = true;
                     }
                     break;
-                case "未经产妇":
+                case "未经产妇": // 女性+(婚育史或既往史)数值累加为0
                     regex = "(\\d+)-(\\d+)-(\\d+)-(\\d+)";
-                    if (sex == 2 && StringUtil.isNotBlank(marital) && RegexUtil.getRegexRes(marital, regex)) {
-                        if (Integer.parseInt(RegexUtil.getRegexData(marital, regex, 1))
-                                + Integer.parseInt(RegexUtil.getRegexData(marital, regex, 2))
-                                + Integer.parseInt(RegexUtil.getRegexData(marital, regex, 3)) == 0) {
-                            flag = true;
+                    if (sex == 2) {
+                        if (StringUtil.isNotBlank(marital) && RegexUtil.getRegexRes(marital, regex)) {
+                            // 婚育史判断
+                            groupList = RegexUtil.getRegexDataList(marital, regex);
+                        } else if (StringUtil.isNotBlank(pasts) && RegexUtil.getRegexRes(pasts, regex)) {
+                            // 既往史判断
+                            groupList = RegexUtil.getRegexDataList(pasts, regex);
+                        }
+                        if (ListUtil.isNotEmpty(groupList) && groupList.size() == 4) {
+                            if (Integer.parseInt(groupList.get(0)) + Integer.parseInt(groupList.get(1))
+                                    + Integer.parseInt(groupList.get(2)) == 0) {
+                                flag = true;
+                            }
                         }
                     }
                     break;
-                case "经产妇":
+                case "经产妇": // 女性+(婚育史或既往史)数值累加>=1
                     regex = "(\\d+)-(\\d+)-(\\d+)-(\\d+)";
-                    if (sex == 2 && StringUtil.isNotBlank(marital) && RegexUtil.getRegexRes(marital, regex)) {
-                        if (Integer.parseInt(RegexUtil.getRegexData(marital, regex, 1))
-                                + Integer.parseInt(RegexUtil.getRegexData(marital, regex, 2))
-                                + Integer.parseInt(RegexUtil.getRegexData(marital, regex, 3)) >= 1) {
-                            flag = true;
+                    if (sex == 2) {
+                        if (StringUtil.isNotBlank(marital) && RegexUtil.getRegexRes(marital, regex)) {
+                            // 婚育史判断
+                            groupList = RegexUtil.getRegexDataList(marital, regex);
+                        } else if (StringUtil.isNotBlank(pasts) && RegexUtil.getRegexRes(pasts, regex)) {
+                            // 既往史判断
+                            groupList = RegexUtil.getRegexDataList(pasts, regex);
+                        }
+                        if (ListUtil.isNotEmpty(groupList) && groupList.size() == 4) {
+                            if (Integer.parseInt(groupList.get(0)) + Integer.parseInt(groupList.get(1))
+                                    + Integer.parseInt(groupList.get(2)) >= 1) {
+                                flag = true;
+                            }
                         }
                     }
                     break;

+ 1 - 0
src/main/java/com/diagbot/util/Content.java

@@ -311,5 +311,6 @@ public class Content {
             "yyyy-MM-ddHH:mm:ss.000",
             "yyyyMMddHH:mm",
             "yyyy-MM-dd'T'HH:mm:ss",
+            "MM/dd/yyyyHH:mm:ss"
     };
 }

+ 72 - 47
src/main/java/com/diagbot/util/RegexUtil.java

@@ -40,16 +40,12 @@ public class RegexUtil {
     /**
      * 是否有符合正则的数据(大小写敏感)
      *
-     * @param content 文本内容
-     * @param regex   表达式
-     * @param senstive 大小写是否敏感
+     * @param content  文本内容
+     * @param regex    表达式
      * @return
      */
-    public static Boolean getRegexRes(String content, String regex, boolean senstive) {
-        if (senstive) {
-            return getRegexResCommon(content, regex, true);
-        }
-        return getRegexResCommon(content, regex, false);
+    public static Boolean getRegexResSen(String content, String regex) {
+        return getRegexResCommon(content, regex, true);
     }
 
     /**
@@ -79,7 +75,7 @@ public class RegexUtil {
     /**
      * 获取pattern
      *
-     * @param regex 正则表达式
+     * @param regex     正则表达式
      * @param sensitive 大小写敏感
      * @return
      */
@@ -94,7 +90,7 @@ public class RegexUtil {
     }
 
     /**
-     * 根据正则获取指定分组数据(大小写不敏感)
+     * 根据正则获取第一个匹配的指定分组数据(大小写不敏感)
      *
      * @param content  文本内容
      * @param regex    表达式
@@ -106,22 +102,19 @@ public class RegexUtil {
     }
 
     /**
-     * 根据正则获取指定分组数据(大小写敏感)
+     * 根据正则获取第一个匹配的指定分组数据(大小写敏感)
      *
      * @param content  文本内容
      * @param regex    表达式
      * @param groupNum 获取第几个内容
      * @return
      */
-    public static String getRegexData(String content, String regex, Integer groupNum, Boolean sensitive) {
-        if (sensitive) {
-            return getRegexDataCommon(content, regex, groupNum, true);
-        }
-        return getRegexDataCommon(content, regex, groupNum, false);
+    public static String getRegexDataSen(String content, String regex, Integer groupNum) {
+        return getRegexDataCommon(content, regex, groupNum, true);
     }
 
     /**
-     * 根据正则获取指定分组数据(公共方法)
+     * 根据正则获取第一个匹配的指定分组数据(公共方法)
      *
      * @param content  文本内容
      * @param regex    表达式
@@ -148,38 +141,35 @@ public class RegexUtil {
     }
 
     /**
-     * 根据正则获取所有分组数据(大小写不敏感)
+     * 根据正则获取第一个匹配的所有分组数据(大小写不敏感)
      *
      * @param content
      * @param regex
      * @return
      */
-    public static List<String> getRegexData(String content, String regex) {
-        return getRegexDataCommon(content, regex, false);
+    public static List<String> getRegexDataList(String content, String regex) {
+        return getRegexDataListCommon(content, regex, false);
     }
 
     /**
-     * 根据正则获取所有分组数据(大小写敏感)
+     * 根据正则获取第一个匹配的所有分组数据(大小写敏感)
      *
      * @param content
      * @param regex
      * @return
      */
-    private static List<String> getRegexData(String content, String regex, Boolean sensitive) {
-        if (sensitive) {
-            getRegexDataCommon(content, regex, true);
-        }
-        return getRegexDataCommon(content, regex, false);
+    public static List<String> getRegexDataListSen(String content, String regex) {
+        return getRegexDataListCommon(content, regex, true);
     }
 
     /**
-     * 根据正则获取所有分组数据(内部方法)
+     * 根据正则获取第一个匹配的所有分组数据(内部方法)
      *
      * @param content
      * @param regex
      * @return
      */
-    private static List<String> getRegexDataCommon(String content, String regex, Boolean sensitive) {
+    private static List<String> getRegexDataListCommon(String content, String regex, Boolean sensitive) {
         List<String> list = Lists.newArrayList();
         try {
             if (StringUtil.isBlank(content)) {
@@ -198,18 +188,51 @@ public class RegexUtil {
         return list;
     }
 
-    public static List<String> getRegexDatas(String content, String pattern){
-        List<String> numbers=new ArrayList<>();
-        // 创建 Pattern 对象
-        Pattern r = Pattern.compile(pattern);
-        // 现在创建 matcher 对象
-        Matcher matcher = r.matcher(content);
-        while (matcher.find()) {
-            //获取当前匹配的值
-            numbers.add(matcher.group());
-        }
+    /**
+     * 根据正则获取所有匹配数据(大小写不敏感)
+     *
+     * @param content
+     * @param regex
+     * @return
+     */
+    public static List<String> getRegexDataAll(String content, String regex) {
+        return getRegexDataAllCommon(content, regex, false);
+    }
 
-        return numbers;
+    /**
+     * 根据正则获取所有匹配数据(大小写敏感)
+     *
+     * @param content
+     * @param regex
+     * @return
+     */
+    public static List<String> getRegexDataAllSen(String content, String regex) {
+        return getRegexDataAllCommon(content, regex, true);
+    }
+
+    /**
+     * 根据正则获取所有匹配数据(内部方法)
+     *
+     * @param content
+     * @param regex
+     * @return
+     */
+    private static List<String> getRegexDataAllCommon(String content, String regex, Boolean sensitive) {
+        List<String> list = Lists.newArrayList();
+        try {
+            if (StringUtil.isBlank(content)) {
+                return list;
+            }
+            Pattern pattern = getPattern(regex, sensitive);
+            Matcher matcher = pattern.matcher(content);
+            while (matcher.find()) {
+                //获取当前匹配的值
+                list.add(matcher.group());
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return list;
     }
 
     /**
@@ -218,19 +241,21 @@ public class RegexUtil {
      * @param args
      */
     public static void main(String[] args) {
-        String regex1 = "([1-9]\\d*\\.?\\d*)|(0\\.\\d*[1-9])";
-        // System.out.println(getRegexData("血小板计数  30.3", regex1, 2));
-        System.out.println(getRegexData("拟诊+(3.3/3.4)任一", regex1));
+        String str = "1-2-3-4, 法法,0-0-1-0";
+        String regex = "(\\d+)-(\\d+)-(\\d+)-(\\d+)";
+        System.out.println(getRegexDataList(str, regex));
 
-        String s1 = "ABC";
-        System.out.println(getRegexRes(s1, "Abc", true));
+        // String regex1 = "([1-9]\\d*\\.?\\d*)|(0\\.\\d*[1-9])";
+        // // System.out.println(getRegexData("血小板计数  30.3", regex1, 2));
+        // System.out.println(getRegexData("拟诊+(3.3/3.4)任一", regex1));
+        //
+        // String s1 = "ABC";
+        // System.out.println(getRegexRes(s1, "Abc", true));
 
-        System.out.println(getRegexDatas("拟诊+(3.3/3.4)任一","([1-9]\\d*\\.?\\d*)|(0\\.\\d*[1-9])"));
+        System.out.println(getRegexDataAll("拟诊+(3.3/3.4)任一", "([1-9]\\d*\\.?\\d*)|(0\\.\\d*[1-9])"));
 
         ArrayList<String> js = Lists.newArrayList("G.4", "G.1", "G.2", "G.3");
         List<String> collect = js.stream().sorted().collect(Collectors.toList());
         System.out.println(collect);
-
-
     }
 }