基于javaweb的医疗挂号管理系统(java+springboot+freemarker+layui+mysql)

news2024/10/6 8:22:28

基于javaweb的医疗挂号管理系统(java+springboot+freemarker+layui+mysql)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

20220819210023

20220819210024

20220819210025

20220819210026

20220819210027

20220819210028

基于javaweb+mysql的医疗挂号管理系统(java+Springboot+freemarker+layui+maven+Mysql)

项目介绍

本系统分为管理员、医生、患者三种角色; 管理员角色包含以下功能: 管理员登录,医生患者管理,患者管理,药品管理,科目管理,疾病管理,预约管理,病史管理,住院信息管理,管理员管理等功能。

医生角色包含以下功能: 医生角色登录,查看预约的病例,开药,查看病史等功能。

患者角色包含以下功能: 患者角色首页,患者登录,查询信息,挂号预约,查看病史,查看住院信息等功能。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;  5.数据库:MySql 5.7版本; 6.是否Maven项目:是;

技术栈

  1. 后端:SpringBoot 2. 前端:freemarker+CSS+JavaScript+jquery+layui

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录

医生管理控制层:

@Controller

public class DoctorController {

@Autowired

DoctorService doctorService;

@Autowired

AppointmentService appointmentService;

@Autowired

PatientService patientService;

@Autowired

DrugsService drugsService;

@Autowired

HospitalizationService hospitalizationService;

@Autowired

MedicalhistoryService medicalhistoryService;

@Autowired

OptionService optionService;

@Autowired

SeekService seekService;

@Value(“${filepath.seekpdfpath}”)

private String path;

@RequestMapping(“/admin/doctorManage”)

public String doctorManage(HttpServletRequest request,@RequestParam(value=“name”,required = false) String name,@RequestParam(value=“certId”,required = false) String certId){

request.setAttribute(“name”,name);

request.setAttribute(“certId”,certId);

request.setAttribute(“doctors”,doctorService.getAllDoctor(name,certId));

return “admin/doctorManage”;

@RequestMapping(value = “/admin/doctor/{id}”,method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delDoctor(@PathVariable Integer id){

JSONObject json=new JSONObject();

json.put(“message”,doctorService.delDoctor(id));

return json;

@RequestMapping(value = “/admin/doctor/{id}”,method = RequestMethod.GET)

public String doctorInfo(@PathVariable Integer id,HttpServletRequest request){

request.setAttribute(“doctor”,doctorService.getDoctor(id));

return “admin/info/doctorinfo”;

@RequestMapping(value = “/admin/doctor”,method = RequestMethod.POST)

@ResponseBody

public JSONObject AddDoctor(@RequestBody Doctor doctor){

JSONObject json=new JSONObject();

json.put(“message”,doctorService.addDoctor(doctor));

return json;

@RequestMapping(value = “/admin/doctor”,method = RequestMethod.PUT)

@ResponseBody

public JSONObject updateDoctor(@RequestBody Doctor doctor){

JSONObject json=new JSONObject();

json.put(“message”,doctorService.upDoctor(doctor));

return json;

@RequestMapping(“/admin/doctorAdd”)

public String doctorAddPage(){

return “admin/add/doctoradd”;

@RequestMapping(“/doctor/seekMedicalAdvice”)

public String seekMedicalAdvice(HttpServletRequest request, HttpSession session,@RequestParam(value = “patientname”,required = false)String patientname,@RequestParam(value = “time”,required = false)String time){

Login login=(Login)session.getAttribute(“login”);

Doctor doctor=doctorService.getDoctorByLoginId(login.getId());

request.setAttribute(“appointments” ,appointmentService.selectByDoctorId(doctor.getId(),patientname,time));

return “doctor/seekMedicalAdvice”;

@RequestMapping(“/doctor/seek/{id}”)

public String seek(@PathVariable Integer id,HttpServletRequest request){

request.setAttribute(“options”,optionService.getAll());

request.setAttribute(“patient”,patientService.getPatient(id));

request.setAttribute(“drugs”,drugsService.getAllDrugs());

return “doctor/seek”;

@RequestMapping(value = “/doctor/drug”,method = RequestMethod.PUT)

@ResponseBody

public JSONObject drug(@RequestBody Map map){

JSONObject json=new JSONObject();

Patient patient=new Patient();

patient.setDrugsids(DrugsUtils.vaild(map));

patient.setId(Integer.parseInt((String)map.get(“patientid”)));

json.put(“message”,patientService.seek(patient));

return json;

@RequestMapping(value = “/doctor/zation”,method = RequestMethod.POST)

@ResponseBody

public JSONObject zation(@RequestBody Hospitalization hospitalization){

JSONObject json=new JSONObject();

json.put(“message”,hospitalizationService.AddHospitalization(hospitalization));

return json;

@RequestMapping(value = “/doctor/medicalhistory/{id}”)

public String medicalhistory(@PathVariable Integer id,HttpServletRequest request){

request.setAttribute(“medicalhistorys”,medicalhistoryService.getMedicalhistoryByPatientId(id));

return “doctor/medicalhistory”;

@RequestMapping( value = “/doctor/{department}”,method = RequestMethod.GET)

@ResponseBody

public JSONObject getDoctorByDepartment(@PathVariable String department) throws UnsupportedEncodingException{

JSONObject json=new JSONObject();

department = URLDecoder.decode(department,“UTF-8”);

json.put(“doctors”,doctorService.getDoctorByDepartment(department));

return json;

@RequestMapping( value = “/doctor/seekinfo”,method = RequestMethod.POST)

@ResponseBody

public JSONObject seekinfo(@RequestBody Map map){

JSONObject json=new JSONObject();

String message=doctorService.seekInfo(map);

json.put(“message”,message);

return json;

@RequestMapping( value = “/doctor/printseek/{id}”,method = RequestMethod.POST)

@ResponseBody

public JSONObject printseek(@PathVariable Integer id,HttpSession session){

Login login=(Login)session.getAttribute(“login”);

Doctor doctor=doctorService.getDoctorByLoginId(login.getId());

JSONObject json=new JSONObject();

Seek seek=seekService.getSeekByPatientId(id);

seek.setPatientname(patientService.getPatient(id).getName());

seek.setDoctorname(doctor.getName());

//createSeekInfo,第三个参数填空字符串就是生成在项目根目录里面,要是想生成在别的路径,例:D:\ 就是生成在D盘根目录

path = Thread.currentThread().getContextClassLoader().getResource(“”).getPath().substring(0,Thread.currentThread().getContextClassLoader().getResource(“”).getPath().length()-16)+“/”;

String message= PDFUtils.createSeekInfo(seek,optionService,path);

json.put(“message”,message);

return json;

登录管理控制层:

@Controller

public class LoginController {

@Autowired

LoginService loginService;

@RequestMapping(value = “/hospital/login”)

public String loginAndregist(){

return “login&regist”;

@RequestMapping(“/admin/adminManage”)

public String adminManage(HttpServletRequest request,@RequestParam(value = “username”,required = false)String username){

request.setAttribute(“username”,username);

request.setAttribute(“admins”,loginService.findAllAdmin(username));

return “/admin/adminManage”;

@RequestMapping(“/admin/admin/{id}”)

public String adminInfo(HttpServletRequest request,@PathVariable Integer id){

request.setAttribute(“admin”,loginService.getAdmin(id));

return “/admin/info/admininfo”;

@RequestMapping(“/admin/adminAdd”)

public String adminAddPage(){

return"admin/add/adminadd";

@RequestMapping(value = “/admin/admin”,method = RequestMethod.POST)

@ResponseBody

public JSONObject adminAdd(@RequestBody Login login){

JSONObject json=new JSONObject();

json.put(“message”,loginService.addAmin(login));

return json;

@RequestMapping(value = “/admin/admin”,method = RequestMethod.PUT)

@ResponseBody

public JSONObject upAdmin(@RequestBody Login login){

JSONObject json=new JSONObject();

json.put(“message”,loginService.updateAdmin(login));

return json;

@RequestMapping(value = “/admin/admin/{id}”,method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delAdmin(@PathVariable Integer id){

JSONObject json=new JSONObject();

json.put(“message”,loginService.delAdmin(id));

return json;

@RequestMapping(value = “/loginout”,method = RequestMethod.GET)

public String loginout(HttpSession session){

session.removeAttribute(“login”);

return “/hospital”;

@RequestMapping(value = “/login”,method = RequestMethod.POST)

@ResponseBody

public JSONObject login(@RequestBody Login login,HttpSession session){

JSONObject json=new JSONObject();

json.put(“message”,loginService.login(login));

session.setAttribute(“login”,login);

return json;

@RequestMapping(value = “/regest”,method = RequestMethod.POST)

@ResponseBody

public JSONObject regest(@RequestBody Login login){

JSONObject json=new JSONObject();

json.put(“message”,loginService.regist(login));

return json;

@RequestMapping(“/hospital”)

public String hospital(){

return “index”;

@RequestMapping(“/hospital/patient/index”)

public String patientIndex(){

return “/patient/search”;

@RequestMapping(“/hospital/doctor/index”)

public String doctorIndex(){

return “/doctor/index”;

@RequestMapping(“/hospital/admin/index”)

public String adminIndex(){

return “/admin/index”;

病人管理控制层:

@Controller

public class PatientController {

@Autowired

PatientService patientService;

@Autowired

DoctorService doctorService;

@Autowired

AppointmentService appointmentService;

@Autowired

HospitalizationService hospitalizationService;

@Autowired

MedicalhistoryService medicalhistoryService;

@Value(“${filepath.appointpdf}”)

private String path;

@RequestMapping(“/admin/patientManage”)

public String patientlist(HttpServletRequest request,@RequestParam(value=“name”,required = false) String name,@RequestParam(value=“certId”,required = false) String certId){

request.setAttribute(“name”,name);

request.setAttribute(“certId”,certId);

request.setAttribute(“patients”,patientService.getAllPatients(name,certId));

return “admin/patientManage”;

@RequestMapping(value = “/admin/patient/{id}”,method = RequestMethod.DELETE)

@ResponseBody

public JSONObject delPatient(@PathVariable Integer id){

JSONObject json=new JSONObject();

json.put(“message”,patientService.delPatient(id));

return json;

@RequestMapping(value = “/admin/patient/{id}”,method = RequestMethod.GET)

public String patientInfo(@PathVariable Integer id,HttpServletRequest request){

request.setAttribute(“patient”,patientService.getPatient(id));

request.setAttribute(“appointments”,appointmentService.getPatientMessage(id));

request.setAttribute(“hospitalizations”,hospitalizationService.getPatientMessage(id));

request.setAttribute(“doctors”,doctorService.getAllDoctor());

return “admin/info/patientinfo”;

@RequestMapping(value = “/admin/patientAdd”,method = RequestMethod.GET)

public String patientAddPage(){

return “admin/add/patientadd”;

@RequestMapping(value = “/admin/patient”,method = RequestMethod.PUT)

@ResponseBody

public JSONObject patientInfo(@RequestBody Patient patient){

JSONObject json=new JSONObject();

json.put(“message”,patientService.updatePatient(patient));

return json;

@RequestMapping(value = “/admin/patient”,method = RequestMethod.POST)

@ResponseBody

public JSONObject delPatient(@RequestBody Patient patient){

JSONObject json=new JSONObject();

json.put(“message”,patientService.addPatient(patient));

return json;

@RequestMapping(value = “/patient/medicalhistory”)

public String medicalhistory(HttpSession session,HttpServletRequest request){

Login login=(Login)session.getAttribute(“login”);

Patient patient=patientService.findPatientByLoginId(login.getId());

request.setAttribute(“medicalhistorys”,medicalhistoryService.getMedicalhistoryByPatientId(patient.getId()));

return “patient/medicalhistory”;

@RequestMapping(value = “/patient/hospitalization”)

public String hospitalization(HttpSession session,HttpServletRequest request){

Login login=(Login)session.getAttribute(“login”);

Patient patient=patientService.findPatientByLoginId(login.getId());

request.setAttribute(“theLast”,hospitalizationService.findTheLastHospitalization(patient.getHospitalizationid()));

Hospitalization hospitalization=new Hospitalization();

hospitalization.setPatientid(patient.getId());

hospitalization.setId(patient.getHospitalizationid());

request.setAttribute(“others”,hospitalizationService.findOtherHospitalization(hospitalization));

return “patient/hospitalization”;

@RequestMapping(value = “/patient/appointment”)

public String appointmentInfo(HttpServletRequest request,HttpSession session){

Login login=(Login)session.getAttribute(“login”);

Patient patient=patientService.findPatientByLoginId(login.getId());

request.setAttribute(“patientid”,patient.getId());

request.setAttribute(“doctors”,doctorService.getAllDoctor());

return “patient/appointment”;

@RequestMapping(value = “/patient/appointment”,method = RequestMethod.POST)

@ResponseBody

public JSONObject appointment(@RequestBody Appointment appointment){

JSONObject json=new JSONObject();

Patient patient=new Patient();

String message=appointmentService.addAppointment(appointment);

patient.setAppointmentid(appointmentService.selectTheLastAppointment(appointment.getPatientid()));

patient.setId(appointment.getPatientid());

patientService.updateAppointMent(patient);

json.put(“message”,message);

return json;

@RequestMapping(value=“/patient/search”,method=RequestMethod.GET)

public String search(){

return “/patient/search”;

@RequestMapping(value=“/patient/searchinfo”,method=RequestMethod.GET)

@ResponseBody

public JSONObject searchinfo(@RequestParam(“name”)String name,@RequestParam(“type”)String type){

JSONObject json=new JSONObject();

json.put(“map”,patientService.serrchInfo(name,type));

return json;

@RequestMapping(value = “/hospital/{view}”)

public String test(@PathVariable String view){

return “patient/”+view;

@RequestMapping(value = “/patient/downloadpdf”,method = RequestMethod.POST)

@ResponseBody

public JSONObject downloadpdf(HttpSession session){

JSONObject json=new JSONObject();

Login login=(Login)session.getAttribute(“login”);

Patient patient=patientService.findPatientByLoginId(login.getId());

Integer idlast=appointmentService.selectTheLastAppointment(patient.getId());

Appointment appointment=appointmentService.getAppointment(idlast);

//createAppointMent,第三个参数填空字符串就是生成在项目根目录里面,要是想生成在别的路径,例:D:\ 就是生成在D盘根目录

path = Thread.currentThread().getContextClassLoader().getResource(“”).getPath().substring(0,Thread.currentThread().getContextClassLoader().getResource(“”).getPath().length()-16);

json.put(“message”,PDFUtils.createAppointMent(appointment,path));

return json;


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1651.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

幼儿园小程序实战开发教程(终篇)

我们已经写了四篇教程,涵盖了需求分析及各个页面,本篇是我们的最终篇。 咨询信息 我们小程序需要收集家长和孩子的信息,为此我们也规划了数据源。如果按照传统开发思路,那我们是要依次实现信息采集的每个字段,然后再…

<Linux系统复习>文件描述符

一、本章重点 1、进程和打开文件的关系 2、简单复习c语言文件操作 3、介绍系统调用:open、clos、write、read 4、理解文件描述符 5、文件描述符分配规则 6、理解stdin、stdout、stderr与fd的关系 7、理解linux下一切皆文件 8、理解重定向的本质 9、理解stdin和stdou…

《吉师作业》(1)之我是web手为啥让我学C

前言 🍀作者简介:吉师散养学生,为挣钱努力拼搏的一名小学生。 🍁个人主页:吉师职业混子的博客_CSDN博客-python学习,HTML学习,清览题库--C语言程序设计第五版编程题解析领域博主 🫒文章目的:我不…

freeRTOS学习(二)

堆内存管理 先决条件 FreeRTOS是作为一组C源文件提供的,因此成为一个合格的C程序员是使用FreeRTOS的先决条件。 动态内存分配及其与FreeRTOS的相关性 内核对象:如任务、队列、信号量和事件组。为了使FreeRTOS尽可能易于使用,这些内核对象不…

科普一下MTU是什么,如何设置MTU

欢迎来到东用知识小课堂,下面我们就来科普一下一下MTU是什么,如何设置MTUMTU是最大传输单元的意思,代指一类通讯协议某一层上所能通过的最大数据包大小(以byte为单位)。最大传输单元这一主要参数一般与串行通讯接口相关(网络接口卡、串口等)。…

【Vue实用功能】彻底搞懂Vue中的Mixin混入

前言 有些小伙伴接手别人的Vue项目时,看到里面有个Mixin文件夹,可能会云里雾里的状态,今天我们来好好聊聊Mixin,争取以后不再云里雾里。 一、什么是Mixins? Mixins(混入):当我们存在多个组件中的逻辑或者…

MySQL总结

文章目录一.SQL语句简介1.什么是SQL?2.SQL分类二.MySql常用数据类型三.数据库操作1.创建数据库2.查询和删除数据库3.备份/恢复数据库四.表操作1.创建表2.修改/查看表五.CRUD语句1.Insert语句2.Delete语句3.Update语句4.Select语句五.函数1.统计函数count2.字符串相关…

for in和for of

文章目录二者在什么情况下可以使用for ... in什么是可枚举的属性?for...of什么是可迭代的数据?总结二者在什么情况下可以使用 for … in 可以用在可枚举的数据,如: 对象数组(循环的是索引)字符串 什么是…

ESP8266-Arduino网络编程实例-发送邮件(基于SMTP)

发送邮件(基于SMTP) 本文将演示如何使用ESP8266发送邮件。实例中将使用SMTP(Simple Mail Transfer Protocol)协议通QQ邮箱向指定邮箱发送邮件。 1、设置QQ邮箱第三方服务 1)第一步:注册一个QQ邮箱 2)第二步:开启QQ邮箱的第三方服务 1、硬件准备 ESP8266 NodeMCU开发…

高通Android随身WIFI屏蔽商家远程控制断网

部分随身WIFI商家后台会监测用户是否使用的是自家的eSIM,若使用了外置卡槽或eSIM的ICCID改变就会断网,主要表现是先联网后突然变成飞行模式,或联网后开热点变飞行模式。这就是商家后台做了监测,检测到异常就断网。我们的主要解决思路就是禁止随身wifi连接商家的远程服务器,…

pytorch中一维卷积,二维卷积,三维卷积,层次特征注意力

一维卷积 一维卷积操作常用作文本数据或者序列数据的处理。这里以文本数据为例进行讲解。 下图左边是一个文本矩阵,是将这句话‘I like this movie very much!’转换为计算机可以处理的语言。对于宽度,可以认为是词向量的维度,高度可以表示为这个句子的最大长度,从这里可…

上手Python之set(集合)

为什么使用集合 我们目前接触到了列表、元组、字符串三个数据容器了。基本满足大多数的使用场景。 为何又需要学习新的集合类型呢? 通过特性来分析: 列表可修改、支持重复元素且有序 元组、字符串不可修改、支持重复元素且有序 有没有看出一些局限&…

JavaEE在线学习系统的设计与实现

目 录 摘 要 i Abstract ii 第1章 概论 1 1.1 课题背景 1 1.2 课题意义 2 1.3开发工具及技术 2 1.3.1 MyEclipse 2 1.3.2 ToMcat 2 1.3.3 SqlServer 2 1.3.4 JSP 3 1.3.5 Servlet 3 第2章 可行性分析及总体设计原则 5 2.1可行性分析 5 2.1.1技术可行性 5 2.1.2经济可行性 5 2.1…

Python - Numpy库的使用(简单易懂)

目录 numpy多维数组——数组的创建 1、array函数创建数组对象 2、通过arange、linspace函数创建等差数组对象 3、通过logspace函数创建等比数列数组 函数 zeros ones diag eye full numpy多维数组——生成随机数 函数 seed rand randn randint 函数 binomial normal 和…

【算法篇-搜索与图论】适合算法入门小白理解的深度优先搜索(DFS )以及解决全排列数字

目录1.什么是深度优先搜索(DFS)2.结合例子看DFS2.1 全排列数字结语该文章部分内容摘抄自 啊哈磊老师的《啊哈!算法》 一本对算法新手非常友好的书,非常推荐新手去阅读! 1.什么是深度优先搜索(DFS&#xff0…

【阿里云】短信服务

目录 1. 前置技术:阿里大鱼 1.1 概述 1.2 开通 1.3 签名管理 1.3.1 签名概述 1.3.2 添加签名 1.3.3 使用 1.4 模板管理 1.4.1 模板概述 1.4.2 添加模板 1.4.3 使用 1.5 在线文档 1.5.1 打开在线文档 1.5.2 使用在线文档 1.6 使用工具类发送短信 1.7…

基于混合VNS(变邻域搜索算法)的PSO(粒子群优化算法)的任务分配问题(Matlab代码实现)

💥💥💞💞欢迎来到本博客❤️❤️💥💥 🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。 ⛳️座右铭&a…

数据分析 | Pandas 200道练习题,每日10道题,学完必成大神(3)

文章目录1.读取本的数据集2.查看数据的前5行3.将salary列的数据转换为最大值和最小值的平均值4.将数据根据学历进行分组计算平均值5.将createTime列转换为月日6.查看所索引,数据类型和内存信息7.查看数值型列的汇总统计8.新增一列根据salary将数据分为三组9.按照sal…

【Day31】力扣算法(超详细思路+注释)[1441. 用栈操作构建数组 ] [621. 任务调度器]

您的点赞,收藏以及关注是对作者最大的鼓励喔 ~~ 刷题打卡,第 三十一 天题目一、1441. 用栈操作构建数组题目二、621. 任务调度器题目一、1441. 用栈操作构建数组 原题链接:1441. 用栈操作构建数组 题目描述: 给你一个数组targe…

5 个 Flutter VSCode 技巧和窍门,你可以马上使用!

5 个 Flutter VSCode 技巧和窍门,你可以马上使用! 前言 今天,我将向你展示 5 个非常有用的 Flutter 技巧,你可以立即应用到你的项目中。我不会给你任何软件包或扩展,但非常简单,但非常有用的技巧&#xff0…