|
@@ -16,6 +16,7 @@ import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationRecordDoc;
|
|
|
import com.lantone.qc.pub.model.entity.Drug;
|
|
|
import com.lantone.qc.pub.model.label.ThreeLevelWardLabel;
|
|
|
+import com.lantone.qc.pub.util.DateUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Component;
|
|
@@ -80,7 +81,11 @@ public class THR02985 extends QCCatalogue {
|
|
|
if (Arrays.asList(KSS).contains(name)) {
|
|
|
continue;
|
|
|
}
|
|
|
- doctorAdviceDrugMap.put(StringUtil.parseDateTime(startDateStr), name);
|
|
|
+ Date startDate = StringUtil.parseDateTime(startDateStr);
|
|
|
+ if (startDate != null) {
|
|
|
+ startDate = DateUtil.dateZeroClear(startDate);
|
|
|
+ doctorAdviceDrugMap.put(startDate, name);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -166,6 +171,7 @@ public class THR02985 extends QCCatalogue {
|
|
|
continue;
|
|
|
}
|
|
|
boolean modelFind = false;
|
|
|
+ int wardNum = 0;
|
|
|
for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
|
|
|
/*****************纯文本匹配******************/
|
|
|
Map<String, String> wardDocStructureMap = threeLevelWardDoc.getStructureMap();
|
|
@@ -190,10 +196,18 @@ public class THR02985 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ if (StringUtil.isNotBlank(missDrug) && !modelFind) {//missDrug不为空,只有两种可能:1.确实是缺失的药 2.字符串为“时间不匹配”
|
|
|
+ wardNum++; //当前所有查房记录都没找到药,该医嘱时间再与系统当前时间对比,若超过48小时则提示该药缺失
|
|
|
+ }
|
|
|
if (StringUtil.isBlank(missDrug) || modelFind) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
+ //如果目前所有查房记录都没有
|
|
|
+ if (wardNum == allDoctorWradDocs.size() && CatalogueUtil.compareTime(doctorAdviceDate, new Date(), 48 * 60L)) {
|
|
|
+ infoStr = CatalogueUtil.concatInfo(infoStr, splitDrugs.toString().replaceAll("[\\[\\]]", ""));
|
|
|
+ continue;
|
|
|
+ }
|
|
|
|
|
|
if (StringUtil.isNotBlank(missDrug) && !"时间不匹配".equals(missDrug) && !modelFind) {
|
|
|
infoStr = CatalogueUtil.concatInfo(infoStr, missDrug);
|
|
@@ -221,14 +235,17 @@ public class THR02985 extends QCCatalogue {
|
|
|
if ("时间不匹配".equals(missDrug)) {
|
|
|
missDrug = "";//初始化缺失药物
|
|
|
}
|
|
|
- if (doctorAdviceDate.before(wardDate) && !CatalogueUtil.compareTime(doctorAdviceDate, wardDate, days * 24 * 60L)) {
|
|
|
+ //开医嘱时间起,昨天今天明天记录内查找药
|
|
|
+ if ((doctorAdviceDate.before(wardDate) && !CatalogueUtil.compareTime(doctorAdviceDate, wardDate, days * 24 * 60L))
|
|
|
+ || (wardDate.before(doctorAdviceDate) && !CatalogueUtil.compareTime(wardDate, doctorAdviceDate, 24 * 60L))) {
|
|
|
boolean findDrug = false;
|
|
|
for (String drug : drugs) {
|
|
|
if (StringUtil.isBlank(drug)) {
|
|
|
continue;
|
|
|
}
|
|
|
if (content.contains(drug.replaceAll("[^\\u4e00-\\u9fa5]", ""))
|
|
|
- || regexFind(content, "继续", "治疗") || regexFind(content, "维持", "治疗")) {
|
|
|
+ || regexFind(content, "继续", "治疗") || regexFind(content, "维持", "治疗")
|
|
|
+ || regexFind(content, "继续", "抗感染") || regexFind(content, "治疗", "同前")) {
|
|
|
findDrug = true;
|
|
|
break;
|
|
|
} else {
|