use `qc`;
DROP TABLE IF EXISTS `med_abnormal_info`;
CREATE TABLE `med_abnormal_info`  (
  `abnormal_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `module_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `rec_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模块名称',
  `param_in` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '入参',
  `param_out` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '出参',
  `ramark` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '异常描述',
  `is_deleted` char(3) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'N' COMMENT '是否删除,N:未删除，Y:删除',
  `gmt_create` datetime(0) NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',
  `gmt_modified` datetime(0) NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录修改时间,如果时间是1970年则表示纪录未修改',
  `creator` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '创建人，0表示无创建人值',
  `modifier` varchar(60) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '修改人,如果为0则表示纪录未修改',
  PRIMARY KEY (`abnormal_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 106 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;


alter table med_consultation_note alter column is_deleted set default 'N';
update  med_consultation_note set is_deleted = 'N';
alter table med_consultation_apply alter column is_deleted set default 'N';
update  med_consultation_apply set is_deleted = 'N';
alter table med_consultation_result alter column is_deleted set default 'N';
update  med_consultation_result set is_deleted = 'N';
alter table med_admission_note alter column is_deleted set default 'N';
update  med_admission_note set is_deleted = 'N';
alter table med_leave_hospital alter column is_deleted set default 'N';
update  med_leave_hospital set is_deleted = 'N';
alter table med_crisis_note alter column is_deleted set default 'N';
update  med_crisis_note set is_deleted = 'N';
alter table med_operative_note alter column is_deleted set default 'N';
update  med_operative_note set is_deleted = 'N';
alter table med_rescue_note alter column is_deleted set default 'N';
update  med_rescue_note set is_deleted = 'N';
alter table med_preoperative_discussion alter column is_deleted set default 'N';
update  med_preoperative_discussion set is_deleted = 'N';
alter table med_operative_first_record alter column is_deleted set default 'N';
update  med_operative_first_record set is_deleted = 'N';
alter table med_ward_record alter column is_deleted set default 'N';
update  med_ward_record set is_deleted = 'N';
alter table med_death_discussion alter column is_deleted set default 'N';
update  med_death_discussion set is_deleted = 'N';
alter table med_death_note alter column is_deleted set default 'N';
update  med_death_note set is_deleted = 'N';
alter table med_difficult_case alter column is_deleted set default 'N';
update  med_difficult_case set is_deleted = 'N';
alter table med_ill_critically alter column is_deleted set default 'N';
update med_ill_critically set is_deleted = 'N';
alter table med_ill_seriousl alter column is_deleted set default 'N';
update  med_ill_seriousl set is_deleted = 'N';
alter table med_transfer_in_note alter column is_deleted set default 'N';
update  med_transfer_in_note set is_deleted = 'N';
alter table med_transfer_out_note alter column is_deleted set default 'N';
update  med_transfer_out_note set is_deleted = 'N';
alter table med_blood_result alter column is_deleted set default 'N';
update  med_blood_result set is_deleted = 'N';
alter table med_blood_transfusion alter column is_deleted set default 'N';
update  med_blood_transfusion set is_deleted = 'N';
alter table med_period_conclusion alter column is_deleted set default 'N';
update  med_period_conclusion set is_deleted = 'N';
alter table med_first_record alter column is_deleted set default 'N';
update  med_first_record set is_deleted = 'N';




