|
@@ -1,6 +1,7 @@
|
|
package com.lantone.qc.kernel.catalogue.preoperativediscussion;
|
|
package com.lantone.qc.kernel.catalogue.preoperativediscussion;
|
|
|
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
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.InputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
@@ -29,20 +30,34 @@ public class PRE0328 extends QCCatalogue {
|
|
@Override
|
|
@Override
|
|
protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
|
|
protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
|
|
/**
|
|
/**
|
|
- * 如果手术记录次数(第一次手术的日期内有其他手术不算次数) 大于 术前讨论、术前小结次数,则出错
|
|
|
|
|
|
+ * 1:如果急诊手术【入院时间-手术开始时间小于30分钟】则可不用写术前小结。
|
|
|
|
+ * 2:如果入院时间-手术开始时间小于30分钟,则术前讨论、术前小结次数+1。
|
|
|
|
+ * 3:如果手术记录次数(第一次手术的日期内有其他手术不算次数) 大于 术前讨论、术前小结次数,则出错
|
|
*/
|
|
*/
|
|
status.set("0");
|
|
status.set("0");
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
if (operationDocs == null || operationDocs.size() == 0) {
|
|
if (operationDocs == null || operationDocs.size() == 0) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-// if (inputInfo.getBeHospitalizedDoc() != null
|
|
|
|
-// && inputInfo.getBeHospitalizedDoc().getStructureMap().get("现病史") != null
|
|
|
|
-// && inputInfo.getBeHospitalizedDoc().getStructureMap().get("现病史").matches(".*急诊.*术.*|.*急症.*术.*")) {
|
|
|
|
-// return;
|
|
|
|
-// }
|
|
|
|
-// boolean emergencyOperation = findEmergencyOperation(inputInfo);
|
|
|
|
-// boolean emergencyOperationFromWardRecord = findEmergencyOperationFromWardRecord(inputInfo);
|
|
|
|
|
|
+ boolean emergencyOperation = false;
|
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() != null) {
|
|
|
|
+ Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
|
+ String admisTime = beHospitalStructureMap.get("入院日期");
|
|
|
|
+ //取手术记录第一次手术开始时间和入院时间比较,相差30分钟内不报缺陷
|
|
|
|
+ OperationRecordDoc operationRecordDoc = operationDocs.get(0).getOperationRecordDoc();
|
|
|
|
+ String startTime = "";
|
|
|
|
+ if (operationRecordDoc != null) {
|
|
|
|
+ startTime = operationRecordDoc.getStructureMap().get("手术开始时间");
|
|
|
|
+ }
|
|
|
|
+ if (StringUtil.isNotBlank(startTime) && StringUtil.isNotBlank(admisTime)) {
|
|
|
|
+ if (!CatalogueUtil.compareTime(
|
|
|
|
+ StringUtil.parseDateTime(admisTime),
|
|
|
|
+ StringUtil.parseDateTime(startTime),
|
|
|
|
+ Long.valueOf(30))) {//入院到手术未超过30分钟,则可不用写术前小结
|
|
|
|
+ emergencyOperation = true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
int i = getOperationSum(operationDocs); // 获取手术记录次数
|
|
int i = getOperationSum(operationDocs); // 获取手术记录次数
|
|
int j = 0; // 获取术前讨论、术前小结次数
|
|
int j = 0; // 获取术前讨论、术前小结次数
|
|
@@ -51,50 +66,18 @@ public class PRE0328 extends QCCatalogue {
|
|
j++;
|
|
j++;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-// /* 如果首次病程录的诊疗计划里有急诊手术 或 查房记录的病情记录里有急诊手术,则术前小结的数量加1 */
|
|
|
|
-// if (emergencyOperation || emergencyOperationFromWardRecord) {
|
|
|
|
-// if (j == 0) {
|
|
|
|
-// j++;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
|
|
+ /* 如果入院时间-手术开始时间小于30分钟,则术前讨论、术前小结次数+1*/
|
|
|
|
+ if (emergencyOperation) {
|
|
|
|
+ if (j == 0) {
|
|
|
|
+ j++;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (i > 0 && i > j) {
|
|
if (i > 0 && i > j) {
|
|
status.set("-1");
|
|
status.set("-1");
|
|
info.set("手术记录不一致");
|
|
info.set("手术记录不一致");
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-// private boolean findEmergencyOperation(InputInfo inputInfo) {
|
|
|
|
-// FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
|
|
-// if (firstCourseRecordDoc != null) {
|
|
|
|
-// String treatPlan = firstCourseRecordDoc.getStructureMap().get("诊疗计划");
|
|
|
|
-// // 根据医学部要求,加入“急症”和“术”
|
|
|
|
-// if (StringUtil.isNotBlank(treatPlan)) {
|
|
|
|
-// String regex = ".*急诊.*术.*|.*急症.*术.*";
|
|
|
|
-// return treatPlan.matches(regex);
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// return false;
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// private boolean findEmergencyOperationFromWardRecord(InputInfo inputInfo) {
|
|
|
|
-// List<ThreeLevelWardDoc> threeLevelWardDocs = inputInfo.getThreeLevelWardDocs();
|
|
|
|
-// if (threeLevelWardDocs.size() == 0) {
|
|
|
|
-// return false;
|
|
|
|
-// }
|
|
|
|
-// List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDocs.get(0).getAllDoctorWradDocs();
|
|
|
|
-// for (ThreeLevelWardDoc threeLevelWardDoc : allDoctorWradDocs) {
|
|
|
|
-// String content = threeLevelWardDoc.getStructureMap().get("病情记录");
|
|
|
|
-// // 根据医学部要求,加入“急症”和“术”
|
|
|
|
-// if (StringUtil.isNotBlank(content)) {
|
|
|
|
-// String regex = ".*急诊.*术.*|.*急症.*术.*";
|
|
|
|
-// if (content.matches(regex)) {
|
|
|
|
-// return true;
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// }
|
|
|
|
-// return false;
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 获取手术记录次数
|
|
* 获取手术记录次数
|
|
*
|
|
*
|