use `sys-icss`;

DROP TABLE IF EXISTS `icss_vital_order`;
-- 周铁钢
-- ----------------------------
-- Table structure for icss_dictionary_info
-- ----------------------------
DROP TABLE IF EXISTS `icss_dictionary_info`;
CREATE TABLE `icss_dictionary_info` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `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则表示纪录未修改',
  `group_type` bigint(20) NOT NULL DEFAULT '0' COMMENT '分组（值自定义）',
  `name` varchar(100) NOT NULL DEFAULT '' COMMENT '内容',
  `val` varchar(255) NOT NULL DEFAULT '' COMMENT '值',
  `return_type` int(11) NOT NULL DEFAULT '1' COMMENT '返回类型（0: 都返回，1：后台维护返回 2：icss界面返回）',
  `order_no` int(11) NOT NULL DEFAULT '0' COMMENT '排序号',
  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='icss字典表';

-- ----------------------------
-- Records of icss_dictionary_info
-- ----------------------------
INSERT INTO `icss_dictionary_info` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '主诉现病史', '1', '1', '10', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '其他史', '3', '1', '20', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '查体', '4', '1', '30', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '化验', '5', '1', '40', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '辅检', '6', '1', '50', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '诊断', '7', '1', '60', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '药品', '8', '1', '70', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '药品分类', '9', '1', '80', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '多列多选标签（杂音/初为）', '2', '1', '10', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '多项统一横铺标签（血压）', '3', '1', '20', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('11', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '症状详细（症状尾巴）', '4', '1', '30', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('12', 'Y', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '单选含自由填写项', '5', '1', '40', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('13', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '组合项标签（既往史）', '6', '1', '50', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('14', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '化验组合', '7', '1', '60', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('15', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '空标签', '9', '1', '70', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('16', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '2', '症状推送类型（添加症状）', '11', '1', '80', '组合标签-填写单类型');
INSERT INTO `icss_dictionary_info` VALUES ('26', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '主诉', '1', '1', '10', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('27', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '现病史', '2', '1', '20', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('28', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '其他史', '3', '1', '30', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('29', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '查体', '4', '1', '40', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '化验', '5', '1', '50', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('31', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '辅检', '6', '1', '60', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('33', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '5', '从左到右，从上到下', '1', '1', '10', '成文顺序');
INSERT INTO `icss_dictionary_info` VALUES ('34', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '5', '按点击顺序成文', '0', '1', '20', '成文顺序');
INSERT INTO `icss_dictionary_info` VALUES ('35', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '默认值', '0', '1', '10', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('36', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '单选', '1', '1', '20', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('37', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '多选', '2', '1', '30', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('38', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '数字键盘带单位', '5', '1', '40', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('39', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '输入框', '6', '1', '50', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('40', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '数字键盘', '7', '1', '60', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('41', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '联合推送', '99', '1', '80', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('42', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '6', '单选含自由填写项', '11', '1', '70', '单标签组件类型');
INSERT INTO `icss_dictionary_info` VALUES ('43', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '量表', '21', '1', '90', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('44', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '核心指标', '22', '1', '100', '标签归属');
INSERT INTO `icss_dictionary_info` VALUES ('45', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '诊断', '7', '1', '70', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('46', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '普通病', '0', '1', '10', '诊断类型');
INSERT INTO `icss_dictionary_info` VALUES ('47', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '慢病', '1', '1', '20', '诊断类型');
INSERT INTO `icss_dictionary_info` VALUES ('48', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '7', '急诊', '2', '1', '30', '诊断类型');
INSERT INTO `icss_dictionary_info` VALUES ('49', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '文本模块', '0', '1', '10', '量表结构类型');
INSERT INTO `icss_dictionary_info` VALUES ('50', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '8', '推送模块', '1', '1', '20', '量表结构类型');
INSERT INTO `icss_dictionary_info` VALUES ('51', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '现病史空模板', '22', '1', '80', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('52', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '现病史空模板子模板', '322', '1', '90', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('53', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '主诉子模板', '31', '1', '100', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('54', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '4', '现病史子模板', '32', '1', '110', '模板类型归属');
INSERT INTO `icss_dictionary_info` VALUES ('55', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '1', '不良反应', '10', '1', '110', '标签归属');


-- 导入默认的诊断类型
-- ----------------------------
-- Table structure for icss_dis_scale
-- ----------------------------
DROP TABLE IF EXISTS `icss_dis_scale`;
CREATE TABLE `icss_dis_scale` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `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则表示纪录未修改',
  `dis_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '诊断标签id',
  `scale_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '量表标签id',
  `order_no` smallint(6) NOT NULL DEFAULT '0' COMMENT '排序号',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='诊断量表映射表';

-- ----------------------------
-- Table structure for icss_dis_type
-- ----------------------------
DROP TABLE IF EXISTS `icss_dis_type`;
CREATE TABLE `icss_dis_type` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `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则表示纪录未修改',
  `dis_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '诊断标签id',
  `parent_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '父级诊断id',
  `type` tinyint(4) NOT NULL DEFAULT '1' COMMENT '1：慢病，2：急诊',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='诊断类型表';


insert into icss_dis_type(`dis_id`, `type`)
SELECT id,0 FROM `icss_question_info` where type = 7 and is_deleted = 'N';

-- 将糖尿病设置为慢病
update icss_dis_type set type = 1 where dis_id = (
	select id from icss_question_info where tag_name = '糖尿病' and is_deleted = 'N' and type = 7
);



-- ----------------------------
-- Table structure for icss_scale_content
-- ----------------------------
DROP TABLE IF EXISTS `icss_scale_content`;
CREATE TABLE `icss_scale_content` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `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则表示纪录未修改',
  `scale_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '量表标签id',
  `content` text COMMENT '内容',
  `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '0:文本，1：大数据接口填充',
  `order_no` smallint(6) NOT NULL DEFAULT '0' COMMENT '排序号',
  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='量表内容表';


-- 王峰
-- ----------------------------
-- Table structure for icss_evaluation_module_mapping
-- ----------------------------
DROP TABLE IF EXISTS `icss_evaluation_module_mapping`;
CREATE TABLE `icss_evaluation_module_mapping` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `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则表示纪录未修改',
  `region_name` varchar(200) DEFAULT NULL COMMENT '区域名',
  `region_type` varchar(200) DEFAULT NULL COMMENT '区域类型（0默认自定义，1大数据，2内部数据）',
  `order_no` int(11) DEFAULT NULL COMMENT '区域顺序',
  `disease_id` bigint(20) DEFAULT NULL COMMENT '疾病id',
  `remark` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='管理与评估模板表';

-- ----------------------------
-- Records of icss_evaluation_module_mapping
-- ----------------------------
INSERT INTO `icss_evaluation_module_mapping` VALUES ('1', 'N', '1970-01-02 12:00:00', '1970-01-01 12:00:00', '1', '1', '疗效评估', '1', '1', '21773', null);
INSERT INTO `icss_evaluation_module_mapping` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '1', '1', '血糖控制情况', '10', '2', '21773', null);
INSERT INTO `icss_evaluation_module_mapping` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '1', '整体评估', '0', '3', '21773', null);
INSERT INTO `icss_evaluation_module_mapping` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '1', '糖尿病分级管理', '1', '4', '21773', null);
INSERT INTO `icss_evaluation_module_mapping` VALUES ('5', 'N', '1970-01-02 12:00:00', '1970-01-01 12:00:00', '0', '1', '疗效评估820', '1', '1', '105', null);
INSERT INTO `icss_evaluation_module_mapping` VALUES ('6', 'N', '1970-01-03 12:00:00', '1970-01-01 12:00:00', '0', '11', '疗效评估520', '1', '1', '98', null);
INSERT INTO `icss_evaluation_module_mapping` VALUES ('7', 'N', '1970-01-04 12:00:00', '1970-01-01 12:00:00', '0', '1', '疗效评估297', '1', '1', '297', null);
INSERT INTO `icss_evaluation_module_mapping` VALUES ('8', 'N', '1970-01-08 12:00:00', '1970-01-01 12:00:00', '0', '1', '疗效评估800', '1', '1', '20718', null);

-- ----------------------------
-- Table structure for icss_index_data
-- ----------------------------
DROP TABLE IF EXISTS `icss_index_data`;
CREATE TABLE `icss_index_data` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `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则表示纪录未修改',
  `index_unique` varchar(200) DEFAULT NULL COMMENT '指标公表名',
  `index_value` varchar(200) DEFAULT NULL COMMENT '指标值',
  `index_unit` varchar(200) DEFAULT NULL COMMENT '指标单位',
  `is_abnormal` int(11) DEFAULT NULL COMMENT '是否异常',
  `creat_time` datetime DEFAULT NULL COMMENT '化验时间',
  `patient_id` bigint(20) DEFAULT NULL COMMENT '患者id',
  `inquiry_code` varchar(50) DEFAULT NULL COMMENT '就诊号',
  `remark` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COMMENT='指标数据表';

-- ----------------------------
-- Records of icss_index_data
-- ----------------------------
INSERT INTO `icss_index_data` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '空腹血糖', '10', 'mo/L', '1', '2019-03-11 20:00:05', '1001', '2973', null);
INSERT INTO `icss_index_data` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '空腹血糖', '20', 'mo/L', '1', '2019-03-05 20:01:15', '1001', '2979', null);
INSERT INTO `icss_index_data` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '餐后2小时血糖', '6', 'mo/L', '0', '2019-03-11 20:02:02', '1001', '2973', null);
INSERT INTO `icss_index_data` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '餐后2小时血糖', '4', 'mo/L', '1', '2019-03-05 20:17:32', '1001', '5454', null);
INSERT INTO `icss_index_data` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '餐后2小时血糖', '8', 'mo/L', '1', '2019-03-01 20:17:36', '1001', '456764546798', null);
INSERT INTO `icss_index_data` VALUES ('6', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '餐后2小时血糖', '9', 'mo/L', '1', '2019-03-11 20:17:39', '1001', '4565463', null);
INSERT INTO `icss_index_data` VALUES ('7', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '餐后2小时血糖', '5', 'mo/L', '1', '2019-03-07 20:17:56', '1001', '436456456', null);
INSERT INTO `icss_index_data` VALUES ('8', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '随机血糖', '1', 'mo/L', '1', '2019-02-06 20:17:41', '1001', '457896', null);
INSERT INTO `icss_index_data` VALUES ('9', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '随机血糖', '2', 'mo/L', '1', '2019-03-12 20:17:46', '1001', '364', null);
INSERT INTO `icss_index_data` VALUES ('10', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '随机血糖', '3', 'mo/L', '1', '2019-02-14 20:17:49', '1001', '45645', null);
INSERT INTO `icss_index_data` VALUES ('11', 'Y', '2019-03-12 15:22:42', '2019-03-12 15:58:43', '1', '0', '空腹血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('12', 'Y', '2019-03-12 15:24:02', '2019-03-12 15:58:43', '1', '0', '空腹血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('13', 'Y', '2019-03-12 15:24:02', '2019-03-12 15:58:43', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('14', 'Y', '2019-03-12 15:24:02', '2019-03-12 15:58:43', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('15', 'Y', '2019-03-12 15:58:43', '2019-03-12 15:59:16', '1', '0', '空腹血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('16', 'Y', '2019-03-12 15:58:43', '2019-03-12 15:59:16', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('17', 'Y', '2019-03-12 15:58:43', '2019-03-12 15:59:16', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('18', 'Y', '2019-03-12 15:59:16', '2019-04-10 11:23:17', '1', '0', '空腹血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('19', 'Y', '2019-03-12 15:59:16', '2019-04-10 11:23:17', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('20', 'Y', '2019-03-12 15:59:16', '2019-04-10 11:23:17', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('21', 'N', '2019-03-12 16:00:04', '1970-01-01 12:00:00', '1', '0', '空腹血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1002', '297', null);
INSERT INTO `icss_index_data` VALUES ('22', 'N', '2019-03-12 16:00:04', '1970-01-01 12:00:00', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1002', '297', null);
INSERT INTO `icss_index_data` VALUES ('23', 'N', '2019-03-12 16:00:04', '1970-01-01 12:00:00', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1002', '297', null);
INSERT INTO `icss_index_data` VALUES ('24', 'Y', '2019-03-12 16:48:57', '2019-03-12 16:55:21', '1', '0', '空腹血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '5297', null);
INSERT INTO `icss_index_data` VALUES ('25', 'Y', '2019-03-12 16:48:57', '2019-03-12 16:55:21', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '5297', null);
INSERT INTO `icss_index_data` VALUES ('26', 'Y', '2019-03-12 16:48:57', '2019-03-12 16:55:21', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '5297', null);
INSERT INTO `icss_index_data` VALUES ('27', 'N', '2019-03-12 16:55:21', '1970-01-01 12:00:00', '1', '0', '空腹血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '5297', null);
INSERT INTO `icss_index_data` VALUES ('28', 'N', '2019-03-12 16:55:21', '1970-01-01 12:00:00', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '5297', null);
INSERT INTO `icss_index_data` VALUES ('29', 'N', '2019-03-12 16:55:21', '1970-01-01 12:00:00', '1', '0', '随机血糖', '18', 'mmol/L', '1', '2019-03-12 15:21:01', '1001', '5297', null);
INSERT INTO `icss_index_data` VALUES ('30', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '糖化血红蛋白', '19', 'mmol/L', '1', '2019-03-03 20:16:48', '1001', '5297', null);
INSERT INTO `icss_index_data` VALUES ('31', 'Y', '2019-04-10 11:23:17', '2019-04-10 11:40:47', '1', '0', '空腹血糖', '520', 'string', '1', '2019-05-01 12:00:00', '1001', '297', null);
INSERT INTO `icss_index_data` VALUES ('32', 'N', '2019-04-10 11:40:58', '1970-01-01 12:00:00', '1', '0', '空腹血糖', '520', 'string', '1', '2019-05-01 12:00:00', '1001', '297', null);

-- ----------------------------
-- Table structure for icss_index_config
-- ----------------------------
DROP TABLE IF EXISTS `icss_index_config`;
CREATE TABLE `icss_index_config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `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则表示纪录未修改',
  `index_unique` varchar(200) DEFAULT NULL COMMENT '指标公表名',
  `disease_id` bigint(20) DEFAULT NULL COMMENT '疾病id',
  `index_desc` int(11) DEFAULT NULL COMMENT '指标描述',
  `order_no` int(11) DEFAULT NULL COMMENT '显示顺序',
  `remark` varchar(300) DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='指标配置';

-- ----------------------------
-- Records of icss_index_config
-- ----------------------------
INSERT INTO `icss_index_config` VALUES ('1', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '空腹血糖', '21773', '1', '1', null);
INSERT INTO `icss_index_config` VALUES ('2', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '餐后2小时血糖', '21773', '1', '2', null);
INSERT INTO `icss_index_config` VALUES ('3', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '随机血糖', '21773', '1', '3', null);
INSERT INTO `icss_index_config` VALUES ('4', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '糖化血红蛋白', '21773', '2', '1', null);
INSERT INTO `icss_index_config` VALUES ('5', 'N', '1970-01-01 12:00:00', '1970-01-01 12:00:00', '0', '0', '血压', '105', '1', '1', null);

-- 王宇
--模板信息字段修改
alter table icss_module_info change  column disease module_type bigint(20) COMMENT '(0.通用 1.根据科室划分 2.慢病)';
alter table icss_module_info add  column relation_id bigint(20) NOT NULL DEFAULT '0' COMMENT '关联id';
ALTER TABLE `icss_module_info` MODIFY COLUMN `type`  varchar(20) NOT NULL DEFAULT 0 COMMENT '类型(1.主诉 2.现病史 3.其他史 4.查体 5.化验 6.辅检 7.诊断 8.医嘱 22.现病史空模板 31.主诉子模板 32.现病史子模板 322.现病史空模板子模板)' AFTER `name`;
