/* Navicat Premium Data Transfer Source Server : 绿谷 Source Server Type : MariaDB Source Server Version : 100324 Source Host : 49.232.6.143:3306 Source Schema : question Target Server Type : MariaDB Target Server Version : 100324 File Encoding : 65001 Date: 13/05/2021 15:22:21 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for t_ht_doctor -- ---------------------------- DROP TABLE IF EXISTS `t_ht_doctor`; CREATE TABLE `t_ht_doctor` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 登录用户id 普通索引 ', `position_id` bigint(20) NULL DEFAULT 0 COMMENT ' 职务ID 普通索引 ', `title_id` bigint(20) NULL DEFAULT 0 COMMENT ' 职称ID ', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ', `sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ', `age` int(11) NULL DEFAULT 0 COMMENT ' 年龄 ', `auditor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 审核医生ID(即上级职务对应的医生ID) 普通索引 ', `audit_state` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 审核状态(0:未审核 1:审核通过 2:审核失败) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `share_patient_edit` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '分享病人编辑页面路径', `create_time` timestamp NOT NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `doctor_user_index`(`user_id`) USING BTREE, INDEX `doctor_position_index`(`position_id`) USING BTREE, INDEX `doctor_title_index`(`title_id`) USING BTREE, INDEX `doctor_auditor_index`(`auditor_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '医生表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_doctor_audit -- ---------------------------- DROP TABLE IF EXISTS `t_ht_doctor_audit`; CREATE TABLE `t_ht_doctor_audit` ( `id` bigint(20) NOT NULL, `doctor_id` bigint(20) NULL DEFAULT 0 COMMENT '待审核医生ID ', `auditor_id` bigint(20) NULL DEFAULT 0 COMMENT '审核医生ID', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `audit_auditor_index`(`auditor_id`, `doctor_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '医生审核表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_opretion_log -- ---------------------------- DROP TABLE IF EXISTS `t_ht_opretion_log`; CREATE TABLE `t_ht_opretion_log` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 用户id 普通索引 ', `type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 操作类型(1:注册 2:登录 3:修改密码 4:退出 5:资格认证 6:资格审核 7.生成报告单 8测评,9修改病人信息) ', `table_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作的表名 普通索引 ', `data_id` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作的数据ID ', `content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 操作内容 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `log_user_index`(`user_id`) USING BTREE, INDEX `log_table_index`(`table_name`, `data_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '操作日志表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient`; CREATE TABLE `t_ht_patient` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 登录用户id 普通索引 ', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ', `patient_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 门诊号 普通索引 ', `hospital_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 住院号 普通索引 ', `idcard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 身份证号 普通索引 ', `sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ', `marital_status` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 婚姻状况(1:未婚2:已婚 3:离异 4:分居 5:丧偶 6:同居 7:其他 ) ', `educational_status` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 教育程度(1:文盲 2:小学 3:初中 4:高中 5:大学 6:大学以上 7:其他) ', `educational_status_unit` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 受教育时间(年或月) ', `nation` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 民族 ', `native_place` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 籍贯 ', `career` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 职业(1:农林牧渔水利生产人员 2:教师 3:医务工作者 4:专业技术人员 5:生产、运输设备操作人员及有关人员6:商业、服务业人员7:国家机关、事业单位、企业负责人8:国家机关、事业单位、企业办事人员和有关人员9:军人 10:媒体、文体类工作人员 11:在校学生 12:未就业 13:家务 14:其他 ', `birth_number` int(11) NULL DEFAULT NULL COMMENT ' 生育数量 ', `menopause_age` int(11) NULL DEFAULT NULL COMMENT ' 绝经年龄(女) ', `contact` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 联系人 ', `mobile` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 手机 ', `phone` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 电话 ', `province` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 省份 ', `city` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 城市 ', `address` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 住址 ', `domicile` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 住所(1:自己家中 2:养老院 3:其他) ', `independent_living_skills` tinyint(2) UNSIGNED NULL DEFAULT NULL COMMENT ' 独立生活能力(1:能够独立生活 2:需要他人帮助完成复杂活动 3:需要他人帮助完成基本活动 4:完全依赖他人生活 5:未知 6:其他) ', `dwelling_state` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 居住状态(1:独居 2:与配偶或对象或子女 3:与亲戚或朋友居住) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT ' 第一次录入人 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `patient_superior_index`(`user_id`) USING BTREE, INDEX `patient_number_index`(`patient_number`) USING BTREE, INDEX `patient_hospitalr_index`(`hospital_number`) USING BTREE, INDEX `patient_idcard_index`(`idcard`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友基本信息' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_acp -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_acp`; CREATE TABLE `t_ht_patient_acp` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `ct` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' ct ', `mri` varchar(51) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' mri ', `hcy` varchar(52) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 同型半胱氨酸 ', `vb12` varchar(53) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 维生素B12 ', `folic_acid` varchar(54) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 叶酸 ', `tt3` varchar(55) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血清总T3 ', `tt4` varchar(56) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血清总T4 ', `tsh` varchar(57) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 促甲状腺素 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人', `ta1` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '血清Aβ1-42', `tpt` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '血清p-tau181', PRIMARY KEY (`id`) USING BTREE, INDEX `acp_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '辅助检查' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_body -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_body`; CREATE TABLE `t_ht_patient_body` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `height` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 身高(cm) ', `weight` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 体重(kg) ', `waistline` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 腰围(寸) ', `blood_pressure_shrink` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血压-收缩压(mmHg) ', `blood_pressure_diastole` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 血压-舒张压(mmHg) ', `resting_heart_rate` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 静息心率 ', `vision` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 受试的视觉功能是否正常(1:是 0:否) ', `auditory` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 受试的听觉功能是否正常(1:是 0:否) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人', PRIMARY KEY (`id`) USING BTREE, INDEX `body_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病人身体基本信息表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_canvas -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_canvas`; CREATE TABLE `t_ht_patient_canvas` ( `id` bigint(20) NOT NULL, `patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT '病友检查报告单ID', `question_id` bigint(20) NULL DEFAULT 0 COMMENT '测评试题ID', `begin_time` bigint(20) NULL DEFAULT 0 COMMENT '时间ms数', `canvas_width` int(11) NULL DEFAULT 0 COMMENT '画板宽', `canvas_height` int(11) NULL DEFAULT 0 COMMENT '画板高', `line_color` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '笔触颜色', `line_width` int(11) NULL DEFAULT 0 COMMENT '笔触粗细', `create_time` timestamp NOT NULL DEFAULT current_timestamp, `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', `open_canvas_time` bigint(20) NULL DEFAULT 0 COMMENT '打开画板的时间', `beyond_proportion` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '超出占比', PRIMARY KEY (`id`) USING BTREE, INDEX `canvas_patient_report_index`(`patient_report_id`) USING BTREE, INDEX `canvas_question_index`(`question_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '画板信息(每次画图生成一个画板信息)' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_canvas_line -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_canvas_line`; CREATE TABLE `t_ht_patient_canvas_line` ( `id` bigint(20) NOT NULL, `patient_canvas_id` bigint(20) NULL DEFAULT 0 COMMENT '画板id', `points` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '笔记详情(x,y,time)', `create_time` timestamp NOT NULL DEFAULT current_timestamp, `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP, `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除', PRIMARY KEY (`id`) USING BTREE, INDEX `canvas_patient_canvas_index`(`patient_canvas_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '画板轨迹表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_family -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_family`; CREATE TABLE `t_ht_patient_family` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 姓名 ', `age` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '年龄', `sex` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 性别(0:男 1:女) ', `educational_status` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 教育程度(1:文盲 2:小学 3:初中 4:高中 5:大学 6:大学以上 7:其他) ', `relation` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 患者家属(知情人)与患者的关系(1:配偶/伴侣 2:子女3:兄弟姐妹 4:其他亲属 5:朋友、邻居 6:受雇看护 7:其他) ', `is_live_together` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 患者家属(知情人)是否与患者一起居住(1:是 0:否) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人', PRIMARY KEY (`id`) USING BTREE, INDEX `family_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '家属表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_family_illness -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_family_illness`; CREATE TABLE `t_ht_patient_family_illness` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 亲属名字 ', `relation` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 与患者关系 ', `diagnose` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 诊断 ', `onset_age` int(11) NULL DEFAULT 0 COMMENT ' 发病年龄 ', `now_age` int(11) NULL DEFAULT 0 COMMENT ' 现在年龄(如已去世,为去世年龄) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人', PRIMARY KEY (`id`) USING BTREE, INDEX `family_illness_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '家族史' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_follow_up -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_follow_up`; CREATE TABLE `t_ht_patient_follow_up` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `follow_up_datetime` datetime NULL DEFAULT NULL COMMENT ' 随访时间 ', `follow_up_times` int(11) NULL DEFAULT 0 COMMENT ' 第几次随访 ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT ' 录入人 (医生ID)', `diagnose` bigint(20) NULL DEFAULT 0 COMMENT ' 诊断人 (医生ID)', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `followup_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病人随访表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_illness_history -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_illness_history`; CREATE TABLE `t_ht_patient_illness_history` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `cardiac_arrest_history` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心跳骤停史(1:有0:无) ', `angina` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心绞痛(1:有0:无) ', `mi` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心肌梗死(1:有0:无) ', `atrial_fibrillation` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 心房纤颤(1:有0:无) ', `chf` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 充血性心衰(1:有0:无) ', `other_cardiovascular_diseases` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 其他心血管疾病(1:有0:无) ', `wuis` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 缺血性卒中(1:有0:无) ', `hcvd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 出血性卒中(1:有0:无) ', `parkinson_disease` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 帕金森病(1:有0:无) ', `epilepsy` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 癫痫(1:有0:无) ', `brain_trauma` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 脑外伤(1:有0:无) ', `hypertension` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高血压(1:有0:无) ', `diabetes` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 糖尿病(1:有0:无) ', `hlp` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高脂血症(1:有0:无) ', `hyperhomocysteinemia` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 高同型半胱氨酸血症(1:有0:无) ', `vb12_deficiency` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 维生素B12缺乏(1:有0:无) ', `thyroid_disease` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 甲状腺疾病(甲亢 甲减)(1:有0:无) ', `copd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 慢阻肺(1:有0:无) ', `asthma` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 哮喘(1:有0:无) ', `insomnia` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 失眠(1:有0:无) ', `sleep_suspend` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 睡眠暂停(1:有0:无) ', `ckd` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 慢性肾脏病(1:有0:无) ', `rheumatoid` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类风湿(1:有0:无) ', `depression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 抑郁(1:有0:无) ', `general_anesthesia_surgery` int(11) NULL DEFAULT 0 COMMENT ' 全麻手术史次数 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人', PRIMARY KEY (`id`) USING BTREE, INDEX `illness_history_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '既往史' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_parent_illness -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_parent_illness`; CREATE TABLE `t_ht_patient_parent_illness` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `memory` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 记忆障碍(1:有 0:无) (丢三落四,忘记谈话的内容和/或日期;经常忘记熟悉的人的名字等;重复提问和/或谈论同一个问题;物品不能放回固定位置) ', `language` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 语言障碍(1:有 0:无) (语言不流利;自主谈话减少;自发语言中实词减少,赘语、找词困难、用词不当但不予纠正;理解他人语言能力下降;书写能力下降;阅读困难等) ', `space` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 空间技能(1:有 0:无) (不能正确指出看到的物体、辨别方向困难或迷路、使用餐具困难、穿衣穿反等) ', `emotion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 情感淡漠(1:有 0:无) (兴趣丧失或能力下降,社交退缩) ', `depression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 抑郁(1:有0:无) (情绪低落、对活动失去兴趣、悲观绝望、食欲不振易疲劳等) ', `illusion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 幻觉/幻听/幻嗅(1:有 0:无) ', `delusion` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 虚构/妄想(1:有 0:无) ', `derepression` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 脱抑制(1:有 0:无) 在家中或公共场所的语言或行为是否粗俗不当、是否无视个人卫生、是否与陌生人过分亲近) ', `irritable` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 易激惹、激越、攻击行为(1:有 0:无) (过度兴奋、大喊大叫、对人(拳打脚踢) ', `personality_changes` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 人格改变(1:有 0:无) ', `exercise` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 运动障碍(1:是0:否) (共济失调、帕金森样运动障碍、不自主运动) ', `first_illness` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 最早出现的症状(1:认知 2:行为 3:运动 4:不祥) ', `reason` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 认知症状起病原因(1:隐匿 2:亚急性 3:急性起病) ', `change_form` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 症状发展变化的形式(1:渐进性加重 2:阶梯样加重 3:无变化 4:波动性 5:逐渐减轻) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人', PRIMARY KEY (`id`) USING BTREE, INDEX `parent_illness_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '现病史' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_persional -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_persional`; CREATE TABLE `t_ht_patient_persional` ( `id` bigint(20) NOT NULL, `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人id 普通索引 ', `smoking_history` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 有无吸烟史(1:有0:无) ', `smoking_year` int(11) NULL DEFAULT NULL COMMENT ' 吸烟时长(年) ', `smoking_amount` int(11) NULL DEFAULT NULL COMMENT ' 吸烟平均每日几支 ', `smoking_quit` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 是否戒烟(1:是0:否) ', `smoking_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 戒烟时长(年) ', `drink_history` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 有无饮酒史(1:有0:无) ', `drink_year` int(11) NULL DEFAULT NULL COMMENT ' 饮酒时长(年) ', `drink_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 饮酒类型(1:白酒 2:普通酒 3:啤酒),不同类型用,分割 ', `drink_amount` int(11) NULL DEFAULT 0 COMMENT ' 平均每日饮酒量(两/ml) ', `tea_coffee_history` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 有无喝茶咖啡史(1:有0:无) ', `tea_coffee_year` int(11) NULL DEFAULT NULL COMMENT ' 喝茶咖啡时长(年) ', `tea_coffee_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 喝茶咖啡类型(1:绿茶 2:红茶 3:乌龙茶 4.咖啡 5其他) ', `tea_coffee_frequency` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 喝茶咖啡频率(1:偶尔 2:每周1~2次 3:每周3~4次 4:每周5次及以上) ', `tea_coffee_quit` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 现在是否停止喝茶/咖啡(1:是 0:否) ', `tea_coffee_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 挺喝茶咖啡时长(年) ', `dietary_habit` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 饮食习惯(1:素食为主 2:荤食为主 3:荤素搭配 4:喜欢甜食 5:高盐 6:高脂 7:喜爱油炸物 ', `workout_time` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 锻炼时间(1:不太活动(看电视,读报等)2:轻度活动(种花或家务) 3:中度活动(游泳、打拳、慢跑、跳舞)4:重度活动(举杠铃等) ', `sleep_time` int(11) NULL DEFAULT NULL COMMENT ' 平均每天睡眠时间(小时) ', `snore` tinyint(1) UNSIGNED NULL DEFAULT NULL COMMENT ' 是否打鼾(1:有 0:无) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `recorder` bigint(20) NULL DEFAULT 0 COMMENT '录入人', `drink_quit` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 现在是否停止饮酒(1:是 0:否) ', `drink_quit_year` int(11) NULL DEFAULT NULL COMMENT ' 停止饮酒时长(年) ', PRIMARY KEY (`id`) USING BTREE, INDEX `persional_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '个人史' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_question_record -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_question_record`; CREATE TABLE `t_ht_patient_question_record` ( `id` bigint(20) NOT NULL, `patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友检查报告单ID 联合索引 ', `question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID ', `record_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '额外记录类型(answer:答案,errorMsg:错误信息,otherMsg:其他内容,paint:画图,voice:语音,startTime:起笔时长)', `record_value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 病友回答情况 ', `record_time` bigint(20) NULL DEFAULT 0 COMMENT ' 记录时间 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `record_patient_index`(`patient_report_id`, `question_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友答题记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_report -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_report`; CREATE TABLE `t_ht_patient_report` ( `id` bigint(20) NOT NULL, `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 报告单名称 ', `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病人ID 普通索引 ', `patient_idcard` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 病人身份证 ', `patient_age` tinyint(3) NULL DEFAULT 0 COMMENT '病人测评时的年龄', `doctor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评医生ID ', `serial_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 编号 ', `initial_impression` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 初步印象 ', `clinical_diagnosis` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 临床诊断(轻度认知障碍... 痴呆…无) ', `pasi` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 严重程度(0:未评测 1:轻度 2:中度 3:重度) ', `department` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 科别 ', `bed_number` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 床号 ', `report_time` bigint(20) NULL DEFAULT 0 COMMENT ' 报告时间 ', `check_time` bigint(20) NULL DEFAULT 0 COMMENT ' 检查时间 ', `evaluation_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评分类code(报告单表的版本) ', `url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 报告单路径 ', `qr_code_url` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '二维码路径', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `show_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '显示状态 0:不显示 1:在历史报告单中显示', `hospital` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '医院', `complete_status` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT '完成状态 0:未完成 1:完成 2:忽略', `user_id` bigint(20) NULL DEFAULT 0 COMMENT 'userId', PRIMARY KEY (`id`) USING BTREE, INDEX `patient_report_patient_index`(`patient_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友检查报告单表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_report_record -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_report_record`; CREATE TABLE `t_ht_patient_report_record` ( `id` bigint(20) NOT NULL, `report_id` bigint(20) NULL DEFAULT 0 COMMENT '病人报告单ID', `doctor_id` bigint(20) NULL DEFAULT 0 COMMENT '医生ID', `content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '报告内容', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `report_record_report_index`(`report_id`) USING BTREE, INDEX `report_record_doctor_index`(`doctor_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友检查报告单变更记录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_patient_score -- ---------------------------- DROP TABLE IF EXISTS `t_ht_patient_score`; CREATE TABLE `t_ht_patient_score` ( `id` bigint(20) NOT NULL, `patient_report_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友检查报告单ID 普通索引 ', `patient_id` bigint(20) NULL DEFAULT 0 COMMENT ' 病友ID ', `question_parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评试题上级code 联合索引 ', `question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID ', `option_id` bigint(20) NULL DEFAULT 0 COMMENT '选项ID', `option_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项name ', `score` decimal(11, 1) NULL DEFAULT 0.0 COMMENT ' 得分 ', `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(0:答案和得分 1:答案 2:得分) ', `answer` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 用户答案(存储图片或语音路径) ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', `answer_time` bigint(20) NULL DEFAULT 0 COMMENT '答题时间', PRIMARY KEY (`id`) USING BTREE, INDEX `score_report_index`(`patient_report_id`) USING BTREE, INDEX `score_question_index`(`question_parent_code`, `question_id`) USING BTREE, INDEX `score_patient_index`(`patient_id`) USING BTREE, INDEX `score_option_index`(`option_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '病友得分表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_position -- ---------------------------- DROP TABLE IF EXISTS `t_ht_position`; CREATE TABLE `t_ht_position` ( `id` bigint(20) NOT NULL, `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:医院 2:科室 3:职务) ', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 名称 ', `superior_department_id` bigint(20) NULL DEFAULT 0 COMMENT ' 所属部门ID 普通索引 ', `superior_id` bigint(20) NULL DEFAULT 0 COMMENT ' 上级职务ID 普通索引 ', `relevancy` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联单位 ', `has_manage` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否有管理权限(1:是 0:否) ', `has_audit` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否有审核权限(1:是 0:否)', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `position_name_index`(`name`, `superior_department_id`) USING BTREE, INDEX `position_superior_department_index`(`superior_department_id`) USING BTREE, INDEX `position_superior_index`(`superior_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '职务表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_question -- ---------------------------- DROP TABLE IF EXISTS `t_ht_question`; CREATE TABLE `t_ht_question` ( `id` bigint(20) NOT NULL, `evaluation_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 测评分类code(报告单表的编码) 联合索引 ', `parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 上级code(报告单表的编码) 普通索引 ', `sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 联合索引 ', `question` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 题目', `type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT '1文本,2图片,3语音,4选项,5连线且文字倒转,6文本倒转,7:图片且题目和选项位置互换,8:图片且图片颠倒', `record_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外记录类型(errorMsg:错误信息,otherMsg:其他内容) ', `record_content` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 额外记录内容 ', `relation_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联题目code,多个code之间使用,分割 ', `operate_type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 用户操作类型(0无,0无,1语音,2画图,3.画图显示中线和图形,4敲击,5画图不显示图形,6画图只显示中线) ', `recode_starttime` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否需要记录动笔时长(1是0否) ', `time_wabei` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否需要定时截图保存(1是0否) ', `allow_clear` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否允许重画(0否1是2回退) ', `clear_times` int(11) NULL DEFAULT 0 COMMENT ' 最多重画次数 ', `timing_length` int(11) NULL DEFAULT 0 COMMENT ' 定时器时长 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `question_evaluation_index`(`evaluation_code`, `sort`) USING BTREE, INDEX `question_parent_index`(`parent_code`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '测试题表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_question_introducer -- ---------------------------- DROP TABLE IF EXISTS `t_ht_question_introducer`; CREATE TABLE `t_ht_question_introducer` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID 索引 ', `content` varchar(1000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 引导语内容 ', `sort` int(11) NULL DEFAULT 0 COMMENT ' 排序 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `introducer_question_index`(`question_id`, `sort`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '引导语表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_question_option -- ---------------------------- DROP TABLE IF EXISTS `t_ht_question_option`; CREATE TABLE `t_ht_question_option` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID', `sort` int(11) NULL DEFAULT 1 COMMENT ' 排序 ', `type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '选项类型(redio:单选,checkbox:多选,number-socre:用户输入分数,) ', `name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项变量名 ', `score` decimal(11, 1) NULL DEFAULT 0.0 COMMENT ' 选项分数 ', `display` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 选项内容 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注,使用:{sum:1,isAutoformula:1,formulaSymbol:\"*\",formulaName:\"frequency,degree\"} sum:求和,isAutoformula:是否自动进行计算,formulaSymbol:计算符号,formulaName:计算属性 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `option_question_index`(`question_id`, `sort`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '选项表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_question_relevance -- ---------------------------- DROP TABLE IF EXISTS `t_ht_question_relevance`; CREATE TABLE `t_ht_question_relevance` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NULL DEFAULT 0 COMMENT '问题id', `relevance_id` bigint(20) NULL DEFAULT 0 COMMENT '被关联的问题的id', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '试题关联表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_question_scoring_rule -- ---------------------------- DROP TABLE IF EXISTS `t_ht_question_scoring_rule`; CREATE TABLE `t_ht_question_scoring_rule` ( `id` bigint(20) NOT NULL, `question_id` bigint(20) NULL DEFAULT 0 COMMENT ' 测评试题ID 索引 ', `type` tinyint(2) UNSIGNED NULL DEFAULT 0 COMMENT ' 计分规则类型,0:个数判断-从小到大 ', `detail` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 计分规则详细内容:例子:[{\"small\":0,\"key\":0},{\"small\":1,\"key\":1},{\"small\":3,\"key\":2},{\"small\":5,\"key\":3}]', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `scoring_rule_question_index`(`question_id`, `type`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '测试计分规则表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_relation -- ---------------------------- DROP TABLE IF EXISTS `t_ht_relation`; CREATE TABLE `t_ht_relation` ( `id` bigint(20) NOT NULL, `user_id` bigint(20) NULL DEFAULT 0 COMMENT ' 普通索引 ', `relation_url` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 关联路径 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `relation_user_index`(`user_id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '关联其他域' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_report -- ---------------------------- DROP TABLE IF EXISTS `t_ht_report`; CREATE TABLE `t_ht_report` ( `id` bigint(20) NOT NULL, `code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 编码 索引 ', `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 名称 ', `parent_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 上级编码 索引 ', `description` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 划界描述 ', `total_score` int(11) NULL DEFAULT 0 COMMENT ' 总分(<0:不需要显示总分,=0:不计分, >0:总分) ', `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:报告单 2:测评 3:测评子类 4:二级子类) ', `is_show` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否在报告单上显示(1:是 0:否) ', `sort` int(11) NULL DEFAULT 0 COMMENT ' 报告单展示顺序 ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE, INDEX `report_code_index`(`code`) USING BTREE, INDEX `report_parent_code_index`(`parent_code`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '报告单表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for t_ht_title -- ---------------------------- DROP TABLE IF EXISTS `t_ht_title`; CREATE TABLE `t_ht_title` ( `id` bigint(20) NOT NULL, `type` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 类型(1:医生 2:护士) ', `title` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 职称 ', `superidor_id` bigint(20) NULL DEFAULT 0 COMMENT ' 上级ID ', `remark` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT ' 备注 ', `create_time` timestamp NULL DEFAULT current_timestamp COMMENT ' 创建时间 ', `update_time` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE CURRENT_TIMESTAMP COMMENT ' 修改时间 ', `is_del` tinyint(1) UNSIGNED NULL DEFAULT 0 COMMENT ' 是否删除(1:是 0:否) ', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '职称表' ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1;