Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/dev/20200716_1.3.8' into debug

zhaops 4 rokov pred
rodič
commit
8589e75116

+ 130 - 1
doc/017.20200716v1.3.8/qc_inti_check.sql

@@ -1,4 +1,133 @@
 use `qc`;
 ALTER TABLE `med_check_info` ADD COLUMN `check_type` INT(11) NULL COMMENT '核查类型(0病历,1病案首页)' AFTER `status`;
 UPDATE med_check_info a SET check_type =0;
-UPDATE med_check_info a SET check_name = (SELECT linkman FROM sys_user b WHERE a.check_id=b.id) inkman FROM sys_user b WHERE a.check_id=b.id)
+UPDATE med_check_info a SET check_name = (SELECT linkman FROM sys_user b WHERE a.check_id=b.id) inkman FROM sys_user b WHERE a.check_id=b.id)
+
+
+DELETE FROM sys_user_pageset WHERE user_id = -1;
+
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历等级', 'level', '1', '1', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历得分', 'scoreRes', '1', '2', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人住院序号', 'behospitalCode', '1', '3', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查状态', 'mrStatus', '1', '4', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查人', 'mrName', '1', '5', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案首页核查时间', 'mrTime', '1', '6', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查状态', 'checkStatus', '1', '7', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查人', 'chName', '1', '8', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病历核查时间', 'chTime', '1', '9', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病案号', 'fileCode', '1', '10', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '病人姓名', 'name', '1', '11', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '性别', 'sex', '1', '12', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '年龄', 'age', '1', '13', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '床号', 'bedCode', '1', '14', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '入院日期', 'behospitalDate', '1', '15', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '出院日期', 'leaveHospitalDate', '1', '16', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '归档日期', 'placefileDate', '1', '17', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主诊断', 'diagnose', '1', '18', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '住院医生', 'behDoctorName', '1', '19', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主管医生', 'doctorName', '1', '20', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '主任医生', 'directorDoctorName', '1', '21', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES (  'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '科室', 'behDeptName', '1', '22', NULL);
+INSERT INTO `sys_user_pageset` (  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`) VALUES ( 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '-1', '1', '评分时间', 'gradeTime', '1', '23', NULL);
+
+-- 找出没有”核查状态“的人员并给加上
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查状态" ELSE "病案首页核查状态" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrStatus" ELSE "mrStatus" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 4 ELSE 4 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrStatus") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查人" ELSE "病案首页核查人" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrName" ELSE "mrName" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 5 ELSE 5 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrName") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病案首页核查时间" ELSE "病案首页核查时间" END NAME,
+ CASE WHEN ISNULL(userId) THEN "mrTime" ELSE "mrTime" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 6 ELSE 6 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "mrTime") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病历核查人" ELSE "病历核查人" END NAME,
+ CASE WHEN ISNULL(userId) THEN "chName" ELSE "chName" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 7 ELSE 7 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "chName") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+
+ INSERT INTO sys_user_pageset
+(  `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `user_id`, `page_type`, `name`, `val`, `status`, `order_no`, `remark`)
+ SELECT is_deleted,
+gmt_create,
+ gmt_modified,
+ creator,
+MODIFIER,
+ user_id,
+ page_type,
+ CASE WHEN ISNULL(NAME) THEN "病历核查时间" ELSE "病历核查时间" END NAME,
+ CASE WHEN ISNULL(userId) THEN "chTime" ELSE "chTime" END val,
+ CASE WHEN ISNULL(STATUS) THEN 0 ELSE 0 END STATUS,
+ CASE WHEN ISNULL(order_no) THEN 8 ELSE 8 END order_no,
+ remark
+ FROM (SELECT * FROM  sys_user_pageset  WHERE user_id <> -1) b LEFT JOIN  (SELECT c.user_id AS userId FROM  sys_user_pageset c  WHERE user_id <> -1 AND val = "chTime") p ON b.user_id = p.userId
+WHERE  userId IS NULL
+ GROUP BY user_id ;
+
+ UPDATE sys_user_pageset a SET a.name = "病历核查状态" WHERE a.user_id <> -1 AND val ="checkStatus"
+
+-- 新增权限
+INSERT INTO `sys_menu`(`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `parent_id`, `code`, `show_status`, `maintain_status`, `order_no`, `remark`) VALUES (38, 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '31天再入院人数', 17, 'YH-ZKK-31TZRYRS', 1, 1, 14, '用户-质控科-31天再入院人数');
+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, 38, '用户-质控科-31天再入院人数');

+ 8 - 0
src/main/java/com/diagbot/vo/QcResultShortPageVO.java

@@ -36,6 +36,14 @@ public class QcResultShortPageVO extends Page {
      * 条目id
      */
     private Long casesEntryId;
+    /**
+     * 模块名称
+     */
+    private String casesName;
+    /**
+     * 模块id
+     */
+    private Long casesId;
     /**
      * 科室名称
      */

+ 2 - 0
src/main/java/com/diagbot/web/ConsoleController.java

@@ -466,6 +466,8 @@ public class ConsoleController {
                     "patName: 病人姓名 <br>" +
                     "casesEntryName: 条目名称 <br>" +
                     "casesEntryId: 条目id <br>" +
+                    "casesName: 模块名称 <br>" +
+                    "casesId: 模块id <br>" +
                     "behDeptName:科室名称 <br>" +
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +

+ 2 - 0
src/main/java/com/diagbot/web/ConsoleExportController.java

@@ -209,6 +209,8 @@ public class ConsoleExportController {
                     "patName: 病人姓名 <br>" +
                     "casesEntryName: 条目名称 <br>" +
                     "casesEntryId: 条目id <br>" +
+                    "casesName: 模块名称 <br>" +
+                    "casesId: 模块id <br>" +
                     "behDeptName:科室名称 <br>" +
                     "doctorId:医生工号 <br>" +
                     "doctorName:医生姓名 <br>" +

+ 27 - 9
src/main/resources/mapper/BehospitalInfoMapper.xml

@@ -3164,6 +3164,15 @@
         <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
             AND d.NAME = #{qcResultShortPageVO.casesEntryName}
         </if>
+        <if test="qcResultShortPageVO.casesEntryId != null ">
+            AND d.id = #{qcResultShortPageVO.casesEntryId}
+        </if>
+        <if test="qcResultShortPageVO.casesName != null and qcResultShortPageVO.casesName != ''">
+            AND d.cases_name = #{qcResultShortPageVO.casesName}
+        </if>
+        <if test="qcResultShortPageVO.casesId != null">
+            AND d.cases_id = #{qcResultShortPageVO.casesId}
+        </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
             AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
             OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
@@ -3174,9 +3183,6 @@
             OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
             OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
         </if>
-        <if test="qcResultShortPageVO.casesEntryId != null ">
-            AND d.id = #{qcResultShortPageVO.casesEntryId}
-        </if>
         <if test="qcResultShortPageVO.isReject != null">
             AND c.is_reject = #{qcResultShortPageVO.isReject}
         </if>
@@ -5342,6 +5348,15 @@
         <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
             AND d.NAME = #{qcResultShortPageVO.casesEntryName}
         </if>
+        <if test="qcResultShortPageVO.casesEntryId != null ">
+            AND d.id = #{qcResultShortPageVO.casesEntryId}
+        </if>
+        <if test="qcResultShortPageVO.casesName != null and qcResultShortPageVO.casesName != ''">
+            AND d.cases_name = #{qcResultShortPageVO.casesName}
+        </if>
+        <if test="qcResultShortPageVO.casesId != null">
+            AND d.cases_id = #{qcResultShortPageVO.casesId}
+        </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
             AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
             OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
@@ -5352,9 +5367,6 @@
             OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
             OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
         </if>
-        <if test="qcResultShortPageVO.casesEntryId != null ">
-            AND d.id = #{qcResultShortPageVO.casesEntryId}
-        </if>
         <if test="qcResultShortPageVO.isReject != null">
             AND c.is_reject = #{qcResultShortPageVO.isReject}
         </if>
@@ -5565,6 +5577,15 @@
         <if test="qcResultShortPageVO.casesEntryName != null and qcResultShortPageVO.casesEntryName != ''">
             AND d.NAME = #{qcResultShortPageVO.casesEntryName}
         </if>
+        <if test="qcResultShortPageVO.casesEntryId != null ">
+            AND d.id = #{qcResultShortPageVO.casesEntryId}
+        </if>
+        <if test="qcResultShortPageVO.casesName != null and qcResultShortPageVO.casesName != ''">
+            AND d.cases_name = #{qcResultShortPageVO.casesName}
+        </if>
+        <if test="qcResultShortPageVO.casesId != null">
+            AND d.cases_id = #{qcResultShortPageVO.casesId}
+        </if>
         <if test="qcResultShortPageVO.doctorId != null and qcResultShortPageVO.doctorId != ''">
             AND (a.doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
             OR a.beh_doctor_id LIKE CONCAT( '%', #{qcResultShortPageVO.doctorId}, '%' )
@@ -5575,9 +5596,6 @@
             OR a.beh_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' )
             OR a.director_doctor_name LIKE CONCAT( '%', #{qcResultShortPageVO.doctorName}, '%' ))
         </if>
-        <if test="qcResultShortPageVO.casesEntryId != null ">
-            AND d.id = #{qcResultShortPageVO.casesEntryId}
-        </if>
         <if test="qcResultShortPageVO.isReject != null">
             AND c.is_reject = #{qcResultShortPageVO.isReject}
         </if>