|
@@ -9,8 +9,18 @@ CREATE TABLE `kl_symptom` (
|
|
|
`modifier` varchar(20) NOT NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
|
|
|
`concept_id` bigint(20) NOT NULL COMMENT '术语概念id',
|
|
|
`description` varchar(500) NOT NULL DEFAULT '' COMMENT '描述',
|
|
|
- `explains` text NOT NULL DEFAULT '' COMMENT '详细阐述',
|
|
|
+ `explains` text DEFAULT NULL COMMENT '详细阐述',
|
|
|
`remark` varchar(255) DEFAULT NULL COMMENT '备注',
|
|
|
PRIMARY KEY (`id`),
|
|
|
UNIQUE KEY `CONCEPT_ID_INDEX` (`concept_id`) USING BTREE COMMENT '概念id全表唯一'
|
|
|
-) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='症状扩展表';
|
|
|
+) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='症状扩展表';
|
|
|
+
|
|
|
+insert into `med`.kl_symptom(`concept_id`)
|
|
|
+select DISTINCT id from `med`.kl_concept where lib_type = 1;
|
|
|
+
|
|
|
+update `med`.kl_symptom t,
|
|
|
+ (select b.id, a.description, a.explains from `sys-prec`.prec_question_info a, `med`.kl_concept b
|
|
|
+ where a.is_deleted = 'N' and b.is_deleted = 'N' and b.lib_type = 1 and a.type = 1 and a.tag_type = 4
|
|
|
+ and Encrypt_char(a.tag_name) = b.lib_name) m
|
|
|
+set t.description = m.description, t.explains = m.explains
|
|
|
+where t.concept_id = m.id;
|