Java Graduation Project JavaWeb Hospital Registration System

Project development technology: Jsp + Servlet

Project Type: JavaWeb

Usage: reference for graduation project

Function details: Divided into three types of users: doctors, patients, and administrators, with many functions.

This system was a graduation project together with my classmates when I graduated from university. It has been modified and improved many times at the request of the instructor, and its functions are relatively complete. The main technology is Jsp + Servlet JavaWeb project. Also attached are the main codes of the core functions and the corresponding flow charts for reference and learning!

Research background of hospital registration system

With the aging of the population, more and more elderly people need to go to the hospital for treatment. Even some young people often go to the hospital to queue up for treatment. Seeing a doctor has always been something that people cannot solve quickly. As more and more people see a doctor, , but the number of experts and doctors is limited, so it is a common feeling of many users that it is difficult to see a doctor. In large tertiary hospitals in big cities, such as Nanjing Military General Hospital, People’s Hospital and other large hospitals, there are often a large group of people queuing at the door at 5 o’clock in the morning waiting for the hospital to open, so as to get in and register for treatment as soon as possible. Users who arrive late will It is commonplace in many hospitals to have to wait for several hours to get a call. So now when you go to large hospitals to see a doctor, you have to wait in line for a long time and see a doctor for a few minutes.

The development of computer technology and the Internet in the new stage has made the use of the Internet almost universal among people now. Therefore, more and more people have adapted to the Internet + trend. Many traditional offline services have dedicated online platforms. Because offline registration often requires users to wait for a long time, hospitals have gradually developed their own hospital-specific online appointment registration systems to facilitate people to register in advance and come directly for treatment at the corresponding time, saving unnecessary time.

Research purpose and significance

In order to respond to the Internet + trend and solve the problem of long queues for hospital registration, a hospital appointment registration management system based on SSM was developed. The purpose is to facilitate people to make appointments online and save long waiting times in queues. The principle of the hospital appointment registration management system is that the user makes an appointment with a doctor in advance and registers. After the registration is successful, there is no need to queue up at the hospital for registration. When the appointed time arrives, the user can go directly to the hospital for treatment. The doctor will review the registration when using this system, and passing the user’s registration application will be considered as completing an appointment. The administrator maintains and manages data in the background.

By developing a hospital appointment registration management system, users’ waiting time for seeing a doctor can be greatly saved. Users only need to make an appointment in advance on the mobile or web page to successfully register, eliminating unnecessary steps. Using this system, hospitals can optimize resource allocation and provide medical services to more users.

The paper can be used for reference such as flow charts, ER diagrams, use case diagrams and other materials

1. Patient user use case diagram

2. Doctor user use case diagram

3. Administrator use case diagram

4. System architecture diagram

5. Appointment registration function flow chart

6. Doctor scheduling function flow chart

Other relevant information will not be listed one by one.

1. Website interface design

  1. Home
  2. Website introduction page
  3. View Doctor
  4. Medical Guide

2. Introduction to patient client functions

  1. User login –Registration and login
  2. View doctor details
  3. View doctor schedule – query doctors with multiple conditions
  4. Doctor’s personal schedule
  5. Doctor registration source query
  6. Make an appointment with a doctor – Make an appointment with a doctor under the number source available for appointment.
  7. Take a number for medical treatment – after the appointment is successful, you can cancel the appointment, confirm the number, and print the appointment form

3. Introduction to doctor terminal functions

  1. Check your own scheduled patients
  2. Doctor’s leave

4. Introduction to administrator terminal functions

  1. Administrator and physician login window

  2. Backend homepage

  3. Medical guide management

  4. Patient appointment status management

  5. Department Management

  6. Leave management

  7. Drug and drug classification management

  8. Doctor Information Management

  9. Doctor shift management

Creation of database tables

?

/*
 Navicat Premium Data Transfer

 Source Server:dyh
 Source Server Type: MySQL
 Source Server Version: 50722
 Source Host: localhost:3306
 Source Schema: jsp_yiyuan_manage

 Target Server Type: MySQL
 Target Server Version: 50722
 File Encoding: 65001

 Date: 26/10/2021 21:55:45
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

----------------------------
--Table structure for allusers
----------------------------
DROP TABLE IF EXISTS `allusers`;
CREATE TABLE `allusers` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Administrator account',
  `pwd` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'password',
  `cx` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Permission',
  `addtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT 'Add time',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of all users
----------------------------
INSERT INTO `allusers` VALUES (1, 'admin', 'admin', 'Super Administrator', '2020-06-27 15:58:04');
INSERT INTO `allusers` VALUES (4, '999', '999', 'General administrator', '2020-06-27 15:57:06');
INSERT INTO `allusers` VALUES (5, 'ad', '123456', 'General administrator', '2021-04-08 14:02:08');
INSERT INTO `allusers` VALUES (6, 'adm', '123456', 'General administrator', '2021-04-08 14:41:57');

----------------------------
-- Table structure for chuangweixinxi
----------------------------
DROP TABLE IF EXISTS `chuangweixinxi`;
CREATE TABLE `chuangweixinxi` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `mingcheng` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `keshi` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `fanghao` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `chuanghao` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `tupian` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `zhuangtai` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `jiage` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `beizhu` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `addtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of chuangweixinxi
----------------------------
INSERT INTO `chuangweixinxi` VALUES (12, 'Standard Room', 'Orthopedics', '20', '2001', '', 'Already Stayed', '', 'Assad Punctual Master', '2020-05- 10 12:23:02');
INSERT INTO `chuangweixinxi` VALUES (13, 'Single room', 'Internal medicine', '10', '1003', '', 'Already lived', '', 'Rice cooker rice cooker issued by Dafan Gandi' , '2020-05-10 12:26:20');
INSERT INTO `chuangweixinxi` VALUES (14, 'Single bed', 'Surgery', '1-401', '2001', '', 'Not living', '', 'Assad Assad Assad Assad', '2020-05-10 21:56:49');

----------------------------
-- Table structure for dx
----------------------------
DROP TABLE IF EXISTS `dx`;
CREATE TABLE `dx` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `leibie` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of dx
----------------------------
INSERT INTO `dx` VALUES (1, 'System Announcement', '

    Welcome everyone to log in to our site. Our site is mainly a system carefully crafted for our friends. I hope you can have a good mood on our site, thank you!

\r\


    Keep striving for self-improvement, be open to all rivers, and study hard!

');
INSERT INTO `dx` VALUES (2, 'System Introduction', 'System Introduction');
INSERT INTO `dx` VALUES (3, 'About us', 'About us!!
');
INSERT INTO `dx` VALUES (4, 'Contact information', 'Contact person: xxxxxxxx
  Tel: 0000-0000000
  Mobile: 010000000000
  Fax: 0000-0000000
  Email: [email protected]
  Address: Your company’s address
  Website: http://www.xxxx.com
');

----------------------------
-- Table structure for keshixinxi
----------------------------
DROP TABLE IF EXISTS `keshixinxi`;
CREATE TABLE `keshixinxi` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `keshi` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Department name',
  `addtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT 'Add time',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of keshixinxi
----------------------------
INSERT INTO `keshixinxi` VALUES (1, 'Clinical Psychology', '2020-05-10 02:39:18');
INSERT INTO `keshixinxi` VALUES (4, 'Traditional Chinese Medicine', '2020-05-10 02:39:18');
INSERT INTO `keshixinxi` VALUES (5, 'Orthopedics', '2020-05-10 02:39:18');
INSERT INTO `keshixinxi` VALUES (6, 'ENT', '2021-04-07 08:38:11');
INSERT INTO `keshixinxi` VALUES (7, 'Internal Medicine', '2020-05-10 17:41:53');
INSERT INTO `keshixinxi` VALUES (8, 'Surgery', '2020-05-10 21:53:57');
INSERT INTO `keshixinxi` VALUES (9, 'Pediatrics', '2021-04-07 08:37:26');
INSERT INTO `keshixinxi` VALUES (10, 'Obstetrics and Gynecology', '2021-04-07 08:37:44');
INSERT INTO `keshixinxi` VALUES (11, 'Stomatology', '2021-04-07 08:46:42');

----------------------------
-- Table structure for liuyanban
----------------------------
DROP TABLE IF EXISTS `liuyanban`;
CREATE TABLE `liuyanban` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `cheng` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Commenter',
  `xingbie` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `QQ` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `youxiang` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `dianhua` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `neirong` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Message content',
  `addtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT 'Add time',
  `huifuneirong` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'reply content',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of liuyanban
----------------------------
INSERT INTO `liuyanban` VALUES (5, '555', '', '', '', '', 'This is my first time using online registration and I found it very convenient and fast', '2021-04-08 14:40:54 ', 'Thanks for the support!!');

----------------------------
-- Table structure for paibanbiao
----------------------------
DROP TABLE IF EXISTS `paibanbiao`;
CREATE TABLE `paibanbiao` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `bianhao` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Shift number',
  `yishengbianhao` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Doctor number',
  `yishengxingming` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Doctor's name',
  `riqi` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Date of treatment',
  `xingqi` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'week',
  `shiduan` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Period',
  `shengyuhao` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Number of people who can make a reservation',
  `addtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT 'Add time',
  `jiuzhendidian` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Medical location',
  `jiuzhenshijian` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Medical time',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of paibanbiao
----------------------------
INSERT INTO `paibanbiao` VALUES (5, '04260311475482', '001', '陈志一', '2020-05-01', '五', 'afternoon', '15', '2021-08-22 23: 05:49', 'Department 8', '14:00-17:00');
INSERT INTO `paibanbiao` VALUES (6, '04260311475471', '001', '陈志一', '2020-05-01', '五', 'morning', '25', '2021-04-07 09: 23:33', 'Department 8', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (9, '03301742558424', '008', 'Cai Xiaofang', '2020-04-07', '二', 'AM', '18', '2021-04-08 14:14 :25', 'Department Five', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (10, '05102154566002', '006', 'Chen Yanqi', '2020-05-11', '一', 'morning', '26', '2021-04-09 18:13 :02', 'Department Four', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (11, '04070923511247', '013', 'Tang Tiansi', '2021-04-16', '五', 'AM', '18', '2021-04-07 11:07 :44', 'Department Seven', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (12, '04070926312361', '012', '张伟', '2021-04-19', '一', 'afternoon', '10', '2021-08-23 22: 44:27', 'Department 6', '14:00-17:00');
INSERT INTO `paibanbiao` VALUES (13, '04070927018204', '011', 'Ren Xianzhi', '2021-04-19', '一', 'morning', '18', '2021-04-09 18:12 :41', 'Department Three', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (14, '04070927238707', '011', 'Ren Xianzhi', '2021-04-21', '三', 'morning', '16', '2021-04-09 18:13 :12', 'Department Three', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (15, '04070927488915', '010', 'Dai Junguo', '2021-04-20', '二', 'AM', '8', '2021-04-07 09:41 :54', 'Department 1', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (16, '04070928169001', '009', 'Zhang Qinhua', '2021-04-22', '四', 'morning', '13', '2021-04-08 14:19 :27', 'Department 2', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (17, '04081412053669', '002', 'Du Xiaodong', '2021-04-16', '五', 'AM', '18', '2021-04-08 19:10 :03', 'Department Four', '8:00-11:00');
INSERT INTO `paibanbiao` VALUES (18, '04081412386025', '002', 'Du Xiaodong', '2021-04-16', '五', 'afternoon', '16', '2021-04-08 20:29 :49', 'Department Four', '14:00-17:00');

----------------------------
-- Table structure for pinglun
----------------------------
DROP TABLE IF EXISTS `pinglun`;
CREATE TABLE `pinglun` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `xinwenID` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Comment number',
  `pinglunneirong` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT 'Comment content',
  `pinglunren` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Commenter',
  `pingfen` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Rating',
  `biao` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `addtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT 'Comment time',
  PRIMARY KEY (`ID`, `pinglunneirong`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of pinglun
----------------------------
INSERT INTO `pinglun` VALUES (1, '7', 'OxyContin Assad Assad', '666', '4', 'yishengxinxi', '2020-05-10 21:59:13') ;
INSERT INTO `pinglun` VALUES (2, '15', 'Excellent medical skills!', '999', '1', 'yishengxinxi', '2021-04-07 21:10:24');
INSERT INTO `pinglun` VALUES (3, '9', 'keyi', 'ddd', '1', 'yishengxinxi', '2021-04-08 20:50:36');
INSERT INTO `pinglun` VALUES (4, '5', 'The doctor is very good', 'Dai Jie', '1', 'yishengxinxi', '2021-04-09 18:05:22');
INSERT INTO `pinglun` VALUES (5, '5', 'Dr. Chen, who makes an appointment every time', 'Dai Jie', '1', 'yishengxinxi', '2021-04-09 18:05:43') ;

----------------------------
--Table structure for qingjia
----------------------------
DROP TABLE IF EXISTS `qingjia`;
CREATE TABLE `qingjia` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `start_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Start time',
  `end_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'End time',
  `reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Reason for leave',
  `status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'status',
  `userId` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'leave requester',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of qingjia
----------------------------
INSERT INTO `qingjia` VALUES (1, '2021-04-07', '2021-04-15', 'Qingming Tomb Sweeping', '2', 'doctor');
INSERT INTO `qingjia` VALUES (2, '2021-04-10', '2021-04-11', 'drinking wedding wine', '1', '011');
INSERT INTO `qingjia` VALUES (3, '2021-04-08', '2021-04-09', 'private', '2', '002');
INSERT INTO `qingjia` VALUES (4, '2021-04-08', '2021-04-09', 'Business trip to study', '2', '011');

----------------------------
-- Table structure for xinwentongzhi
----------------------------
DROP TABLE IF EXISTS `xinwentongzhi`;
CREATE TABLE `xinwentongzhi` (
  `ID` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `biaoti` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'title',
  `leibie` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'category',
  `neirong` longtext CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT 'content',
  `tianjiaren` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Publisher',
  `shouyetupian` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'Picture',
  `dianjilv` int(11) DEFAULT NULL COMMENT 'Click rate',
  `addtime` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0) COMMENT 'Publish time',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 56 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;

----------------------------
-- Records of xinwentongzhi
----------------------------
INSERT INTO `xinwentongzhi` VALUES (54, 'Please show the epidemic prevention QR code when you come', 'Medical Guide', 'Please show the epidemic prevention QR code when you come', 'hsg', 'upload/1585561300892.jpg', 19, '2021-08-22 23:04:22');
INSERT INTO `xinwentongzhi` VALUES (55, 'Medical Guide', 'Medical Guide', 'Medical Guide', 'admin', 'upload/1629643816695.jpg', 2, '2021-08-22 23:04:18' );

Project acquisition:

https://gitee.com/sinonfin/L-javaWebSha/tree/master