From a780b10aed16437683682a2b760484e870c94289 Mon Sep 17 00:00:00 2001 From: kuaileWu <1432334894@qq.com> Date: Tue, 5 Mar 2024 12:07:42 +0800 Subject: [PATCH] sql --- acupuncture.sql | 131 +++++++++++++++++++++++++++ 针灸挂号系统功能拆分.txt | 2 +- 针灸挂号系统功能表结构.sql | 166 +++++++++++++++++++++++++++------- 3 files changed, 266 insertions(+), 33 deletions(-) create mode 100644 acupuncture.sql diff --git a/acupuncture.sql b/acupuncture.sql new file mode 100644 index 0000000..997d422 --- /dev/null +++ b/acupuncture.sql @@ -0,0 +1,131 @@ +CREATE TABLE `user_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `avator` varchar(255) NOT NULL DEFAULT '' COMMENT '头像', + `nick` varchar(100) NOT NULL DEFAULT '' COMMENT '昵称', + `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '公众号openid', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='患者用户表'; + +CREATE TABLE `visitor_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `uid` int(11) NOT NULL DEFAULT '0' COMMENT '患者用户表id', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', + `idcard_ext` char(4) NOT NULL DEFAULT '' COMMENT '身份证后四位', + `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=正常 1=已删除' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='就诊用户人表'; + +CREATE TABLE `visit_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', + `visit_time` varchar(50) NOT NULL DEFAULT '' COMMENT '就诊预约时间 07:30-08:30', + `visit_date` varchar(50) NOT NULL DEFAULT '' COMMENT '就诊预约日期 2024-03-01', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=待叫号 1=就诊中 2=就诊完成 3=已过期 4=已过号 5=已退号', + `acupuncture_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '针灸状态 0=待留针 1=已留针 2=已取针', + `start_acupuncture_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '开始针灸时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='就诊挂号表'; + +CREATE TABLE `visit_info_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', + `last_visit` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '最后就诊时间', + `total_num` int(11) NOT NULL DEFAULT '0' COMMENT '总针灸次数', + `remain_num` int(11) NOT NULL DEFAULT '0' COMMENT '剩余针灸次数' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户就诊信息表'; + +CREATE TABLE `doctor_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', + `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', + `invite_code` char(128) NOT NULL DEFAULT '' COMMENT '邀请码', + `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '14字简介', + `detail` text COMMENT '个人详细介绍', + `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '公众号openid', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生表'; + +CREATE TABLE `doctor_helper_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', + `idcard` varchar(255) NOT NULL DEFAULT '' COMMENT '身份证号', + `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=志愿者 1=助手', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=待审核 1=审核通过 2=停用' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生助手表'; + +CREATE TABLE `doctor_helper_auth` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=志愿者 1=助手', + `rule` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=代患者预约 1=帮患者取证 2=挂号条录入' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生助手权限表'; + +CREATE TABLE `hospital_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `province` varchar(100) NOT NULL DEFAULT '' COMMENT '省', + `cite` varchar(100) NOT NULL DEFAULT '' COMMENT '市', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '医院名称', + `short_name` varchar(255) NOT NULL DEFAULT '' COMMENT '医院简称', + `departments` varchar(100) NOT NULL DEFAULT '' COMMENT '科室部门', + `morning_worktime` char(50) NOT NULL DEFAULT '' COMMENT '上午上班时间-上午下班时间 9:00-12:00', + `afternoon_worktime` char(50) NOT NULL DEFAULT '' COMMENT '下午上班时间-下午下班时间 14:00-17:30', + `holiday_work_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=否 1=是 节假日是否停诊', + `acupuncture_num` int(4) NOT NULL DEFAULT '0' COMMENT '一次挂号针灸次数', + `acupuncture_time` int(4) NOT NULL DEFAULT '0' COMMENT '每次针灸时长', + `bed_num` int(4) NOT NULL DEFAULT '0' COMMENT '时间段可预约床位数', + `acupuncture_num_exipre` int(4) NOT NULL DEFAULT '0' COMMENT '针灸次数有效期,单位天', + `visit_days` int(4) NOT NULL DEFAULT '0' COMMENT '距离当前可挂号最晚时间,单位小时,设置为2小时,用户可挂近两小时的号', + `notice` text COMMENT '就诊提醒', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=就诊中 1=已停诊' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医院表'; + +CREATE TABLE `week_worktimes` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `week_day` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1~7 代表周一到周天', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 休息 1 上午上班 2 下午上班 3 全天出诊' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='每周出诊安排表'; + +CREATE TABLE `doctor_visit_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `morning_worktime` char(50) NOT NULL DEFAULT '' COMMENT '上午上班时间-上午下班时间 9:00-12:00,0代表休息,1代表默认时间段', + `afternoon_worktime` char(50) NOT NULL DEFAULT '' COMMENT '下午上班时间-下午下班时间 14:00-17:30,0代表休息,1代表默认时间段', + `date` date NOT NULL DEFAULT '0000-00-00' COMMENT '调诊日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生出诊调整表'; + +CREATE TABLE `everyday_visit_nums` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `times` char(50) NOT NULL DEFAULT '' COMMENT '挂号时间段 07:30-08:30', + `date` date NOT NULL DEFAULT '0000-00-00' COMMENT '挂号日期', + `num` int(5) NOT NULL DEFAULT '0' COMMENT '挂号数量', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '放号时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='每天挂号放号数量,放号表'; + +CREATE TABLE `register_opt_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', + `acupuncture_nums` int(11) NOT NULL DEFAULT '0' COMMENT '针灸次数', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=挂号 1=退号', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='挂号操作表'; \ No newline at end of file diff --git a/针灸挂号系统功能拆分.txt b/针灸挂号系统功能拆分.txt index 1ff48b4..e53f03d 100644 --- a/针灸挂号系统功能拆分.txt +++ b/针灸挂号系统功能拆分.txt @@ -41,4 +41,4 @@ https://lbs.qq.com/service/webService/webServiceGuide/search/webServiceSuggestio 已完成 1.针灸挂号系统需求确认 -2.针灸挂号系统前端框架搭建 \ No newline at end of file +2.针灸挂号系统前端框架搭建 diff --git a/针灸挂号系统功能表结构.sql b/针灸挂号系统功能表结构.sql index 635da46..89b8a7d 100644 --- a/针灸挂号系统功能表结构.sql +++ b/针灸挂号系统功能表结构.sql @@ -1,14 +1,25 @@ -一 用户端 -1.用户表 user_list +1.患者用户表 user_list id +hid 医院id doctor_id 医生id avator 头像 nick 昵称 openid 公众号openid create 创建时间 +CREATE TABLE `user_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `avator` varchar(255) NOT NULL DEFAULT '' COMMENT '头像', + `nick` varchar(100) NOT NULL DEFAULT '' COMMENT '昵称', + `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '公众号openid', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='患者用户表'; + 2.就诊用户人表 visitor_list id +hid 医院id doctor_id 医生id uid 用户id name 姓名 @@ -16,29 +27,41 @@ idcard_ext 身份证后四位 phone 手机号 create 添加时间 status 0 正常 1已删除 - -3.就诊挂号预约表 visit_book_list +CREATE TABLE `visitor_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `uid` int(11) NOT NULL DEFAULT '0' COMMENT '患者用户表id', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', + `idcard_ext` char(4) NOT NULL DEFAULT '' COMMENT '身份证后四位', + `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=正常 1=已删除' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='就诊用户人表'; + +3.就诊挂号表 visit_list id hid 医院id doctor_id 医生id visitor_id 就诊用户人id visit_time 就诊预约时间 07:30-08:30 visit_date 就诊预约日期 2024-03-01 -status 0=待就诊 1=已完成 - -4.就诊挂号表 visit_list -id -hid 医院id -doctor_id 医生id -visit_book_id 就诊预约表id -visitor_id 就诊用户人id -visit_time 就诊预约时间 07:30-08:30 -visit_date 就诊预约日期 2024-03-01 status 0=待叫号 1=就诊中 2=就诊完成 3=已过期 4=已过号 5=已退号 acupuncture_status 针灸状态 0 待留针 1 已留针 2 已取针 start_acupuncture_time 开始针灸时间 - -5.用户就诊信息表 visit_info_list +CREATE TABLE `visit_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', + `visit_time` varchar(50) NOT NULL DEFAULT '' COMMENT '就诊预约时间 07:30-08:30', + `visit_date` varchar(50) NOT NULL DEFAULT '' COMMENT '就诊预约日期 2024-03-01', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=待叫号 1=就诊中 2=就诊完成 3=已过期 4=已过号 5=已退号', + `acupuncture_status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '针灸状态 0=待留针 1=已留针 2=已取针', + `start_acupuncture_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '开始针灸时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='就诊挂号表'; + +4.用户就诊信息表 visit_info_list id hid 医院id doctor_id 医生id @@ -46,8 +69,15 @@ visitor_id 就诊用户人id last_visit 最后就诊时间 total_num 总针灸次数 remain_num 剩余针灸次数 - -二 医生端 +CREATE TABLE `visit_info_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', + `last_visit` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT '最后就诊时间', + `total_num` int(11) NOT NULL DEFAULT '0' COMMENT '总针灸次数', + `remain_num` int(11) NOT NULL DEFAULT '0' COMMENT '剩余针灸次数' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户就诊信息表'; 1.医生表 doctor_list id @@ -58,6 +88,16 @@ desc 14字简介 detail 个人详细介绍 openid 公众号openid create 注册时间 +CREATE TABLE `doctor_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', + `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', + `invite_code` char(128) NOT NULL DEFAULT '' COMMENT '邀请码', + `desc` varchar(255) NOT NULL DEFAULT '' COMMENT '14字简介', + `detail` text COMMENT '个人详细介绍', + `openid` varchar(255) NOT NULL DEFAULT '' COMMENT '公众号openid', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '注册时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生表'; 2.医生助手表 doctor_helper_list id @@ -68,13 +108,30 @@ idcard 身份证号 phone 手机号 type 0 志愿者 1 助手 status 0=待审核 1=审核通过 2=停用 +CREATE TABLE `doctor_helper_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '姓名', + `idcard` varchar(255) NOT NULL DEFAULT '' COMMENT '身份证号', + `phone` bigint(11) NOT NULL DEFAULT '0' COMMENT '手机号', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=志愿者 1=助手', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=待审核 1=审核通过 2=停用' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生助手表'; 3.医生助手权限表 doctor_helper_auth id -doctor_id 医生id hid 医院 0=代表所有医院 +doctor_id 医生id type 0=志愿者 1=助手 rule 0=代患者预约 1=帮患者取证 2=挂号条录入 +CREATE TABLE `doctor_helper_auth` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=志愿者 1=助手', + `rule` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=代患者预约 1=帮患者取证 2=挂号条录入' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生助手权限表'; 4.医院表 hospital_list id @@ -86,7 +143,7 @@ short_name 医院简称 departments 科室部门 morning_worktime 上午上班时间-上午下班时间 9:00-12:00 afternoon_worktime 下午上班时间-下午下班时间 14:00-17:30 -holiday_work_type 0 否 1 是 节假日是否停诊 +holiday_work_type 0=否 1=是 节假日是否停诊 acupuncture_num 一次挂号针灸次数 acupuncture_time 每次针灸时长 bed_num 时间段可预约床位数 @@ -95,13 +152,40 @@ visit_days 距离当前可挂号最晚时间,单位小时,设置为2小时, notice 就诊提醒 create 创建时间 status 0 就诊中 1 已停诊 +CREATE TABLE `hospital_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `province` varchar(100) NOT NULL DEFAULT '' COMMENT '省', + `cite` varchar(100) NOT NULL DEFAULT '' COMMENT '市', + `name` varchar(255) NOT NULL DEFAULT '' COMMENT '医院名称', + `short_name` varchar(255) NOT NULL DEFAULT '' COMMENT '医院简称', + `departments` varchar(100) NOT NULL DEFAULT '' COMMENT '科室部门', + `morning_worktime` char(50) NOT NULL DEFAULT '' COMMENT '上午上班时间-上午下班时间 9:00-12:00', + `afternoon_worktime` char(50) NOT NULL DEFAULT '' COMMENT '下午上班时间-下午下班时间 14:00-17:30', + `holiday_work_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=否 1=是 节假日是否停诊', + `acupuncture_num` int(4) NOT NULL DEFAULT '0' COMMENT '一次挂号针灸次数', + `acupuncture_time` int(4) NOT NULL DEFAULT '0' COMMENT '每次针灸时长', + `bed_num` int(4) NOT NULL DEFAULT '0' COMMENT '时间段可预约床位数', + `acupuncture_num_exipre` int(4) NOT NULL DEFAULT '0' COMMENT '针灸次数有效期,单位天', + `visit_days` int(4) NOT NULL DEFAULT '0' COMMENT '距离当前可挂号最晚时间,单位小时,设置为2小时,用户可挂近两小时的号', + `notice` text COMMENT '就诊提醒', + `create` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=就诊中 1=已停诊' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医院表'; 5.每周出诊安排表 week_worktimes id -doctor_id 医生id hid 医院 +doctor_id 医生id week_day 1~7 代表周一到周天 type 0 休息 1 上午上班 2 下午上班 3 全天出诊 +CREATE TABLE `week_worktimes` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `week_day` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1~7 代表周一到周天', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 休息 1 上午上班 2 下午上班 3 全天出诊' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='每周出诊安排表'; 6.医生出诊调整表 doctor_visit_list id @@ -110,6 +194,14 @@ doctor_id 医生id morning_worktime 上午上班时间-上午下班时间 9:00-12:00,0代表休息,1代表默认时间段 afternoon_worktime 下午上班时间-下午下班时间 14:00-17:30,0代表休息,1代表默认时间段 date 调诊日期 2024-03-01 +CREATE TABLE `doctor_visit_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `morning_worktime` char(50) NOT NULL DEFAULT '' COMMENT '上午上班时间-上午下班时间 9:00-12:00,0代表休息,1代表默认时间段', + `afternoon_worktime` char(50) NOT NULL DEFAULT '' COMMENT '下午上班时间-下午下班时间 14:00-17:30,0代表休息,1代表默认时间段', + `date` date NOT NULL DEFAULT '0000-00-00' COMMENT '调诊日期' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='医生出诊调整表'; 7.everyday_visit_nums 每天挂号放号数量,放号表 id @@ -119,20 +211,30 @@ times 挂号时间段 07:30-08:30 date 挂号日期 2024-03-01 num 挂号数量 create_time 放号时间 +CREATE TABLE `everyday_visit_nums` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `times` char(50) NOT NULL DEFAULT '' COMMENT '挂号时间段 07:30-08:30', + `date` date NOT NULL DEFAULT '0000-00-00' COMMENT '挂号日期', + `num` int(5) NOT NULL DEFAULT '0' COMMENT '挂号数量', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '放号时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='每天挂号放号数量,放号表'; 8.挂号操作表 register_opt_list id +hid 医院id +doctor_id 医生id visitor_id 就诊用户人id acupuncture_nums 针灸次数 type 0=挂号 1=退号 - - -问题: -1.帮挂号退号是不是直接挂上号和退号了 -2.预约就诊时间页面是否还有用 - -已完成 - - - - +create_time 操作时间 +CREATE TABLE `register_opt_list` ( + `id` int NOT NULL AUTO_INCREMENT PRIMARY KEY, + `hid` int(11) NOT NULL DEFAULT '0' COMMENT '医院id', + `doctor_id` int(11) NOT NULL DEFAULT '0' COMMENT '医生id', + `visitor_id` int(11) NOT NULL DEFAULT '0' COMMENT '就诊用户人id', + `acupuncture_nums` int(11) NOT NULL DEFAULT '0' COMMENT '针灸次数', + `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0=挂号 1=退号', + `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间' +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='挂号操作表'; \ No newline at end of file