|
@@ -9,10 +9,8 @@ import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
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.Date;
|
|
|
|
-import java.util.HashMap;
|
|
|
|
-import java.util.List;
|
|
|
|
-import java.util.Map;
|
|
|
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
|
+import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
* @ClassName : THR02986
|
|
* @ClassName : THR02986
|
|
@@ -30,7 +28,7 @@ public class THR02986 extends QCCatalogue {
|
|
status.set("0");
|
|
status.set("0");
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
- Map<Date, String> doctorAdviceDrugMap = new HashMap<>();
|
|
|
|
|
|
+ Map<Date, String> doctorAdviceDrugMap = new LinkedHashMap<>();
|
|
for (DoctorAdviceDoc adviceDoc : doctorAdviceDocs) {
|
|
for (DoctorAdviceDoc adviceDoc : doctorAdviceDocs) {
|
|
Map<String, String> adviceDocStructureMap = adviceDoc.getStructureMap();
|
|
Map<String, String> adviceDocStructureMap = adviceDoc.getStructureMap();
|
|
String name = adviceDocStructureMap.get("医嘱项目名称");
|
|
String name = adviceDocStructureMap.get("医嘱项目名称");
|
|
@@ -48,16 +46,28 @@ public class THR02986 extends QCCatalogue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
String infoStr = "";
|
|
String infoStr = "";
|
|
|
|
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
for (Map.Entry<Date, String> doctorAdviceDrug : doctorAdviceDrugMap.entrySet()) {
|
|
for (Map.Entry<Date, String> doctorAdviceDrug : doctorAdviceDrugMap.entrySet()) {
|
|
Date doctorAdviceDate = doctorAdviceDrug.getKey();
|
|
Date doctorAdviceDate = doctorAdviceDrug.getKey();
|
|
- String drug = doctorAdviceDrug.getValue();
|
|
|
|
- if (drug.contains("注射用")) {
|
|
|
|
- drug = drug.substring(drug.indexOf("注射用") + 3);
|
|
|
|
|
|
+ Set<String> splitDrugs = new LinkedHashSet<>();
|
|
|
|
+ splitDrugs = CatalogueUtil.getRegexWords(doctorAdviceDrug.getValue(), "[((\\[][^\\[\\]()()]+[\\]))]");
|
|
|
|
+
|
|
|
|
+ boolean isFind = false;
|
|
|
|
+ for (String drug : splitDrugs) {
|
|
|
|
+ int matchSum = 0;
|
|
|
|
+ if (drug.equals("合资") || drug.equals("进口") || drug.equals("国产") ) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ if (drug.contains("注射用")) {
|
|
|
|
+ drug = drug.substring(drug.indexOf("注射用") + 3);
|
|
|
|
+ }
|
|
|
|
+ matchSum = getMatchSum(allDoctorWradDocs, doctorAdviceDate, drug, matchSum, 2);
|
|
|
|
+ if (matchSum > 0) {
|
|
|
|
+ isFind = true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- int matchSum = 0;
|
|
|
|
- matchSum = getMatchSum(allDoctorWradDocs, doctorAdviceDate, drug, matchSum, 2);
|
|
|
|
- if (matchSum == 0) {
|
|
|
|
- infoStr = CatalogueUtil.concatInfo(infoStr, drug);
|
|
|
|
|
|
+ if (!isFind) {
|
|
|
|
+ String.format(infoStr = CatalogueUtil.concatInfo(infoStr, doctorAdviceDrug.getValue() + "<医嘱时间>:" + sdf.format(doctorAdviceDate)));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (StringUtil.isNotBlank(infoStr)) {
|
|
if (StringUtil.isNotBlank(infoStr)) {
|