|
@@ -7,12 +7,11 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
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 : THR02985
|
|
* @ClassName : THR02985
|
|
@@ -48,13 +47,24 @@ public class THR02985 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();
|
|
|
|
- int matchSum = 0;
|
|
|
|
- matchSum = getMatchSum(allDoctorWradDocs, doctorAdviceDate, drug, matchSum, 2);
|
|
|
|
- if (matchSum == 0) {
|
|
|
|
- infoStr = CatalogueUtil.concatInfo(infoStr, drug);
|
|
|
|
|
|
+ Set<String> splitDrugs = CatalogueUtil.getRegexWords(doctorAdviceDrug.getValue(), "[((\\[][^\\[\\]()()]+[\\]))]");
|
|
|
|
+
|
|
|
|
+ boolean isFind = false;
|
|
|
|
+ for (String drug : splitDrugs) {
|
|
|
|
+ int matchSum = 0;
|
|
|
|
+ if (drug.equals("合资") || drug.equals("进口") || drug.equals("国产") ) {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ matchSum = getMatchSum(allDoctorWradDocs, doctorAdviceDate, drug, matchSum, 2);
|
|
|
|
+ if (matchSum > 0) {
|
|
|
|
+ isFind = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (!isFind) {
|
|
|
|
+ String.format(infoStr = CatalogueUtil.concatInfo(infoStr, doctorAdviceDrug.getValue() + "<医嘱时间>:" + sdf.format(doctorAdviceDate)));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -70,7 +80,7 @@ public class THR02985 extends QCCatalogue {
|
|
for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
|
|
for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
|
|
Map<String, String> wardDocStructureMap = threeLevelWardDoc.getStructureMap();
|
|
Map<String, String> wardDocStructureMap = threeLevelWardDoc.getStructureMap();
|
|
String wardDateStr = wardDocStructureMap.get("查房日期");
|
|
String wardDateStr = wardDocStructureMap.get("查房日期");
|
|
- String content = wardDocStructureMap.get("病情记录");
|
|
|
|
|
|
+ String content = wardDocStructureMap.get("病情记录") + wardDocStructureMap.get("治疗计划和措施");
|
|
Date wardDate = StringUtil.parseDateTime(wardDateStr);
|
|
Date wardDate = StringUtil.parseDateTime(wardDateStr);
|
|
if (doctorAdviceDate.before(wardDate) && !CatalogueUtil.compareTime(doctorAdviceDate, wardDate, days * 24 * 60L)) {
|
|
if (doctorAdviceDate.before(wardDate) && !CatalogueUtil.compareTime(doctorAdviceDate, wardDate, days * 24 * 60L)) {
|
|
if (content.contains(drug)) {
|
|
if (content.contains(drug)) {
|