|
@@ -5,6 +5,7 @@ import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
@@ -62,7 +63,7 @@ public class THR02985 extends QCCatalogue {
|
|
|
if (drug.contains("注射用")) {
|
|
|
drug = drug.substring(drug.indexOf("注射用") + 3);
|
|
|
}
|
|
|
- matchSum = getMatchSum(allDoctorWradDocs, doctorAdviceDate, drug, matchSum, 2);
|
|
|
+ matchSum = getMatchSum(inputInfo.getFirstCourseRecordDoc(), allDoctorWradDocs, doctorAdviceDate, drug, matchSum, 2);
|
|
|
if (matchSum > 0) {
|
|
|
isFind = true;
|
|
|
}
|
|
@@ -80,7 +81,17 @@ public class THR02985 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private int getMatchSum(List<ThreeLevelWardDoc> allDoctorWradDocs, Date doctorAdviceDate, String drug, int matchSum, int days) {
|
|
|
+ private int getMatchSum(FirstCourseRecordDoc firstCourseRecordDoc, List<ThreeLevelWardDoc> allDoctorWradDocs, Date doctorAdviceDate, String drug, int matchSum, int days) {
|
|
|
+ if (firstCourseRecordDoc != null) {
|
|
|
+ String wardDateStr = firstCourseRecordDoc.getStructureMap().get("记录时间");
|
|
|
+ String content = firstCourseRecordDoc.getStructureMap().get("治疗计划") + firstCourseRecordDoc.getStructureMap().get("诊疗计划");
|
|
|
+ Date wardDate = StringUtil.parseDateTime(wardDateStr);
|
|
|
+ if (doctorAdviceDate.before(wardDate) && !CatalogueUtil.compareTime(doctorAdviceDate, wardDate, days * 24 * 60L)) {
|
|
|
+ if (content.contains(drug)) {
|
|
|
+ matchSum++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
|
|
|
Map<String, String> wardDocStructureMap = threeLevelWardDoc.getStructureMap();
|
|
|
String wardDateStr = wardDocStructureMap.get("查房日期");
|