SQL专题


前言

数据库设计文档

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

数据库设计

1.SQL

create database kkb_hospital default charset utf8;
use kkb_hospital;

SET FOREIGN_KEY_CHECKS=0;

DROP TABLE IF EXISTS `behospital`;
CREATE TABLE `behospital` (
  `beH_id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `beH_nursePeoPle` varchar(18) NOT NULL COMMENT '护理人',
  `beH_patBed` varchar(18) NOT NULL COMMENT '病床号',
  `beH_antecedent` decimal(10,0) NOT NULL COMMENT '缴纳押金',
  `beH_illness` varchar(300) NOT NULL COMMENT '病情介绍',
  `beH_closePrice` int NOT NULL COMMENT '结算状态0未结算1已结算',
  `beH_state` int NOT NULL COMMENT '信息状态0正常1删除',
  `hosr_id` int DEFAULT NULL,
  `beH_date` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`beH_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COMMENT='住院表';

-- ----------------------------
-- Records of behospital
-- ----------------------------
INSERT INTO `behospital` VALUES ('1', '护士1号', 'a203', '56', '支气管炎', '0', '1', '8', '2021-08-29 08:05:13');
INSERT INTO `behospital` VALUES ('2', '护士1号', 'a206', '500', '精神病', '0', '0', '9', '2021-08-28 13:38:22');

-- ----------------------------
-- Table structure for `chargeproject`
-- ----------------------------
DROP TABLE IF EXISTS `chargeproject`;
CREATE TABLE `chargeproject` (
  `chaP_id` int NOT NULL AUTO_INCREMENT COMMENT '收费项目编号',
  `chaP_name` varchar(30) NOT NULL COMMENT '收费项目名称',
  `chaP_money` decimal(10,0) NOT NULL COMMENT '收费金额',
  `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`chaP_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1103 DEFAULT CHARSET=utf8 COMMENT='收费项目表';

-- ----------------------------
-- Records of chargeproject
-- ----------------------------
INSERT INTO `chargeproject` VALUES ('1101', '测试项', '900', '2021-08-28 11:08:45');
INSERT INTO `chargeproject` VALUES ('1102', '心电图', '1000', '2021-08-28 11:08:45');

-- ----------------------------
-- Table structure for `doctor`
-- ----------------------------
DROP TABLE IF EXISTS `doctor`;
CREATE TABLE `doctor` (
  `d_id` int NOT NULL AUTO_INCREMENT COMMENT '医生表唯一id',
  `d_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '医生编号',
  `d_name` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '医生姓名',
  `d_idCar` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '身份证号',
  `d_phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '手机号',
  `d_sex` int NOT NULL COMMENT '0男1女',
  `d_birthday` date NOT NULL COMMENT '出生日期',
  `d_age` int NOT NULL COMMENT '年龄',
  `d_email` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '电子邮箱',
  `d_keshi` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所属科室',
  `d_xueli` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '学历',
  `d_desc` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `d_inTime` date DEFAULT NULL COMMENT '入职时间',
  `d_state` int(1) unsigned zerofill DEFAULT '0' COMMENT '状态0正常1离职',
  PRIMARY KEY (`d_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='医生表';

-- ----------------------------
-- Records of doctor
-- ----------------------------
INSERT INTO `doctor` VALUES ('31', '1001', '慎', '420102199003077394', '13500088907', '0', '1990-03-07', '31', '1298562014@qq.com', '001002', '硕士研究生', '您果然深思熟虑,召唤师!', '2020-07-24', '0');
INSERT INTO `doctor` VALUES ('32', '1002', '蒙多', '420102199003079517', '18497012578', '0', '1990-03-07', '31', '2127642014@qq.com', '002003', '博士研究生', '蒙多想去哪就去哪!', '2021-08-12', '0');
INSERT INTO `doctor` VALUES ('33', '1003', '腕豪', '420102199003072016', '18790496594', '0', '1990-03-07', '31', '779416161@qq.com', '004010', '硕士研究生', '要是你在梦里打过我,你最好就现在醒醒,给我道歉。', '2019-12-25', '0');
INSERT INTO `doctor` VALUES ('34', '1004', '娑娜', '420102199001076646', '17846042240', '1', '1990-01-07', '31', '321242014@qq.com', '001001', '大学本科', '只有你可以听到我的话,召唤师,今天我们演奏哪首曲子?', '2020-01-24', '0');
INSERT INTO `doctor` VALUES ('35', '1005', '悠米', '420102199003072067', '18224657329', '1', '1990-03-07', '31', '1231234123@qq.com', '006002', '大学本科', '等等你觉得现在回去安全吗!', '2017-10-25', '0');
INSERT INTO `doctor` VALUES ('36', '1006', '莎米拉', '420102199003071603', '15047977468', '1', '1990-03-07', '31', '13231242014@qq.com', '001001', '硕士研究生', '要是能给我过去的经历当头一枪该多好。', '2017-10-25', '0');
INSERT INTO `doctor` VALUES ('37', '1007', '扎克', '420102199003073684', '14732075470', '1', '1990-03-07', '31', '3442342314@qq.com', '005002', '大学专科', '我也许会屈服,但我绝对不会折服', '2021-08-13', '0');
INSERT INTO `doctor` VALUES ('38', '1008', '维克托', '420102199009074872', '13901686082', '0', '1990-09-07', '30', '1297642014@qq.com', '002008', '硕士研究生', '什么是光荣的进化', '2021-08-12', '0');
INSERT INTO `doctor` VALUES ('39', '1009', '卢锡安', '420102199009078574', '19894958776', '0', '1990-09-07', '30', '1297642014@qq.com', '002007', '硕士研究生', '想尽办法,勇敢战斗', '2021-07-28', '0');
INSERT INTO `doctor` VALUES ('40', '1010', '佐伊', '11010119990307726X', '13508583014', '1', '1999-03-07', '22', '1297642014@qq.com', '003002', '博士研究生', '那只眼睛曾经眺望前方安全的航线,但是现在永远闭上了', '2021-08-06', '0');
INSERT INTO `doctor` VALUES ('41', '1011', '戴安娜', '110101199903078422', '15162157785', '1', '1999-03-07', '22', '2342344423@qq.com', '003005', '大学本科', '一轮新月正在冉冉升起', '2021-08-06', '0');
INSERT INTO `doctor` VALUES ('42', '1012', '奥利安娜', '110101199903077104', '17217015911', '1', '1999-03-07', '22', '423452@qq.com', '003001', '大学本科', '我们会帮你杀敌,这肯定很有趣', '2021-08-04', '0');
INSERT INTO `doctor` VALUES ('43', '1013', '布兰德', '110101199903078844', '14781319256', '1', '1999-03-07', '22', '423423523@qq.com', '004008', '硕士研究生', '烧吧烧吧', '2021-08-13', '0');
INSERT INTO `doctor` VALUES ('44', '1014', '加里奥', '11010119900307213X', '17263664361', '0', '1990-03-07', '31', '4234234@qq.com', '004008', '大学专科', '你好,巨大的闪光金矿,我必须摧毁你。喔', '2021-08-05', '0');
INSERT INTO `doctor` VALUES ('45', '1015', '乐芙兰', '110101199003075357', '18472371133', '0', '1990-03-07', '31', '1297642014@qq.com', '005002', '硕士研究生', '只不过是镜花水月而已', '2021-08-21', '0');
INSERT INTO `doctor` VALUES ('46', '1016', '安妮', '110101199003075496', '13132723771', '0', '1990-03-07', '31', 'rerewt@qq.com', '005002', '大学本科', '我的小熊去哪了', '2021-08-12', '0');
INSERT INTO `doctor` VALUES ('47', '1017', '伊泽瑞尔', '150303195208077121', '16551657274', '1', '1952-08-07', '69', '4234234234@qq.com', '005001', '大学本科', '是时候展现真正的技术了', '2019-11-01', '0');
INSERT INTO `doctor` VALUES ('48', '1018', '凯特琳', '150303195208077121', '18797798072', '1', '1952-08-07', '69', '5463453@qq.com', '006002', '大学本科', '有谁不喜欢被枪指着呢', '2021-08-21', '0');
INSERT INTO `doctor` VALUES ('49', '1019', '德莱文', '110101199003150396', '13581167709', '0', '1990-03-15', '31', 'eqwrqwe@qq.com', '006001', '硕士研究生', '欢迎来到德莱联盟', '2020-01-23', '0');
INSERT INTO `doctor` VALUES ('50', '1020', '金克斯', '110101199003153757', '15754328203', '0', '1990-03-15', '31', '312344@qq.com', '007002', '硕士研究生', '规则就是用来打破的', '2020-12-25', '0');
INSERT INTO `doctor` VALUES ('51', '1021', '艾希', '110101199003150572', '19847413865', '0', '1990-03-15', '31', '234234@qq.com', '007004', '博士研究生', '我瞄得很稳', '2021-08-22', '0');
INSERT INTO `doctor` VALUES ('52', '1022', '薇恩', '110101199003074821', '18369944367', '1', '1990-03-07', '31', '34234@qq.com', '007005', '大学本科', '让我们来猎杀哪些陷入黑暗中的人们', '2020-07-01', '0');
INSERT INTO `doctor` VALUES ('53', '1022', '	格雷福斯', '1101011990', '19851232208', '0', '2019-03-12', '56', '656665@qq.com', '014254', '博士研究生', null, null, '0');

-- ----------------------------
-- Table structure for `drug`
-- ----------------------------
DROP TABLE IF EXISTS `drug`;
CREATE TABLE `drug` (
  `dr_id` int NOT NULL AUTO_INCREMENT COMMENT '药品编号',
  `dr_url` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '鑽搧鍥剧墖URL',
  `dr_inPrice` decimal(10,0) DEFAULT NULL COMMENT '杩涗环',
  `dr_outPrice` decimal(10,0) DEFAULT NULL COMMENT '鍞环',
  `dr_name` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '鑽搧鍚嶇О',
  `dr_type` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '鑽搧绫诲瀷',
  `dr_simDesc` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '绠€鍗曚粙缁?',
  `dr_qualityDate` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '淇濊川鏈?',
  `dr_detaDesc` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '璇︾粏鎻忚堪',
  `dr_fatory` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '鐢熶骇鍘傚',
  `dr_direction` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '鏈嶇敤璇存槑',
  `dr_remark` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '澶囨敞',
  `dr_number` int DEFAULT NULL COMMENT '鑽搧鐨勫簱瀛?',
  PRIMARY KEY (`dr_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1308947 DEFAULT CHARSET=utf8 COMMENT='药品表';

-- ----------------------------
-- Records of drug
-- ----------------------------
INSERT INTO `drug` VALUES ('123', '8f8accf919514c9ba17d204ffdfcdbb6.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '发给', '', '请在医生指导下使用', '', '65');
INSERT INTO `drug` VALUES ('124', 'b8f41157898f45f59b9472c96fa04da4.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '', '', '请在医生指导下使用', '', '56');
INSERT INTO `drug` VALUES ('125', '887b18c0972044c0889594aa7a67f3fc.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '无详细描述', '三无厂商', '请在医生指导下使用', '无备注', '56');
INSERT INTO `drug` VALUES ('126', '9eeafc8303a04069ba3046670b87a7d5.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '无详细', '三无公司', '请在医生指导下使用', '无备注', '56');
INSERT INTO `drug` VALUES ('127', 'f0b35ad1bea54473ba3ac46600b66189.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '', '', '请在医生指导下使用', '', '95');
INSERT INTO `drug` VALUES ('128', '06c5b9d1e5fd4c09aa2014be5745c0ba.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '', '', '请在医生指导下使用', '', '1');
INSERT INTO `drug` VALUES ('145', 'd8bc047751de40c3a84ff0c90eaf75c0.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '', '', '请在医生指导下使用', '', '1');
INSERT INTO `drug` VALUES ('1234', 'fa346c009c744be69588c3d74a434a18.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '', '', '请在医生指导下使用', '', '120');
INSERT INTO `drug` VALUES ('1269', 'f23bfea8ed3b482a9556ec8fd2867836.jpg', '52', '56', '头孢', '处方药', '', '36', '', '', '请在医生指导下使用', '', '92');
INSERT INTO `drug` VALUES ('1294', '8ad18ed8d10e43a7addfd4568cca26b9.jpg', '52', '56', '头孢', '处方药', '', '36', '', '', '请在医生指导下使用', '', '65');
INSERT INTO `drug` VALUES ('12346', '6564dedd53054765975d63db6df94f20.jpg', '52', '56', '处方药', '处方药', '无描述', '36', '', '', '请在医生指导下使用', '', '952');
INSERT INTO `drug` VALUES ('12348', '0f34daec8ad2460aaf30bb527fe7c20b.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '965');
INSERT INTO `drug` VALUES ('12389', '232459818b484ff78723ad9a0674171c.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '952');
INSERT INTO `drug` VALUES ('12392', '7a4fbe84aa774a51a4c7329cf62dce2a.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '9586');
INSERT INTO `drug` VALUES ('12398', '9b97f472a19d4b5ba5f2c19597c24bc1.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '', '', '652');
INSERT INTO `drug` VALUES ('12450', '0486787bf6cd4519b89f6744137e1522.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '952');
INSERT INTO `drug` VALUES ('12465', '24f83747898b418ab07b0bad8bf2652f.jpg', '52', '56', '感康', '西药', '无描述', '36', '', '', '请在医生指导下使用', '', '56');
INSERT INTO `drug` VALUES ('12656', '44e058c00ad043e893d2d61c1251047d.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '623');
INSERT INTO `drug` VALUES ('12945', 'b21ae9bcacf747439c0466edc9f1482f.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '652');
INSERT INTO `drug` VALUES ('12946', 'b211910c06ed4e70befb5c9d673fdabb.jpg', null, null, '头孢', '中药', '', '36', '', '', '', '', '652');
INSERT INTO `drug` VALUES ('12962', '1f7127cb07294765822279a2d3709d4e.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '65');
INSERT INTO `drug` VALUES ('13054', '7c5085bf3a474860a0bc8d98694f737f.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '6235');
INSERT INTO `drug` VALUES ('15348', 'fa17b4c7f4414e589722107e169ca9e6.jpg', '65', '468', '玻璃酸辣', '处方药', '去', '36', '如果日本儿童方法v从', '法担保法第三个', '日本大阪v', 'v 发给v让他会让人好吧', '4752');
INSERT INTO `drug` VALUES ('98523', '9921c19231f04cf7b00cedc89e0c9631.jpg', '52', '56', '头孢', '中药', '无描述', '36', '测试用药', '三无公司', '请在医生指导下使用', '无', '954');
INSERT INTO `drug` VALUES ('123156', '01d51431ca08431c9a3463becb80d58b.jpg', '52', '56', '头孢', '处方药', '无描述', '36', '不详细的描述', '良心制药', '请在医生指导下服用', '无备注', null);
INSERT INTO `drug` VALUES ('123258', '59041345fc474df888ce33d5ccadb7e4.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '652');
INSERT INTO `drug` VALUES ('123458', 'fe248a9f5f6948c283578195fe812e63.jpg', '52', '56', '头孢', '中药', '', '36', '', '', '', '', '684');
INSERT INTO `drug` VALUES ('123785', 'dfe6061bf6e64858b70ed303fd4df85c.jpg', '52', '56', '头孢', '中药', '无描述', '36', '', '', '请在医生指导下使用', '', '954');
INSERT INTO `drug` VALUES ('123884', 'c983e3b148a945779bff6f4574ed5aca.jpg', null, null, '头孢', '中药', '', '36', '', '', '', '', '95');
INSERT INTO `drug` VALUES ('123947', '8b0c861e87854b48994ca1ce0353005a.jpg', '52', '56', '头孢', '中药', '无描述', '36', '不详细的描述', '良心制药', '在医生指导下服用', '无备注', null);
INSERT INTO `drug` VALUES ('124465', '3e9b4242933e44d29a3c6313c5802d40.jpg', null, null, '头孢', '中药', '', '36', '', '', '', '', '65');
INSERT INTO `drug` VALUES ('129456', '126caeef382b4a3c802d9c915e4d8a29.jpg', '52', '56', '头孢', '西药', '', '36', '', '', '', '', '95');
INSERT INTO `drug` VALUES ('129654', '8ca7023be6a04808a52159d5ad9a6398.jpg', '52', '56', '头孢', '西药', '无描述', '36', '', '', '请在医生指导下使用', '', '954');
INSERT INTO `drug` VALUES ('1234475', 'c483f48db36e4eacb042822b6349e2b4.jpg', '52', '56', '头孢', '西药', '无描述', '36', '', '', '请在医生指导下使用', '', '9723');
INSERT INTO `drug` VALUES ('1237852', '27ea4c4176a94eda9a59054d22f9def4.jpg', null, null, '头孢', '西药', '', '36', '', '', '', '', '36');
INSERT INTO `drug` VALUES ('1308945', 'fb209b3a4da94402a781659682f1ad37.jpg', '52', '56', '头孢', '西药', '无描述', '36', '', '', '请在医生指导下使用', '', '92');

-- ----------------------------
-- Table structure for `drugpeople`
-- ----------------------------
DROP TABLE IF EXISTS `drugpeople`;
CREATE TABLE `drugpeople` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '中间表编号',
  `dr_id` int NOT NULL COMMENT '药品编号',
  `peopleId` int NOT NULL COMMENT '病人的编号',
  `dr_number` int NOT NULL COMMENT '药品数量',
  `drIssue_Number` int NOT NULL COMMENT '已发药品数量',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='药品病人中间表';

-- ----------------------------
-- Records of drugpeople
-- ----------------------------
INSERT INTO `drugpeople` VALUES ('1', '123', '1001', '2', '0');
INSERT INTO `drugpeople` VALUES ('2', '123', '1002', '8', '0');
INSERT INTO `drugpeople` VALUES ('3', '12962', '1003', '8', '0');
INSERT INTO `drugpeople` VALUES ('4', '12962', '1001', '10', '5');
INSERT INTO `drugpeople` VALUES ('5', '123', '8', '50', '0');
INSERT INTO `drugpeople` VALUES ('6', '12962', '9', '62', '45');
INSERT INTO `drugpeople` VALUES ('7', '12962', '8', '20', '10');

-- ----------------------------
-- Table structure for `hosregister`
-- ----------------------------
DROP TABLE IF EXISTS `hosregister`;
CREATE TABLE `hosregister` (
  `hosR_id` int NOT NULL AUTO_INCREMENT COMMENT '编号',
  `hosR_code` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '所挂科室编号',
  `hosR_name` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '挂号人姓名',
  `hosR_idCar` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '身份证号',
  `hosR_medical` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '社保号',
  `hosR_regPrice` decimal(10,2) NOT NULL COMMENT '挂号费',
  `hosR_phone` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '联系电话',
  `hosR_selfPrice` int NOT NULL COMMENT '是否自费0自费1免费',
  `hosR_sex` int NOT NULL COMMENT '性别0男1女',
  `hosR_age` int NOT NULL COMMENT '年龄',
  `hosR_work` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '职业',
  `hosR_lookDoctor` int NOT NULL COMMENT '初复诊0初诊1复诊',
  `d_id` int NOT NULL COMMENT '医生编号',
  `ks_code` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '所挂科室编号',
  `hosR_remark` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注',
  `hosR_state` int NOT NULL COMMENT '挂号状态 0挂号1已住院2已出院3已退号',
  `hosR_time` datetime NOT NULL COMMENT '挂号时间',
  PRIMARY KEY (`hosR_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='挂号表';

-- ----------------------------
-- Records of hosregister
-- ----------------------------
INSERT INTO `hosregister` VALUES ('8', '1001', '格雷福斯', '420102199009076376', '420102199009076376', '1000.00', '17849757927', '0', '0', '30', '打野', '0', '53', '001001', '你在玩什么呢', '0', '2021-08-25 15:44:15');
INSERT INTO `hosregister` VALUES ('9', '1002', '内瑟斯', '420102199009078574', '420102199009078574', '1000.00', '18337439184', '0', '0', '30', '战士', '0', '38', '002002', '生与死轮回不止,我们生,他们死', '0', '2021-08-25 15:45:47');

-- ----------------------------
-- Table structure for `ks`
-- ----------------------------
DROP TABLE IF EXISTS `ks`;
CREATE TABLE `ks` (
  `ks_id` int NOT NULL AUTO_INCREMENT COMMENT '科室表id',
  `ks_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '科室编码',
  `ks_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '科室名称',
  `ks_type_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '科室类型编码',
  `ks_type_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '科室类型名称',
  PRIMARY KEY (`ks_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of ks
-- ----------------------------
INSERT INTO `ks` VALUES ('2', '001001', '呼吸内科', '001', '内科');
INSERT INTO `ks` VALUES ('3', '001002', '消化内科', '001', '内科');
INSERT INTO `ks` VALUES ('4', '001003', '神经内科', '001', '内科');
INSERT INTO `ks` VALUES ('5', '001004', '心血管内科', '001', '内科');
INSERT INTO `ks` VALUES ('6', '001005', '血液内科', '001', '内科');
INSERT INTO `ks` VALUES ('7', '001006', '肾内科', '001', '内科');
INSERT INTO `ks` VALUES ('8', '001007', '内分泌科', '001', '内科');
INSERT INTO `ks` VALUES ('9', '001008', '老年病科', '001', '内科');
INSERT INTO `ks` VALUES ('10', '001009', '肿瘤内科', '001', '内科');
INSERT INTO `ks` VALUES ('11', '001010', '普内科', '001', '内科');
INSERT INTO `ks` VALUES ('12', '001011', '风湿免疫科', '001', '内科');
INSERT INTO `ks` VALUES ('13', '001012', '骨肿瘤科', '001', '内科');
INSERT INTO `ks` VALUES ('14', '002001', '普外科', '002', '外科');
INSERT INTO `ks` VALUES ('15', '002002', '神经外科', '002', '外科');
INSERT INTO `ks` VALUES ('16', '002003', '骨科', '002', '外科');
INSERT INTO `ks` VALUES ('17', '002004', '泌尿外科', '002', '外科');
INSERT INTO `ks` VALUES ('18', '002005', '胸外科', '002', '外科');
INSERT INTO `ks` VALUES ('19', '002006', '心脏大血管外科', '002', '外科');
INSERT INTO `ks` VALUES ('20', '002007', '烧伤科', '002', '外科');
INSERT INTO `ks` VALUES ('21', '002008', '整形外科', '002', '外科');
INSERT INTO `ks` VALUES ('22', '002009', '肿瘤外科', '002', '外科');
INSERT INTO `ks` VALUES ('23', '003001', '妇科', '003', '妇产科');
INSERT INTO `ks` VALUES ('24', '003002', '产科', '003', '妇产科');
INSERT INTO `ks` VALUES ('25', '003003', '计划生育', '003', '妇产科');
INSERT INTO `ks` VALUES ('26', '003004', '优生学科', '003', '妇产科');
INSERT INTO `ks` VALUES ('27', '003005', '生殖健康与不孕症科', '003', '妇产科');
INSERT INTO `ks` VALUES ('28', '003006', '肿瘤妇科', '003', '妇产科');
INSERT INTO `ks` VALUES ('29', '004001', '新生儿科', '004', '儿科');
INSERT INTO `ks` VALUES ('30', '004002', '小儿传染病科', '004', '儿科');
INSERT INTO `ks` VALUES ('31', '004003', '小儿消化科', '004', '儿科');
INSERT INTO `ks` VALUES ('32', '004004', '小儿呼吸科', '004', '儿科');
INSERT INTO `ks` VALUES ('33', '004005', '小儿心脏病科', '004', '儿科');
INSERT INTO `ks` VALUES ('34', '004006', '小儿肾病科', '004', '儿科');
INSERT INTO `ks` VALUES ('35', '004007', '小儿血液病科', '004', '儿科');
INSERT INTO `ks` VALUES ('36', '004008', '小儿神经病学科', '004', '儿科');
INSERT INTO `ks` VALUES ('37', '004009', '小儿内分泌科', '004', '儿科');
INSERT INTO `ks` VALUES ('38', '004010', '小二遗传病科', '004', '儿科');
INSERT INTO `ks` VALUES ('39', '004011', '小儿免疫科', '004', '儿科');
INSERT INTO `ks` VALUES ('40', '004012', '小儿肿瘤科', '004', '儿科');
INSERT INTO `ks` VALUES ('41', '004013', '小儿普内科', '004', '儿科');
INSERT INTO `ks` VALUES ('42', '004014', '小儿眼科', '004', '儿科');
INSERT INTO `ks` VALUES ('43', '004015', '儿科综合', '004', '儿科');
INSERT INTO `ks` VALUES ('44', '005001', '皮肤病科', '005', '皮肤科');
INSERT INTO `ks` VALUES ('45', '005002', '性传播疾病科', '005', '皮肤科');
INSERT INTO `ks` VALUES ('46', '006001', '耳鼻喉科', '006', '耳鼻咽喉科');
INSERT INTO `ks` VALUES ('47', '006002', '头颈外科', '006', '耳鼻咽喉科');
INSERT INTO `ks` VALUES ('48', '007001', '口腔内科', '007', '口腔科');
INSERT INTO `ks` VALUES ('49', '007002', '口腔颌面外科', '007', '口腔科');
INSERT INTO `ks` VALUES ('50', '007003', '正畸形', '007', '口腔科');
INSERT INTO `ks` VALUES ('51', '007004', '口腔修复科', '007', '口腔科');
INSERT INTO `ks` VALUES ('52', '007005', '口腔预防保健科', '007', '口腔科');

-- ----------------------------
-- Table structure for `menu`
-- ----------------------------
DROP TABLE IF EXISTS `menu`;
CREATE TABLE `menu` (
  `m_id` int NOT NULL AUTO_INCREMENT COMMENT '菜单编号',
  `m_name` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单名称',
  `m_url` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '菜单资源路径',
  `m_state` int NOT NULL COMMENT '菜单资源路径 0正常1禁用',
  PRIMARY KEY (`m_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='菜单资源表';

-- ----------------------------
-- Records of menu
-- ----------------------------
INSERT INTO `menu` VALUES ('2', '挂号信息管理', 'registration/index.html', '0');
INSERT INTO `menu` VALUES ('3', '门诊医生管理', 'doctor/index.html', '0');
INSERT INTO `menu` VALUES ('4', '药品管理', 'medicine/index.html', '0');
INSERT INTO `menu` VALUES ('5', '住院管理', 'hospital/index.html', '0');
INSERT INTO `menu` VALUES ('6', '收费项目管理', 'hospital/charge.html', '0');
INSERT INTO `menu` VALUES ('7', '在院发药', 'hospital/dispensing.html', '0');
INSERT INTO `menu` VALUES ('8', '住院结算', 'hospital/account.html', '0');
INSERT INTO `menu` VALUES ('9', '月营业额统计', 'hospital/profitMonth.html', '1');
INSERT INTO `menu` VALUES ('10', '年营业额统计', 'hospital/profitYear.html', '1');
INSERT INTO `menu` VALUES ('11', '用户管理', 'User/index.html', '0');
INSERT INTO `menu` VALUES ('12', '角色管理', 'Role/index.html', '0');
INSERT INTO `menu` VALUES ('13', '资源管理', 'Resource/index.html', '0');
INSERT INTO `menu` VALUES ('14', '密码管理', 'User/password.html', '0');
INSERT INTO `menu` VALUES ('15', '检查收费项目登记', 'hospital/charge2.html', '0');

-- ----------------------------
-- Table structure for `people`
-- ----------------------------
DROP TABLE IF EXISTS `people`;
CREATE TABLE `people` (
  `people_Id` int NOT NULL AUTO_INCREMENT,
  `people_name` varchar(80) DEFAULT NULL,
  PRIMARY KEY (`people_Id`)
) ENGINE=InnoDB AUTO_INCREMENT=1007 DEFAULT CHARSET=utf8 COMMENT '人员表';

-- ----------------------------
-- Records of people
-- ----------------------------
INSERT INTO `people` VALUES ('1001', '李四');
INSERT INTO `people` VALUES ('1002', '王五');
INSERT INTO `people` VALUES ('1003', '二麻子');
INSERT INTO `people` VALUES ('1004', '张三');
INSERT INTO `people` VALUES ('1005', '王二');
INSERT INTO `people` VALUES ('1006', '张二');

-- ----------------------------
-- Table structure for `pricepeople`
-- ----------------------------
DROP TABLE IF EXISTS `pricepeople`;
CREATE TABLE `pricepeople` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '中间表编号',
  `chaP_id` int NOT NULL COMMENT '收费项编号',
  `beH_id` int NOT NULL COMMENT '病人编号',
  `createTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='收费项和病人中间表';

-- ----------------------------
-- Records of pricepeople
-- ----------------------------
INSERT INTO `pricepeople` VALUES ('1', '1102', '1', '2021-08-28 15:39:30');
INSERT INTO `pricepeople` VALUES ('2', '1102', '2', '2021-08-28 16:46:59');
INSERT INTO `pricepeople` VALUES ('3', '1101', '2', '2021-08-28 18:41:40');

-- ----------------------------
-- Table structure for `role`
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
  `r_id` int NOT NULL AUTO_INCREMENT COMMENT '角色编号',
  `r_name` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '角色名称',
  `r_state` int NOT NULL COMMENT '角色状态 0正常1禁用',
  PRIMARY KEY (`r_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色表';

-- ----------------------------
-- Records of role
-- ----------------------------
INSERT INTO `role` VALUES ('1', '管理员', '0');
INSERT INTO `role` VALUES ('2', '药品管理员', '0');
INSERT INTO `role` VALUES ('3', '医生', '0');
INSERT INTO `role` VALUES ('4', '医院前台挂号员', '0');
INSERT INTO `role` VALUES ('5', '住院办理员', '0');
INSERT INTO `role` VALUES ('25', '护士', '0');

-- ----------------------------
-- Table structure for `role_menu`
-- ----------------------------
DROP TABLE IF EXISTS `role_menu`;
CREATE TABLE `role_menu` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '中间表编号',
  `r_id` int NOT NULL COMMENT '角色编号',
  `m_id` int NOT NULL COMMENT '菜单资源编号',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=199 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色菜单中间表';

-- ----------------------------
-- Records of role_menu
-- ----------------------------
INSERT INTO `role_menu` VALUES ('110', '1', '2');
INSERT INTO `role_menu` VALUES ('111', '1', '3');
INSERT INTO `role_menu` VALUES ('112', '1', '4');
INSERT INTO `role_menu` VALUES ('113', '1', '5');
INSERT INTO `role_menu` VALUES ('114', '1', '6');
INSERT INTO `role_menu` VALUES ('115', '1', '7');
INSERT INTO `role_menu` VALUES ('116', '1', '8');
INSERT INTO `role_menu` VALUES ('117', '1', '9');
INSERT INTO `role_menu` VALUES ('118', '1', '10');
INSERT INTO `role_menu` VALUES ('119', '1', '11');
INSERT INTO `role_menu` VALUES ('120', '1', '12');
INSERT INTO `role_menu` VALUES ('121', '1', '13');
INSERT INTO `role_menu` VALUES ('122', '1', '14');
INSERT INTO `role_menu` VALUES ('123', '1', '15');
INSERT INTO `role_menu` VALUES ('126', '5', '5');
INSERT INTO `role_menu` VALUES ('127', '5', '8');
INSERT INTO `role_menu` VALUES ('128', '5', '14');
INSERT INTO `role_menu` VALUES ('129', '4', '2');
INSERT INTO `role_menu` VALUES ('130', '4', '14');
INSERT INTO `role_menu` VALUES ('144', '3', '6');
INSERT INTO `role_menu` VALUES ('145', '3', '14');
INSERT INTO `role_menu` VALUES ('150', '2', '4');
INSERT INTO `role_menu` VALUES ('151', '2', '7');
INSERT INTO `role_menu` VALUES ('152', '2', '14');
INSERT INTO `role_menu` VALUES ('186', '21', '7');
INSERT INTO `role_menu` VALUES ('187', '21', '8');
INSERT INTO `role_menu` VALUES ('195', '25', '2');
INSERT INTO `role_menu` VALUES ('196', '25', '3');
INSERT INTO `role_menu` VALUES ('197', '25', '4');
INSERT INTO `role_menu` VALUES ('198', '25', '5');

-- ----------------------------
-- Table structure for `user`
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `u_id` int NOT NULL AUTO_INCREMENT COMMENT '用户id',
  `u_loginName` varchar(18) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录名',
  `u_passWord` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码',
  `u_trueName` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '真实姓名',
  `u_email` varchar(80) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '邮箱',
  `u_state` int NOT NULL COMMENT '0正常 1禁用',
  `r_id` int NOT NULL COMMENT '角色编号',
  PRIMARY KEY (`u_id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户表';

-- ----------------------------
-- Records of user
-- ----------------------------
INSERT INTO `user` VALUES ('16', 'yasuo', 'qwe@123', '亚索', 'qwe@123', '1', '1');
INSERT INTO `user` VALUES ('17', 'jie', 'qwe@123', '影流之主', 'qwe@123', '0', '2');
INSERT INTO `user` VALUES ('18', 'kasha', 'qwe@123', '卡莎', 'qwe@123', '0', '3');
INSERT INTO `user` VALUES ('19', 'gailun', 'qwe@123', '盖伦', '129742014@qq.com', '0', '4');
INSERT INTO `user` VALUES ('20', 'aike', 'qwe@123', '艾克', '129742814@qq.com', '0', '5');

总结

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

低调的小哥哥

你的关注就是我为你服务的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值