|
@@ -1,9 +1,11 @@
|
|
package com.lantone.qc.kernel.catalogue.beilun.operationdiscussion;
|
|
package com.lantone.qc.kernel.catalogue.beilun.operationdiscussion;
|
|
|
|
|
|
|
|
+import com.alibaba.druid.support.json.JSONUtils;
|
|
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.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.FirstPageRecordDoc;
|
|
import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
@@ -17,7 +19,7 @@ import java.text.ParseException;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @Description: 手术患者缺术前主刀医师查房记录
|
|
|
|
|
|
+ * @Description: 主刀医师术前查房未在术前24小时内完成
|
|
* @author: WANGSY
|
|
* @author: WANGSY
|
|
* @time: 2020/11/11 11:22
|
|
* @time: 2020/11/11 11:22
|
|
*/
|
|
*/
|
|
@@ -28,7 +30,9 @@ public class OPE0369 extends QCCatalogue {
|
|
protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
|
|
protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
|
|
status.set("0");
|
|
status.set("0");
|
|
if (outputInfo.getResult() != null) {
|
|
if (outputInfo.getResult() != null) {
|
|
|
|
+ //1.获取查房记录
|
|
Map<String, Object> thr03090 = outputInfo.getResult().get("THR03090");
|
|
Map<String, Object> thr03090 = outputInfo.getResult().get("THR03090");
|
|
|
|
+ //2.如果查房记录不为空且大于零且状态是-1(查房记录报错)
|
|
if (thr03090 != null && thr03090.size() > 0 && thr03090.get("status").equals("-1")) {
|
|
if (thr03090 != null && thr03090.size() > 0 && thr03090.get("status").equals("-1")) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
@@ -43,6 +47,9 @@ public class OPE0369 extends QCCatalogue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
|
|
|
|
+ System.out.println(JSONUtils.toJSONString(firstPageRecordDoc));
|
|
|
|
+ String behospitalWay = firstPageRecordDoc.getStructureMap().get("入院途径");
|
|
//先判断是否有手术记录
|
|
//先判断是否有手术记录
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
if (operationDocs == null || operationDocs.size() == 0) {
|
|
if (operationDocs == null || operationDocs.size() == 0) {
|
|
@@ -68,7 +75,7 @@ public class OPE0369 extends QCCatalogue {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
String operationStartDate = "";
|
|
String operationStartDate = "";
|
|
- List<Date> operDateList = new ArrayList<>();
|
|
|
|
|
|
+ List<Date> operDateList = new ArrayList<>(); //手术时间
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
if (operationDoc.getOperationRecordDoc() != null) {
|
|
if (operationDoc.getOperationRecordDoc() != null) {
|
|
Map<String, String> operationDocStructureMap = operationDoc.getOperationRecordDoc().getStructureMap();
|
|
Map<String, String> operationDocStructureMap = operationDoc.getOperationRecordDoc().getStructureMap();
|
|
@@ -83,6 +90,16 @@ public class OPE0369 extends QCCatalogue {
|
|
Long.valueOf(30))) {
|
|
Long.valueOf(30))) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ //急诊手术处理【入院途径:急诊,且第一次手术时间和入院时间相差1小时】
|
|
|
|
+ if(StringUtil.isNotBlank(behospitalWay)&&"急诊".equals(behospitalWay)
|
|
|
|
+ &&!CatalogueUtil.compareTime(
|
|
|
|
+ StringUtil.parseDateTime(admisTime),
|
|
|
|
+ StringUtil.parseDateTime(operationStartDate),
|
|
|
|
+ Long.valueOf(60)))
|
|
|
|
+ {
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
operDateList.add(StringUtil.parseDateTime(operationStartDate));
|
|
operDateList.add(StringUtil.parseDateTime(operationStartDate));
|
|
} else {//取不到手术时间
|
|
} else {//取不到手术时间
|
|
return;
|
|
return;
|
|
@@ -142,10 +159,12 @@ public class OPE0369 extends QCCatalogue {
|
|
List<Map<String, Date>> operationDateList = new ArrayList<>();
|
|
List<Map<String, Date>> operationDateList = new ArrayList<>();
|
|
Map<String, Date> operationDate = null;
|
|
Map<String, Date> operationDate = null;
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
|
|
+ //获取手术记录对象
|
|
OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
|
|
OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
|
|
if (operationRecordDoc == null) {
|
|
if (operationRecordDoc == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
+ //获取手术记录文档
|
|
Map<String, String> structureMap = operationRecordDoc.getStructureMap();
|
|
Map<String, String> structureMap = operationRecordDoc.getStructureMap();
|
|
String operationStartDateStr = structureMap.get("手术开始时间");
|
|
String operationStartDateStr = structureMap.get("手术开始时间");
|
|
if (StringUtil.isNotBlank(operationStartDateStr) && !operationStartDateStr.contains("年月日")) {
|
|
if (StringUtil.isNotBlank(operationStartDateStr) && !operationStartDateStr.contains("年月日")) {
|