Browse Source

脚本完善

chengyao 3 năm trước cách đây
mục cha
commit
0ffe8ff828

+ 19 - 26
doc/037.20211117_2.1.4/qc_initv2.1.4.sql

@@ -47,11 +47,11 @@ AND (a.doctor_id is null or a.doctor_id = '' or a.doctor_id ='-' or a.doctor_id
 
 
 -- 对空数据初始化
-UPDATE med_behospital_info a set a.doctor_name = '-' where a.doctor_name is null || a.doctor_name = '' AND a.hospital_id = @hospitalId
-UPDATE med_behospital_info a set a.doctor_id = '-' where a.doctor_id is null || a.doctor_id = '' AND a.hospital_id = @hospitalId
+UPDATE med_behospital_info a set a.doctor_name = '-' where a.doctor_name is null || a.doctor_name = '' AND a.hospital_id = @hospitalId;
+UPDATE med_behospital_info a set a.doctor_id = '-' where a.doctor_id is null || a.doctor_id = '' AND a.hospital_id = @hospitalId;
 
 
-DROP TABLE IF EXISTS `med_qcresult_click`;
+DROP TABLE IF EXISTS `med_click_info`;
 CREATE TABLE `med_click_info` (
   `id` int(20) NOT NULL AUTO_INCREMENT,
   `hospital_id` tinyint(5) DEFAULT '0' COMMENT '医院ID',
@@ -59,7 +59,8 @@ CREATE TABLE `med_click_info` (
   `dept_name` varchar(64) DEFAULT NULL COMMENT '科室名称',
   `doctor_id` varchar(16) DEFAULT NULL COMMENT '医生ID',
   `doctor_name` varchar(64) DEFAULT NULL COMMENT '医生姓名',
-  `qcresult_info_id` int(16) DEFAULT NULL COMMENT '质控结果基本信息ID',
+  `opt_type` tinyint(1) DEFAULT '1' COMMENT '0-单模块质控 1-全病历质控',
+  `qcresult_info_id` int(16) DEFAULT NULL COMMENT '评分结果id',
   `behospital_code` varchar(16) DEFAULT NULL COMMENT '病人住院ID',
   `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
   `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT ' 记录创建时间',
@@ -68,8 +69,7 @@ CREATE TABLE `med_click_info` (
   `modifier` varchar(20) DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
   PRIMARY KEY (`id`),
   KEY `idx_all` (`hospital_id`,`behospital_code`) USING BTREE,
-  KEY `qcresult_info_id` (`qcresult_info_id`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=37918 DEFAULT CHARSET=utf8 COMMENT='临床医生点击质控病历次数基本表';
+) ENGINE=InnoDB AUTO_INCREMENT=62313 DEFAULT CHARSET=utf8 COMMENT='临床医生点击质控病历次数基本表';
 
 DROP TABLE IF EXISTS `med_qcresult_click`;
 CREATE TABLE `med_qcresult_click` (
@@ -78,14 +78,14 @@ CREATE TABLE `med_qcresult_click` (
   `behospital_code` varchar(16) NOT NULL COMMENT '病人住院ID',
   `dept_id` varchar(16) DEFAULT NULL COMMENT '住院科室ID',
   `dept_name` varchar(64) DEFAULT NULL COMMENT '住院科室名称',
-  `doctor_id` varchar(16) DEFAULT '' COMMENT '主治医生ID',
-  `doctor_name` varchar(50) DEFAULT '' COMMENT '主治医生姓名',
   `qcresult_info_id` bigint(20) NOT NULL COMMENT '评分结果id',
   `cases_entry_ids` varchar(1024) DEFAULT '0' COMMENT '触发埋点病历质控缺陷id集',
   `is_deleted` char(3) DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
   `gmt_create` datetime DEFAULT '1970-01-01 12:00:00' COMMENT ' 记录创建时间',
-  PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=8586 DEFAULT CHARSET=utf8 COMMENT='全病历质控、单模块质控(触发埋点)缺陷详情';
+  PRIMARY KEY (`id`),
+  KEY `idx_all` (`hospital_id`,`behospital_code`)
+) ENGINE=InnoDB AUTO_INCREMENT=8587 DEFAULT CHARSET=utf8 COMMENT='全病历质控、单模块质控(触发埋点)缺陷详情';
+
 
 
 /**
@@ -98,7 +98,7 @@ med_qcresult_cases表新增评分结果主表id字段
  */
 ALTER TABLE `med_qcresult_cases` ADD COLUMN qcresult_info_id BIGINT (20) DEFAULT NULL COMMENT '评分结果id' AFTER `behospital_code`;
 
---全院
+-- 全院
 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-SJFX', '1', '1', '12', '用户-数据分析');
 SET @id =@@identity;
 
@@ -113,7 +113,8 @@ INSERT INTO `sys_role_menu` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creat
 
 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', @idSec, 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', @idSec, 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', @idThr, 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', @idThr, NULL);
 
 
 
@@ -131,27 +132,18 @@ INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`,
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @idperSec, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @idperThr, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @idperFou, NULL);
-INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @idperFiv, NULL);
-INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @idperSix, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', @idperFir, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', @idperSec, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', @idperThr, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', @idperFou, NULL);
 
-INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idSec, @idperFir, NULL, '临床质控使用统计');
+-- INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idSec, @idperFir, NULL, '临床质控使用统计');
 -- INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idSec, @idperSec, NULL, '临床质控使用统计(内页)');
-INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idThr, @idperThr, NULL, '条目缺陷改善统计');
+-- INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idThr, @idperThr, NULL, '条目缺陷改善统计');
 -- INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idThr, @idperFou, 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', @idThr, 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', @idThr, NULL);
-
---科室
+-- 科室
 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-SJFXKS', '1', '1', '13', '用户-数据分析(科室)');
 SET @idks =@@identity;
 
@@ -161,7 +153,6 @@ SET @idksThr =@@identity;
 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', @idks, 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', '2', @idks, 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', @idksThr, 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', '2', @idksThr, NULL);
 
@@ -172,9 +163,11 @@ SET @idperFiv =@@identity;
 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', '条目缺陷改善统计(内页)', '', '/qc/analysisDept/getEntryDefectImproveInnerDept', 'ALL', '条目缺陷改善统计(内页)-科室', NULL);
 SET @idperSix =@@identity;
 
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @idperFiv, NULL);
+INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', @idperSix, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', @idperFiv, NULL);
 INSERT INTO `sys_role_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `role_id`, `permission_id`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', @idperSix, NULL);
 
 
-INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idksThr, @idperFiv, NULL, '条目缺陷改善统计');
+-- INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idksThr, @idperFiv, NULL, '条目缺陷改善统计');
 -- INSERT INTO `sys_menu_permission` ( `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `menu_id`, `permission_id`, `order_nu`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', @idksThr, @idperSix, NULL, '条目缺陷改善统计(内页)');

+ 0 - 10
src/main/java/com/diagbot/entity/MedQcresultClick.java

@@ -44,16 +44,6 @@ public class MedQcresultClick implements Serializable {
     private String deptName;
 
 
-    /**
-     * 医生id
-     */
-    private String doctorId;
-
-    /**
-     * 医生name
-     */
-    private String doctorName;
-
     /**
      * 评分结果id
      */

+ 3 - 0
src/main/java/com/diagbot/facade/DataAnalysisDeptFacade.java

@@ -133,6 +133,9 @@ public class DataAnalysisDeptFacade {
     }
 
     private void entryDefectDeptSet(GetEntryDefectImproveDeptVO getEntryDefectImproveDeptVO) {
+        if(StringUtils.isBlank(getEntryDefectImproveDeptVO.getDeptName())){
+            getEntryDefectImproveDeptVO.setDeptName("--");
+        }
         getEntryDefectImproveDeptVO.setCurrent(1L);
         getEntryDefectImproveDeptVO.setSize(Long.MAX_VALUE);
         //入参验证

+ 0 - 2
src/main/java/com/diagbot/facade/DataAnalysisFacade.java

@@ -129,8 +129,6 @@ public class DataAnalysisFacade {
             if (null != behospitalInfo) {
                 medQcresultClick.setDeptId(behospitalInfo.getBehDeptId());
                 medQcresultClick.setDeptName(behospitalInfo.getBehDeptName());
-                medQcresultClick.setDoctorId(behospitalInfo.getDoctorId());
-                medQcresultClick.setDoctorName(behospitalInfo.getDoctorName());
             }
             medQcresultClick.setQcresultInfoId(qcresultInfo.getId());
             medQcresultClick.setCasesEntryIds(sbFir.toString());

+ 0 - 2
src/main/resources/mapper/MedQcresultClickMapper.xml

@@ -9,8 +9,6 @@
         <result column="behospital_code" property="behospitalCode" />
         <result column="dept_id" property="deptId" />
         <result column="dept_name" property="deptName" />
-        <result column="doctor_id" property="doctorId" />
-        <result column="doctor_name" property="doctorName" />
         <result column="qcresult_info_id" property="qcresultInfoId" />
         <result column="cases_entry_ids" property="CasesEntryIds" />
         <result column="gmt_create" property="gmtCreate" />