|
@@ -0,0 +1,57 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.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;
|
|
|
+import com.lantone.qc.pub.model.doc.ward.AttendingDoctorWardDoc;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : THR03020
|
|
|
+ * @Description : 入院72小时内无Attending查房记录(要有Attending标示) 首次查房时间最早,如果不在72小时之内,那么所有查房肯定都不在
|
|
|
+ * @Author : 胡敬
|
|
|
+ * @Date: 2020-03-19 13:51
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class THR03020 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ if (inputInfo.getThreeLevelWardDocs().size() == 0) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (inputInfo.getLeaveHospitalDoc() != null && inputInfo.getLeaveHospitalDoc().getStructureMap() != null) {
|
|
|
+ Map<String, String> leaveHospitalStructureMap = inputInfo.getLeaveHospitalDoc().getStructureMap();
|
|
|
+ String admisTime = leaveHospitalStructureMap.get(Content.admisTime);
|
|
|
+ String dischargeTime = leaveHospitalStructureMap.get(Content.dischargeTime);
|
|
|
+ if (CatalogueUtil.isEmpty(admisTime) || CatalogueUtil.isEmpty(dischargeTime)) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ //如果住院天数小于3天则不判断该条规则
|
|
|
+ if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(dischargeTime), (long) (72 * 60))) {
|
|
|
+ status.set("0");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ ThreeLevelWardDoc threeLevelWardDoc = inputInfo.getThreeLevelWardDocs().get(0);
|
|
|
+ List<AttendingDoctorWardDoc> attendingDoctorWardDocs = threeLevelWardDoc.getAttendingDoctorWardDocs();
|
|
|
+ if (attendingDoctorWardDocs.size() > 0) {
|
|
|
+ AttendingDoctorWardDoc firstAttending = attendingDoctorWardDocs.get(0);
|
|
|
+ String wardDateStr = firstAttending.getStructureMap().get("查房日期");
|
|
|
+ if (!CatalogueUtil.compareTime(StringUtil.parseDateTime(admisTime), StringUtil.parseDateTime(wardDateStr), 72 * 60L)) {
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //没有出院小结,这条直接不报错
|
|
|
+ status.set("0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|