Ver código fonte

抽取医嘱组合条件判断

zhanghang 4 anos atrás
pai
commit
1f85a4a801

+ 59 - 0
doc/031.20210326v2.0.3/qc_initv2.0.3.sql

@@ -91,6 +91,65 @@ INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`,
 qc_cases_entry_hospital、qc_type_cases_entry 分值确定添加
  */
 INSERT INTO `qc_cases_entry_hospital` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ( 'N', '2021-04-19 11:54:19', '2021-04-19 11:54:19', '0', '医学人员', '3107', '4', '1.0', '1.0', '手术记录次数与手术次数不一致', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21322', 'N', '2021-04-19 11:56:50', '2021-04-19 11:56:50', '0', '医学人员', '3117', '4', '1.0', '1.0', '病理检查存在病程记录中无病理报告结果', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21321', 'N', '2021-04-19 11:56:23', '2021-04-19 11:56:23', '0', '医学人员', '3116', '4', '1.0', '1.0', '病理检查缺少病理检查报告单', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21319', 'N', '2021-04-19 11:55:38', '2021-04-19 11:55:38', '0', '医学人员', '3115', '4', '1.0', '1.0', '医嘱存在CT,病程记录未记录', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21320', 'N', '2021-04-19 11:55:59', '2021-04-19 11:55:59', '0', '医学人员', '3114', '4', '1.0', '1.0', '医嘱存在CT,报告单未记录', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21318', 'N', '2021-04-19 11:55:18', '2021-04-19 11:55:18', '0', '医学人员', '3113', '4', '1.0', '1.0', '医嘱存在MR,病程记录未记录', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21324', 'N', '2021-04-19 11:57:30', '2021-04-19 11:57:30', '0', '医学人员', '3112', '4', '1.0', '1.0', '医嘱存在MR,报告单未记录', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21325', 'N', '2021-04-19 11:57:52', '2021-04-19 11:57:52', '0', '医学人员', '3111', '4', '1.0', '1.0', '手术病理检查存在手术记录中无病理相关记录', '1', '1', '0', '');
+INSERT INTO `qc`.`qc_cases_entry_hospital` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `cases_entry_id`, `hospital_id`, `score`, `score_run`, `msg`, `is_used`, `is_used_run`, `is_reject`, `remark`) VALUES ('21323', 'N', '2021-04-19 11:57:14', '2021-04-19 11:57:14', '0', '医学人员', '3110', '4', '1.0', '1.0', '病案首页未在患者出院院24小时内完成', '1', '1', '0', '');
+
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329070', '65', '3117', NULL, 'N', '2021-04-19 12:47:51', '2021-04-19 12:47:51', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329071', '74', '3117', NULL, 'N', '2021-04-19 12:47:51', '2021-04-19 12:47:51', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329072', '66', '3117', NULL, 'N', '2021-04-19 12:47:51', '2021-04-19 12:47:51', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329073', '80', '3117', NULL, 'N', '2021-04-19 12:47:51', '2021-04-19 12:47:51', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329074', '109', '3117', NULL, 'N', '2021-04-19 12:47:51', '2021-04-19 12:47:51', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329075', '110', '3117', NULL, 'N', '2021-04-19 12:47:51', '2021-04-19 12:47:51', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329076', '65', '3116', NULL, 'N', '2021-04-19 12:48:09', '2021-04-19 12:48:09', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329077', '66', '3116', NULL, 'N', '2021-04-19 12:48:09', '2021-04-19 12:48:09', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329078', '74', '3116', NULL, 'N', '2021-04-19 12:48:09', '2021-04-19 12:48:09', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329079', '80', '3116', NULL, 'N', '2021-04-19 12:48:09', '2021-04-19 12:48:09', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329080', '109', '3116', NULL, 'N', '2021-04-19 12:48:09', '2021-04-19 12:48:09', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329081', '110', '3116', NULL, 'N', '2021-04-19 12:48:09', '2021-04-19 12:48:09', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329088', '66', '3115', NULL, 'N', '2021-04-19 12:48:57', '2021-04-19 12:48:57', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329089', '65', '3115', NULL, 'N', '2021-04-19 12:48:57', '2021-04-19 12:48:57', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329090', '74', '3115', NULL, 'N', '2021-04-19 12:48:57', '2021-04-19 12:48:57', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329091', '80', '3115', NULL, 'N', '2021-04-19 12:48:57', '2021-04-19 12:48:57', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329092', '109', '3115', NULL, 'N', '2021-04-19 12:48:57', '2021-04-19 12:48:57', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329093', '110', '3115', NULL, 'N', '2021-04-19 12:48:57', '2021-04-19 12:48:57', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329082', '65', '3114', NULL, 'N', '2021-04-19 12:48:42', '2021-04-19 12:48:42', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329083', '66', '3114', NULL, 'N', '2021-04-19 12:48:42', '2021-04-19 12:48:42', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329084', '74', '3114', NULL, 'N', '2021-04-19 12:48:42', '2021-04-19 12:48:42', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329085', '80', '3114', NULL, 'N', '2021-04-19 12:48:42', '2021-04-19 12:48:42', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329086', '109', '3114', NULL, 'N', '2021-04-19 12:48:42', '2021-04-19 12:48:42', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329087', '110', '3114', NULL, 'N', '2021-04-19 12:48:42', '2021-04-19 12:48:42', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329094', '65', '3113', NULL, 'N', '2021-04-19 12:49:11', '2021-04-19 12:49:11', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329095', '66', '3113', NULL, 'N', '2021-04-19 12:49:11', '2021-04-19 12:49:11', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329096', '74', '3113', NULL, 'N', '2021-04-19 12:49:11', '2021-04-19 12:49:11', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329097', '80', '3113', NULL, 'N', '2021-04-19 12:49:11', '2021-04-19 12:49:11', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329098', '109', '3113', NULL, 'N', '2021-04-19 12:49:11', '2021-04-19 12:49:11', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329099', '110', '3113', NULL, 'N', '2021-04-19 12:49:11', '2021-04-19 12:49:11', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329058', '65', '3112', NULL, 'N', '2021-04-19 12:47:20', '2021-04-19 12:47:20', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329059', '66', '3112', NULL, 'N', '2021-04-19 12:47:20', '2021-04-19 12:47:20', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329060', '74', '3112', NULL, 'N', '2021-04-19 12:47:20', '2021-04-19 12:47:20', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329061', '80', '3112', NULL, 'N', '2021-04-19 12:47:20', '2021-04-19 12:47:20', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329062', '109', '3112', NULL, 'N', '2021-04-19 12:47:20', '2021-04-19 12:47:20', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329063', '110', '3112', NULL, 'N', '2021-04-19 12:47:20', '2021-04-19 12:47:20', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329052', '65', '3111', NULL, 'N', '2021-04-19 12:47:02', '2021-04-19 12:47:02', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329053', '66', '3111', NULL, 'N', '2021-04-19 12:47:02', '2021-04-19 12:47:02', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329054', '74', '3111', NULL, 'N', '2021-04-19 12:47:02', '2021-04-19 12:47:02', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329055', '80', '3111', NULL, 'N', '2021-04-19 12:47:02', '2021-04-19 12:47:02', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329056', '109', '3111', NULL, 'N', '2021-04-19 12:47:02', '2021-04-19 12:47:02', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329057', '110', '3111', NULL, 'N', '2021-04-19 12:47:02', '2021-04-19 12:47:02', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329064', '65', '3110', NULL, 'N', '2021-04-19 12:47:35', '2021-04-19 12:47:35', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329065', '66', '3110', NULL, 'N', '2021-04-19 12:47:35', '2021-04-19 12:47:35', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329066', '74', '3110', NULL, 'N', '2021-04-19 12:47:35', '2021-04-19 12:47:35', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329067', '80', '3110', NULL, 'N', '2021-04-19 12:47:35', '2021-04-19 12:47:35', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329068', '109', '3110', NULL, 'N', '2021-04-19 12:47:35', '2021-04-19 12:47:35', '99', '99');
+INSERT INTO `qc`.`qc_type_cases_entry` (`id`, `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('329069', '110', '3110', NULL, 'N', '2021-04-19 12:47:35', '2021-04-19 12:47:35', '99', '99');
+
+
 
 INSERT INTO `qc_type_cases_entry` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '109', '3107', NULL, 'N', '2021-04-19 11:58:03', '2021-04-19 11:58:03', '98', '98');
 INSERT INTO `qc_type_cases_entry` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '110', '3107', NULL, 'N', '2021-04-19 11:58:03', '2021-04-19 11:58:03', '98', '98');

+ 24 - 21
src/main/java/com/diagbot/enums/QualityContent.java

@@ -40,34 +40,37 @@ public class QualityContent {
     public static final String PATHOLOGY = "病理";
 
     /**
-     * 医嘱手术患者相关
+     * 医嘱CT相关
      */
-    public static final String OPERATION = "手术";
-    public static final String NO_OPERATION = "非手术";
-    public static final String OPERATION_ROOM = "手术室";
-    public static final String VENIPUNCTURE_CATHETERIZATION  = "静脉穿刺置管术";
-    public static final String OPERATION_SPECIAL_PATIENTS = "特殊病人手术使用一次性卫生材料";
-    public static final String IMMUNODEFICIENCY_VIRUS_ANTIBODY = "人免疫缺陷病毒抗体检测免费";
+    public static String[][] CT_LIST = {{"CT"},{"X线"}};
+    public static String[][] CT_REGULATION = {{"ATCH","TCT","HCT","OCT","NCT","LCT","ACT"},{"取消"},{"暂停"}};
+
     /**
-     * 医嘱CT相关
+     * 医嘱手术相关
      */
-    public static final String CT = "CT";
-    public static final String X_RAY = "X线";
-    public static final String ATCH = "ATCH";
-    public static final String TCT = "TCT";
-    public static final String HCT = "HCT";
-    public static final String OCT = "OCT";
-    public static final String NCT = "NCT";
-    public static final String LCT = "LCT";
-    public static final String ACT = "ACT";
-    public static List<String> CT_REGULATION = Arrays.asList("TCT","HCT","OCT","NCT","LCT","ACT");
+    public static String[][] OPERATION_LIST={
+            {"手术"},
+            {"手术A"}
+    };
+    public static String[][] OPERATION_ARG={
+            {"非手术"},
+            {"手术室"},
+            {"手术","取消"},
+            {"暂停","手术"},
+            {"静脉穿刺置管术"},
+            {"停"},
+            {"前一次"},
+            {"特殊病人手术使用一次性卫生材料"},
+            {"人免疫缺陷病毒抗体检测免费"}
+    };
+
+
     /**
      * 医嘱MR相关
      */
     public static final String MR = "MR";
-    public static final String MRGNETIC_RESONANCE = "磁共振";
-    public static final String IMRT = "IMRT";
-    public static final String MRS = "mrs评分";
+    public static String[][] MR_LIST = {{"MR"},{"磁共振"}};
+    public static String[][] MR_REGULATION = {{"IMRT"},{"mrs评分"},{"取消"}};
     /**
      * 抗菌药物目录
      */

+ 87 - 62
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -592,41 +592,47 @@ public class ConsoleFacade {
             List<DoctorAdvice> doctorAdvices = doctorAdviceFacade.getBaseMapper().selectList(dtoQueryWrapper);
             //手术病理
             if(ListUtil.isNotEmpty(doctorAdvices)&&doctorAdvices.size()>0) {
-                dd:
-            for (DoctorAdvice doctorAdvice : doctorAdvices) {
-                String name = doctorAdvice.getDaItemName();
-                if (StringUtil.isNotEmpty(name)) {
-                if (name.contains(QualityContent.OPERATION)) {
-                    if (name.contains(QualityContent.NO_OPERATION) || name.contains(QualityContent.OPERATION_ROOM) || (name.contains(QualityContent.OPERATION) && name.contains(QualityContent.COUNTERMAND)) || (name.contains(QualityContent.PAUSE) && name.contains(QualityContent.OPERATION)) || name.contains(QualityContent.VENIPUNCTURE_CATHETERIZATION) || name.startsWith(QualityContent.STOP) || name.contains(QualityContent.LAST)
-                            || name.contains(QualityContent.OPERATION_SPECIAL_PATIENTS) || name.contains(QualityContent.IMMUNODEFICIENCY_VIRUS_ANTIBODY)) {
-                        continue;
-                    } else {
-                        for (DoctorAdvice advice : doctorAdvices) {
-                            String daItemName = advice.getDaItemName();
-                            if (daItemName.contains(QualityContent.PATHOLOGY)) {
-                                operationPathologyNum++;
-                                break dd;
+                operationPathology:
+                for (DoctorAdvice doctorAdvice : doctorAdvices) {
+                    String name = doctorAdvice.getDaItemName();
+                    if (StringUtil.isNotEmpty(name)) {
+                        String[][] operationList = QualityContent.OPERATION_LIST;
+                        Boolean stair = stairCondition(name, operationList);
+                        if(stair){
+                            String[][] operationArg = QualityContent.OPERATION_ARG;
+                            Boolean levelCondition = secondLevelCondition(name, operationArg);
+                            if(levelCondition){
+                                operationNum++;
+                                for (DoctorAdvice advice : doctorAdvices) {
+                                    String daItemName = advice.getDaItemName();
+                                    if (daItemName.contains(QualityContent.PATHOLOGY)) {
+                                        operationPathologyNum++;
+                                        break operationPathology;
+                                    }
+                                }
                             }
                         }
                     }
-                    }
-                }
                 }
             }
+
             //手术
             if(ListUtil.isNotEmpty(doctorAdvices)&&doctorAdvices.size()>0) {
                 for (DoctorAdvice doctorAdvice : doctorAdvices) {
                     String name = doctorAdvice.getDaItemName();
                     if (StringUtil.isNotEmpty(name)) {
-                        if (name.contains(QualityContent.OPERATION)) {
-                            if (name.contains(QualityContent.NO_OPERATION) || name.contains(QualityContent.OPERATION_ROOM) || (name.contains(QualityContent.OPERATION) && name.contains(QualityContent.COUNTERMAND)) || (name.contains(QualityContent.PAUSE) && name.contains(QualityContent.OPERATION)) || name.contains(QualityContent.VENIPUNCTURE_CATHETERIZATION) || name.startsWith(QualityContent.STOP) || name.contains(QualityContent.LAST)
-                                    || name.contains(QualityContent.OPERATION_SPECIAL_PATIENTS) || name.contains(QualityContent.IMMUNODEFICIENCY_VIRUS_ANTIBODY)) {
-                                continue;
-                            } else {
+                        String[][] operationList = QualityContent.OPERATION_LIST;
+                        Boolean stair = stairCondition(name, operationList);
+                        if(stair){
+                            String[][] operationArg = QualityContent.OPERATION_ARG;
+                            Boolean levelCondition = secondLevelCondition(name, operationArg);
+                            if(levelCondition){
                                 operationNum++;
-                                break;
+                                break ;
                             }
                         }
+
+
                     }
                 }
             }
@@ -636,41 +642,55 @@ public class ConsoleFacade {
         map.put(QualityContent.NO_RECORD_OPERATION,operationNum);
         return map;
     }
+    /**
+     * 医嘱二级条件判断 或且
+     * @param name
+     * @param arg
+     * @return
+     */
+    public Boolean  secondLevelCondition(String name,String[][] arg){
+        for (int i = 0; i < arg.length; i++) {
+            String[] strings = arg[i];
+            int z=0;
+            for (int y = 0; y < strings.length; y++) {
+                if(name.contains(strings[y])){
+                    z++;
+                }
+            }
+            if(z==strings.length){
+                continue;
+            }else {
+               return true;
+            }
+        }
+        return false;
+    }
 
     /**
-     * 医嘱表判断无病案首页是否为手术患者的人数
+     * 一级条件判断 或且
+     * @param name
+     * @param arg
+     * @return
      */
-    public int getOperationNum(FilterVO filterVO){
-        List<String> behospitalCodeList = adviceVerify(filterVO);
-        int operationNum=0;
-        if(ListUtil.isNotEmpty(behospitalCodeList)&&behospitalCodeList.size()>0) {
-            for (String behospitalCode : behospitalCodeList) {
-                QueryWrapper<DoctorAdvice> dtoQueryWrapper = new QueryWrapper<>();
-                dtoQueryWrapper.eq("behospital_code", behospitalCode)
-                        .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("da_status", QualityContent.EXECUTE_ORDER);
-                //查医嘱表
-                List<DoctorAdvice> doctorAdvices = doctorAdviceFacade.getBaseMapper().selectList(dtoQueryWrapper);
-                if(ListUtil.isNotEmpty(doctorAdvices)&&doctorAdvices.size()>0) {
-                    for (DoctorAdvice doctorAdvice : doctorAdvices) {
-                        String name = doctorAdvice.getDaItemName();
-                        if (StringUtil.isNotEmpty(name)) {
-                            if (name.contains(QualityContent.OPERATION)) {
-                                if (name.contains(QualityContent.NO_OPERATION) || name.contains(QualityContent.OPERATION_ROOM) || (name.contains(QualityContent.OPERATION) && name.contains(QualityContent.COUNTERMAND)) || (name.contains(QualityContent.PAUSE) && name.contains(QualityContent.OPERATION)) || name.contains(QualityContent.VENIPUNCTURE_CATHETERIZATION) || name.startsWith(QualityContent.STOP) || name.contains(QualityContent.LAST)
-                                        || name.contains(QualityContent.OPERATION_SPECIAL_PATIENTS) || name.contains(QualityContent.IMMUNODEFICIENCY_VIRUS_ANTIBODY)) {
-                                    continue;
-                                } else {
-                                    operationNum++;
-                                    break;
-                                }
-                            }
-                        }
-                    }
+    public Boolean  stairCondition(String name,String[][] arg){
+        for (int i = 0; i < arg.length; i++) {
+            String[] strings = arg[i];
+            int z=0;
+            for (int y = 0; y < strings.length; y++) {
+                if(name.contains(strings[y])){
+                    z++;
                 }
             }
+            if(z==strings.length){
+                return true;
+            }else {
+                continue;
+            }
         }
-        return operationNum;
+        return false;
     }
+
+
     /**
      * 获取CT/MRI人数
      */
@@ -684,15 +704,16 @@ public class ConsoleFacade {
                     if (!codeList.contains(behospitalCode)) {
                         String daItemName = ctNumMap.get("da_item_name");
                         if (StringUtil.isNotEmpty(daItemName)) {
-                            if ((daItemName.contains(QualityContent.CT) || daItemName.contains(QualityContent.X_RAY))) {
-                                if ((!daItemName.contains(QualityContent.ATCH) && !daItemName.contains(QualityContent.TCT) && !daItemName.contains(QualityContent.HCT)
-                                        && !daItemName.contains(QualityContent.OCT) && !daItemName.contains(QualityContent.NCT) && !daItemName.contains(QualityContent.LCT)
-                                        && !daItemName.contains(QualityContent.ACT)) || (daItemName.contains(QualityContent.STOP))) {
-                                    //都不包含为CT
-                                    codeList.add(behospitalCode);
-                                    continue;
+                                String[][] ctList = QualityContent.CT_LIST;
+                                Boolean stair = stairCondition(daItemName, ctList);
+                                if(stair){
+                                    String[][] ctRegulation = QualityContent.CT_REGULATION;
+                                    Boolean levelCondition = secondLevelCondition(daItemName, ctRegulation);
+                                    if(levelCondition){
+                                        codeList.add(behospitalCode);
+                                        continue;
+                                    }
                                 }
-                            }
                 }
             }
         }
@@ -702,12 +723,16 @@ public class ConsoleFacade {
                     if (!codeList.contains(behospitalCodeMri)) {
                         String daItemName = MRINumMap.get("da_item_name");
                         if (StringUtil.isNotEmpty(daItemName)) {
-                            if (daItemName.contains(QualityContent.MRGNETIC_RESONANCE) || daItemName.contains(QualityContent.MR)) {
-                                if (!daItemName.contains(QualityContent.IMRT) && !daItemName.contains(QualityContent.MRS)) {
-                                    codeMri.add(behospitalCodeMri);
+                            String[][] mrList = QualityContent.MR_LIST;
+                            Boolean stair = stairCondition(daItemName, mrList);
+                            if(stair){
+                                String[][] mrRegulation = QualityContent.MR_REGULATION;
+                                Boolean levelCondition = secondLevelCondition(daItemName, mrRegulation);
+                                if(levelCondition){
+                                    codeList.add(behospitalCodeMri);
                                     continue;
                                 }
-                    }
+                            }
                 }
             }
         }