|
@@ -4,6 +4,7 @@ import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
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.FirstCourseRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
@@ -57,9 +58,13 @@ public class OPE0369 extends QCCatalogue {
|
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
|
if (operationDoc.getOperationRecordDoc() != null) {
|
|
|
Map<String, String> operationDocStructureMap = operationDoc.getOperationRecordDoc().getStructureMap();
|
|
|
- operationStartDate = operationDocStructureMap.get("手术开始时间");
|
|
|
- if (operationStartDate.contains("年月日")) {
|
|
|
- continue;
|
|
|
+ String opeStartDate = operationDocStructureMap.get("手术日期");
|
|
|
+ String opeStartTime = operationDocStructureMap.get("开始时间");
|
|
|
+ if (StringUtil.isNotBlank(opeStartDate)) {
|
|
|
+ operationStartDate = opeStartDate;
|
|
|
+ if (StringUtil.isNotBlank(opeStartTime)) {
|
|
|
+ operationStartDate = opeStartDate + " " + opeStartTime;
|
|
|
+ }
|
|
|
}
|
|
|
if (StringUtil.isNotBlank(operationStartDate)) {
|
|
|
if (!CatalogueUtil.compareTime(
|
|
@@ -86,6 +91,12 @@ public class OPE0369 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //判断是否为急诊手术
|
|
|
+ if (findEmergencyOperation(inputInfo)) {
|
|
|
+ return;
|
|
|
+// operationCount--;
|
|
|
+ }
|
|
|
+
|
|
|
ThreeLevelWardDoc threeLevelWardDoc = threeLevelWardDocs.get(0);
|
|
|
List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|
|
|
for (ThreeLevelWardDoc threeLevelWard : allDoctorWradDocs) {
|
|
@@ -110,9 +121,22 @@ public class OPE0369 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if (operationCount > operateCount) {
|
|
|
+ if (operationCount > 0 && operationCount > operateCount) {
|
|
|
status.set("-1");
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private boolean findEmergencyOperation(InputInfo inputInfo) {
|
|
|
+ FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
|
+ if (firstCourseRecordDoc != null) {
|
|
|
+ String treatPlan = firstCourseRecordDoc.getStructureMap().get("诊疗计划");
|
|
|
+ treatPlan = treatPlan.replace("\r\n", "");
|
|
|
+ if (StringUtil.isNotBlank(treatPlan)) {
|
|
|
+ String regex = ".*急诊.*术.*";
|
|
|
+ return treatPlan.matches(regex);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
}
|