|
@@ -0,0 +1,64 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.hangzhoufubao.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.MedicalRecordInfoDoc;
|
|
|
+import com.lantone.qc.pub.util.DateUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : THR0123
|
|
|
+ * @Description : 入院记录未在患者入院24小时内完成
|
|
|
+ * @Author : 贺聪聪
|
|
|
+ * @Date: 2020-09-30 13:51
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class THR0123 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ String admisTime = "";
|
|
|
+ MedicalRecordInfoDoc medicalRecordInfoDoc = inputInfo.getMedicalRecordInfoDoc();
|
|
|
+ if (medicalRecordInfoDoc != null && medicalRecordInfoDoc.getStructureMap() != null) {
|
|
|
+ //入院日期
|
|
|
+ admisTime = medicalRecordInfoDoc.getStructureMap().get("behospitalDate");
|
|
|
+ if (StringUtil.isNotBlank(admisTime) && inputInfo.getBeHospitalizedDoc() == null) {
|
|
|
+ if (!CatalogueUtil.compareTime(
|
|
|
+ StringUtil.parseDateTime(admisTime),
|
|
|
+ StringUtil.parseDateTime(DateUtil.nowString()),
|
|
|
+ Long.valueOf(24 * 60))) {//如果入院还未过24小时规则不判断
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ status.set("-1");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (inputInfo.getBeHospitalizedDoc() != null && inputInfo.getBeHospitalizedDoc().getStructureMap() != null) {
|
|
|
+ Map<String, String> beHospitalStructureMap = inputInfo.getBeHospitalizedDoc().getStructureMap();
|
|
|
+ admisTime = beHospitalStructureMap.get(Content.admisDate);
|
|
|
+ String recordTime = beHospitalStructureMap.get("记录时间");
|
|
|
+ if (CatalogueUtil.isEmpty(admisTime) || CatalogueUtil.isEmpty(recordTime)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (!CatalogueUtil.compareTime(
|
|
|
+ StringUtil.parseDateTime(admisTime),
|
|
|
+ StringUtil.parseDateTime(DateUtil.nowString()),
|
|
|
+ Long.valueOf(24 * 60))) {//如果入院还未过24小时规则不判断
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (CatalogueUtil.compareTime(
|
|
|
+ StringUtil.parseDateTime(admisTime),
|
|
|
+ StringUtil.parseDateTime(recordTime),
|
|
|
+ Long.valueOf(24 * 60))) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+}
|