|
@@ -1,11 +1,15 @@
|
|
|
package com.lantone.qc.kernel.catalogue.threelevelward;
|
|
|
|
|
|
+import com.lantone.qc.dbanaly.util.KernelConstants;
|
|
|
+import com.lantone.qc.dbanaly.util.SpecialStorageUtil;
|
|
|
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;
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
+import com.lantone.qc.pub.util.SpringContextUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
@@ -34,6 +38,33 @@ public class THR0601 extends QCCatalogue {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ /* 如果存在手术记录,判断主刀医生是否为主治医生 */
|
|
|
+ String operatorName = "";
|
|
|
+ List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
|
+ if (operationDocs != null) {
|
|
|
+ for (OperationDoc operationDoc : operationDocs) {
|
|
|
+ if (operationDoc.getOperationRecordDoc() != null) {
|
|
|
+ Map<String, String> operationDocStructureMap = operationDoc.getOperationRecordDoc().getStructureMap();
|
|
|
+ if (StringUtil.isBlank(operatorName)) {
|
|
|
+ operatorName = operationDocStructureMap.get("主刀医师");
|
|
|
+ if (StringUtil.isBlank(operatorName) && StringUtil.isNotBlank(operationDocStructureMap.get("手术者及助手名称"))) {
|
|
|
+ operatorName = operationDocStructureMap.get("手术者及助手名称").split("、")[0];
|
|
|
+ if (operatorName.contains("主刀:") && operatorName.split(":").length > 1) {
|
|
|
+ operatorName = operatorName.split(":")[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ //取病案首页主治医生名称
|
|
|
+// String visitingStaff = "";
|
|
|
+// if (inputInfo.getFirstPageRecordDoc() != null) {
|
|
|
+// Map<String, String> firstPageStructureExtMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+// visitingStaff = firstPageStructureExtMap.get("主治医师");
|
|
|
+// }
|
|
|
+
|
|
|
List<ThreeLevelWardDoc> allDoctorWradDocs = inputInfo.getThreeLevelWardDocs().get(0).getAllDoctorWradDocs();//查房记录
|
|
|
String title, record;
|
|
|
boolean findIndications = false;
|
|
@@ -45,15 +76,39 @@ public class THR0601 extends QCCatalogue {
|
|
|
findIndications = true;
|
|
|
break;
|
|
|
}
|
|
|
- if (StringUtil.isNotBlank(title) && StringUtil.isNotBlank(record)
|
|
|
- && title.contains("共同照护讨论记录") && record.contains(Content.attend)) {
|
|
|
+ if (StringUtil.isNotBlank(record) && record.contains(Content.attend)) {
|
|
|
findIndications = true;
|
|
|
break;
|
|
|
}
|
|
|
|
|
|
+ if (StringUtil.isNotBlank(operatorName) && (title.contains("主刀") || record.contains("主刀"))) {
|
|
|
+ String operationProfessor = getCourseProfessor(operatorName);
|
|
|
+ if (operationProfessor.contains("主治")) {
|
|
|
+ findIndications = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
if (!findIndications) {
|
|
|
status.set("-1");
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ private String getCourseProfessor(String operatorName) {
|
|
|
+ String professor = "";
|
|
|
+ if (StringUtil.isBlank(operatorName)) {
|
|
|
+ return professor;
|
|
|
+ }
|
|
|
+ SpecialStorageUtil specialStorageUtil = SpringContextUtil.getBean("specialStorageUtil");
|
|
|
+ Map<String, Object> surgeon = specialStorageUtil.getJsonStringValue(KernelConstants.HOSPITAL_DOCTOR_MAP);
|
|
|
+ if (surgeon != null) {
|
|
|
+ Map<String, String> doctor = (Map) surgeon.get(operatorName);
|
|
|
+ if (doctor != null) {
|
|
|
+ professor = doctor.get("professor");
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ return professor;
|
|
|
+ }
|
|
|
}
|