فهرست منبع

Merge branch 'dev/law_20210712' into dev/mapping20210603

gaodm 3 سال پیش
والد
کامیت
2ea770e2bf

+ 17 - 0
doc/20210712静态知识增加法律法规/cdss_init.sql

@@ -0,0 +1,17 @@
+USE `cdss`;
+
+INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('130', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '法律法规', '10', '2', '100', '静态知识检索类型');
+INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('131', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '10', '法律法规', '10', '0', '10', '静态知识类型');
+INSERT INTO `sys_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('132', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '13', '法律法规', '法律法规', '1', '411', '页面显示词性');
+UPDATE `sys_dictionary_info` SET `return_type` = 0 WHERE `group_type` = 10 AND NAME LIKE '护理';
+-- 已经执行
+-- UPDATE `tran_plan_detail`
+-- SET number = NULL
+-- WHERE
+-- 	`name` IN (
+-- 		'开单合理性',
+-- 		'高危',
+-- 		'危急值提醒',
+-- 		'其他提醒'
+-- 	);
+

+ 31 - 0
doc/20210712静态知识增加法律法规/med2021_init.sql

@@ -0,0 +1,31 @@
+USE `med_2021`;
+
+INSERT INTO `kl_lexicon` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `name`, `code`, `is_has_common`, `only_one`, `can_change`, `remark`) VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '法律法规', '130', '0', '0', '0', '');
+
+
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('144', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '法律法规', '10', '2', '100', '静态知识检索类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('145', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '13', '法律法规', '法律法规', '1', '411', '页面显示词性');
+
+-- 静态信息关联放入到数据库中
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('146', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '50', '静态知识', '1', '1', '10', '静态知识类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('147', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '50', '注意事项', '2', '1', '20', '静态知识类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('148', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '50', '临床路径', '3', '1', '30', '静态知识类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('149', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '50', '一般治疗', '4', '1', '40', '静态知识类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('150', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '1', '1,3,4', '1', '0', '诊断关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('151', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '2', '1', '1', '0', '药品关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('152', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '3', '1,2', '1', '0', '检验套餐关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('153', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '4', '1,2', '1', '0', '检验细项关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('154', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '5', '1,2', '1', '0', '检查关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('155', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '6', '1,2', '1', '0', '检查子项关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('156', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '7', '1', '1', '0', '手术和操作关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('157', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '8', '1', '1', '0', '量表关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('158', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '9', '1', '1', '0', '护理关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('159', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '10', '1', '1', '0', '法律法规关联的静态信息类型');
+INSERT INTO `kl_dictionary_info` (`id`, `is_deleted`, `gmt_create`, `gmt_modified`, `creator`, `modifier`, `group_type`, `name`, `val`, `return_type`, `order_no`, `remark`) VALUES ('160', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '51', '999', '1,2,3,4', '1', '0', '其他关联的静态信息类型');
+
+-- 已经执行
+-- UPDATE `med_2021`.`kl_rule_plan` SET `id`='73', `is_deleted`='Y', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `plan_code`='rule', `rule_type`='1', `parent_id`='10', `name`='开单项', `type`='5', `number`=NULL, `code`='', `order_no`='4', `remark`='' WHERE (`id`='73');
+-- UPDATE `med_2021`.`kl_rule_plan` SET `id`='103', `is_deleted`='Y', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `plan_code`='rule', `rule_type`='1', `parent_id`='11', `name`='开单项', `type`='5', `number`=NULL, `code`='', `order_no`='4', `remark`='' WHERE (`id`='103');
+-- UPDATE `med_2021`.`kl_rule_plan` SET `id`='403', `is_deleted`='Y', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `plan_code`='rule', `rule_type`='1', `parent_id`='14', `name`='开单项', `type`='5', `number`=NULL, `code`='', `order_no`=NULL, `remark`='' WHERE (`id`='403');
+-- UPDATE `med_2021`.`kl_rule_plan` SET `id`='503', `is_deleted`='Y', `gmt_create`='1970-01-01 12:00:00', `gmt_modified`='1970-01-01 12:00:00', `creator`='0', `modifier`='0', `plan_code`='rule', `rule_type`='1', `parent_id`='15', `name`='开单项', `type`='5', `number`=NULL, `code`='', `order_no`=NULL, `remark`='' WHERE (`id`='503');
+-- DELETE FROM `kl_concept` where id = 80958;

+ 2 - 1
src/main/java/com/diagbot/enums/LexiconEnum.java

@@ -58,7 +58,8 @@ public enum LexiconEnum implements KeyedNamed {
     OperationClassNode(407,"手术和操作类别根节点"),
     LisClassNode(408,"实验室检查类别根节点"),
     PacsClassNode(409,"辅助检查类别根节点"),
-    Age(410,"年龄");
+    Age(410,"年龄"),
+    Law(130,"法律法规");
 
 
     @Setter

+ 15 - 9
src/main/java/com/diagbot/facade/KlConceptStaticFacade.java

@@ -95,7 +95,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
         StaticKnowledgeDTO staticKnowledgeDTO = new StaticKnowledgeDTO();
         Integer type = convertType(staticKnowledgeVO.getType(), 1);
         if (type == null) {
-            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确类型(1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理)");
+            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确类型(1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理、10-法律法规)");
         }
         staticKnowledgeVO.setType(type);
 
@@ -346,7 +346,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
     public IPage<StaticKnowledgeIndexPageDTO> staticIndexPage(StaticKnowledgeIndexPageVO staticKnowledgeIndexPageVO) {
         //默认查找全部
         if (ListUtil.isEmpty(staticKnowledgeIndexPageVO.getTypes())) {
-            staticKnowledgeIndexPageVO.setTypeIds(Arrays.asList(new Integer[] { 0 }));
+            staticKnowledgeIndexPageVO.setTypeIds(Arrays.asList(0));
         }
         staticKnowledgeIndexPageVO.setTypeIds(new ArrayList<>());
 
@@ -359,7 +359,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
         //检索类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、5-手术和操作
         if (ListUtil.isEmpty(types)
                 || (ListUtil.isNotEmpty(types) && types.contains(0))) {
-            staticKnowledgeIndexPageVO.getTypeIds().addAll(Arrays.asList(new Integer[] { LexiconEnum.Disease.getKey(),
+            staticKnowledgeIndexPageVO.getTypeIds().addAll(Arrays.asList(LexiconEnum.Disease.getKey(),
                     LexiconEnum.Medicine.getKey(),
                     LexiconEnum.LisName.getKey(),
                     LexiconEnum.LisSubName.getKey(),
@@ -367,7 +367,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
                     LexiconEnum.PacsSubName.getKey(),
                     LexiconEnum.Operation.getKey(),
                     LexiconEnum.Scale.getKey(),
-                    LexiconEnum.Nurse.getKey() }));
+                    LexiconEnum.Nurse.getKey(),
+                    LexiconEnum.Law.getKey()));
         } else {
             if (types.contains(1)) {
                 staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.Disease.getKey());
@@ -392,9 +393,12 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
             if (types.contains(9)) {
                 staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.Nurse.getKey());
             }
+            if (types.contains(10)) {
+                staticKnowledgeIndexPageVO.getTypeIds().add(LexiconEnum.Law.getKey());
+            }
         }
         if (ListUtil.isEmpty(staticKnowledgeIndexPageVO.getTypeIds())) {
-            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确的检索类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、7-手术和操作、8-量表、9-护理");
+            throw new CommonException(CommonErrorCode.PARAM_IS_ERROR, "请输入正确的检索类型(多选):0-全部、1-诊断、2-药品、3-检验、4-检查、7-手术和操作、8-量表、9-护理、10-法律法规");
         }
         IPage<StaticKnowledgeIndexPageDTO> page = super.staticIndexPage(staticKnowledgeIndexPageVO);
 
@@ -665,10 +669,7 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
         List<KlConceptScale> scales = klConceptScaleFacade.list(new QueryWrapper<KlConceptScale>()
                 .eq("is_deleted", IsDeleteEnum.N.getKey())
                 .eq("concept_id", concept.getId()));
-        if (ListUtil.isEmpty(scales)) {
-            return false;
-        }
-        return true;
+        return !ListUtil.isEmpty(scales);
     }
 
     /**
@@ -713,6 +714,9 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
                 case 9:
                     retType = LexiconEnum.Nurse.getKey();
                     break;
+                case 10:
+                    retType = LexiconEnum.Law.getKey();
+                    break;
                 default:
                     break;
             }
@@ -735,6 +739,8 @@ public class KlConceptStaticFacade extends KlConceptStaticServiceImpl {
                 retType = 8;
             } else if (type.equals(LexiconEnum.Nurse.getKey())) {
                 retType = 9;
+            } else if (type.equals(LexiconEnum.Law.getKey())) {
+                retType = 10;
             }
         }
         return retType;

+ 8 - 4
src/main/java/com/diagbot/facade/MedRetrievalFacade.java

@@ -97,8 +97,8 @@ public class MedRetrievalFacade {
                 break;
             case 3:
                 medRetrievalVO.setTypeId(LexiconEnum.PacsName.getKey());
-                medRetrievalVO.getTypeIds().addAll(Arrays.asList(new Integer[] { LexiconEnum.PacsName.getKey(),
-                        LexiconEnum.PacsSubName.getKey() }));
+                medRetrievalVO.getTypeIds().addAll(Arrays.asList(LexiconEnum.PacsName.getKey(),
+                        LexiconEnum.PacsSubName.getKey()));
                 indexList = klConceptFacade.index(medRetrievalVO);
                 if (ListUtil.isNotEmpty(indexList)) {
                     List<RetrievalConceptDTO> pacsNames = new ArrayList<>();
@@ -233,7 +233,7 @@ public class MedRetrievalFacade {
         //检索类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理
         if (ListUtil.isEmpty(types)
                 || (ListUtil.isNotEmpty(types) && types.contains(0))) {
-            staticKnowledgeIndexVO.getTypeIds().addAll(Arrays.asList(new Integer[] { LexiconEnum.Disease.getKey(),
+            staticKnowledgeIndexVO.getTypeIds().addAll(Arrays.asList(LexiconEnum.Disease.getKey(),
                     LexiconEnum.Medicine.getKey(),
                     LexiconEnum.LisName.getKey(),
                     LexiconEnum.LisSubName.getKey(),
@@ -241,7 +241,8 @@ public class MedRetrievalFacade {
                     LexiconEnum.PacsSubName.getKey(),
                     LexiconEnum.Operation.getKey(),
                     LexiconEnum.Scale.getKey(),
-                    LexiconEnum.Nurse.getKey() }));
+                    LexiconEnum.Nurse.getKey(),
+                    LexiconEnum.Law.getKey()));
         } else {
             if (types.contains(1)) {
                 staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.Disease.getKey());
@@ -266,6 +267,9 @@ public class MedRetrievalFacade {
             if (types.contains(9)) {
                 staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.Nurse.getKey());
             }
+            if (types.contains(10)) {
+                staticKnowledgeIndexVO.getTypeIds().add(LexiconEnum.Law.getKey());
+            }
         }
 
         List<StaticKnowledgeIndexDTO> retList = klConceptFacade.staticIndex(staticKnowledgeIndexVO);

+ 5 - 5
src/main/java/com/diagbot/web/KlConceptStaticController.java

@@ -45,7 +45,7 @@ public class KlConceptStaticController {
     KlConceptStaticFacade klConceptStaticFacade;
 
     @ApiOperation(value = "获取静态知识[zhaops]",
-            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理 <br>" +
+            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理、10-法律法规 <br>" +
                     "contentTypes: 内容类型(多选):1-静态信息、2-注意事项、3-临床路径、4-治疗方案<br>" +
                     "name: 标准术语名称<br>")
     @PostMapping("/getStaticKnowledge")
@@ -56,7 +56,7 @@ public class KlConceptStaticController {
     }
 
     @ApiOperation(value = "获取静态知识列表[zhaops]",
-            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理  <br>" +
+            notes = "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理、10-法律法规  <br>" +
                     "name: 术语名称<br>" +
                     "status: 启用状态:1-启用、0-禁用<br>")
     @PostMapping("/getPage")
@@ -70,7 +70,7 @@ public class KlConceptStaticController {
     }
 
     @ApiOperation(value = "静态知识检索(分页返回)[zhaops]",
-            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理  <br>" +
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理、10-法律法规  <br>" +
                     "inputStr: 检索内容<br>")
     @PostMapping("/staticIndexPage")
     @SysLogger("staticIndexPage")
@@ -86,7 +86,7 @@ public class KlConceptStaticController {
     @ApiOperation(value = "保存静态知识-新增或修改[zhaops]",
             notes = "id: id <br>" +
                     "name: 术语名称 <br>" +
-                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理  <br>" +
+                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理、10-法律法规  <br>" +
                     "clinicalPathwayName: 临床路径名称<br>" +
                     "noticeName: 注意事项名称<br>" +
                     "source:数据来源:0-医院端、1-云平台,默认0 <br>" +
@@ -122,7 +122,7 @@ public class KlConceptStaticController {
 
     @ApiOperation(value = "静态知识是否存在[zhaops]",
             notes = "name: 术语名称 <br>" +
-                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理  <br>")
+                    "type: 类型:1-诊断、2-药品、3-检验套餐、4-检验细项、5-检查、6-检查子项、7-手术和操作、8-量表、9-护理、10-法律法规  <br>")
     @PostMapping("/isExist")
     @SysLogger("isExist")
     public RespDTO<Boolean> isExist(@Valid @RequestBody KlConceptStaticVO klConceptStaticVO) {

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

@@ -52,7 +52,7 @@ public class RetrievalController {
     }
 
     @ApiOperation(value = "医学知识(静态知识)检索[zhaops]",
-            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表 <br>" +
+            notes = "types: 类型(多选):0-全部、1-诊断、2-药品、3-检验、5-检查、6-手术和操作、8-量表、9-护理、10-法律法规 <br>" +
                     "inputStr: 检索内容<br>")
     @PostMapping("/staticKnowledgeIndex")
     public RespDTO<List<StaticKnowledgeIndexDTO>> staticKnowledgeIndex(@Valid @RequestBody StaticKnowledgeIndexVO staticKnowledgeIndexVO) {