Browse Source

质控类型:24小时内入院死亡记录 增加的规则

chengyao 3 years ago
parent
commit
44dc54cd9c

+ 49 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathcasediscuss/DEAC0109.java

@@ -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 "记录时间";
+        }
+    }
+}

+ 28 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03204.java

@@ -0,0 +1,28 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.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 org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0347
+ * @Description : 24小时病历记录无死亡时间
+ * @Author : 胡敬
+ * @Date: 2020-03-18 18:38
+ */
+@Component
+public class DEAR03204 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            if (CatalogueUtil.isEmpty(deathRecordStructureMap.get("死亡日期"))) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 36 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03205.java

@@ -0,0 +1,36 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.deathrecord;
+
+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 : DEAR0371
+ * @Description : 24小时病历记录死亡时间未精确到分
+ * @Author : 胡敬
+ * @Date: 2020-03-18 18:38
+ */
+@Component
+public class DEAR03205 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            String deathTime = deathRecordStructureMap.get("死亡时间");
+            if (CatalogueUtil.isEmpty(deathTime)) {
+                return;
+            }
+            Date deathDate = StringUtil.parseDateTime(deathTime, CatalogueUtil.processDateFormat(Content.dateFormats));
+            if (null == deathDate) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 28 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03206.java

@@ -0,0 +1,28 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.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 org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0341
+ * @Description : 24小时病历记录无入院诊断
+ * @Author : 胡敬
+ * @Date: 2020-03-18 17:14
+ */
+@Component
+public class DEAR03206 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            if (CatalogueUtil.isEmpty(deathRecordStructureMap.get("入院诊断"))) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 37 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03207.java

@@ -0,0 +1,37 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.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.util.StringUtil;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0340
+ * @Description : 24小时病历记录无入院情况
+ * @Author : 胡敬
+ * @Date: 2020-03-18 17:14
+ */
+@Component
+public class DEAR03207 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            // 与任燕青确认,统一只需要判断入院情况,
+            // if(StringUtils.isBlank(deathRecordStructureMap.get("主诉"))){
+            //     status.set("-1");
+            //     return;
+            // }
+            if (CatalogueUtil.isEmpty(deathRecordStructureMap.get("入院情况"))
+                    && StringUtil.isEmpty(deathRecordStructureMap.get("实验室检查"))
+                    && StringUtil.isEmpty(deathRecordStructureMap.get("影像学检查"))
+                    && StringUtil.isEmpty(deathRecordStructureMap.get("病情摘要"))) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 42 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03208.java

@@ -0,0 +1,42 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.deathrecord;
+
+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 org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0342
+ * @Description : 24小时病历记录无诊疗经过
+ * @Author : 胡敬
+ * @Date: 2020-03-18 17:14
+ */
+@Component
+public class DEAR03208 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            String key = getKeyByHospitalId();
+            if (CatalogueUtil.isEmpty(deathRecordStructureMap.get(key))) {
+                status.set("-1");
+            }
+        }
+    }
+    private String getKeyByHospitalId() {
+        switch (Content.hospital_Id)
+        {
+            case "1":               //长兴
+            case "2":
+            case "5":
+            case "35":
+                return "诊疗经过";
+            default:
+                return "诊疗经过(重点记录病情演变、抢救经过)";
+        }
+    }
+}

+ 28 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03209.java

@@ -0,0 +1,28 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.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 org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0345
+ * @Description : 24小时病历记录无死亡原因
+ * @Author : 胡敬
+ * @Date: 2020-03-18 18:37
+ */
+@Component
+public class DEAR03209 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            if (CatalogueUtil.isEmpty(deathRecordStructureMap.get("死亡原因"))) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 28 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03210.java

@@ -0,0 +1,28 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.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 org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : DEAR0346
+ * @Description : 24小时病历记录无死亡诊断
+ * @Author : 胡敬
+ * @Date: 2020-03-18 18:38
+ */
+@Component
+public class DEAR03210 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            if (CatalogueUtil.isEmpty(deathRecordStructureMap.get("死亡诊断"))) {
+                status.set("-1");
+            }
+        }
+    }
+}

+ 48 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/deathrecord/DEAR03211.java

@@ -0,0 +1,48 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.deathrecord;
+
+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 : DEAC0098
+ * @Description : 24小时病历记录未在患者死亡后24小时内完成
+ * @Author : 胡敬
+ * @Date: 2020-03-19 11:08
+ */
+@Component
+public class DEAR03211 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        status.set("0");
+        if (inputInfo.getDeathRecordDoc() != null && inputInfo.getDeathRecordDoc().getStructureMap() != null) {
+            Map<String, String> deathRecordStructureMap = inputInfo.getDeathRecordDoc().getStructureMap();
+            String deceaseTime = deathRecordStructureMap.get("死亡时间");
+            String key = getKeyByHospitalId();
+            String recordTime = deathRecordStructureMap.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(24 * 60))) {
+                status.set("-1");
+            }
+        }
+    }
+    private String getKeyByHospitalId() {
+        switch (Content.hospital_Id)
+        {
+            case "7":               //厦门
+                return "病历日期";
+            default:
+                return "记录时间";
+        }
+    }
+}

+ 30 - 0
kernel/src/main/java/com/lantone/qc/kernel/catalogue/hospital/changshaxy/medicalwriting/MEDI02890.java

@@ -0,0 +1,30 @@
+package com.lantone.qc.kernel.catalogue.hospital.changshaxy.medicalwriting;
+
+import com.lantone.qc.kernel.catalogue.QCCatalogue;
+import com.lantone.qc.pub.model.InputInfo;
+import com.lantone.qc.pub.model.OutputInfo;
+import com.lantone.qc.pub.model.doc.NoticeOfConversationDoc;
+import org.springframework.stereotype.Component;
+
+import java.util.Map;
+
+/**
+ * @ClassName : NOT0718
+ * @Description : 缺入院病情告知书
+ * @Author : 胡敬
+ * @Date: 2020-04-21 18:40
+ */
+@Component
+public class MEDI02890 extends QCCatalogue {
+    public void start(InputInfo inputInfo, OutputInfo outputInfo) {
+        NoticeOfConversationDoc noticeOfConversationDoc = inputInfo.getNoticeOfConversationDoc();
+        if (noticeOfConversationDoc == null){
+            status.set("0");
+            return;
+        }
+        Map<String, String> structureMap = noticeOfConversationDoc.getStructureMap();
+        if (structureMap.containsKey("入院病情告知书")){
+            status.set("0");
+        }
+    }
+}