|
@@ -2,6 +2,7 @@ package com.lantone.qc.kernel.catalogue.xiamen.threelevelward;
|
|
|
|
|
|
import com.lantone.qc.kernel.catalogue.QCCatalogue;
|
|
|
import com.lantone.qc.kernel.util.CatalogueUtil;
|
|
|
+import com.lantone.qc.pub.Content;
|
|
|
import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
@@ -35,6 +36,8 @@ public class THR02900 extends QCCatalogue {
|
|
|
if (inputInfo.getThreeLevelWardDocs() != null && inputInfo.getThreeLevelWardDocs().size() > 0) {
|
|
|
allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
//标题
|
|
|
String allTitle = "";
|
|
|
//病情记录
|
|
@@ -44,6 +47,17 @@ public class THR02900 extends QCCatalogue {
|
|
|
String firstAssistant = "";
|
|
|
//手术结束时间
|
|
|
String opeEndTime = "";
|
|
|
+ //主治医师
|
|
|
+ String attendingDoctor = "";
|
|
|
+ //住院医师
|
|
|
+ String hospitalizationDoctor = "";
|
|
|
+ int num = 0;
|
|
|
+ //病案首页
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() != null) {
|
|
|
+ Map<String, String> firstPagestructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ attendingDoctor = firstPagestructureMap.get("主治医师");
|
|
|
+ hospitalizationDoctor = firstPagestructureMap.get("住院医师");
|
|
|
+ }
|
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
|
OperationRecordDoc operationRecordDoc = operationDoc.getOperationRecordDoc();
|
|
|
if (operationRecordDoc == null) {
|
|
@@ -58,20 +72,23 @@ public class THR02900 extends QCCatalogue {
|
|
|
} else {
|
|
|
firstAssistant = structureMap.get("一助");
|
|
|
//取得手术时间截取结束时间(格式 2020-07-24 10:30-2020-07-24 11:45)
|
|
|
- opeEndTime = structureMap.get("手术日期");
|
|
|
- if (StringUtil.isBlank(opeEndTime)) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- String endTime = structureMap.get("结束时间");
|
|
|
- if (StringUtil.isNotBlank(endTime)) {
|
|
|
- if (endTime.length() > 5) {
|
|
|
- opeEndTime = opeEndTime.substring(0, Math.min(5, opeEndTime.length())) + endTime;
|
|
|
- } else {
|
|
|
- opeEndTime = opeEndTime + " " + endTime;
|
|
|
- }
|
|
|
- }
|
|
|
+ String key = getKeyByHospitalId();
|
|
|
+ opeEndTime = structureMap.get(key);
|
|
|
+ opeEndTime = getTime(opeEndTime, structureMap);
|
|
|
}
|
|
|
String chiefSurgeon = structureMap.get("主刀医师");
|
|
|
+
|
|
|
+ //手术记录中的术者如果和病案首页中的主治医师/住院医师是同一个人,那么本次手术不需要判断术前查房和术后24查房两个条目
|
|
|
+ if (num == 0 && StringUtil.isNotBlank(attendingDoctor) && StringUtil.isNotBlank(chiefSurgeon) && chiefSurgeon.contains(attendingDoctor)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (num == 0 && StringUtil.isNotBlank(hospitalizationDoctor) && StringUtil.isNotBlank(chiefSurgeon) && chiefSurgeon.contains(hospitalizationDoctor)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ num++;
|
|
|
+ if (opeEndTime.contains("年月日")) {
|
|
|
+ continue;
|
|
|
+ }
|
|
|
Date opeEndDate = CatalogueUtil.parseStringDate(opeEndTime);
|
|
|
if (opeEndDate == null) {
|
|
|
continue;
|
|
@@ -108,12 +125,11 @@ public class THR02900 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
//查房标题中有主刀
|
|
|
- if (allTitle.contains("主刀") || allTitle.contains("术后第一天") ||
|
|
|
- (StringUtil.isNotBlank(chiefSurgeon) && allTitle.contains(chiefSurgeon))) {
|
|
|
+ if (allTitle.contains("主刀") || allTitle.contains("术后第一天") || allTitle.contains("术后第1天")) {
|
|
|
return;
|
|
|
}
|
|
|
//病情记录对比
|
|
|
- if ((StringUtil.isNotBlank(chiefSurgeon) && allPathography.contains(chiefSurgeon)) ||
|
|
|
+ if ((StringUtil.isNotBlank(chiefSurgeon) && allPathography.contains(chiefSurgeon)) || allPathography.contains("术后第一天") || allPathography.contains("术后第1天") ||
|
|
|
(StringUtil.isNotBlank(firstAssistant) && allPathography.contains(firstAssistant))) {
|
|
|
return;
|
|
|
}
|
|
@@ -131,4 +147,34 @@ public class THR02900 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private String getTime(String opeEndTime, Map<String, String> structureMap) {
|
|
|
+ String time = "";
|
|
|
+ switch (Content.hospital_Id) {
|
|
|
+ case "7": //厦门
|
|
|
+ if (StringUtil.isBlank(opeEndTime)) {
|
|
|
+ }
|
|
|
+ String endTime = structureMap.get("结束时间");
|
|
|
+ if (StringUtil.isNotBlank(endTime)) {
|
|
|
+ if (endTime.length() > 5) {
|
|
|
+ time = opeEndTime.substring(0, Math.min(5, opeEndTime.length())) + endTime;
|
|
|
+ } else {
|
|
|
+ time = opeEndTime + " " + endTime;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return time;
|
|
|
+ default:
|
|
|
+ time = opeEndTime.substring(17);
|
|
|
+ return time;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private String getKeyByHospitalId() {
|
|
|
+ switch (Content.hospital_Id) {
|
|
|
+ case "7": //厦门
|
|
|
+ return "病历日期";
|
|
|
+ default:
|
|
|
+ return "记录时间";
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|