|
@@ -29,22 +29,20 @@ public class PRE0328 extends QCCatalogue {
|
|
|
@Override
|
|
|
protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
|
|
|
/**
|
|
|
- * 1:入院记录【现病史】包含".*急诊.*术.*|.*急症.*术.*"不报错。
|
|
|
- * 2:如果术前讨论、术前小结次数条数为0 且 (首次病程录【诊疗计划】或查房记录【病情记录】包含急诊手术——".*急诊.*术.*|.*急症.*术.*"),则术前讨论、术前小结次数+1。
|
|
|
- * 3:如果手术记录次数(第一次手术的日期内有其他手术不算次数) 大于 术前讨论、术前小结次数,则出错
|
|
|
+ * 如果手术记录次数(第一次手术的日期内有其他手术不算次数) 大于 术前讨论、术前小结次数,则出错
|
|
|
*/
|
|
|
status.set("0");
|
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
|
if (operationDocs == null || operationDocs.size() == 0) {
|
|
|
return;
|
|
|
}
|
|
|
- if (inputInfo.getBeHospitalizedDoc() != null
|
|
|
- && inputInfo.getBeHospitalizedDoc().getStructureMap().get("现病史") != null
|
|
|
- && inputInfo.getBeHospitalizedDoc().getStructureMap().get("现病史").matches(".*急诊.*术.*|.*急症.*术.*")) {
|
|
|
- return;
|
|
|
- }
|
|
|
- boolean emergencyOperation = findEmergencyOperation(inputInfo);
|
|
|
- boolean emergencyOperationFromWardRecord = findEmergencyOperationFromWardRecord(inputInfo);
|
|
|
+// if (inputInfo.getBeHospitalizedDoc() != null
|
|
|
+// && inputInfo.getBeHospitalizedDoc().getStructureMap().get("现病史") != null
|
|
|
+// && inputInfo.getBeHospitalizedDoc().getStructureMap().get("现病史").matches(".*急诊.*术.*|.*急症.*术.*")) {
|
|
|
+// return;
|
|
|
+// }
|
|
|
+// boolean emergencyOperation = findEmergencyOperation(inputInfo);
|
|
|
+// boolean emergencyOperationFromWardRecord = findEmergencyOperationFromWardRecord(inputInfo);
|
|
|
|
|
|
int i = getOperationSum(operationDocs); // 获取手术记录次数
|
|
|
int j = 0; // 获取术前讨论、术前小结次数
|
|
@@ -53,52 +51,53 @@ public class PRE0328 extends QCCatalogue {
|
|
|
j++;
|
|
|
}
|
|
|
}
|
|
|
- /* 如果首次病程录的诊疗计划里有急诊手术 或 查房记录的病情记录里有急诊手术,则术前小结的数量加1 */
|
|
|
- if (emergencyOperation || emergencyOperationFromWardRecord) {
|
|
|
- if (j == 0) {
|
|
|
- j++;
|
|
|
- }
|
|
|
- }
|
|
|
+// /* 如果首次病程录的诊疗计划里有急诊手术 或 查房记录的病情记录里有急诊手术,则术前小结的数量加1 */
|
|
|
+// if (emergencyOperation || emergencyOperationFromWardRecord) {
|
|
|
+// if (j == 0) {
|
|
|
+// j++;
|
|
|
+// }
|
|
|
+// }
|
|
|
if (i > 0 && i > j) {
|
|
|
status.set("-1");
|
|
|
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;
|
|
|
- }
|
|
|
+// 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;
|
|
|
+// }
|
|
|
|
|
|
/**
|
|
|
* 获取手术记录次数
|
|
|
+ *
|
|
|
* @param operationDocs
|
|
|
* @return
|
|
|
*/
|