|
@@ -16,10 +16,9 @@ import com.lantone.qc.pub.util.ListUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
-import java.util.Comparator;
|
|
|
|
-import java.util.Date;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Objects;
|
|
|
|
|
|
+import java.io.InputStream;
|
|
|
|
+import java.io.InputStreamReader;
|
|
|
|
+import java.util.*;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -61,12 +60,25 @@ public class THR03235 extends QCCatalogue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
|
|
- List<String> chineseMedicineyinpian = Content.CHINESEMEDICINEYINPIAN;
|
|
|
|
|
|
+ List<String> chinesemedicineyinpian = Lists.newArrayList();
|
|
|
|
+ Properties properties = new Properties();
|
|
|
|
+ InputStream in = Thread.currentThread().getContextClassLoader()
|
|
|
|
+ .getResourceAsStream("medicine.properties");
|
|
|
|
+ try {
|
|
|
|
+ properties.load(new InputStreamReader(in, "UTF-8"));
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ String medicineStr = properties.getProperty("chinesemedicineyinpian");
|
|
|
|
+ if (StringUtil.isNotBlank(medicineStr)) {
|
|
|
|
+ chinesemedicineyinpian = Arrays.stream(medicineStr.split(",")).collect(Collectors.toList());
|
|
|
|
+ }
|
|
|
|
+
|
|
Boolean isRecord = false;
|
|
Boolean isRecord = false;
|
|
List<DoctorAdviceDoc> recordList = Lists.newLinkedList();
|
|
List<DoctorAdviceDoc> recordList = Lists.newLinkedList();
|
|
for (DoctorAdviceDoc item : doctorAdviceDocs) {
|
|
for (DoctorAdviceDoc item : doctorAdviceDocs) {
|
|
if (null != item.getStructureMap()) {
|
|
if (null != item.getStructureMap()) {
|
|
- if (RegexUtil.getRegexListRes(item.getStructureMap().get("医嘱项目名称"), chineseMedicineyinpian)) {
|
|
|
|
|
|
+ if (RegexUtil.getRegexListRes(item.getStructureMap().get("医嘱项目名称"), chinesemedicineyinpian)) {
|
|
if (!recordList.contains(item)) {
|
|
if (!recordList.contains(item)) {
|
|
recordList.add(item);
|
|
recordList.add(item);
|
|
}
|
|
}
|