|
@@ -10,6 +10,7 @@ import com.lantone.qc.pub.model.InputInfo;
|
|
|
import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
|
|
|
import com.lantone.qc.pub.util.DateUtil;
|
|
|
import com.lantone.qc.pub.util.SpringContextUtil;
|
|
@@ -77,7 +78,8 @@ public class THR0126 extends QCCatalogue {
|
|
|
/* 首次病程录如果是主治或者主任写的,也算主治查房 */
|
|
|
FirstCourseRecordDoc firstCourseRecordDoc = inputInfo.getFirstCourseRecordDoc();
|
|
|
if (firstCourseRecordDoc != null) {
|
|
|
- String firstCourseProfessor = getFirstCourseProfessor(firstCourseRecordDoc);
|
|
|
+ String doctorSign = firstCourseRecordDoc.getStructureMap().get("医生签名");
|
|
|
+ String firstCourseProfessor = getFirstCourseProfessor(doctorSign);
|
|
|
if (firstCourseProfessor.contains("主治") || firstCourseProfessor.contains("主任")) {
|
|
|
String recordDateStr = firstCourseRecordDoc.getStructureMap().get("记录时间");
|
|
|
if (StringUtil.isNotBlank(recordDateStr)) {
|
|
@@ -98,12 +100,49 @@ public class THR0126 extends QCCatalogue {
|
|
|
} else if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), new Date(), 48 * 60L)) {
|
|
|
status.set("0");//没有主治医师查房,若入院时间和系统当前时间对比,相差48小时则报错
|
|
|
}
|
|
|
+
|
|
|
+ /* 如果存在手术记录,判断主刀医生是否为主治医生 */
|
|
|
+ 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();
|
|
|
+ operatorName = operationDocStructureMap.get("主刀医师");
|
|
|
+ if (StringUtil.isBlank(operatorName) && StringUtil.isNotBlank(operationDocStructureMap.get("手术者及助手名称"))) {
|
|
|
+ operatorName = operationDocStructureMap.get("手术者及助手名称").split("、")[0];
|
|
|
+ if(operatorName.contains("主刀:")){
|
|
|
+ operatorName = operatorName.split(":")[1];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ThreeLevelWardDoc> allDoctorWradDocs = threeLevelWardDoc.getAllDoctorWradDocs();
|
|
|
+ for (ThreeLevelWardDoc threeLevelWard : allDoctorWradDocs) {
|
|
|
+ Map<String, String> structureMap = threeLevelWard.getStructureMap();
|
|
|
+ String wardDateStr = structureMap.get("查房日期");
|
|
|
+ if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(wardDateStr), 48 * 60L)) {
|
|
|
+ String makeTitle = structureMap.get("查房标题");
|
|
|
+ if (makeTitle.contains("主治")) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ } else if (makeTitle.contains("主刀")) {
|
|
|
+ String operationProfessor = getFirstCourseProfessor(operatorName);
|
|
|
+ if (operationProfessor.contains("主治") || operationProfessor.contains("主任")) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private String getFirstCourseProfessor(FirstCourseRecordDoc firstCourseRecordDoc) {
|
|
|
+ private String getFirstCourseProfessor(String doctorSign) {
|
|
|
String professor = "";
|
|
|
- String doctorSign = firstCourseRecordDoc.getStructureMap().get("医生签名");
|
|
|
+// String doctorSign = firstCourseRecordDoc.getStructureMap().get("医生签名");
|
|
|
if (StringUtil.isBlank(doctorSign)) {
|
|
|
return professor;
|
|
|
}
|