Browse Source

Merge branch 'cdsscore20201130_regular' into develop

gaodm 4 years ago
parent
commit
eb975db1af

+ 129 - 0
doc/002.00000正则匹配规则初始化数据/sys_regular_config.sql

@@ -0,0 +1,129 @@
+/*
+Navicat MySQL Data Transfer
+
+Source Server         : 192.168.2.236
+Source Server Version : 50731
+Source Host           : 192.168.2.236:3306
+Source Database       : cdss
+
+Target Server Type    : MYSQL
+Target Server Version : 50731
+File Encoding         : 65001
+
+Date: 2020-12-03 16:11:15
+*/
+use `cdss`;
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for sys_regular_config
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_regular_config`;
+CREATE TABLE `sys_regular_config` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
+  `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
+  `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
+  `gmt_modified` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
+  `creator` varchar(20) NOT NULL DEFAULT '0' COMMENT '创建人,0表示无创建人值',
+  `modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
+  `stand_name` varchar(255) DEFAULT NULL COMMENT '标准名',
+  `rules_code` varchar(255) DEFAULT NULL COMMENT '正则编码',
+  `rules_name` varchar(255) DEFAULT NULL COMMENT '正则名称',
+  `rules_tepy` int(11) DEFAULT NULL COMMENT '正则类型',
+  `rules_value` varchar(255) DEFAULT NULL COMMENT '正则式',
+  `remark` varchar(255) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of sys_regular_config
+-- ----------------------------
+INSERT INTO `sys_regular_config` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '钾测定', 'JCD', '钾测定', '1', '(钾测定)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血小板计数', 'XXBJS', '血小板计数', '1', '(血小板)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血小板计数', 'XXBJS', '血小板计数', '1', '(血小板计数)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血小板计数', 'XXBJS', '血小板计数', '1', '(血小板数)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血浆凝血酶原时间测定(PT)', 'XJNXMYSJCE', '血浆凝血酶原时间测定(PT)', '1', '(血浆凝血酶原时间测定\\(PT\\))\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血浆凝血酶原时间测定(PT)', 'XJNXMYSJCE', '血浆凝血酶原时间测定(PT)', '1', '(血浆凝血酶原时间测定)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血浆凝血酶原时间测定(PT)', 'XJNXMYSJCE', '血浆凝血酶原时间测定(PT)', '1', '(凝血酶原时间)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血浆凝血酶原时间测定(PT)', 'XJNXMYSJCE', '血浆凝血酶原时间测定(PT)', '1', '(凝血酶原时间检测)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血浆凝血酶原时间测定(PT)', 'XJNXMYSJCE', '血浆凝血酶原时间测定(PT)', '1', '(凝血酶原)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '活化部分凝血活酶时间测定(APTT)', 'HHBFNXM', '活化部分凝血活酶时间测定(APTT)', '1', '(活化部分凝血活酶时间测定\\(APTT\\))\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '活化部分凝血活酶时间测定(APTT)', 'HHBFNXM', '活化部分凝血活酶时间测定(APTT)', '1', '(APTT)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('12', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '活化部分凝血活酶时间测定(APTT)', 'HHBFNXM', '活化部分凝血活酶时间测定(APTT)', '1', '(活化部分凝血活酶时间测定)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '活化部分凝血活酶时间测定(APTT)', 'HHBFNXM', '活化部分凝血活酶时间测定(APTT)', '1', '(活化部分凝血活酶时间)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '活化部分凝血活酶时间测定(APTT)', 'HHBFNXM', '活化部分凝血活酶时间测定(APTT)', '1', '(凝血活酶)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血氧饱和度(SAT)', 'XYBHD', '血氧饱和度(SAT)', '1', '(血氧饱和度\\(SAT\\))\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血氧饱和度(SAT)', 'XYBHD', '血氧饱和度(SAT)', '1', '(血氧饱和度)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('17', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血氧饱和度(SAT)', 'XYBHD', '血氧饱和度(SAT)', '1', '(SAT)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('18', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(血肌酐测定)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('19', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(血肌酐)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('20', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(肌酐)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('21', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(肌酐值)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('22', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(血肌酐值)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('23', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(Cr)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('24', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(Cre)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('25', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(SCr)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血肌酐测定', 'XJGCD', '血肌酐测定', '1', '(scr)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '肾小球滤过率(GFR)测定', 'SXQGL', '肾小球滤过率(GFR)测定', '1', '(肾小球滤过率\\(GFR\\)测定)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '肾小球滤过率(GFR)测定', 'SXQGL', '肾小球滤过率(GFR)测定', '1', '(肾小球滤过率)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '肾小球滤过率(GFR)测定', 'SXQGL', '肾小球滤过率(GFR)测定', '1', '(GFR)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '钾测定', 'JCD', '钾测定', '1', '(钾离子)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '钾测定', 'JCD', '钾测定', '1', '(血清钾)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('32', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '钾测定', 'JCD', '钾测定', '1', '(血钾)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '国际标准化比值(INR)', 'GJBZH', '国际标准化比值(INR)', '1', '(国际标准化比值\\(INR\\))\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '国际标准化比值(INR)', 'GJBZH', '国际标准化比值(INR)', '1', '(国际标准化比值)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '国际标准化比值(INR)', 'GJBZH', '国际标准化比值(INR)', '1', '(INR)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '国际标准化比值(INR)', 'GJBZH', '国际标准化比值(INR)', '1', '(国际标准化比值测定)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '国际标准化比值(INR)', 'GJBZH', '国际标准化比值(INR)', '1', '(国际标准化比值\\(INR\\)测定)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('38', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '国际标准化比值(INR)', 'GJBZH', '国际标准化比值(INR)', '1', '(inr)\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+', null);
+INSERT INTO `sys_regular_config` VALUES ('39', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '碘比醇', null, '碘比醇', '2', '(\\、碘比醇过敏)|(无碘比醇过敏)|(否认碘比醇过敏)¥(碘比醇过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('40', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '碘比醇', null, '碘剂', '2', '(\\、碘剂过敏)|(无碘剂过敏)|(否认碘剂过敏)¥(碘剂过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('41', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '碘比醇', null, '碘制剂', '2', '(\\、碘制剂过敏)|(无碘制剂过敏)|(否认碘制剂过敏)¥(碘制剂过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '碘比醇', null, '碘制品', '2', '(\\、碘制品过敏)|(无碘制品过敏)|(否认碘制品过敏)¥(碘制品过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '碘比醇', null, '碘类', '2', '(\\、碘类过敏)|(无碘类过敏)|(否认碘类过敏)¥(碘类过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '碘比醇', null, '碘化X射线', '2', '(\\、碘化X射线过敏)|(无碘化X射线过敏)|(否认碘化X射线过敏)¥(碘化X射线过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '六氟化硫微泡', null, '六氟化硫微泡', '2', '(\\、六氟化硫微泡过敏)|(无六氟化硫微泡过敏)|(否认六氟化硫微泡过敏)¥(六氟化硫微泡过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '六氟化硫微泡', null, '微泡剂', '2', '(\\、微泡剂过敏)|(无微泡剂过敏)|(否认微泡剂过敏)¥(微泡剂过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '六氟化硫微泡', null, '微泡造影剂', '2', '(\\、微泡造影剂过敏)|(无微泡造影剂过敏)|(否认微泡造影剂过敏)¥(微泡造影剂过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '钆贝葡胺', null, '钆贝葡胺', '2', '(\\、钆贝葡胺过敏)|(无钆贝葡胺过敏)|(否认钆贝葡胺过敏)¥(钆贝葡胺过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '钆贝葡胺', null, '钆对比剂', '2', '(\\、钆对比剂过敏)|(无钆对比剂过敏)|(否认钆对比剂过敏)¥(钆对比剂过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '利多卡因', null, '利多卡因', '2', '(\\、利多卡因过敏)|(无利多卡因过敏)|(否认利多卡因过敏)|(\\、盐酸利多卡因过敏)|(无盐酸利多卡因过敏)|(否认盐酸利多卡因过敏)|(盐酸利多卡因过敏)¥(利多卡因过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '利多卡因', null, '盐酸利多卡因', '2', '(\\、盐酸利多卡因过敏)|(无盐酸利多卡因过敏)|(否认盐酸利多卡因过敏)¥(盐酸利多卡因过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '丁卡因', null, '丁卡因', '2', '(\\、丁卡因过敏)|(无丁卡因过敏)|(否认丁卡因过敏)|(\\、盐酸丁卡因过敏)|(无盐酸丁卡因过敏)|(否认盐酸丁卡因过敏)|(盐酸丁卡因过敏)¥(丁卡因过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '丁卡因', null, '盐酸丁卡因', '2', '(\\、盐酸丁卡因过敏)|(无盐酸丁卡因过敏)|(否认盐酸丁卡因过敏)¥(盐酸丁卡因过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '丙泊酚', null, '丙泊酚', '2', '(\\、丙泊酚过敏)|(无丙泊酚过敏)|(否认丙泊酚过敏)¥(丙泊酚过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '丙泊酚', null, '双异丙酚', '2', '(\\、双异丙酚过敏)|(无双异丙酚过敏)|(否认双异丙酚过敏)¥(双异丙酚过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('56', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '丙泊酚', null, '异丙酚', '2', '(\\、异丙酚过敏)|(无异丙酚过敏)|(否认异丙酚过敏)¥(异丙酚过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('57', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '依托咪酯', null, '依托咪酯', '2', '(\\、依托咪酯过敏)|(无依托咪酯过敏)|(否认依托咪酯过敏)¥(依托咪酯过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('58', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '依托咪酯', null, '乙苄咪唑', '2', '(\\、乙苄咪唑过敏)|(无乙苄咪唑过敏)|(否认乙苄咪唑过敏)¥(乙苄咪唑过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('59', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '依托咪酯', null, '甲苄咪酯', '2', '(\\、甲苄咪酯过敏)|(无甲苄咪酯过敏)|(否认甲苄咪酯过敏)¥(甲苄咪酯过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('60', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '依托咪酯', null, '甲苄咪唑', '2', '(\\、甲苄咪唑过敏)|(无甲苄咪唑过敏)|(否认甲苄咪唑过敏)¥(甲苄咪唑过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('61', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '依托咪酯', null, '乙咪酯', '2', '(\\、乙咪酯过敏)|(无乙咪酯过敏)|(否认乙咪酯过敏)¥(乙咪酯过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('62', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '咪达唑仑', null, '咪达唑仑', '2', '(\\、咪达唑仑过敏)|(无咪达唑仑过敏)|(否认咪达唑仑过敏)¥(咪达唑仑过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('63', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '咪达唑仑', null, '咪唑安定', '2', '(\\、咪唑安定过敏)|(无咪唑安定过敏)|(否认咪唑安定过敏)¥(咪唑安定过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('64', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '咪达唑仑', null, '咪唑二氮卓', '2', '(\\、咪唑二氮卓过敏)|(无咪唑二氮卓过敏)|(否认咪唑二氮卓过敏)¥(咪唑二氮卓过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('65', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '罗库溴铵', null, '罗库溴铵', '2', '(\\、罗库溴铵过敏)|(无罗库溴铵过敏)|(否认罗库溴铵过敏)¥(罗库溴铵过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('66', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '罗库溴铵', null, '爱可松', '2', '(\\、爱可松过敏)|(无爱可松过敏)|(否认爱可松过敏)¥(爱可松过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('67', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '罗库溴铵', null, '溴化物', '2', '(\\、溴化物过敏)|(无溴化物过敏)|(否认溴化物过敏)¥(溴化物过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('68', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '维库溴铵', null, '维库溴铵', '2', '(\\、维库溴铵过敏)|(无维库溴铵过敏)|(否认维库溴铵过敏)¥(维库溴铵过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('69', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '维库溴铵', null, '溴化凡寇罗宁', '2', '(\\、溴化凡寇罗宁过敏)|(无溴化凡寇罗宁过敏)|(否认溴化凡寇罗宁过敏)¥(溴化凡寇罗宁过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('70', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '复方苯海拉明', null, '复方苯海拉明', '2', '(\\、复方苯海拉明过敏)|(无复方苯海拉明过敏)|(否认复方苯海拉明过敏)¥(复方苯海拉明过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('71', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '复方苯海拉明', null, '抗组胺', '2', '(\\、抗组胺过敏)|(无抗组胺过敏)|(否认抗组胺过敏)¥(抗组胺过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('72', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '复方苯海拉明', null, '抗组织胺', '2', '(\\、抗组织胺过敏)|(无抗组织胺过敏)|(否认抗组织胺过敏)¥(抗组织胺过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('73', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新斯的明', null, '新斯的明', '2', '(\\、新斯的明过敏)|(无新斯的明过敏)|(否认新斯的明过敏)¥(新斯的明过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('74', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新斯的明', null, '醋甲胆碱', '2', '(\\、醋甲胆碱过敏)|(无醋甲胆碱过敏)|(否认醋甲胆碱过敏)¥(醋甲胆碱过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('75', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新斯的明', null, '乙酰甲胆碱', '2', '(\\、乙酰甲胆碱过敏)|(无乙酰甲胆碱过敏)|(否认乙酰甲胆碱过敏)¥(乙酰甲胆碱过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('76', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '新斯的明', null, '乙酰胆碱', '2', '(\\、乙酰胆碱过敏)|(无乙酰胆碱过敏)|(否认乙酰胆碱过敏)¥(乙酰胆碱过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('77', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '腺苷', null, '腺苷', '2', '(\\、腺苷过敏)|(无腺苷过敏)|(否认腺苷过敏)¥(腺苷过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('78', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '腺苷', null, '腺苷酸', '2', '(\\、腺苷酸过敏)|(无腺苷酸过敏)|(否认腺苷酸过敏)¥(腺苷酸过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('79', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '孟鲁司特', null, '孟鲁司特', '2', '(\\、孟鲁司特过敏)|(无孟鲁司特过敏)|(否认孟鲁司特过敏)¥(孟鲁司特过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('80', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '孟鲁司特', null, '白三烯', '2', '(\\、白三烯过敏)|(无白三烯过敏)|(否认白三烯过敏)¥(白三烯过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('81', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '尘螨', null, '尘螨', '2', '(\\、尘螨过敏)|(无尘螨过敏)|(否认尘螨过敏)¥(尘螨过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('82', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '尘螨', null, '灰尘', '2', '(\\、灰尘过敏)|(无灰尘过敏)|(否认灰尘过敏)¥(灰尘过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('83', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '尘螨', null, '尘螨类', '2', '(\\、尘螨类过敏)|(无尘螨类过敏)|(否认尘螨类过敏)¥(尘螨类过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('84', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '花粉', null, '花粉', '2', '(\\、花粉过敏)|(无花粉过敏)|(否认花粉过敏)¥(花粉过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('85', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '花粉', null, '花朵', '2', '(\\、花朵过敏)|(无花朵过敏)|(否认花朵过敏)¥(花朵过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('86', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '花粉', null, '花粉性', '2', '(\\、花粉性过敏)|(无花粉性过敏)|(否认花粉性过敏)¥(花粉性过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('87', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '花粉', null, '花粉类', '2', '(\\、花粉类过敏)|(无花粉类过敏)|(否认花粉类过敏)¥(花粉类过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('88', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '动物皮毛', null, '动物皮毛', '2', '(\\、动物皮毛过敏)|(无动物皮毛过敏)|(否认动物皮毛过敏)¥(动物皮毛过敏)', null);
+INSERT INTO `sys_regular_config` VALUES ('89', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '动物皮毛', null, '皮毛', '2', '(\\、皮毛过敏)|(无皮毛过敏)|(否认皮毛过敏)|(\\、动物皮毛过敏)|(无动物皮毛过敏)|(否认动物皮毛过敏)|(动物皮毛过敏)¥(皮毛过敏)', null);

+ 18 - 0
src/main/java/com/diagbot/dto/RegularValueDTO.java

@@ -0,0 +1,18 @@
+package com.diagbot.dto;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-12-01 9:46
+ */
+@Setter
+@Getter
+public class RegularValueDTO {
+    private String  standName;
+    private String  key;
+    private String  value;
+    private Integer  type;
+}

+ 181 - 0
src/main/java/com/diagbot/entity/SysRegularConfig.java

@@ -0,0 +1,181 @@
+package com.diagbot.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author wangfeng
+ * @since 2020-12-08
+ */
+public class SysRegularConfig implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 资源ID
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 是否删除,N:未删除,Y:删除
+     */
+    private String isDeleted;
+
+    /**
+     * 记录创建时间
+     */
+    private Date gmtCreate;
+
+    /**
+     * 记录修改时间,如果时间是1970年则表示纪录未修改
+     */
+    private Date gmtModified;
+
+    /**
+     * 创建人,0表示无创建人值
+     */
+    private String creator;
+
+    /**
+     * 修改人,如果为0则表示纪录未修改
+     */
+    private String modifier;
+
+    /**
+     * 标准名
+     */
+    private String standName;
+
+    /**
+     * 正则编码
+     */
+    private String rulesCode;
+
+    /**
+     * 正则名称
+     */
+    private String rulesName;
+
+    /**
+     * 正则类型
+     */
+    private Integer rulesTepy;
+
+    /**
+     * 正则式
+     */
+    private String rulesValue;
+
+    private String remark;
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    public String getIsDeleted() {
+        return isDeleted;
+    }
+
+    public void setIsDeleted(String isDeleted) {
+        this.isDeleted = isDeleted;
+    }
+    public Date getGmtCreate() {
+        return gmtCreate;
+    }
+
+    public void setGmtCreate(Date gmtCreate) {
+        this.gmtCreate = gmtCreate;
+    }
+    public Date getGmtModified() {
+        return gmtModified;
+    }
+
+    public void setGmtModified(Date gmtModified) {
+        this.gmtModified = gmtModified;
+    }
+    public String getCreator() {
+        return creator;
+    }
+
+    public void setCreator(String creator) {
+        this.creator = creator;
+    }
+    public String getModifier() {
+        return modifier;
+    }
+
+    public void setModifier(String modifier) {
+        this.modifier = modifier;
+    }
+    public String getStandName() {
+        return standName;
+    }
+
+    public void setStandName(String standName) {
+        this.standName = standName;
+    }
+    public String getRulesCode() {
+        return rulesCode;
+    }
+
+    public void setRulesCode(String rulesCode) {
+        this.rulesCode = rulesCode;
+    }
+    public String getRulesName() {
+        return rulesName;
+    }
+
+    public void setRulesName(String rulesName) {
+        this.rulesName = rulesName;
+    }
+    public Integer getRulesTepy() {
+        return rulesTepy;
+    }
+
+    public void setRulesTepy(Integer rulesTepy) {
+        this.rulesTepy = rulesTepy;
+    }
+    public String getRulesValue() {
+        return rulesValue;
+    }
+
+    public void setRulesValue(String rulesValue) {
+        this.rulesValue = rulesValue;
+    }
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    @Override
+    public String toString() {
+        return "SysRegularConfig{" +
+            "id=" + id +
+            ", isDeleted=" + isDeleted +
+            ", gmtCreate=" + gmtCreate +
+            ", gmtModified=" + gmtModified +
+            ", creator=" + creator +
+            ", modifier=" + modifier +
+            ", standName=" + standName +
+            ", rulesCode=" + rulesCode +
+            ", rulesName=" + rulesName +
+            ", rulesTepy=" + rulesTepy +
+            ", rulesValue=" + rulesValue +
+            ", remark=" + remark +
+        "}";
+    }
+}

+ 60 - 0
src/main/java/com/diagbot/enums/RegularConfigEnum.java

@@ -0,0 +1,60 @@
+package com.diagbot.enums;
+
+import com.diagbot.core.KeyedNamed;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-12-01 11:10
+ */
+public enum RegularConfigEnum implements KeyedNamed {
+    lis(1, "化验"),
+    allergy(2, "过敏源");
+
+    @Setter
+    private int key;
+
+    @Setter
+    private String name;
+
+    RegularConfigEnum(int key, String name) {
+        this.key = key;
+        this.name = name;
+    }
+
+    public static RegularConfigEnum getEnum(int key) {
+        for (RegularConfigEnum item : RegularConfigEnum.values()) {
+            if (item.key == key) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static TypeEnum getEnum(String value) {
+        for (TypeEnum item : TypeEnum.values()) {
+            if (item.getName().equals(value)) {
+                return item;
+            }
+        }
+        return null;
+    }
+
+    public static String getName(int key) {
+        RegularConfigEnum item = getEnum(key);
+        return item != null ? item.name : null;
+    }
+
+    @Override
+    public int getKey() {
+        return key;
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+
+}

+ 10 - 1
src/main/java/com/diagbot/facade/IndicationFacade.java

@@ -1,14 +1,19 @@
 package com.diagbot.facade;
 package com.diagbot.facade;
 
 
+import com.baomidou.mybatisplus.extension.api.R;
+import com.diagbot.biz.push.entity.Lis;
 import com.diagbot.client.StandConvertServiceClient;
 import com.diagbot.client.StandConvertServiceClient;
 import com.diagbot.dto.IndicationDTO;
 import com.diagbot.dto.IndicationDTO;
+import com.diagbot.dto.RegularValueDTO;
 import com.diagbot.dto.WordCrfDTO;
 import com.diagbot.dto.WordCrfDTO;
+import com.diagbot.enums.RegularConfigEnum;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonErrorCode;
 import com.diagbot.exception.CommonException;
 import com.diagbot.exception.CommonException;
 import com.diagbot.rule.CommonRule;
 import com.diagbot.rule.CommonRule;
 import com.diagbot.util.CoreUtil;
 import com.diagbot.util.CoreUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.util.ListUtil;
 import com.diagbot.vo.IndicationPushVO;
 import com.diagbot.vo.IndicationPushVO;
+import com.diagbot.vo.RegularConfigDataVO;
 import com.diagbot.vo.StandConvert;
 import com.diagbot.vo.StandConvert;
 import io.github.lvyahui8.spring.facade.DataFacade;
 import io.github.lvyahui8.spring.facade.DataFacade;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -39,6 +44,8 @@ public class IndicationFacade {
     StandConvertServiceClient standConvertServiceClient;
     StandConvertServiceClient standConvertServiceClient;
     @Autowired
     @Autowired
     CommonRule commonRule;
     CommonRule commonRule;
+    @Autowired
+    SysRegularConfigFacade sysRegularConfigFacade;
 
 
     private static final Map<String, List<String>> methodMap;
     private static final Map<String, List<String>> methodMap;
 
 
@@ -94,7 +101,9 @@ public class IndicationFacade {
             commonFacade.dataTypeSet(wordCrfDTO, standConvertMap);
             commonFacade.dataTypeSet(wordCrfDTO, standConvertMap);
         }
         }
         CoreUtil.getDebugStr(standStart, "标准词转换耗时", debug);
         CoreUtil.getDebugStr(standStart, "标准词转换耗时", debug);
-
+        //正则匹配开始
+        wordCrfDTO = sysRegularConfigFacade.getRegularConfigs(wordCrfDTO,indicationPushVO);
+        //正则匹配结束
         // 合并【数据来源】
         // 合并【数据来源】
         wordCrfDTO.setDiagSource(commonRule.getDiseaseSource(wordCrfDTO));
         wordCrfDTO.setDiagSource(commonRule.getDiseaseSource(wordCrfDTO));
         wordCrfDTO.setDrugSource(commonRule.getDrugSource(wordCrfDTO));
         wordCrfDTO.setDrugSource(commonRule.getDrugSource(wordCrfDTO));

+ 198 - 0
src/main/java/com/diagbot/facade/SysRegularConfigFacade.java

@@ -0,0 +1,198 @@
+package com.diagbot.facade;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.diagbot.biz.push.entity.Lis;
+import com.diagbot.dto.RegularValueDTO;
+import com.diagbot.dto.WordCrfDTO;
+import com.diagbot.entity.SysRegularConfig;
+import com.diagbot.enums.IsDeleteEnum;
+import com.diagbot.enums.RegularConfigEnum;
+import com.diagbot.exception.CommonErrorCode;
+import com.diagbot.exception.CommonException;
+import com.diagbot.model.entity.AllergyMedicine;
+import com.diagbot.model.label.PastLabel;
+import com.diagbot.service.impl.SysRegularConfigServiceImpl;
+import com.diagbot.util.ListUtil;
+import com.diagbot.vo.IndicationPushVO;
+import com.diagbot.vo.RegularConfigDataVO;
+import com.diagbot.vo.RegularConfigSaveVO;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-11-30 16:10
+ */
+@Component
+public class SysRegularConfigFacade extends SysRegularConfigServiceImpl {
+
+    public List<RegularValueDTO> getRegularConfigDatas(RegularConfigDataVO regularConfigDataVO) {
+        List<RegularValueDTO> listData = new ArrayList<>();
+        QueryWrapper<SysRegularConfig> regularQuery = new QueryWrapper<>();
+        regularQuery.eq("is_deleted", IsDeleteEnum.N.getKey())
+                .eq(regularConfigDataVO.getRulesCode() != null, "rules_code", regularConfigDataVO.getRulesCode())
+                .eq(regularConfigDataVO.getRulesTepy() != null, "rules_tepy", regularConfigDataVO.getRulesTepy());
+        List<SysRegularConfig> regularConfigs = list(regularQuery);
+        if (ListUtil.isNotEmpty(regularConfigs)) {
+            for (SysRegularConfig data : regularConfigs) {
+                String pattern = "";
+                String patternMax = "";
+                if (data.getRulesTepy().equals(RegularConfigEnum.allergy.getKey())) {
+                    pattern = data.getRulesValue().split("¥")[0];
+                    patternMax = data.getRulesValue().split("¥")[1];
+                } else {
+                    pattern = data.getRulesValue();
+                }
+                // 创建 Pattern 对象
+                Pattern r = Pattern.compile(pattern, Pattern.CASE_INSENSITIVE);
+                // 现在创建 matcher 对象
+                Matcher m = r.matcher(regularConfigDataVO.getText());
+                int trueMin = 0;
+                while (m.find()) {
+                    //System.out.println(m.group());
+                    String steing = m.group();
+                    String value = "";
+                    Integer type = data.getRulesTepy();
+                    if (data.getRulesTepy().equals(RegularConfigEnum.lis.getKey())) {
+                        value = steing.replaceAll("([^\\d\\.]|\\.(?=[^\\.]*\\.))", "");
+                        RegularValueDTO regularValueDTO = new RegularValueDTO();
+                        regularValueDTO.setKey(data.getRulesName());
+                        regularValueDTO.setStandName(data.getStandName());
+                        regularValueDTO.setType(type);
+                        regularValueDTO.setValue(value);
+                        listData.add(regularValueDTO);
+                    } else if (data.getRulesTepy().equals(RegularConfigEnum.allergy.getKey())) {
+                        //取否认的数
+                        trueMin++;
+                    }
+                }
+                int trueMax = 0;
+                //取所有符合的
+                if (data.getRulesTepy().equals(RegularConfigEnum.allergy.getKey())) {
+                    Pattern rMax = Pattern.compile(patternMax, Pattern.CASE_INSENSITIVE);
+                    // 现在创建 matcher 对象
+                    Matcher mMax = rMax.matcher(regularConfigDataVO.getText());
+                    while (mMax.find()) {
+                        if (data.getRulesTepy().equals(RegularConfigEnum.allergy.getKey())) {
+                            trueMax++;
+                        }
+                    }
+                    int mun = trueMax - trueMin;
+                    if (mun > 0) {
+                        RegularValueDTO regularValueDTO = new RegularValueDTO();
+                        regularValueDTO.setKey(data.getRulesName());
+                        regularValueDTO.setType(data.getRulesTepy());
+                        regularValueDTO.setStandName(data.getStandName());
+                        listData.add(regularValueDTO);
+                    }
+                }
+
+
+            }
+
+
+        }
+        return listData;
+    }
+
+    /**
+     * @param wordCrfDTO
+     * @return
+     */
+    public WordCrfDTO getRegularConfigs(WordCrfDTO wordCrfDTO, IndicationPushVO indicationPushVO) {
+        String allergyStr = indicationPushVO.getAllergy();
+        String symptom = wordCrfDTO.getSymptom();//现病史
+        RegularConfigDataVO regularConfigData = new RegularConfigDataVO();
+        regularConfigData.setText(symptom);
+        List<RegularValueDTO> regularConfigDatas = getRegularConfigDatas(regularConfigData);
+        List<Lis> lisData = wordCrfDTO.getLis();
+        PastLabel pastLabel = wordCrfDTO.getPastLabel();//获取过敏史数据
+        List<AllergyMedicine> allergies = pastLabel.getAllergyMedicines();
+        if (ListUtil.isNotEmpty(regularConfigDatas)) {
+            for (RegularValueDTO data : regularConfigDatas) {
+                if (data.getType().equals(RegularConfigEnum.lis.getKey())) {
+                    if (!data.getValue().equals("")) {
+                        Lis lis = new Lis();
+                        lis.setUniqueName(data.getKey());
+                        lis.setDetailName(data.getKey());
+                        lis.setName(data.getKey());
+                        lis.setValue(Double.valueOf(data.getValue()));
+                        lisData.add(lis);
+                    }
+                } else if (data.getType().equals(RegularConfigEnum.allergy.getKey())) {
+                    AllergyMedicine allergy = new AllergyMedicine();
+                    allergy.setName(data.getKey());
+                    allergy.setStandName(data.getStandName());
+                    allergies.add(allergy);
+                }
+            }
+        }
+        String pasts = wordCrfDTO.getPasts();//既往史
+        RegularConfigDataVO regularConfigPasts = new RegularConfigDataVO();
+        regularConfigData.setText(pasts);
+        regularConfigData.setRulesTepy(RegularConfigEnum.allergy.getKey());
+        List<RegularValueDTO> regularConfigPastss = getRegularConfigDatas(regularConfigData);
+        if (ListUtil.isNotEmpty(regularConfigPastss)) {
+            for (RegularValueDTO dataPasts : regularConfigPastss) {
+                AllergyMedicine allergy = new AllergyMedicine();
+                allergy.setName(dataPasts.getKey());
+                allergy.setStandName(dataPasts.getStandName());
+                allergies.add(allergy);
+            }
+        }
+        if (null != allergyStr && !allergyStr.equals("")) {
+            String[] result = allergyStr.split("[\\,\\,]");
+            for (String r : result) {
+                AllergyMedicine allergyMedicine = new AllergyMedicine();
+                allergyMedicine.setName(r.trim());
+                allergyMedicine.setStandName(r.trim());
+                allergies.add(allergyMedicine);
+
+            }
+        }
+        pastLabel.setAllergyMedicines(allergies);
+        wordCrfDTO.setPastLabel(pastLabel);
+        wordCrfDTO.setLis(lisData);
+        return wordCrfDTO;
+    }
+
+    public boolean saverRegularConfigDatas(List<RegularConfigSaveVO> regularConfigSaveVOList) {
+        boolean res = false;
+        for (RegularConfigSaveVO regularConfigSaveVO : regularConfigSaveVOList) {
+
+
+            List<String> name = regularConfigSaveVO.getName();
+            for (String str : name) {
+                int countTow = this.count(new QueryWrapper<SysRegularConfig>()
+                        .eq("is_deleted", IsDeleteEnum.N.getKey())
+                        .eq(str != null, "rules_name", str)
+                        .eq(regularConfigSaveVO.getStandardName() != null, "stand_name", str)
+                        .eq(regularConfigSaveVO.getRulesTepy() != null, "rules_tepy", regularConfigSaveVO.getRulesTepy()));
+                if (countTow > 0) {
+                    throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, str + "该方案编码已存在");
+                } else {
+                    SysRegularConfig regularConfig = new SysRegularConfig();
+                    regularConfig.setStandName(regularConfigSaveVO.getStandardName());
+                    regularConfig.setRulesName(str);
+                    regularConfig.setRulesTepy(regularConfigSaveVO.getRulesTepy());
+                    String rulesValue = "";
+                    if (regularConfigSaveVO.getRulesTepy().equals(RegularConfigEnum.allergy.getKey())) {
+                        //int num = str.length();
+                        rulesValue = "(\\、" + str + "过敏)|(无" + str + "过敏)|(否认" + str + "过敏)¥(" + str + "过敏)";
+                    } else if (regularConfigSaveVO.getRulesTepy().equals(RegularConfigEnum.lis.getKey())) {
+                        rulesValue = "(" + str + ")\\s*[(\\-|\\+)?\\d+(\\.\\d+)?$]+";
+                    }
+                    regularConfig.setRulesValue(rulesValue);
+                    res = save(regularConfig);
+                }
+            }
+        }
+        return res;
+    }
+}

+ 16 - 0
src/main/java/com/diagbot/mapper/SysRegularConfigMapper.java

@@ -0,0 +1,16 @@
+package com.diagbot.mapper;
+
+import com.diagbot.entity.SysRegularConfig;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-11-30
+ */
+public interface SysRegularConfigMapper extends BaseMapper<SysRegularConfig> {
+
+}

+ 16 - 0
src/main/java/com/diagbot/service/SysRegularConfigService.java

@@ -0,0 +1,16 @@
+package com.diagbot.service;
+
+import com.diagbot.entity.SysRegularConfig;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-11-30
+ */
+public interface SysRegularConfigService extends IService<SysRegularConfig> {
+
+}

+ 20 - 0
src/main/java/com/diagbot/service/impl/SysRegularConfigServiceImpl.java

@@ -0,0 +1,20 @@
+package com.diagbot.service.impl;
+
+import com.diagbot.entity.SysRegularConfig;
+import com.diagbot.mapper.SysRegularConfigMapper;
+import com.diagbot.service.SysRegularConfigService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-11-30
+ */
+@Service
+public class SysRegularConfigServiceImpl extends ServiceImpl<SysRegularConfigMapper, SysRegularConfig> implements SysRegularConfigService {
+
+}

+ 17 - 0
src/main/java/com/diagbot/vo/RegularConfigDataVO.java

@@ -0,0 +1,17 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-11-30 16:19
+ */
+@Setter
+@Getter
+public class RegularConfigDataVO {
+    private String text;
+    private String rulesCode;
+    private Integer rulesTepy;
+}

+ 19 - 0
src/main/java/com/diagbot/vo/RegularConfigSaveVO.java

@@ -0,0 +1,19 @@
+package com.diagbot.vo;
+
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.List;
+
+/**
+ * @author wangfeng
+ * @Description:
+ * @date 2020-12-03 14:57
+ */
+@Setter
+@Getter
+public class RegularConfigSaveVO {
+    private List<String> name;
+    private String standardName;
+    private Integer rulesTepy;
+}

+ 56 - 0
src/main/java/com/diagbot/web/SysRegularConfigController.java

@@ -0,0 +1,56 @@
+package com.diagbot.web;
+
+
+import com.diagbot.dto.RegularValueDTO;
+import com.diagbot.dto.RespDTO;
+import com.diagbot.facade.SysRegularConfigFacade;
+import com.diagbot.vo.RegularConfigDataVO;
+import com.diagbot.vo.RegularConfigSaveVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * <p>
+ * 前端控制器
+ * </p>
+ *
+ * @author zhoutg
+ * @since 2020-11-30
+ */
+@RestController
+@RequestMapping("/sysRegularConfig")
+@Api(value = "正则匹配相关API", tags = { "正则匹配相关API" })
+@SuppressWarnings("unchecked")
+public class SysRegularConfigController {
+
+    @Autowired
+    SysRegularConfigFacade sysRegularConfigFacade;
+
+    @ApiOperation(value = "从文本中取出化验相应正则数据",
+            notes = "从文本中取出化验相应正则数据")
+    @PostMapping("/getRegularConfigData")
+    public RespDTO<List<RegularValueDTO>> getRegularConfigData(@Valid @RequestBody RegularConfigDataVO regularConfigDataVO) {
+        List<RegularValueDTO> data = sysRegularConfigFacade.getRegularConfigDatas(regularConfigDataVO);
+        return RespDTO.onSuc(data);
+    }
+
+    @ApiOperation(value = "保存相应正则数据",
+            notes = "保存相应正则数据")
+    @PostMapping("/saverRegularConfigData")
+    @Transactional
+    public RespDTO<Boolean> saverRegularConfigData(@Valid @RequestBody List<RegularConfigSaveVO> regularConfigSaveVO) {
+        boolean res = sysRegularConfigFacade.saverRegularConfigDatas(regularConfigSaveVO);
+        return RespDTO.onSuc(res);
+    }
+
+}

+ 21 - 0
src/main/resources/mapper/SysRegularConfigMapper.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.diagbot.mapper.SysRegularConfigMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="BaseResultMap" type="com.diagbot.entity.SysRegularConfig">
+        <id column="id" property="id" />
+        <result column="is_deleted" property="isDeleted" />
+        <result column="gmt_create" property="gmtCreate" />
+        <result column="gmt_modified" property="gmtModified" />
+        <result column="creator" property="creator" />
+        <result column="modifier" property="modifier" />
+        <result column="stand_name" property="standName" />
+        <result column="rules_code" property="rulesCode" />
+        <result column="rules_name" property="rulesName" />
+        <result column="rules_tepy" property="rulesTepy" />
+        <result column="rules_value" property="rulesValue" />
+        <result column="remark" property="remark" />
+    </resultMap>
+
+</mapper>