Community medical service system based on SpringBoot [with source code]

Community medical service management system based on SpringBoot+Vue separation of front and back ends (community hospital appointment management system)

  1. Development language: Java
  2. database: mysql
  3. Technology:SpringBoot+MyBatis+Vue+ElementUI
  4. Tools: IDEA/Ecilpse+mysql+Navicat

Roles: Admin, User, Physician

  1. Administrator: After logging in to the system, the administrator can perform detailed operations on the home page, personal center, user management, doctor management, appointment doctor management, medical treatment information management, medical record information management, health file management, system management, etc.
  2. User: The user logs in to the system and can perform corresponding operations on the home page, personal center, appointment doctor management, medical consultation information management, diagnosis and treatment plan management, medical record information management, health file management and other functional modules.
  3. Doctors: Doctors log in to the community hospital management service system, and can perform corresponding operations on the home page, personal center, doctor management, appointment doctor management, medical treatment information management, diagnosis and treatment plan management, medical record information management, health file management and other functions.
    insert image description here

insert image description here

insert image description here
insert image description here
insert image description here
insert image description here

Summary

  With the development of society, all walks of life in society are taking advantage of the information age. The dominance and popularity of computers necessitated the development of various information systems.

  Medical service system, the main modules include view administrator; home page, personal center, ordinary villager management, rural doctor management, announcement information management, rural clinic management, health file management, learning and training management, assessment information management, medical map management, medical Drug management, type information management, purchase information management, message board management, administrator management, system management and other functions. The administrator in the system is mainly to store and manage all kinds of information safely and effectively, and can also manage, update and maintain the system, and has corresponding operation authority on the background.

  In order to realize the various functions of the medical service system, the strong support of the background database is needed. A large amount of data such as the administrator verifying the registration information, the collected user information, and the associated information obtained from the analysis are all managed by the database. In this paper, the database server uses Mysql as the background database, which makes the Web and the database closely linked. During the design process, the system code is fully guaranteed to be readable, practical, easy to expand, universal, easy to maintain later, easy to operate, and the page is concise.

  The development of this system makes it more convenient and quick to obtain the information of the medical service system, and also makes the information of the medical service system more systematic and orderly. The system interface is more friendly and easy to operate.

Keywords : medical service system; Spring Boot framework; Mysql database Java language

technical feasibility

  The medical service system is developed and used in the Windows operating system, and the performance of the current PC is already capable of serving as a web server for ordinary websites. The technology used in system development is also owned by itself, and it is also one of the widely used technologies at present.

  The development environment and configuration of the system can be installed by yourself. The system uses Java development tools and a relatively mature Mysql database for data interaction between the foreground and the background of the system. The database can be modified and maintained according to the technical language and combined with the requirements, which can make the website The operation is more stable and safe, so as to complete the development of the website.

(1) Hardware Feasibility Analysis

  The design of system management and information analysis has no hard requirements for the computer used. As long as the computer can be used normally, it is feasible to write code and page design. The main reason is that there are some requirements for the server. The server to be uploaded after the platform is built is If there are certain requirements, the server must be selected with relatively high security, and then the opening of the website must be smooth, and the pause should not be too long; cost-effective; high security.

(2) Software feasibility analysis

  The entire system is developed using cloud computing. The scalability of traffic and the intelligent adjustment based on traffic are the advantages of cloud computing. safe and efficient operation.

  Therefore, we conducted a feasibility study from two aspects, and it can be seen that there is no problem in the development of the system.

the code

package com.controller;


import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;

/**
 * 登录相关
 */
@RequestMapping("users")
@RestController
public class UserController{
    
    
	
	@Autowired
	private UserService userService;
	
	@Autowired
	private TokenService tokenService;

	/**
	 * 登录
	 */
	@IgnoreAuth
	@PostMapping(value = "/login")
	public R login(String username, String password, String captcha, HttpServletRequest request) {
    
    
		UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
		if(user==null || !user.getPassword().equals(password)) {
    
    
			return R.error("账号或密码不正确");
		}
		String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
		return R.ok().put("token", token);
	}
	
	/**
	 * 注册
	 */
	@IgnoreAuth
	@PostMapping(value = "/register")
	public R register(@RequestBody UserEntity user){
    
    
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    
    
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

	/**
	 * 退出
	 */
	@GetMapping(value = "logout")
	public R logout(HttpServletRequest request) {
    
    
		request.getSession().invalidate();
		return R.ok("退出成功");
	}
	
	/**
     * 密码重置
     */
    @IgnoreAuth
	@RequestMapping(value = "/resetPass")
    public R resetPass(String username, HttpServletRequest request){
    
    
    	UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));
    	if(user==null) {
    
    
    		return R.error("账号不存在");
    	}
    	user.setPassword("123456");
        userService.update(user,null);
        return R.ok("密码已重置为:123456");
    }
	
	/**
     * 列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,UserEntity user){
    
    
        EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
    	PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/list")
    public R list( UserEntity user){
    
    
       	EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();
      	ew.allEq(MPUtil.allEQMapPre( user, "user")); 
        return R.ok().put("data", userService.selectListView(ew));
    }

    /**
     * 信息
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") String id){
    
    
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }
    
    /**
     * 获取用户的session用户信息
     */
    @RequestMapping("/session")
    public R getCurrUser(HttpServletRequest request){
    
    
    	Long id = (Long)request.getSession().getAttribute("userId");
        UserEntity user = userService.selectById(id);
        return R.ok().put("data", user);
    }

    /**
     * 保存
     */
    @PostMapping("/save")
    public R save(@RequestBody UserEntity user){
    
    
//    	ValidatorUtils.validateEntity(user);
    	if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {
    
    
    		return R.error("用户已存在");
    	}
        userService.insert(user);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody UserEntity user){
    
    
//        ValidatorUtils.validateEntity(user);
    	UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));
    	if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {
    
    
    		return R.error("用户名已存在。");
    	}
        userService.updateById(user);//全部更新
        return R.ok();
    }

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
    
    
        userService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
}

System test

Testing purposes

  For any system, testing is an essential link. Testing can find many problems in the system. Before all software goes online, sufficient testing should be done to ensure that there will be no frequent bugs or functional problems after going online. The occurrence of problems such as unsatisfied requirements. The system is tested from unit test, function test and use case test to ensure the stability and reliability of the system.

function test

  The following table is a test case of the doctor information management function, which detects whether the addition, deletion, modification, and query of doctor information in the doctor information management are successfully run. Observing the response of the system, it is concluded that this function has also reached the design goal, and the system is running correctly.

Guess you like

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