|
@@ -7,6 +7,7 @@ import com.lantone.qc.pub.model.OutputInfo;
|
|
|
import com.lantone.qc.pub.model.doc.FirstCourseRecordDoc;
|
|
|
import com.lantone.qc.pub.model.doc.MedicalRecordInfoDoc;
|
|
|
import com.lantone.qc.pub.model.doc.ThreeLevelWardDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.consultation.ConsultationDoc;
|
|
|
import com.lantone.qc.pub.model.doc.operation.OperationDoc;
|
|
|
import com.lantone.qc.pub.util.ListUtil;
|
|
|
import com.lantone.qc.pub.util.StringUtil;
|
|
@@ -25,7 +26,6 @@ import java.util.Map;
|
|
|
*/
|
|
|
@Component
|
|
|
public class OPE0369 extends QCCatalogue {
|
|
|
-
|
|
|
@Override
|
|
|
protected void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
|
|
|
status.set("0");
|
|
@@ -38,6 +38,28 @@ public class OPE0369 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ //主治医师
|
|
|
+ String attendingDoctor = "";
|
|
|
+ //住院医师
|
|
|
+ String hospitalizationDoctor = "";
|
|
|
+ //申请医生
|
|
|
+ String consultationDateStr = "";
|
|
|
+ //记录医生
|
|
|
+ String consultationDoctorSign = "";
|
|
|
+ //病案首页
|
|
|
+ if (inputInfo.getFirstPageRecordDoc() != null) {
|
|
|
+ Map<String, String> firstPagestructureMap = inputInfo.getFirstPageRecordDoc().getStructureMap();
|
|
|
+ attendingDoctor = firstPagestructureMap.get("主治医师");
|
|
|
+ hospitalizationDoctor = firstPagestructureMap.get("住院医师");
|
|
|
+ }
|
|
|
+ //会诊记录
|
|
|
+ if (inputInfo.getConsultationDocs() != null && inputInfo.getConsultationDocs().size() > 0) {
|
|
|
+ ConsultationDoc consultationDoc = inputInfo.getConsultationDocs().get(0);
|
|
|
+ Map<String, String> ConsultationStructureMap = consultationDoc.getConsultationRecordDoc().getStructureMap();
|
|
|
+ consultationDateStr = ConsultationStructureMap.get("申请医生");
|
|
|
+ consultationDoctorSign = ConsultationStructureMap.get("记录医生");
|
|
|
+ }
|
|
|
//先判断是否有手术记录
|
|
|
List<OperationDoc> operationDocs = inputInfo.getOperationDocs();
|
|
|
if (operationDocs == null || operationDocs.size() == 0) {
|
|
@@ -55,6 +77,7 @@ public class OPE0369 extends QCCatalogue {
|
|
|
}
|
|
|
String operationStartDate = "";
|
|
|
String operatorPhysician = "";
|
|
|
+ int num = 0;
|
|
|
List<Date> operDateList = new ArrayList<>();
|
|
|
for (OperationDoc operationDoc : operationDocs) {
|
|
|
if (operationDoc.getOperationRecordDoc() != null) {
|
|
@@ -80,8 +103,25 @@ public class OPE0369 extends QCCatalogue {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
+ //手术记录中的术者如果和病案首页中的主治医师/住院医师是同一个人,那么本次手术不需要判断术前查房和术后24查房两个条目
|
|
|
+ if (num == 0 && StringUtil.isNotBlank(attendingDoctor) && StringUtil.isNotBlank(operatorPhysician) && operatorPhysician.contains(attendingDoctor)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (num == 0 && StringUtil.isNotBlank(hospitalizationDoctor) && StringUtil.isNotBlank(operatorPhysician) && operatorPhysician.contains(hospitalizationDoctor)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ //手术记录中的术者如果和会诊记录中的医生是同一个人,那么本次手术不需要判断术前查房
|
|
|
+ if (num == 0 && StringUtil.isNotBlank(consultationDateStr) && StringUtil.isNotBlank(operatorPhysician) && operatorPhysician.contains(consultationDateStr)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (num == 0 && StringUtil.isNotBlank(consultationDoctorSign) && StringUtil.isNotBlank(operatorPhysician) && operatorPhysician.contains(consultationDoctorSign)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ num++;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if (operDateList.size() > 1) {
|
|
|
for (int i = 0; i < operDateList.size(); i++) {
|
|
|
if (i + 1 < operDateList.size()) {
|