浏览代码

台州死亡病例讨论制度/死亡记录病历质控

kongwz 5 年之前
父节点
当前提交
3731d31f97

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/deathrecord/DEAR0556.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.kernel.catalogue.deathrecord;
+package com.lantone.qc.kernel.catalogue.deathcasediscuss;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
 import com.lantone.qc.kernel.util.CatalogueUtil;

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/deathrecord/DEAR0557.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.kernel.catalogue.deathrecord;
+package com.lantone.qc.kernel.catalogue.deathcasediscuss;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
 import com.lantone.qc.kernel.util.CatalogueUtil;

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/catalogue/deathrecord/DEAR0558.java

@@ -1,4 +1,4 @@
-package com.lantone.qc.kernel.catalogue.deathrecord;
+package com.lantone.qc.kernel.catalogue.deathcasediscuss;
 
 import com.lantone.qc.kernel.catalogue.QCCatalogue;
 import com.lantone.qc.kernel.util.CatalogueUtil;

+ 46 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/deathrecord/DEAR0561.java

@@ -0,0 +1,46 @@
+package com.lantone.qc.kernel.catalogue.deathrecord;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.kernel.util.CatalogueUtil;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.FirstPageRecordDoc;
+import org.springframework.stereotype.Component;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0561
+ * @Description : 死亡记录未在患者离院后24小时内完成
+ * @Author : 胡敬
+ * @Date: 2020-03-18 18:38
+ */
+@Component
+public class DEAR0561 extends QCCatalogue {
+    public static String FORMAT_LONC_CN_MI = "yyyy/MM/dd HH:mm";
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) throws ParseException {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            if (!CatalogueUtil.isEmpty(deathRecordStructureMap.get("死亡时间"))) {
+                String deathDate = deathRecordStructureMap.get("死亡时间");
+                FirstPageRecordDoc firstPageRecordDoc = inputInfo.getFirstPageRecordDoc();
+                if(firstPageRecordDoc != null && firstPageRecordDoc.getStructureMap() != null){
+                    Map<String, String> firstPageMap = firstPageRecordDoc.getStructureMap();
+                    String outDate = firstPageMap.get("出院时间");
+                    if(outDate != null && deathDate != null){
+                        Date date_in = new SimpleDateFormat(FORMAT_LONC_CN_MI).parse(deathDate);
+                        Date date_out = new SimpleDateFormat(FORMAT_LONC_CN_MI).parse(outDate);
+                        int hours = (int) ((date_out.getTime() - date_in.getTime()) / (1000*3600));
+                        if(hours >24){
+                            status.set("-1");
+                        }
+                    }
+                }
+            }
+        }
+    }
+}