|
@@ -0,0 +1,63 @@
|
|
|
+package com.lantone.qc.kernel.catalogue.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.CriticallyIllNoticeDoc;
|
|
|
+import com.lantone.qc.pub.model.doc.DoctorAdviceDoc;
|
|
|
+import com.lantone.qc.pub.util.ListUtil;
|
|
|
+import com.lantone.qc.pub.util.StringUtil;
|
|
|
+import org.springframework.stereotype.Component;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @ClassName : MEDI02995
|
|
|
+ * @Description : 病危患者无病危通知单
|
|
|
+ * @Author : zhoutg
|
|
|
+ * @Date: 2020-04-21 18:40
|
|
|
+ */
|
|
|
+@Component
|
|
|
+public class MEDI02995 extends QCCatalogue {
|
|
|
+
|
|
|
+ public void start(InputInfo inputInfo, OutputInfo outputInfo) {
|
|
|
+ /**
|
|
|
+ * 1、医嘱中包含“病危”2个字THR0595
|
|
|
+ * 2、病危通知单(包含病危+病重)列表中包含“病危”2个字
|
|
|
+ *
|
|
|
+ * 病危通知单数据示例:
|
|
|
+ * 邵逸夫数据示例:病危通知 、病重通知
|
|
|
+ * 长兴和台州病危和病重是混合的:示例:病危(重)告知书,0433 病危(重)通知
|
|
|
+ */
|
|
|
+ status.set("0");
|
|
|
+ if (ListUtil.isEmpty(inputInfo.getDoctorAdviceDocs())) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ Boolean flag = false;
|
|
|
+ for (DoctorAdviceDoc bean : inputInfo.getDoctorAdviceDocs()) {
|
|
|
+ Map<String, String> structureMap = bean.getStructureMap();
|
|
|
+ if (StringUtil.isNotBlank(structureMap.get("医嘱项目名称"))
|
|
|
+ && structureMap.get("医嘱项目名称").indexOf("病危") != -1){
|
|
|
+ // 包含病危医嘱
|
|
|
+ flag = true;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!flag) {
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ // 病危通知书中包含“病危”2个字
|
|
|
+ List<CriticallyIllNoticeDoc> criticallyIllNoticeDocs = inputInfo.getCriticallyIllNoticeDocs();
|
|
|
+ if (ListUtil.isNotEmpty(criticallyIllNoticeDocs)) {
|
|
|
+ for (CriticallyIllNoticeDoc bean : criticallyIllNoticeDocs) {
|
|
|
+ Map<String, String> structureMap = bean.getStructureMap();
|
|
|
+ if (structureMap.containsKey("rec_title") && structureMap.get("rec_title").contains("病危")) {
|
|
|
+ status.set("0");
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ status.set("-1");
|
|
|
+ }
|
|
|
+}
|