Explorar o código

Merge branch 'dev/20210326_2.0.3' into debug

chengyao %!s(int64=4) %!d(string=hai) anos
pai
achega
e52538755f

+ 72 - 13
doc/031.20210326v2.0.3/qc_initv2.0.3.sql

@@ -77,20 +77,79 @@ INSERT INTO `qc_cases_relevance_entry` (`type`, `hospital_id`, `cases_name`, `re
 编码添加
  */
 
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3117', '241', '三级查房制度', '4', 'THR03117', '病理检查存在病程记录中无病理报告结果', '2', '1', '0', '0', '3', '', NULL, '', 'N', '2021-04-16 11:04:42', '2021-04-16 11:04:42', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3116', '283', '病历书写规范', '8', 'MEDI03116', '病理检查缺少病理检查报告单', '2', '1', '0', '0', '3', '', NULL, '', 'N', '2021-04-16 11:07:28', '2021-04-16 11:07:28', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3115', '241', '三级查房制度', '4', 'THR03115', '医嘱存在CT,病程记录未记录', '2', '1', '0', '0', '3', '', NULL, '', 'N', '2021-04-16 11:17:24', '2021-04-16 11:17:24', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3114', '283', '病历书写规范', '8', 'MEDI03114', '医嘱存在CT,报告单未记录', '2', '1', '0', '0', '3', '', NULL, '', 'N', '2021-04-16 11:16:51', '2021-04-16 11:16:51', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3113', '241', '三级查房制度', '4', 'THR3113', '医嘱存在MR,病程记录未记录', '2', '1', '0', '0', '3', '', NULL, '', 'N', '2021-04-16 11:17:46', '2021-04-16 11:17:46', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3112', '283', '病历书写规范', '8', 'MEDI03112', '医嘱存在MR,报告单未记录', '2', '1', '0', '0', '3', '', NULL, '', 'N', '2021-04-16 10:58:38', '2021-04-16 10:58:38', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3111', '248', '围手术期病历讨论', '17', 'OPE03111', '手术病理检查存在手术记录中无病理相关记录', '1', '1', '0', '0', '3', '', NULL, '', 'N', '2021-04-16 11:03:55', '2021-04-16 11:03:55', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3110', '243', '病案首页', '6', 'FIRP03110', '病案首页未在患者出院院24小时内完成', '1', '1', '0', '0', '1', '', NULL, '', 'N', '2021-04-07 17:13:57', '2021-04-07 17:13:57', '0', '医学人员');
-INSERT INTO `qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3107', '248', '围手术期病历讨论', '17', 'OPE03107', '手术记录次数与手术次数不一致', '2', '1', '0', '1', '2', '', NULL, '', 'N', '2021-04-15 14:18:44', '2021-04-15 14:18:44', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3107', '248', '围手术期病历讨论', '17', 'OPE03107', '手术记录次数与手术次数不一致', '2', '1', '0', '1', '2', '', NULL, '', 'N', '2021-04-19 11:54:19', '2021-04-19 11:54:19', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3110', '243', '病案首页', '6', 'FIRP03110', '病案首页未在患者出院院24小时内完成', '1', '1', '0', '1', '1', '', NULL, '', 'N', '2021-04-19 11:57:14', '2021-04-19 11:57:14', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3111', '248', '围手术期病历讨论', '17', 'OPE03111', '手术病理检查存在手术记录中无病理相关记录', '1', '1', '0', '1', '2', '', NULL, '', 'N', '2021-04-19 11:57:52', '2021-04-19 11:57:52', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3112', '283', '病历书写规范', '57', 'MEDI03112', '医嘱存在MR,报告单未记录', '2', '1', '0', '1', '3', '', NULL, '', 'N', '2021-04-20 17:45:41', '2021-04-20 17:45:41', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3113', '241', '三级查房制度', '4', 'THR3113', '医嘱存在MR,病程记录未记录', '2', '1', '0', '1', '2', '', NULL, '', 'N', '2021-04-19 11:55:18', '2021-04-19 11:55:18', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3114', '283', '病历书写规范', '57', 'MEDI03114', '医嘱存在CT,报告单未记录', '2', '1', '0', '1', '2', '', NULL, '', 'N', '2021-04-20 17:46:14', '2021-04-20 17:46:14', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3115', '241', '三级查房制度', '4', 'THR03115', '医嘱存在CT,病程记录未记录', '2', '1', '0', '1', '3', '', NULL, '', 'N', '2021-04-19 11:55:38', '2021-04-19 11:55:38', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3116', '283', '病历书写规范', '57', 'MEDI03116', '病理检查缺少病理检查报告单', '2', '1', '0', '1', '2', '', NULL, '', 'N', '2021-04-20 17:46:02', '2021-04-20 17:46:02', '0', '医学人员');
+INSERT INTO `qc`.`qc_cases_entry` (`id`, `cases_id`, `cases_name`, `mode_id`, `code`, `name`, `drgs`, `type`, `rule_type`, `dev_type`, `accuracy_type`, `precond`, `order_no`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ('3117', '241', '三级查房制度', '4', 'THR03117', '病理检查存在病程记录中无病理报告结果', '2', '1', '0', '1', '2', '', NULL, '', 'N', '2021-04-19 11:56:50', '2021-04-19 11:56:50', '0', '医学人员');
 
 /**
 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` ( `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: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` ( `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: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` ( `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: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` ( `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: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` ( `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: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` ( `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: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` ( `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: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` ( `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: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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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` ( `type_id`, `case_entry_id`, `remark`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`) VALUES ( '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');
@@ -210,10 +269,10 @@ INSERT INTO `med_outpatient_info` VALUES ('200701106000029', '4', '马立站', '
 INSERT INTO `sys_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ('N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医疗质量控制', '-1', 'YH-ZKK-YLZLKZ', '1', '1', '-4', '用户-医疗质量');
 INSERT INTO `sys_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医疗质量控制指标', '50', 'YH-ZKK-YLZLKZZB_XQ', '1', '1', '0', '用户-科室主任-医疗质量控制指标_详情');
 
-INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '50', NULL);
-INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '50', NULL);
-INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '51', NULL);
-INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '51', NULL);
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '41', NULL);
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '41', NULL);
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '42', NULL);
+INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `menu_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '42', NULL);
 
 INSERT INTO `sys_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `permissionUrl`, `method`, `descritpion`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '医疗质量控制指标', 'FUNC000110', '/qc/behospitalInfo/getMedQualityCoList', 'ALL', '医疗质量控制指标表', NULL);
 

+ 75 - 31
src/main/java/com/diagbot/enums/QualityContent.java

@@ -13,6 +13,44 @@ public class QualityContent {
     public static final String NUMBER_OF_HOSPITAL = "入院人数";
     public static final String NO_RECORD_OPERATION = "无病案首页手术患者";
     public static final String NO_RECORD_OPERATION_PATHOLOGY = "无病案首页手术病理患者";
+    /**
+     * 是否需要用到医嘱的指标名称
+     */
+    public static List<String> NO_MEDICAL_ADVICE = Arrays.asList("",
+            "入院记录24小时内完成率","出院记录24小时内完成率","病案首页24小时内完成率"
+    );
+    public static List<String> NEED_MEDICAL_ADVICE = Arrays.asList("",
+            "手术记录24小时内完成率","手术相关记录完成率","患者抢救记录及时完成率","临床用血相关记录符合率","CT检查记录符合率","MRI检查记录符合率","病理检查记录符合率"
+    );
+    /**
+     * 所有指标名称
+     */
+
+    public static final String QB = "";
+    public static final String ZYBA_CYHZ = "住院病案管理人员月均负担出院患者病历数";
+    public static final String BABM_CYHZ = "病案编码人员月均负担出院患者病历数";
+    public static final String MZBA_CYHZ = "门诊病案管理人员月均负担门诊患者病历数";
+    public static final String RYJL_24H_WCL = "入院记录24小时内完成率";
+    public static final String CYJL_24H_WCL = "出院记录24小时内完成率";
+    public static final String BASY_24H_WCL = "病案首页24小时内完成率";
+    public static final String SSJL_24H_WCL = "手术记录24小时内完成率";
+    public static final String CT_JCJL_FHL = "CT检查记录符合率";
+    public static final String MR_JCJL_FHL = "MRI检查记录符合率";
+    public static final String BL_JCJL_FHL = "病理检查记录符合率";
+    public static final String XJPY_JCJL_FHL = "细菌培养检查记录符合率";
+    public static final String KJYW_SY_FHL = "抗菌药物使用记录符合率";
+    public static final String EXZL_HXZL_FHL = "恶性肿瘤化学治疗记录符合率";
+    public static final String EXZL_FSZL_FHL = "恶性肿瘤放射治疗记录符合率";
+    public static final String SS_XGJL_WCL = "手术相关记录完成率";
+    public static final String ZRW_XGJL_WCL = "植入物相关记录符合率";
+    public static final String LCYX_XGJL_WCL = "临床用血相关记录符合率";
+    public static final String YSCF_JL_WCL = "医师查房记录完成率";
+    public static final String HZQJ_JLJS_WCL = "患者抢救记录及时完成率";
+    public static final String CCHZ_2DAY_GDL = "出院患者病历2日归档率";
+    public static final String CCHZ_GD_WZL = "出院患者病历归档完整率";
+    public static final String BHL_FZ_FSL = "不合理复制病历发生率";
+    public static final String ZQTYS_GF_QSL = "知情同意书规范签署率";
+    public static final String JJBLL = "甲级病历率";
     /**
      * 触发规则指标
      */
@@ -29,6 +67,7 @@ public class QualityContent {
      * 医嘱状态
      */
     public static final String EXECUTE_ORDER = "执行";
+    public static final String IN_USE = "在用";
     public static final String CANCELLATION_ORDER = "作废";
     /**
      * 医嘱判断相关
@@ -37,37 +76,42 @@ public class QualityContent {
     public static final String LAST = "前一次";
     public static final String COUNTERMAND = "取消";
     public static final String PAUSE = "暂停";
-    public static final String PATHOLOGY = "病理";
-
     /**
-     * 医嘱手术患者相关
+     * 病理判断
      */
-    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[][] BL_LIST = {{"病理"}};
+
     /**
      * 医嘱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[][] CT_LIST = {{"CT"},{"X线"}};
+    public static String[][] CT_REGULATION = {{"ATCH","TCT","HCT","OCT","NCT","LCT","ACT"},{"取消"},{"暂停"}};
+
+    /**
+     * 医嘱手术相关
+     */
+    public static String[][] OPERATION_LIST={
+            {"手术"}
+    };
+    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评分"},{"取消"}};
     /**
      * 抗菌药物目录
      */
@@ -88,21 +132,21 @@ public class QualityContent {
      * 抢救药物  维护修改
      */
 
-    public static List<String> Rescue_Drug_List = Arrays.asList(
+    public static List<String> RESCUEDRUGLIST = Arrays.asList(
             "尼可刹米","可拉明","盐酸洛贝林","山梗菜碱","肾上腺素","阿拉明", "重酒石酸间羟胺", "多巴胺", "利血平", "25%硫酸镁注射液", "垂体后叶素","注射用血凝酶", "阿托品","氯解磷定注射液","盐酸纳洛酮","异丙嗪", "非那更","地西泮", "安定","20%甘露醇");
-    public static List<String> getRescue_Drug_List() {
-        return Rescue_Drug_List;
-    }
+
 
     /**
      *   临床用血
      */
-    public static List<String> blood_List = Arrays.asList(
-            "交叉配血");
+    public static List<String> BLOODLIST = Arrays.asList(
+            "交叉配血","血交叉","血常规");
 
-    public static List<String> getBlood_List() {
-        return blood_List;
-    }
+    /**
+     * 用于代码判断指标1、2、3执行路径
+     */
+    public static List<String> FOURSTR = Arrays.asList(
+            "住院病案管理人员月均负担出院患者病历数", "病案编码人员月均负担出院患者病历数", "门诊病案管理人员月均负担门诊患者病历数");
 }
 
 

+ 402 - 327
src/main/java/com/diagbot/facade/ConsoleFacade.java

@@ -22,6 +22,7 @@ import com.google.common.collect.Lists;
 import io.github.lvyahui8.spring.aggregate.facade.DataBeanAggregateQueryFacade;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.ibatis.annotations.Param;
+import org.apache.poi.ss.formula.functions.Na;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Qualifier;
@@ -36,6 +37,10 @@ import java.text.SimpleDateFormat;
 import java.time.*;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ForkJoinPool;
 import java.util.stream.Collectors;
 
 import static io.netty.util.internal.SystemPropertyUtil.contains;
@@ -390,30 +395,14 @@ public class ConsoleFacade {
      */
     public List<Map<String, String>> medicalRecordIndicator(FilterVO filterVO) {
         filterFacade.filterVOSet(filterVO);
-        MedQualityControlDTO medQualityControlDTO = new MedQualityControlDTO();
+        String indexName = filterVO.getIndexName();
+        List<Map<String, String>> hashMapArrayList = new ArrayList<>();
+        long zz = System.currentTimeMillis();
         Map<String, Long> selectOperationNumMap = behospitalInfoFacade.selectOperationNum(filterVO);
         //出院人数
         Long startCount = selectOperationNumMap.get(QualityContent.DISCHARGED_PATIENTS);
         //入院人数
         Long endCount = selectOperationNumMap.get(QualityContent.NUMBER_OF_HOSPITAL);
-        Map<String, Integer> operationPathologyNumMap = getOperationPathologyNum(filterVO);
-        //手术人数
-        Long operationFeeNum = selectOperationNumMap.get("operationFee");
-        Integer operationNum = operationPathologyNumMap.get(QualityContent.NO_RECORD_OPERATION);
-        operationFeeNum = operationFeeNum + operationNum;
-        //抗菌人数
-        Long antibiosisFeeNum = selectOperationNumMap.get("antibiosisFee");
-        Integer antibiosis = Integer.valueOf(getAntibiosisNum(filterVO));
-        antibiosisFeeNum = antibiosisFeeNum + antibiosis;
-        //手术病理人数
-        Long operationPathologyFeeNum = selectOperationNumMap.get("operationPathologyFee");
-        Integer operationPathologyNum = operationPathologyNumMap.get(QualityContent.NO_RECORD_OPERATION_PATHOLOGY);
-        operationPathologyFeeNum = operationPathologyFeeNum + operationPathologyNum;
-        Map<String, Long> longMap = getCTNum(filterVO);
-        //CT人数
-        Long CTNum = longMap.get("CT");
-        //MR人数
-        Long MRNum = longMap.get("MR");
         //各指标未完成人数情况
         Map<String, Long> triggeringRulesMap = behospitalInfoFacade.triggeringRules(filterVO);
         Long operationCount = triggeringRulesMap.get(QualityContent.SSJLWCC_24H);
@@ -422,88 +411,125 @@ public class ConsoleFacade {
         Long recordHomePage = triggeringRulesMap.get(QualityContent.BASYWWC_24H);
         //病理手术
         Long antibiosisNum = triggeringRulesMap.get("antibiosisNum");
-        //细菌培养
-        Long bacterialCulture = triggeringRulesMap.get("bacterialCulture");
         //CT
         Long ct = triggeringRulesMap.get("CT");
         //MR
         Long mr = triggeringRulesMap.get("MR");
-        List<Map<String, String>> hashMapArrayList = new ArrayList<>();
-        //入院记录24小时完成率
-        //入院记录完成人数为
-        if (InHospitalRecords != null && startCount!=null) {
-         //   medQualityControlDTO.setAdmissionNum(Double.valueOf(startCount - InHospitalRecords));
-            //入院记录完成率
-        //    medQualityControlDTO.setAdmissionStr(getResult(startCount - InHospitalRecords, startCount));
-            Map<String, String> stringStringHashMap = new LinkedHashMap<>();
-            stringStringHashMap.put("name","入院记录24小时内完成率");
-            stringStringHashMap.put("notCopiedStr",getResult(startCount - InHospitalRecords, startCount));
-            stringStringHashMap.put("num",Double.valueOf(startCount - InHospitalRecords).toString());
-            hashMapArrayList.add(stringStringHashMap);
-        }
-        //手术记录完成率
-        //手术完成人数为
-        if (operationCount != null && operationFeeNum!=null){
-        //    medQualityControlDTO.setOperationNum(Double.valueOf(operationFeeNum - operationCount));
-        //手术完成率
-       //      medQualityControlDTO.setOperationStr(getResult(operationFeeNum - operationCount, operationFeeNum));
-            LinkedHashMap<String, String> stringStringHashMap = new LinkedHashMap<>();
-            stringStringHashMap.put("name","手术记录24小时内完成率");
-             stringStringHashMap.put("notCopiedStr",getResult(operationFeeNum - operationCount, operationFeeNum));
-             stringStringHashMap.put("num",Double.valueOf(operationFeeNum - operationCount).toString());
-            hashMapArrayList.add(stringStringHashMap);
-        }
-            //出院记录24小时完成率
-            //出院记录完成人数为
-        if (OutHospitalRecords != null && startCount!=null) {
-      //      medQualityControlDTO.setLeaveHospitalNum(Double.valueOf(startCount - OutHospitalRecords));
-            //出院记录完成率
-      //      medQualityControlDTO.setLeaveHospitalStr(getResult(startCount - OutHospitalRecords, startCount));
-            Map<String, String> stringStringHashMap = new LinkedHashMap<>();
-            stringStringHashMap.put("name","出院记录24小时内完成率");
-            stringStringHashMap.put("notCopiedStr",getResult(startCount - OutHospitalRecords, startCount));
-            stringStringHashMap.put("num",Double.valueOf(startCount - OutHospitalRecords).toString());
-            hashMapArrayList.add(stringStringHashMap);
-        }
-            //病案首页24小时完成率
-            //病案首页完成人数为
-        if (recordHomePage != null && startCount!=null) {
-       //     medQualityControlDTO.setMedHomePageNum(Double.valueOf(startCount - recordHomePage));
-            //病案首页完成率
-        //    medQualityControlDTO.setMedHomePageStr(getResult(startCount - recordHomePage, startCount));
-            Map<String, String> stringStringHashMap = new LinkedHashMap<>();
-            stringStringHashMap.put("name","病案首页24小时完成率");
-            stringStringHashMap.put("notCopiedStr",getResult(startCount - recordHomePage, startCount));
-            stringStringHashMap.put("num",Double.valueOf(startCount - recordHomePage).toString());
-            hashMapArrayList.add(stringStringHashMap);
-        }
-        //CT完成率
-        if(CTNum!=null && ct!=null) {
-        //    medQualityControlDTO.setCTExaminationConform(getResult(CTNum - ct, CTNum));
-            Map<String, String> stringStringHashMap = new LinkedHashMap<>();
-            stringStringHashMap.put("name","CT检查记录符合率");
-            stringStringHashMap.put("notCopiedStr",getResult(CTNum - ct, CTNum));
-            stringStringHashMap.put("num",Double.valueOf(CTNum - ct).toString());
-            hashMapArrayList.add(stringStringHashMap);
-        }
-        //MR完成率
-        if(MRNum!=null && mr!=null) {
-        //    medQualityControlDTO.setMRIExaminationConform(getResult(MRNum - mr, MRNum));
-            Map<String, String> stringStringHashMap = new LinkedHashMap<>();
-            stringStringHashMap.put("name","MRI检查记录符合率");
-            stringStringHashMap.put("notCopiedStr",getResult(MRNum - mr, MRNum));
-            stringStringHashMap.put("num",Double.valueOf(MRNum - mr).toString());
-            hashMapArrayList.add(stringStringHashMap);
-        }
-        if(operationPathologyFeeNum!=null && antibiosisNum!=null) {
-            //病理完成率为
-        //    medQualityControlDTO.setPathologicalExamination(getResult(operationPathologyFeeNum - antibiosisNum, operationPathologyFeeNum));
-            Map<String, String> stringStringHashMap = new LinkedHashMap<>();
-            stringStringHashMap.put("name","病理检查记录符合率");
-            stringStringHashMap.put("notCopiedStr",getResult(operationPathologyFeeNum - antibiosisNum, operationPathologyFeeNum));
-            stringStringHashMap.put("num",Double.valueOf(operationPathologyFeeNum - antibiosisNum).toString());
-            hashMapArrayList.add(stringStringHashMap);
-        }
+        if(indexName!=null) {
+            if(QualityContent.NO_MEDICAL_ADVICE.contains(indexName)){
+                //入院记录24小时完成率
+                //入院记录完成人数为
+                if(indexName.equals(QualityContent.RYJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
+                    if (InHospitalRecords != null && startCount != null) {
+                        Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                        stringStringHashMap.put("name", QualityContent.RYJL_24H_WCL);
+                        stringStringHashMap.put("notCopiedStr", getResult(startCount - InHospitalRecords, startCount));
+                        stringStringHashMap.put("num", Double.valueOf(startCount).toString());
+                        hashMapArrayList.add(stringStringHashMap);
+                    }
+                }
+
+                //出院记录24小时完成率
+                //出院记录完成人数为
+                if(indexName.equals(QualityContent.CYJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
+                    if (OutHospitalRecords != null && startCount != null) {
+                        Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                        stringStringHashMap.put("name", QualityContent.CYJL_24H_WCL);
+                        stringStringHashMap.put("notCopiedStr", getResult(startCount - OutHospitalRecords, startCount));
+                        stringStringHashMap.put("num", Double.valueOf(startCount).toString());
+                        hashMapArrayList.add(stringStringHashMap);
+                    }
+                }
+                //病案首页24小时完成率
+                //病案首页完成人数为
+                if(indexName.equals(QualityContent.BASY_24H_WCL)||indexName.equals(QualityContent.QB)) {
+                    if (recordHomePage != null && startCount != null) {
+                        Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                        stringStringHashMap.put("name", QualityContent.BASY_24H_WCL);
+                        stringStringHashMap.put("notCopiedStr", getResult(startCount - recordHomePage, startCount));
+                        stringStringHashMap.put("num", Double.valueOf(startCount).toString());
+                        hashMapArrayList.add(stringStringHashMap);
+                    }
+                }
+            }
+            Long operationFeeNum = 0L;
+            List<MedManageParamsDTO> doctorAdviceMedManageParams  = new ArrayList<>();
+            if (QualityContent.NEED_MEDICAL_ADVICE.contains(indexName)) {
+                filterVO.setFlagStr("2");
+                 doctorAdviceMedManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
+                Map<String, Long> adviceNum = null;
+                try {
+                    adviceNum = getAdviceNum(filterVO,doctorAdviceMedManageParams);
+                } catch (ExecutionException e) {
+                    e.printStackTrace();
+                } catch (InterruptedException e) {
+                    e.printStackTrace();
+                }
+                //手术人数
+                 operationFeeNum = selectOperationNumMap.get("operationFee");
+                Long operation = adviceNum.get("operation");
+                operationFeeNum = operationFeeNum + operation;
+                //CT人数
+                Long CTNum = adviceNum.get("CT");
+                //MR人数
+                Long MRNum = adviceNum.get("MR");
+                //手术病理人数
+                Long operationPathologyFeeNum = selectOperationNumMap.get("operationPathologyFee");
+                Long operationPathology = adviceNum.get("operationPathology");
+                operationPathologyFeeNum = operationPathologyFeeNum + operationPathology;
+                //手术记录完成率
+                //手术完成人数为
+                if (indexName.equals(QualityContent.SSJL_24H_WCL)||indexName.equals(QualityContent.QB)) {
+                    if (operationCount != null && operationFeeNum != null) {
+                        LinkedHashMap<String, String> stringStringHashMap = new LinkedHashMap<>();
+                        stringStringHashMap.put("name", QualityContent.SSJL_24H_WCL);
+                        stringStringHashMap.put("notCopiedStr", getResult(operationFeeNum - operationCount, operationFeeNum));
+                        stringStringHashMap.put("num", Double.valueOf(operationFeeNum).toString());
+                        hashMapArrayList.add(stringStringHashMap);
+                    }
+                }
+                //CT完成率
+                if (indexName.equals(QualityContent.CT_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
+                    if (CTNum != null && ct != null) {
+                        Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                        stringStringHashMap.put("name", QualityContent.CT_JCJL_FHL);
+                        stringStringHashMap.put("notCopiedStr", getResult(CTNum - ct, CTNum));
+                        stringStringHashMap.put("num", Double.valueOf(CTNum).toString());
+                        hashMapArrayList.add(stringStringHashMap);
+                    }
+                }
+                //MRI完成率
+                if (indexName.equals(QualityContent.MR_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
+                    if (MRNum != null && mr != null) {
+                        Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                        stringStringHashMap.put("name", QualityContent.MR_JCJL_FHL);
+                        stringStringHashMap.put("notCopiedStr", getResult(MRNum - mr, MRNum));
+                        stringStringHashMap.put("num", Double.valueOf(MRNum).toString());
+                        hashMapArrayList.add(stringStringHashMap);
+                    }
+                }
+                if (indexName.equals(QualityContent.BL_JCJL_FHL)||indexName.equals(QualityContent.QB)) {
+                    if (operationPathologyFeeNum != null && antibiosisNum != null) {
+                        //病理完成率为
+                        Map<String, String> stringStringHashMap = new LinkedHashMap<>();
+                        stringStringHashMap.put("name", QualityContent.BL_JCJL_FHL);
+                        stringStringHashMap.put("notCopiedStr", getResult(operationPathologyFeeNum - antibiosisNum, operationPathologyFeeNum));
+                        stringStringHashMap.put("num", Double.valueOf(operationPathologyFeeNum).toString());
+                        hashMapArrayList.add(stringStringHashMap);
+                    }
+                }
+            }
+
+
+
+        //抗菌人数
+     //   Long antibiosisFeeNum = selectOperationNumMap.get("antibiosisFee");
+    //    Integer antibiosis = Integer.valueOf(getAntibiosisNum(filterVO));
+    //    antibiosisFeeNum = antibiosisFeeNum + antibiosis;
+
+
+        //细菌培养
+        Long bacterialCulture = triggeringRulesMap.get("bacterialCulture");
 
         //抗菌完成率
       //    medQualityControlDTO.setAdmissionStr(getResult(antibiosisFeeNum-0,antibiosisFeeNum));
@@ -512,35 +538,65 @@ public class ConsoleFacade {
         /**
          * =================================标示线========================================
          */
-        Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
+            long x1 = System.currentTimeMillis();
+            System.out.println("qian" + (zz-x1));
+            Map<String, Object> baseIndex = behospitalInfoFacade.getBaseIndex(filterVO);
         //指标一、二、三、二十七
-        List<Map<String, String>> retLists = ManageIndexMethod(hashMapArrayList, baseIndex, filterVO);
-        //指标十七 医师查房记录
-                                  retLists = WardRoundMethod(retLists, baseIndex, triggeringRulesMap);
-        //指标十八 抢救记录
-        List<MedManageParamsDTO> medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
-                                  retLists = rescueMethod(medManageParams,retLists,triggeringRulesMap);
+            if (QualityContent.FOURSTR.contains(indexName)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = ManageIndexMethod(indexName, hashMapArrayList, baseIndex, filterVO);
+            }
+
+            //指标二十七
+            if (indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = firMethod(indexName,hashMapArrayList,baseIndex);
+            }
+
+            long x2 = System.currentTimeMillis();
+            System.out.println("指标一、二、三、二十七 = " + (x2-x1));
+            //指标十七 医师查房记录
+            if (indexName.equals(QualityContent.YSCF_JL_WCL)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = WardRoundMethod(hashMapArrayList, baseIndex, triggeringRulesMap);
+            }
+            long x3 = System.currentTimeMillis();
+            System.out.println("指标十七 = " + (x3-x2));
+            //指标十八 抢救记录
+            if (indexName.equals(QualityContent.HZQJ_JLJS_WCL)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = rescueMethod(doctorAdviceMedManageParams,hashMapArrayList,triggeringRulesMap);
+            }
+            long x4 = System.currentTimeMillis();
+            System.out.println("指标十八 = " + (x4-x3));
+
         //指标十九 出院患者病历2日归档
-                                  retLists = getfileSecAmount(filterVO,retLists, baseIndex);
+            if (indexName.equals(QualityContent.CCHZ_2DAY_GDL)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = getfileSecAmount(filterVO,hashMapArrayList, baseIndex);
+            }
+            long x5 = System.currentTimeMillis();
+            System.out.println("指标十九 = " + (x5-x4));
+
         //指标十四 手术记录
-        retLists = operationMethod(retLists, operationFeeNum+"", triggeringRulesMap);
+            if (indexName.equals(QualityContent.SS_XGJL_WCL)||indexName.equals(QualityContent.QB)) {
+                hashMapArrayList = operationMethod(hashMapArrayList, operationFeeNum+"", triggeringRulesMap);
+            }
+            long x6 = System.currentTimeMillis();
+            System.out.println("指标十四  = " + (x6-x5));
+
         //指标十六  临床用血相关记录符合率
-        filterVO.setFlagStr("1");
-                                 medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
-                                  retLists = bloodMethod(retLists, medManageParams, triggeringRulesMap);
-
-         if(StringUtils.isNotEmpty(filterVO.getIndexName())){
-             List<Map<String, String>> retData = new ArrayList<>();
-             for (int i = 0; i < retLists.size(); i++) {
-                 if(retLists.get(i).containsValue(filterVO.getIndexName())){
-                     retData.add(retLists.get(i));
-                     break;
-                 }
-             }
-             return retData;
-         }
+            if (indexName.equals(QualityContent.LCYX_XGJL_WCL)||indexName.equals(QualityContent.QB)) {
+                filterVO.setFlagStr("1");
+                List<MedManageParamsDTO> medManageParams = behospitalInfoFacade.getMedManageParams(filterVO);
+                long x7 = System.currentTimeMillis();
+                System.out.println("lis查询 = " + (x7-x6));
+                hashMapArrayList = bloodMethod(hashMapArrayList,doctorAdviceMedManageParams, medManageParams, triggeringRulesMap);
+                long x9 = System.currentTimeMillis();
+                System.out.println("封装 = " + (x9-x7));
+            }
+            long x8 = System.currentTimeMillis();
+            System.out.println("指标十六 = " + (x8-x6));
+            System.out.println("总耗时 = " + (x8-x1));
+        }
 
-        return retLists;
+
+        return hashMapArrayList;
     }
 
     /**
@@ -564,166 +620,164 @@ public class ConsoleFacade {
      */
     public List<String>  adviceVerify(FilterVO filterVO){
         List<Map<String, String>> medicalRecords = behospitalInfoFacade.getMedicalRecords(filterVO);
-        List<String> behospitalCodeList = new ArrayList<>();
+        List<String> behospitalCodeList = new CopyOnWriteArrayList<>();
         for (Map<String, String> medicalRecord : medicalRecords) {
-            String b_code = medicalRecord.get("b_code");
             String behospitalCode = medicalRecord.get("behospital_code");
-            if(StringUtil.isEmpty(b_code)){
                 behospitalCodeList.add(behospitalCode);
-            }
         }
         return behospitalCodeList;
     }
+
     /**
-     * 医嘱表判断无病案首页是否为病理手术患者和手术患者的人数
+     * 医嘱二级条件判断 或且
+     * @param name
+     * @param arg
+     * @return
      */
-    public Map<String,Integer> getOperationPathologyNum(FilterVO filterVO){
-        List<String> behospitalCodeList = adviceVerify(filterVO);
-        int operationPathologyNum=0;
-        int operationNum=0;
-        HashMap<String, Integer> map = new HashMap<>();
-        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) {
-                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;
-                            }
-                        }
-                    }
-                    }
-                }
-                }
-            }
-            //手术
-            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  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;
             }
         }
-        map.put(QualityContent.NO_RECORD_OPERATION_PATHOLOGY,operationPathologyNum);
-        map.put(QualityContent.NO_RECORD_OPERATION,operationNum);
-        return map;
+        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人数
+     * 遍历医嘱信息存入相关数据
      */
-    public Map<String,Long> getCTNum(FilterVO filterVO){
-        filterVO.setFlagStr("1");
-        List<Map<String, String>> getDoctorAdviceNum = doctorAdviceFacade.getDoctorAdviceNum(filterVO);
-        Map<String, Long> map = new HashMap<>();
-        List<String> codeList = new ArrayList<>();
-        for (Map<String, String> ctNumMap : getDoctorAdviceNum) {
-                    String behospitalCode = ctNumMap.get("behospital_code");
-                    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;
+    public Map<String,Long> getAdviceNum(FilterVO filterVO,List<MedManageParamsDTO> doctorAdviceMedManageParamsList) throws ExecutionException, InterruptedException {
+        CopyOnWriteArrayList<MedManageParamsDTO> doctorAdviceMedManageParams = new CopyOnWriteArrayList<>(doctorAdviceMedManageParamsList);
+        Map map = new HashMap<String,Integer>();
+        List<String> CTBehospitalCode = new CopyOnWriteArrayList<>();
+        List<String> operationPathologyBehospitalCode = new CopyOnWriteArrayList<>();
+        List<String> MRBehospitalCode = new CopyOnWriteArrayList<>();
+        List<String> operationBehospitalCode = new CopyOnWriteArrayList<>();
+        List<String> pathologyBehospitalCode = new CopyOnWriteArrayList<>();
+        List<String> behospitalCodeList = adviceVerify(filterVO);
+        ForkJoinPool myPool = new ForkJoinPool(4);
+        myPool.submit(() ->
+        doctorAdviceMedManageParams.parallelStream().forEach(adviceMedManageParam->{
+            String daItemName = adviceMedManageParam.getDaItemName();
+            String behospitalCode = adviceMedManageParam.getBehospitalCode();
+            String doctorAdviceType = adviceMedManageParam.getDoctorAdviceType();
+            //得到与手术相关
+            if(StringUtil.isNotEmpty(daItemName)) {
+                //当code存在于无首页code集合中
+                if (behospitalCodeList.contains(behospitalCode)) {
+                    //code也不存在于以保存的code集合
+                    if(!operationBehospitalCode.contains(behospitalCode)){
+                    String[][] operationList = QualityContent.OPERATION_LIST;
+                    Boolean stair = stairCondition(daItemName, operationList);
+                    if(stair) {
+                        String[][] operationArg = QualityContent.OPERATION_ARG;
+                        Boolean levelCondition = secondLevelCondition(daItemName, operationArg);
+                        if (levelCondition) {
+                            operationBehospitalCode.add(behospitalCode);
+                        }
+                    }
+                  }
+                    if(!pathologyBehospitalCode.contains(behospitalCode)){
+                        Boolean condition = stairCondition(daItemName, QualityContent.BL_LIST);
+                        if (condition) {
+                            pathologyBehospitalCode.add(behospitalCode);
+                        }
+                    }
+                }
+                    //得到为临时医嘱
+                    if (StringUtil.isNotEmpty(doctorAdviceType)) {
+                        if (doctorAdviceType.equals(QualityContent.STAT_ORDER)) {
+                            if (!CTBehospitalCode.contains(behospitalCode)) {
+                                //筛选与CT相关
+                                //一级条件
+                                String[][] ctList = QualityContent.CT_LIST;
+                                Boolean stair = stairCondition(daItemName, ctList);
+                                if (stair) {
+                                    String[][] ctRegulation = QualityContent.CT_REGULATION;
+                                    Boolean levelCondition = secondLevelCondition(daItemName, ctRegulation);
+                                    if (levelCondition) {
+                                        CTBehospitalCode.add(behospitalCode);
+                                    }
                                 }
                             }
-                }
-            }
-        }
-        ArrayList<String> codeMri = new ArrayList<>();
-        for (Map<String, String> MRINumMap : getDoctorAdviceNum) {
-            String behospitalCodeMri = MRINumMap.get("behospital_code");
-                    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);
-                                    continue;
+                            //与MR相关
+                            if (!MRBehospitalCode.contains(behospitalCode)) {
+                                String[][] mrList = QualityContent.MR_LIST;
+                                Boolean stair = stairCondition(daItemName, mrList);
+                                if (stair) {
+                                    String[][] ctRegulation = QualityContent.CT_REGULATION;
+                                    Boolean levelCondition = secondLevelCondition(daItemName, ctRegulation);
+                                    if (levelCondition) {
+                                        MRBehospitalCode.add(behospitalCode);
+                                    }
                                 }
+                            }
+                        }
                     }
-                }
+            }
+    })).get();
+        myPool.shutdown();
+        for (String operation : operationBehospitalCode) {
+            if(pathologyBehospitalCode.contains(operation)){
+                operationPathologyBehospitalCode.add(operation);
             }
         }
-        if(ListUtil.isNotEmpty(codeList)){
+        if(ListUtil.isEmpty(CTBehospitalCode)){
             map.put("CT",Long.valueOf(0));
         }else {
-            map.put("CT",Long.valueOf(codeList.size()));
+            map.put("CT",Long.valueOf(CTBehospitalCode.size()));
+        }
+        if(ListUtil.isEmpty(MRBehospitalCode)){
+            map.put("MR",Long.valueOf(0));
+        }else {
+            map.put("MR",Long.valueOf(MRBehospitalCode.size()));
         }
-        if(ListUtil.isNotEmpty(codeMri)){
+        if(ListUtil.isEmpty(operationBehospitalCode)){
             map.put("MR",Long.valueOf(0));
         }else {
-            map.put("MR",Long.valueOf(codeMri.size()));
+            map.put("operation",Long.valueOf(operationBehospitalCode.size()));
+        }
+        if(ListUtil.isEmpty(operationPathologyBehospitalCode)){
+            map.put("operationPathology",Long.valueOf(0));
+        }else {
+            map.put("operationPathology",Long.valueOf(operationPathologyBehospitalCode.size()));
         }
+
         return map;
     }
 
+
     /**
      * 获取无病案首页抗菌药物使用人数
      * @param filterVO
@@ -737,7 +791,7 @@ public class ConsoleFacade {
                 QueryWrapper<DoctorAdvice> dtoQueryWrapper = new QueryWrapper<>();
                 dtoQueryWrapper.eq("behospital_code", behospitalCode)
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("da_status", QualityContent.EXECUTE_ORDER);
+                        .eq("da_status", QualityContent.IN_USE);
                 //查医嘱表
                 List<DoctorAdvice> doctorAdvices = doctorAdviceFacade.getBaseMapper().selectList(dtoQueryWrapper);
                 if (ListUtil.isNotEmpty(doctorAdvices) && doctorAdvices.size() > 0) {
@@ -781,7 +835,7 @@ public class ConsoleFacade {
                 QueryWrapper<DoctorAdvice> dtoQueryWrapper = new QueryWrapper<>();
                 dtoQueryWrapper.eq("behospital_code", behospitalCode)
                         .eq("is_deleted", IsDeleteEnum.N.getKey())
-                        .eq("da_status", QualityContent.EXECUTE_ORDER);
+                        .eq("da_status", QualityContent.IN_USE);
                 List<DoctorAdvice> doctorAdvices = doctorAdviceFacade.getBaseMapper().selectList(dtoQueryWrapper);
                 if(ListUtil.isNotEmpty(doctorAdvices)&&doctorAdvices.size()>0){
                     doc:
@@ -2635,13 +2689,13 @@ public class ConsoleFacade {
     //指标十八 抢救记录
     private  List<Map<String, String>> rescueMethod(List<MedManageParamsDTO> medManageParams, List<Map<String, String>> retList,Map<String, Long> triggeringRulesMap){
         List<MedManageParamsDTO> manageList= new ArrayList<>();
+        List<String> rescueDrugList = QualityContent.RESCUEDRUGLIST;
         for (int i = 0; i < medManageParams.size(); i++) {
-            List<String> rescueDrugList = QualityContent.getRescue_Drug_List();
+            String daItemName = medManageParams.get(i).getDaItemName();
             String doctorAdviceType = medManageParams.get(i).getDoctorAdviceType();
             String da_status = medManageParams.get(i).getDa_status();
             for (String str : rescueDrugList) {
-                String daItemName = medManageParams.get(i).getDaItemName();
-                if(StringUtils.isNotEmpty(daItemName) && daItemName.contains(str) && StringUtils.isNotEmpty(doctorAdviceType) && doctorAdviceType.equals(QualityContent.STAT_ORDER) && StringUtils.isNotEmpty(da_status) && ! doctorAdviceType.equals(QualityContent.CANCELLATION_ORDER)){
+                if(StringUtils.isNotEmpty(daItemName) && daItemName.contains(str) && StringUtils.isNotEmpty(doctorAdviceType) && doctorAdviceType.equals(QualityContent.STAT_ORDER) && (da_status == null || (StringUtils.isNotEmpty(da_status) && ! doctorAdviceType.equals(QualityContent.CANCELLATION_ORDER)))){
                     manageList.add(medManageParams.get(i));
                 }
             }
@@ -2693,22 +2747,31 @@ public class ConsoleFacade {
     }
 
     //指标十六  临床用血相关记录符合率
-    private  List<Map<String, String>> bloodMethod( List<Map<String, String>>retList,  List<MedManageParamsDTO> medManageParams, Map<String, Long> triggeringRulesMap){
-        List<MedManageParamsDTO> manageList= new ArrayList<>();
-        for (MedManageParamsDTO medManageParam : medManageParams) {
-            List<String> blood_list = QualityContent.getBlood_List();
-            String doctorAdviceType = medManageParam.getDoctorAdviceType();
-            String da_status = medManageParam.getDa_status();
-            String daItemName = medManageParam.getDaItemName();
-            String repName = medManageParam.getRepName();
-            for (String str : blood_list) {
-                if(StringUtils.isNotEmpty(daItemName) && daItemName.contains(str) && StringUtils.isNotEmpty(repName) && repName.contains(str) && StringUtils.isNotEmpty(doctorAdviceType) && doctorAdviceType.equals(QualityContent.STAT_ORDER) && StringUtils.isNotEmpty(da_status) && ! da_status.equals(QualityContent.CANCELLATION_ORDER)){
-                    manageList.add(medManageParam);
-                }
-            }
-        }
+    private  List<Map<String, String>> bloodMethod( List<Map<String, String>>retList,List<MedManageParamsDTO> doctorAdviceList, List<MedManageParamsDTO> medManageParams, Map<String, Long> triggeringRulesMap){
+        Set<String> manageList= new CopyOnWriteArraySet<>();
+        List<String> blood_list = QualityContent.BLOODLIST;
+        //lis项目存在用血住院病历号
+        long xx1 = System.currentTimeMillis();
+        List<String> beCode = medManageParams.stream()
+                .filter(obj -> StringUtils.isNotEmpty(obj.getRepName()) && blood_list.contains(obj.getRepName()))
+                .map(MedManageParamsDTO::getBehospitalCode).distinct()
+                .collect(Collectors.toList());
+        long xx2= System.currentTimeMillis();
+        System.out.println("lis项目存在用血住院病历号 = " + (xx2-xx1));
+        //advice体现lis项目存在用血的住院病历号
+        doctorAdviceList.parallelStream()
+              .filter(obj -> beCode.contains(obj.getBehospitalCode()) && obj.getDoctorAdviceType()
+                      .equals(QualityContent.STAT_ORDER) && blood_list.contains(obj.getDaItemName()) &&
+                      (obj.getDa_status() == null) || (StringUtils.isNotEmpty(obj.getDa_status()) && ! obj.getDa_status()
+                      .equals(QualityContent.CANCELLATION_ORDER)))
+                .distinct()
+              .map(obj -> manageList.add(obj.getBehospitalCode()))
+              .collect(Collectors.toList());
+        long xx3= System.currentTimeMillis();
+        System.out.println("advice体现lis项目存在用血的住院病历号 = " + (xx3-xx2));
+
             //临床用血的质控病历总数
-            double count = manageList.stream().map(MedManageParamsDTO::getBehospitalCode).distinct().count();
+            double count = manageList.size();
             String num = null;
             if(StringUtils.isNotEmpty(String.valueOf(count)) &&  count != 0d){
                 //指标十七
@@ -2804,11 +2867,10 @@ public class ConsoleFacade {
     }
 
 
-     private List<Map<String, String>> ManageIndexMethod(List<Map<String, String>> retList, Map<String, Object> baseIndex,FilterVO filterVO){
+     private List<Map<String, String>> ManageIndexMethod(String indexName,List<Map<String, String>> retList, Map<String, Object> baseIndex,FilterVO filterVO){
          FilterVO timeVo = new FilterVO();
          BeanUtils.copyProperties(filterVO,timeVo);
          QueryWrapper<MedManagementInfo> query = new QueryWrapper<>();
-         DecimalFormat df = new DecimalFormat("0.00");
          timeTrans(timeVo);
          query.eq("hospital_id", filterVO.getHospitalId())
                  .eq("is_deleted", IsDeleteEnum.N)
@@ -2817,76 +2879,89 @@ public class ConsoleFacade {
                  .ge("start_date",timeVo.getStartDate())
                  .le("end_date",timeVo.getEndDate())
                  .select("position_id","work_person");
-
-
          List<MedManagementInfo> list = medManagementInfoService.list(query);
-         //单位时间同期门诊病案管理人员实际工作总月数  Double  =
-         Optional<Double> firOp = list.stream().filter(obj -> obj.getPositionId().equals("3")).map(MedManagementInfo::getWorkPerson).reduce(Double::sum);
-         Double firMouth = 0d;
-         if(firOp.isPresent()){
-              firMouth = firOp.get();
+         //单位时间同期门诊病案管理人员实际工作总月数
+         if(indexName.equals(QualityContent.MZBA_CYHZ)||indexName.equals(QualityContent.QB)) {
+             Optional<Double> firOp = list.stream().filter(obj -> obj.getPositionId().equals("3")).map(MedManagementInfo::getWorkPerson).reduce(Double::sum);
+             Double firMouth = 0d;
+             if(firOp.isPresent()){
+                 firMouth = firOp.get();
+             }
+             String num3= null;
+             if(firMouth != 0d && firMouth != null  && StringUtils.isNotEmpty( baseIndex.get("secWorkNum").toString())){
+                 //指标二
+                 num3 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("secWorkNum").toString())/firMouth));
+             }
+             LinkedHashMap<String, String> thrMap = new LinkedHashMap<>();
+             thrMap.put("name","门诊病案管理人员月均负担门诊患者病历数");
+             thrMap.put("num",num3);
+             retList.add(thrMap);
          }
+
          //单位时间同期住院病案管理人员实际工作总月数
-         Optional<Double> secOp = list.stream().filter(obj->obj.getPositionId().equals("1")).map(MedManagementInfo::getWorkPerson).reduce(Double::sum);
-         Double secMouth = 0d;
-         if(secOp.isPresent()){
-             secMouth = secOp.get();
+         if(indexName.equals(QualityContent.ZYBA_CYHZ)||indexName.equals(QualityContent.QB)) {
+             Optional<Double> secOp = list.stream().filter(obj->obj.getPositionId().equals("1")).map(MedManagementInfo::getWorkPerson).reduce(Double::sum);
+             Double secMouth = 0d;
+             if(secOp.isPresent()){
+                 secMouth = secOp.get();
+             }
+             //指标一
+             String num1 = null;
+             if(secMouth != 0d && secMouth != null && StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString())){
+                 num1 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("firWorkNum").toString()) / secMouth));
+             }
+             LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
+             firMap.put("name","住院病案管理人员月均负担出院患者病历数");
+             firMap.put("num",num1);
+             retList.add(firMap);
          }
+
          //单位时间同期病案编码管理人员实际工作总月数
-         Optional<Double> thrOp = list.stream().filter(obj->obj.getPositionId().equals("2")).map(MedManagementInfo::getWorkPerson).reduce(Double::sum);
-         Double thrMouth = 0d;
-         if(thrOp.isPresent()){
-             thrMouth = thrOp.get();
-         }
-         Double firRecord = 0d;
+         if(indexName.equals(QualityContent.BABM_CYHZ)||indexName.equals(QualityContent.QB)) {
+             Optional<Double> thrOp = list.stream().filter(obj->obj.getPositionId().equals("2")).map(MedManagementInfo::getWorkPerson).reduce(Double::sum);
+             Double thrMouth = 0d;
+             if(thrOp.isPresent()){
+                 thrMouth = thrOp.get();
+             }
 
-         //指标一
-         String num1 = null;
-         if(secMouth != 0d && secMouth != null && StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString())){
-              num1 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("firWorkNum").toString()) / secMouth));
-         }
-         LinkedHashMap<String, String> firMap = new LinkedHashMap<>();
-         firMap.put("name","住院病案管理人员月均负担出院患者病历数");
-         firMap.put("num",num1);
-         retList.add(firMap);
-         //指标三
-         String num2 = null;
-         if(thrMouth != 0d && thrMouth != null && StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString())){
-              num2 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("firWorkNum").toString())/thrMouth));
+             //指标三
+             String num2 = null;
+             if(thrMouth != 0d && thrMouth != null && StringUtils.isNotEmpty( baseIndex.get("firWorkNum").toString())){
+                 num2 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("firWorkNum").toString())/thrMouth));
 
+             }
+             LinkedHashMap<String, String> secMap = new LinkedHashMap<>();
+             secMap.put("name","病案编码人员月均负担出院患者病历数");
+             secMap.put("num",num2);
+             retList.add(secMap);
          }
-         LinkedHashMap<String, String> secMap = new LinkedHashMap<>();
-         secMap.put("name","病案编码人员月均负担出院患者病历数");
-         secMap.put("num",num2);
-         retList.add(secMap);
-
-         String num3= null;
-         if(firMouth != 0d && firMouth != null  && StringUtils.isNotEmpty( baseIndex.get("secWorkNum").toString())){
-         //指标二
-                num3 = String.valueOf(Math.ceil(Double.parseDouble(baseIndex.get("secWorkNum").toString())/firMouth));
-         }
-         LinkedHashMap<String, String> thrMap = new LinkedHashMap<>();
-         thrMap.put("name","门诊病案管理人员月均负担门诊患者病历数");
-         thrMap.put("num",num3);
-         retList.add(thrMap);
-
-         //指标二十七 -甲级病历率
-         String num4= null;
-         if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString())){
-             firRecord =Double.parseDouble(baseIndex.get("forWorkNum").toString());
-         }
-         if( firRecord != 0d && StringUtils.isNotEmpty( baseIndex.get("sixWorkNum").toString()) ){
-             double retNum = Double.parseDouble(baseIndex.get("sixWorkNum").toString()) * 100 / firRecord;
-             double firGradeStr = Double.parseDouble(df.format(retNum));
-             num4 = String.valueOf(Math.ceil(firGradeStr));
-         }
-         LinkedHashMap<String, String> fouMap = new LinkedHashMap<>();
-         fouMap.put("name","甲级病历率");
-         fouMap.put("notCopiedStr",StringUtils.isEmpty(num4)? null:(num4+"%"));
-         fouMap.put("num",num4);
-         retList.add(fouMap);
          return retList;
      };
+
+
+    private List<Map<String, String>> firMethod(String indexName,List<Map<String, String>> retList, Map<String, Object> baseIndex){
+        DecimalFormat df = new DecimalFormat("0.00");
+        if(indexName.equals(QualityContent.JJBLL)||indexName.equals(QualityContent.QB)) {
+            //指标二十七 -甲级病历率
+            Double firRecord = 0d;
+            String num4= null;
+            if(StringUtils.isNotEmpty( baseIndex.get("forWorkNum").toString())){
+                firRecord =Double.parseDouble(baseIndex.get("forWorkNum").toString());
+            }
+            if( firRecord != 0d && StringUtils.isNotEmpty( baseIndex.get("sixWorkNum").toString()) ){
+                double retNum = Double.parseDouble(baseIndex.get("sixWorkNum").toString()) * 100 / firRecord;
+                double firGradeStr = Double.parseDouble(df.format(retNum));
+                num4 = String.valueOf(Math.ceil(firGradeStr));
+            }
+            LinkedHashMap<String, String> fouMap = new LinkedHashMap<>();
+            fouMap.put("name","甲级病历率");
+            fouMap.put("notCopiedStr",StringUtils.isEmpty(num4)? null:(num4+"%"));
+            fouMap.put("num",num4);
+            retList.add(fouMap);
+        }
+        return retList;
+    };
+
    private void timeTrans(FilterVO filterVO){
        SimpleDateFormat myFormatter = new SimpleDateFormat("yyyy-MM-dd");
        Calendar cal1 = Calendar.getInstance();

+ 1 - 1
src/main/java/com/diagbot/web/ConsoleController.java

@@ -448,7 +448,7 @@ public class ConsoleController {
     @ApiOperation(value = "病案首页合格率占比[by:zhaops]",
             notes = "type: 统计维度 1-本月,2-本年(必填)<br>" +
                     "level: 病历等级 <br>" +
-                    "name: 科室名称 <br>" +
+                    "deptName: 科室名称 <br>" +
                     "asc: 排序(升序) <br>" +
                     "desc: 排序(降序) <br>" +
                     "isPlacefile: 是否归档(0:未归档,1:已归档) <br>")

+ 8 - 5
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -782,21 +782,22 @@
         <if test="flagStr != null and flagStr == 1 ">
         f2.rep_name as repName,
         </if>
+        <if test="flagStr != null and flagStr == 2">
         f3.da_item_name as daItemName,
         f3.da_status AS daStatus,
-        f3.doctor_advice_type as doctorAdviceType
+        f3.doctor_advice_type as doctorAdviceType,
+        </if>
+        f1.hospitalId
         from(
         SELECT DISTINCT
         a.hospital_id as hospitalId,
         a.behospital_code as behospitalCode
         FROM
         med_behospital_info a,
-        med_qcresult_info b,
-        qc_cases_entry d
+        med_qcresult_info b
         WHERE
         a.is_deleted = 'N'
         AND b.is_deleted = 'N'
-        AND d.is_deleted = 'N'
         AND a.hospital_id = b.hospital_id
         AND a.behospital_code = b.behospital_code
         AND <![CDATA[a.leave_hospital_date >= #{startDate}]]>
@@ -812,10 +813,12 @@
             AND f1.hospitalId = f2.hospital_id
             AND f1.behospitalCode = f2.behospital_code
         </if>
+        <if test="flagStr != null and flagStr == 2">
             join  med_doctor_advice f3
         on  f3.is_deleted = 'N'
         AND f1.hospitalId = f3.hospital_id
         AND f1.behospitalCode = f3.behospital_code
+        </if>
     </select>
 
 
@@ -17842,7 +17845,7 @@
     LEFT JOIN med_home_page b ON b.behospital_code = d.behospital_code
     AND d.hospital_id = b.hospital_id
     AND b.is_deleted = 'N'
-
+    where ISNULL(b.behospital_code)
     </select>
 
 <!--    首页恶性肿瘤-->

+ 2 - 2
src/test/java/com/diagbot/CodeGeneration.java

@@ -33,7 +33,7 @@ public class CodeGeneration {
         gc.setEnableCache(false);// XML 二级缓存
         gc.setBaseResultMap(true);// XML ResultMap
         gc.setBaseColumnList(false);// XML columList
-        gc.setAuthor("zhoutg");// 作者
+        gc.setAuthor("zhanghang");// 作者
 
         // 自定义文件命名,注意 %s 会自动填充表实体属性!
         gc.setControllerName("%sController");
@@ -56,7 +56,7 @@ public class CodeGeneration {
         StrategyConfig strategy = new StrategyConfig();
 //        strategy.setTablePrefix(new String[] { "med_" });// 此处可以修改为您的表前缀
         strategy.setNaming(NamingStrategy.underline_to_camel);// 表名生成策略
-        strategy.setInclude(new String[] { "str_consultation_record"}); // 需要生成的表
+        strategy.setInclude(new String[] { "med_qcresult_info"}); // 需要生成的表
 
         strategy.setSuperServiceClass(null);
         strategy.setSuperServiceImplClass(null);