Project type: SSM project (B/S architecture)
Project Name: hospital reservation and registration system based on SSM
User type: 3 roles (administrator + doctor + patient user)
System type: front end booking interface + background management
Design mode: SSM
Interface appearance: Layui
Development tool: Idea
Database: Mysql+Navicat
Database tables: 11
Author introduction: Chief of planning department! The senior who just graduated from a double first rate University was once a little white!
🍅 (blogger official account number - source of the seniors)
Attention reply practice Free get Teaching research and evaluation system (curriculum design learning project) (open source)
Attention reply student Free get A set of java web source code
Attention reply ppt Free get 367 sets of completed ppt templates
Attention reply resume Free get 200 sets of program resume templates
🍅 Follow to get address: Other projects and project sources Official account number (source code)
🍅 Related articles -- JavaWeb hospital registration system
🍅 Graduation design complete link
Free ppt resources:
Free resume resources:
catalogue
Introduction to administrator side functions
On the login page, you can view the announcement information
Doctor management function, which can find doctors in various ways
To modify a doctor, you can modify the Department and position of the doctor
Patient information management
Modify the patient's account information
Administrator Center: personal information modification and password modification
Hospital notice and announcement management
Department information management, a department can correspond to multiple doctors
Patient end function introduction
Patient personal information modification
Make an appointment online and select the appointment time
My appointment record and can be cancelled
Introduction to functions of doctor terminal
Booking my patient information
After confirming the visit, fill in the patient's symptoms
Personal information modification
Demo video at bottom
Introduction to administrator side functions
On the login page, you can view the announcement information
Doctor management function, which can find doctors in various ways
To modify a doctor, you can modify the Department and position of the doctor
Patient information management
Modify the patient's account information
Admin Center: login log
Administrator Center: personal information modification and password modification
Login password modification
Hospital notice and announcement management
Add announcement
Department information management, a department can correspond to multiple doctors
Patient end function introduction
Patient personal information modification
To make an appointment with a doctor, you can filter doctors in a variety of ways, such as department, name, etc
Make an appointment online and select the appointment time
My appointment record and can be cancelled
Introduction to functions of doctor terminal
Booking my patient information
After confirming the visit, fill in the patient's symptoms
View case information
Personal information modification
Project structure
Database design
ssm hospital registration system (ssm graduation project)
🍅 Related articles -- JavaWeb hospital registration system
Code demonstration part
reserverController.java
@Controller @RequestMapping("/reservation") public class ReservationController { @Autowired private ReservationService reservationService; @RequestMapping("/chooseResDate/{doctor_id}") public String chooseResDate(@PathVariable("doctor_id")int doctor_id, HttpSession session) { session.setAttribute("res_doctor_id",doctor_id); return "/jsp/reservation/chooseResDate"; } @RequestMapping("/addRes") @ResponseBody public ResultUtil addRes(Reservation reservation, HttpSession session) throws ParseException { Integer user_id= (Integer) session.getAttribute("hospital_user_id"); Integer doctor_id=(Integer) session.getAttribute("res_doctor_id"); Date date=new Date(); SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); String nowTime=simpleDateFormat.format(date); Date create_time=simpleDateFormat.parse(nowTime); reservation.setCreate_time(create_time); reservation.setRes_doc_id(doctor_id); reservation.setRes_user_id(user_id); reservation.setStatus(1); //1 indicates the reservation status reservationService.addReservation(reservation); return ResultUtil.ok(); } @RequestMapping("/myReservationList") public String myReservationList() { return "/jsp/reservation/myReservationList"; } @RequestMapping("/getAllMyReservationList") @ResponseBody public ResultUtil getAllMyReservationList(Integer page, Integer limit,HttpSession session) { Integer user_id= (Integer) session.getAttribute("hospital_user_id"); return reservationService.getAllMyReservationList(page,limit,user_id); } @RequestMapping("/cancelRes") @ResponseBody public ResultUtil cancelRes(int res_id) { Reservation reservation=reservationService.getResByResId(res_id); reservation.setStatus(0); //0 is the patient's cancellation status reservationService.updateRes(reservation); return ResultUtil.ok(); } @RequestMapping("/doctorResList") public String doctorResList() { return "/jsp/reservation/doctorResList"; } @RequestMapping("/getDoctorResList") @ResponseBody public ResultUtil getDoctorResList(Integer page, Integer limit,HttpSession session) { Integer doctor_id= (Integer) session.getAttribute("hospital_user_id"); return reservationService.getDoctorResList(page,limit,doctor_id); } @RequestMapping("/acceptRes") @ResponseBody public ResultUtil acceptRes(int res_id) { Reservation reservation=reservationService.getResByResId(res_id); reservation.setStatus(2); //2 is the reception status reservationService.updateRes(reservation); return ResultUtil.ok(); } //Appointment made @RequestMapping("/doctorResDoneList") public String doctorResDoneList() { return "/jsp/reservation/doctorResDoneList"; } @RequestMapping("/getDoctorResDoneList") @ResponseBody public ResultUtil getDoctorResDoneList(Integer page, Integer limit,HttpSession session) { Integer doctor_id= (Integer) session.getAttribute("hospital_user_id"); return reservationService.getDoctorResDoneList(page,limit,doctor_id); } }
reserveService.java
@Service public class ReservationServiceImpl implements ReservationService{ @Autowired private ReservationDao reservationDao; @Override public void addReservation(Reservation reservation) { reservationDao.addReservation(reservation); } @Override public ResultUtil getAllMyReservationList(Integer page, Integer limit,Integer user_id) { PageHelper.startPage(page,limit); List<Reservation> reservations=reservationDao.getAllMyReservationList(user_id); PageInfo<Reservation> pageInfo=new PageInfo<>(reservations); ResultUtil resultUtil=new ResultUtil(); resultUtil.setCode(0); resultUtil.setCount(pageInfo.getTotal()); resultUtil.setData(pageInfo.getList()); return resultUtil; } @Override public Reservation getResByResId(int res_id) { return reservationDao.getResByResId(res_id); } @Override public void updateRes(Reservation reservation) { reservationDao.updateRes(reservation); } //Doctor viewing patient appointment list @Override public ResultUtil getDoctorResList(Integer page, Integer limit, Integer doctor_id) { PageHelper.startPage(page,limit); List<Reservation> reservations=reservationDao.getDoctorResList(doctor_id); PageInfo<Reservation> pageInfo=new PageInfo<>(reservations); ResultUtil resultUtil=new ResultUtil(); resultUtil.setCode(0); resultUtil.setCount(pageInfo.getTotal()); resultUtil.setData(pageInfo.getList()); return resultUtil; } //Doctor to view the list of visits @Override public ResultUtil getDoctorResDoneList(Integer page, Integer limit, Integer doctor_id) { PageHelper.startPage(page,limit); List<Reservation> reservations=reservationDao.getDoctorResDoneList(doctor_id); PageInfo<Reservation> pageInfo=new PageInfo<>(reservations); ResultUtil resultUtil=new ResultUtil(); resultUtil.setCode(0); resultUtil.setCount(pageInfo.getTotal()); resultUtil.setData(pageInfo.getList()); return resultUtil; } }
reserveServiceImpl.java
@Service public class ReservationServiceImpl implements ReservationService{ @Autowired private ReservationDao reservationDao; @Override public void addReservation(Reservation reservation) { reservationDao.addReservation(reservation); } @Override public ResultUtil getAllMyReservationList(Integer page, Integer limit,Integer user_id) { PageHelper.startPage(page,limit); List<Reservation> reservations=reservationDao.getAllMyReservationList(user_id); PageInfo<Reservation> pageInfo=new PageInfo<>(reservations); ResultUtil resultUtil=new ResultUtil(); resultUtil.setCode(0); resultUtil.setCount(pageInfo.getTotal()); resultUtil.setData(pageInfo.getList()); return resultUtil; } @Override public Reservation getResByResId(int res_id) { return reservationDao.getResByResId(res_id); } @Override public void updateRes(Reservation reservation) { reservationDao.updateRes(reservation); } //Doctor viewing patient appointment list @Override public ResultUtil getDoctorResList(Integer page, Integer limit, Integer doctor_id) { PageHelper.startPage(page,limit); List<Reservation> reservations=reservationDao.getDoctorResList(doctor_id); PageInfo<Reservation> pageInfo=new PageInfo<>(reservations); ResultUtil resultUtil=new ResultUtil(); resultUtil.setCode(0); resultUtil.setCount(pageInfo.getTotal()); resultUtil.setData(pageInfo.getList()); return resultUtil; } //Doctor to view the list of visits @Override public ResultUtil getDoctorResDoneList(Integer page, Integer limit, Integer doctor_id) { PageHelper.startPage(page,limit); List<Reservation> reservations=reservationDao.getDoctorResDoneList(doctor_id); PageInfo<Reservation> pageInfo=new PageInfo<>(reservations); ResultUtil resultUtil=new ResultUtil(); resultUtil.setCode(0); resultUtil.setCount(pageInfo.getTotal()); resultUtil.setData(pageInfo.getList()); return resultUtil; }
reserveDao.java
public interface ReservationDao { void addReservation(Reservation reservation); List<Reservation> getAllMyReservationList(Integer user_id); Reservation getResByResId(int res_id); void updateRes(Reservation reservation); List<Reservation> getDoctorResList(Integer doctor_id); List<Reservation> getDoctorResDoneList(Integer doctor_id); }
reserveMapper.xml
<insert id="addReservation" parameterType="com.zhang.hospital.entity.Reservation"> insert into tb_reservation(status,order_time,create_time,res_user_id, res_doc_id) values (#{status},#{order_time},#{create_time},#{res_user_id}, #{res_doc_id}) </insert> <select id="getAllMyReservationList" resultMap="reservationResultMap"> select * from tb_doctor,tb_reservation where res_user_id=#{user_id} and tb_reservation.status=1 and tb_reservation.res_doc_id=tb_doctor.doctor_id </select> <select id="getDoctorResList" resultMap="reservationDocResultMap"> select * from tb_user,tb_reservation where res_doc_id=#{doctor_id} and tb_reservation.status=1 and tb_reservation.res_user_id=tb_user.user_id </select> <select id="getDoctorResDoneList" resultMap="reservationDocResultMap"> select * from tb_user,tb_reservation where res_doc_id=#{doctor_id} and tb_reservation.status=2 and tb_reservation.res_user_id=tb_user.user_id </select> <select id="getResByResId" resultType="com.zhang.hospital.entity.Reservation"> select * from tb_reservation where res_id=#{res_id} </select> <update id="updateRes" parameterType="com.zhang.hospital.entity.Reservation"> update tb_reservation <set> <if test="status!=null"> status=#{status}, </if> <if test="order_time!=null"> order_time=#{order_time}, </if> <if test="create_time!=null"> create_time=#{create_time}, </if> <if test="res_user_id!=null"> res_user_id=#{res_user_id}, </if> <if test="res_doc_id!=null"> res_doc_id=#{res_doc_id}, </if> </set> where res_id=#{res_id} </update>