随着计算机科学的迅猛发展和互联网技术的不断推进,人们的生活方式发生了巨大的变化,同时也推动了整个软件产业的发展。在传统的医院看病,病人需要办理繁杂的手续和填写众多资料,这种操作极其不友好。在一些情况下,医生需要手写病历,不清楚病人的病史,治疗效果可能不佳。本毕业设计基于JavaEE技术体系,采用了前后端分离的思想,并结合了Vue.js、MySQL、Redis、Docker等技术或框架,开发了一个医院管理系统。通过本系统,患者可以提前预约挂号以及自助缴费,医生可以诊断病情并开处方药,医院管理员可以对各种信息数据进行管理和查看数据分析等。该系统可以极大地简化患者看病流程,同时也可以极大地方便医护人员的工作,提高工作效率,减少医疗误差。
关键字 医院管理、Vue.js、JavaEE、互联网技术
【753】基于springboot vue医院挂号管理系统
基于springboot vue医院挂号管理系统源码和论文
Abstract
With the rapid development of computer science and the continuous advancement of Internet technology, great changes have taken place in people's life style, which also promotes the development of the whole software industry. In the traditional hospital, patients need to go through complicated procedures and fill in a lot of information, this operation is extremely unfriendly. In some cases, doctors need handwritten medical records, do not know the patient's history, and the treatment may not be effective. This graduation project is based on JavaEE technology system, using the idea of the separation of front and rear ends, and combined with Vue.js, MySQL, Redis, Docker and other technologies or frameworks, to develop a hospital management system. Through this system, patients can make an appointment in advance and self-help payment, doctors can diagnose the condition and prescribe prescription drugs, hospital administrators can manage all kinds of information data and view data analysis, etc. The system can greatly simplify the process of patients' seeing a doctor, and also greatly facilitate the work of medical staff, improve work efficiency and reduce medical errors.
Keywords Vue, Hospital, JavaEE, Internet
package com.dgut.controller;
import com.dgut.mapper.OrderMapper;
import com.dgut.pojo.Orders;
import com.dgut.pojo.Patient;
import com.dgut.service.DoctorService;
import com.dgut.service.OrderService;
import com.dgut.service.PatientService;
import com.dgut.utils.JwtUtil;
import com.dgut.utils.PdfUtil;
import com.dgut.utils.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mail.javamail.JavaMailSender;
import org.springframework.web.bind.annotation.*;
import redis.clients.jedis.JedisPool;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("patient")
public class PatientController {
@Autowired
private DoctorService doctorService;
@Autowired
private PatientService patientService;
@Autowired
private OrderService orderService;
@Autowired
private JavaMailSender javaMailSender;//邮箱
@Autowired
private JedisPool jedisPool;
@Autowired
private OrderMapper orderMapper;
/**
* 登录数据验证
*/
@RequestMapping(value = "login", method = RequestMethod.POST)
@ResponseBody
public ResponseData login(@RequestParam(value = "pId") int pId, @RequestParam(value = "pPassword") String pPassword) {
Patient patient = this.patientService.login(pId, pPassword);
if (patient != null) {
Map<String,String> map = new HashMap<>();
map.put("pName", patient.getPName());
map.put("pId", String.valueOf(patient.getPId()));
map.put("pCard", patient.getPCard());
String token = JwtUtil.getToken(map);
map.put("token", token);
//response.setHeader("token", token);
return ResponseData.success("登录成功", map);
} else {
return ResponseData.fail("登录失败,密码或账号错误");
}
}
/**
* 根据科室查询所有医生信息
*/
@RequestMapping("findDoctorBySection")
public ResponseData findDoctorBySection(@RequestParam(value = "dSection") String dSection){
return ResponseData.success("根据科室查询所有医生信息成功", this.doctorService.findDoctorBySection(dSection));
}
/**
* 增加挂号信息
*/
@RequestMapping("addOrder")
@ResponseBody
public ResponseData addOrder(Orders order, String arId){
System.out.println(arId);
if (this.orderService.addOrder(order, arId))
return ResponseData.success("插入挂号信息成功");
return ResponseData.fail("插入挂号信息失败");
}
/**
* 根据pId查询挂号
*/
@RequestMapping("findOrderByPid")
public ResponseData findOrderByPid(@RequestParam(value = "pId") int pId){
return ResponseData.success("返回挂号信息成功", this.orderService.findOrderByPid(pId)) ;
}
/**
* 发送邮件
*/
@RequestMapping("sendEmail")
public ResponseData sendEmail(String pEmail){
if (this.patientService.sendEmail(pEmail))
return ResponseData.success("邮件发送成功!");
return ResponseData.fail("邮箱号未注册!");
}
/**
* 找回密码服务邮件和验证码校验
*/
@RequestMapping("findPassword")
public ResponseData findPassword(String pEmail, String pPassword, String code){
if(this.patientService.findPassword(pEmail, pPassword, code))
return ResponseData.success("密码修改成功");
return ResponseData.fail("密码修改失败!验证码不正确或者已过期");
}
/**
* 增加患者信息
*/
@RequestMapping("addPatient")
@ResponseBody
public ResponseData addPatient(Patient patient) {
Boolean bo = this.patientService.addPatient(patient);
if (bo) {
return ResponseData.success("注册成功");
}
return ResponseData.fail("注册失败!账号或邮箱已被占用");
}
@GetMapping("/pdf")
public void downloadPDF(HttpServletRequest request, HttpServletResponse response, int oId) throws Exception {
Orders order = this.orderMapper.findOrderByOid(oId);
PdfUtil.ExportPdf(request, response, order);
}
/**
* 统计患者男女人数
*/
@RequestMapping("patientAge")
public ResponseData patientAge(){
return ResponseData.success("统计患者男女人数成功", this.patientService.patientAge());
}
}
package com.dgut.controller;
import com.dgut.pojo.Orders;
import com.dgut.service.OrderService;
import com.dgut.utils.ResponseData;
import com.dgut.utils.TodayUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
@RestController
@RequestMapping("order")
public class OrderController {
@Autowired
private OrderService orderService;
/**
* 根据id更新挂号信息
*/
@PostMapping("updateOrder")
@ResponseBody
public ResponseData updateOrder(@RequestBody Orders orders) {
if (this.orderService.updateOrder(orders))
return ResponseData.success("更新挂号信息成功");
return ResponseData.fail("更新挂号信息失败!");
}
/**
* 根据id设置缴费状态
*/
@RequestMapping("updatePrice")
public ResponseData updatePrice(int oId){
if (this.orderService.updatePrice(oId))
return ResponseData.success("根据id设置缴费状态成功");
return ResponseData.success("根据id设置缴费状态失败");
}
/**
* 查找医生已完成的挂号单
*/
@RequestMapping("findOrderFinish")
public ResponseData findOrderFinish(int pageNumber, int size, String query, int dId){
return ResponseData.success("查找医生已完成的挂号单完成!", this.orderService.findOrderFinish(pageNumber, size, query, dId));
}
/**
* 根据dId查询挂号
*/
@RequestMapping("findOrderByDid")
public ResponseData findOrderByDid(int pageNumber, int size, String query, int dId){
return ResponseData.success("返回挂号信息成功", this.orderService.findOrderByDid(pageNumber, size, query, dId)) ;
}
/**
* 统计今天挂号人数
*/
@RequestMapping("orderPeople")
public ResponseData oderPeople(){
String oStart = TodayUtil.getTodayYmd();
return ResponseData.success("统计今天挂号人数成功", this.orderService.orderPeople(oStart));
}
/**
* 统计今天某个医生挂号人数
*/
@RequestMapping("orderPeopleByDid")
public ResponseData orderPeopleByDid(int dId){
String oStart = TodayUtil.getTodayYmd();
return ResponseData.success("统计今天挂号人数成功", this.orderService.orderPeopleByDid(oStart, dId));
}
/**
* 获取过去七天的挂号人数
*/
@RequestMapping("orderSeven")
public ResponseData orderSeven(){
ArrayList<Integer> list = new ArrayList<>();
String oStart = null;
for(int i = 20; i > 0;i--){
oStart = TodayUtil.getPastDate(i);
int people = this.orderService.orderPeople(oStart);
list.add(people);
}
return ResponseData.success("获取过去20天的挂号人数成功", list);
}
/**
* 统计挂号男女人数
*/
@RequestMapping("orderGender")
public ResponseData orderGender(){
return ResponseData.success("统计挂号男女人数", this.orderService.orderGender());
}
/**
* 增加诊断及医生意见
*/
@PostMapping("updateOrderByAdd")
@ResponseBody
public ResponseData updateOrderByAdd(@RequestBody Orders order){
if (this.orderService.updateOrderByAdd(order))
return ResponseData.success("增加诊断及医生意见成功");
return ResponseData.fail("增加诊断及医生意见失败");
}
/**
* 判断诊断之后再次购买药物是否已缴费
*/
@RequestMapping("findTotalPrice")
public ResponseData findTotalPrice(int oId){
if(this.orderService.findTotalPrice(oId))
return ResponseData.success("未缴费");
return ResponseData.fail("无需缴费");
}
/**
* 请求挂号时间段
*/
@RequestMapping("findOrderTime")
public ResponseData findOrderTime(String arId){
return ResponseData.success("请求挂号时间段成功", this.orderService.findOrderTime(arId));
}
/**
* 统计过去20天挂号科室人数
*/
@RequestMapping("orderSection")
public ResponseData orderSection(){
return ResponseData.success("统计过去20天挂号科室人数成功", this.orderService.orderSection());
}
}