|
@@ -0,0 +1,49 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.deathcasediscuss;
|
|
|
+
|
|
|
+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.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : DEAC0109
|
|
|
+ * @Description : 死亡病例讨论记录未在患者死亡1周内完成
|
|
|
+ * @Author : 胡敬
|
|
|
+ * @Date: 2020-03-19 10:45
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class DEAC0109 extends QCCatalogue {
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ status.set("0");
|
|
|
+ if (inputInfo.getDeathCaseDiscussDoc() != null && inputInfo.getDeathCaseDiscussDoc().getStructureMap() != null) {
|
|
|
+ Map<String, String> deathCaseDiscussStructureMap = inputInfo.getDeathCaseDiscussDoc().getStructureMap();
|
|
|
+ String deceaseTime = deathCaseDiscussStructureMap.get("死亡时间");
|
|
|
+ String key = getKeyByHospitalId();
|
|
|
+ String recordTime = deathCaseDiscussStructureMap.get(key);
|
|
|
+ if (CatalogueUtil.isEmpty(deceaseTime) || CatalogueUtil.isEmpty(recordTime)) {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ Date deceaseDate = StringUtil.parseDateTime(deceaseTime);
|
|
|
+ Date recordDate = StringUtil.parseDateTime(recordTime);
|
|
|
+ if (deceaseDate.before(recordDate) && CatalogueUtil.compareTime(deceaseDate, recordDate, Long.valueOf(7 * 24 * 60))) {
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ private String getKeyByHospitalId() {
|
|
|
+ switch (Content.hospital_Id)
|
|
|
+ {
|
|
|
+ case "7": //厦门
|
|
|
+ case "35":
|
|
|
+ return "病历日期";
|
|
|
+ default:
|
|
|
+ return "记录时间";
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|