SSM-based hospital appointment management system [with source code]

Hospital Appointment Management System Based on SSM

  • Development language: Java
  • Database: MySQL
  • Technology: Spring+SpringMVC+MyBatis+Echarts
  • Tools:IDEA/Ecilpse、Navicat、Maven

Roles are divided into administrators, patients, doctors

  • Administrators can manage patient information, doctor information, department management, notification announcements, etc.
  • Patients can manage personal information, make an appointment to see a doctor, check doctor information, check notices, pay fees, etc.
  • Doctors can manage personal information, review patient appointments and other functions.

Get the source code three times.

insert image description here
insert image description here

insert image description here

insert image description here

the code

package com.lmu.controller;

/**
 * 用户新增
 */

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;
import com.lmu.model.Role;
import com.lmu.model.User;
import com.lmu.service.RoleService;
import com.lmu.service.UserService;
import com.lmu.utils.JsonUtils;
import com.lmu.utils.Pager;
import com.lmu.utils.UserUtils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.awt.event.FocusEvent;
import java.io.IOException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

@Controller("userController")
@Scope("prototype")
public class UserController extends ActionSupport implements ModelDriven<User> {
    
    
    @Autowired
    private UserService userService;
    @Autowired
    private RoleService roleService;
    private User user;
    private Integer userId;
    private Map<String, Object> map = new HashMap();


    /**
     * list
     *
     * @return
     */
    public String list() throws IOException {
    
    
        User user1 = UserUtils.getUser();
        if (user1 == null || user1.getId() == null){
    
    
            ActionContext.getContext().put("login", 1);
            return SUCCESS;
        }
        Pager<User> pagers = null;
        Role role = user1.getRole();
        if (role.getEnName().equals("admin")) {
    
    
            pagers = userService.getList(user);
            ActionContext.getContext().put("pagers", pagers);
            ActionContext.getContext().put("user", user1);
            ActionContext.getContext().put("role", role);
            ActionContext.getContext().put("bean", user);
            return SUCCESS;
        } else if (role.getEnName().equals("xs") || role.getEnName().equals("js")) {
    
    
            pagers = userService.getList(user1);
            ActionContext.getContext().put("pagers", pagers);
            ActionContext.getContext().put("bean", user);
            return SUCCESS;
        }
        return null;
    }



    /**
     * 跳转add
     *
     * @return
     */
    public String add() {
    
    
        Pager<Role> pagers = roleService.pagers();
        ActionContext.getContext().put("pagers", pagers);
        return SUCCESS;
    }

    /**
     * 查询修改
     *
     * @return
     */
    public String edit() {
    
    
        User bean = userService.findById(userId);
        Pager<Role> pagers = roleService.pagers();
        ActionContext.getContext().put("bean", bean);
        ActionContext.getContext().put("pagers", pagers);
        return SUCCESS;
    }


    /**
     * 审核
     *
     * @return
     */
    public void updateSh() throws IOException {
    
    
        user.setIsSh(1);
        userService.updates(user);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
    }

    /**
     * 更新
     *
     * @return
     */
    public String update() throws IOException {
    
    
        if (user.getPass().equals("")){
    
    
            user.setPass(null);
        }
        userService.updates(user);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
        return SUCCESS;
    }

    /**
     * 保存
     *
     * @return
     */
    public void save() throws IOException {
    
    
        if (userService.getUser(user) != null){
    
    
            map.put("flag", false);
            map.put("url", "login_login.do");
            JsonUtils.toJson(map);
        } else {
    
    
            user.setTime(new Date());
            userService.save(user);
            map.put("flag", true);
            map.put("url", "login_login.do");
            JsonUtils.toJson(map);
        }
    }

    public void delete() throws IOException {
    
    
        User user1 = userService.findById(userId);
        user1.setIsDelete(1);
        userService.update(user1);
        map.put("flag", true);
        map.put("url", "user_list.do");
        JsonUtils.toJson(map);
    }

    @Override
    public User getModel() {
    
    
        if (user == null) {
    
    
            user = new User();
        }
        return user;
    }

    public Integer getUserId() {
    
    
        return userId;
    }

    public void setUserId(Integer userId) {
    
    
        this.userId = userId;
    }

    public User getUser() {
    
    
        return user;
    }

    public void setUser(User user) {
    
    
        this.user = user;
    }
}


Summary

  Nowadays, with the rapid development and improvement of computer network technology in society, its use in all walks of life is gradually increasing, and the Internet has become an indispensable part of today's society. Nowadays, the urban population is increasing rapidly, and more and more people are seeing a doctor. Hospital registration windows are usually lined up like a long queue. This is undoubtedly a difficult problem for some people who are in a hurry or have something to do. Therefore, in order to reduce the pressure on the registration window of the hospital, it is possible to register to see a doctor online. This paper is about the design and implementation of a hospital outpatient appointment registration based on the SSM framework. This system uses layui as the front-end framework and includes JQuery and jsp technology, etc. The back-end is a background program written in java language and uses MySQL database to manage data. According to different authority functions, there are mainly administrators and doctors. , patients, and billing personnel are the four types of users of the system. The system mainly realizes functions such as login registration management, registration management, prescription management, appointment management, and announcement management. The structure of the whole system is clear, the function is clear, and the interface is simple. Patients can make an appointment and register through this system, check the prescriptions prescribed by the doctor, etc. Administrators can use this system module to manage patients and doctors daily.

The purpose and significance of the research

  Nowadays, with the rapid development of science and technology, computers play an important role in all fields of life, especially in information management. To use it in practice, to continuously facilitate people's life from an innovative perspective, to promote the learning of new knowledge, to cultivate self-learning ability, and to exercise the ability of hands-on practice. The previous appointment registration should also get rid of the manual management mode and use computer technology to carry out information management work, so I thought for a long time, and finally decided to use JSP technology to develop an online appointment registration system for hospitals. Nowadays, with the rapid development of science and technology, JSP technology is favored by many developers. JSP technology not only simplifies the burden of developers but also improves the development efficiency. Then a hospital online appointment registration system will be needed by the majority of users and doctors. Therefore, it is necessary to use the computer to be competent for the work of the online appointment registration system of the hospital, so as to make the online appointment registration system of the hospital more accurate, convenient and fast.

main content of the study

  With the development of informatization, the Internet needs to provide more services and construct a more complete system to meet the spiritual and material needs of more and more users. With the increasing maturity of Internet technology, a network-based information management model has been formed. This is the online management system that everyone is familiar with today.

  However, it is far from enough to rely on traditional offline manual statistics for appointment registration. Therefore, the appointment registration work of many hospitals only stays in the traditional appointment registration mode. At the same time, many hospitals have limited funds and lack of professional staff, so the management methods of appointment registration are relatively backward, and it is difficult to improve work efficiency. At the same time, they cannot provide users with online appointment registration or Consultation and other operations, so the hospital online appointment registration system can provide users with more complete online appointment registration. In the past, appointment registration was managed, recorded and operated manually, which was not only troublesome and trivial, but also often made mistakes, which brought great inconvenience to the majority of users, and also required a lot of manpower, material and financial resources, which greatly wasted hospital resources. . With the rapid development of the network, people gradually hope that the hospital online appointment registration system can provide more reasonable and perfect services.

Guess you like

Origin blog.csdn.net/2301_78335941/article/details/131004630