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

运行环境

Java≥8、MySQL≥5.7

开发工具

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

适用

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

功能说明

110123002402

120123002402

130123002402

140123002402

150123002402

160123002402

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

项目介绍

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

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

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

环境需要

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

技术栈

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

使用说明
运行项目,输入localhost:8080/ 登录

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
    request.setAttribute("patientname",patientname);
request.setAttribute("intime",intime);
request.setAttribute("hospitalizations",hospitalizationService.getAllHospitalizations(patientname,intime));
return "admin/hospitalizationManage";
}
@RequestMapping("/admin/hospitalizationAdd")
public String hospitalizationAddPage(HttpServletRequest request){
request.setAttribute("patients",patientService.getAllPatients());
return"admin/add/hospitalizationadd";
}
@RequestMapping(value = "/admin/hospitalization",method = RequestMethod.POST)
@ResponseBody
public JSONObject hospitalizationAdd(@RequestBody Hospitalization hospitalization){
JSONObject json=new JSONObject();
json.put("message",hospitalizationService.AddHospitalization(hospitalization));
return json;
}
@RequestMapping(value = "/admin/hospitalization/{id}",method = RequestMethod.DELETE)
@ResponseBody
public JSONObject delHospitalization(@PathVariable Integer id){
JSONObject json=new JSONObject();
json.put("message",hospitalizationService.deleteHospitalization(id));
return json;
}
@RequestMapping(value = "/admin/hospitalization/{id}",method = RequestMethod.GET)
public String hospitalizationInfo(HttpServletRequest request,@PathVariable Integer id){
request.setAttribute("h",hospitalizationService.getHospitalization(id));
request.setAttribute("patients",patientService.getAllPatients());
return"admin/info/hospitalizationinfo";
}
@RequestMapping(value = "/admin/hospitalization",method = RequestMethod.PUT)
@ResponseBody
public JSONObject delHospitalization(@RequestBody Hospitalization hospitalization){
JSONObject json=new JSONObject();
json.put("message",hospitalizationService.updateHospitalization(hospitalization));
return json;
}
//生成user表excel
@GetMapping(value = "/admin/getHospitalization")
public String getUser(HttpServletResponse response) throws Exception{
HSSFWorkbook workbook = new HSSFWorkbook();
HSSFSheet sheet = workbook.createSheet("统计表");
ExcelUtils.createTitle(workbook,sheet);
List<Hospitalization> rows = hospitalizationService.getAllHospitalizations();

//设置日期格式
HSSFCellStyle style = workbook.createCellStyle();
style.setDataFormat(HSSFDataFormat.getBuiltinFormat("m/d/yy"));

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33


@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));
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    public String medicalhistoryManage(HttpServletRequest request,@RequestParam(value = "doctorname",required = false)String doctorname,@RequestParam(value = "patientname",required = false)String patientname){
request.setAttribute("doctorname",doctorname);
request.setAttribute("patientname",patientname);
request.setAttribute("medicalhistorys",medicalhistoryService.getAllMedicalhistorys(doctorname,patientname));
return "admin/medicalhistoryManage";
}
@RequestMapping("/admin/medicalhistoryAdd")
public String medicalhistoryAddPage(HttpServletRequest request){
request.setAttribute("doctors",doctorService.getAllDoctor());
request.setAttribute("patients",patientService.getAllPatients());
return"admin/add/medicalhistoryadd";
}
@RequestMapping(value = "/admin/medicalhistory/{id}",method = RequestMethod.DELETE)
@ResponseBody
public JSONObject delmedicalhistory(@PathVariable Integer id){
JSONObject json=new JSONObject();
json.put("message",medicalhistoryService.delMedicalhistory(id));
return json;
}
@RequestMapping(value = "/admin/medicalhistory/{id}",method = RequestMethod.GET)
public String medicalhistoryInfo(@PathVariable Integer id,HttpServletRequest request){
request.setAttribute("patients",patientService.getAllPatients());
request.setAttribute("doctors",doctorService.getAllDoctor());
request.setAttribute("medicalhistory",medicalhistoryService.getMedicalhistory(id));
return "admin/info/medicalhistoryInfo";
}
@RequestMapping(value = "/admin/medicalhistory",method = RequestMethod.PUT)
@ResponseBody
public JSONObject medicalhistoryUpdate(@RequestBody Medicalhistory medicalhistory){
JSONObject json=new JSONObject();
json.put("message",medicalhistoryService.UpdateMedicalhistory(medicalhistory));
return json;
}
@RequestMapping(value = "/admin/medicalhistory",method = RequestMethod.POST)
@ResponseBody
public JSONObject medicalhistoryAdd(@RequestBody Medicalhistory medicalhistory){
JSONObject json=new JSONObject();
json.put("message",medicalhistoryService.addMedicalhistory(medicalhistory));
return json;
}
}
package com.hospital.controller;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
    }
@RequestMapping(value = "/admin/medicalhistory/{id}",method = RequestMethod.GET)
public String medicalhistoryInfo(@PathVariable Integer id,HttpServletRequest request){
request.setAttribute("patients",patientService.getAllPatients());
request.setAttribute("doctors",doctorService.getAllDoctor());
request.setAttribute("medicalhistory",medicalhistoryService.getMedicalhistory(id));
return "admin/info/medicalhistoryInfo";
}
@RequestMapping(value = "/admin/medicalhistory",method = RequestMethod.PUT)
@ResponseBody
public JSONObject medicalhistoryUpdate(@RequestBody Medicalhistory medicalhistory){
JSONObject json=new JSONObject();
json.put("message",medicalhistoryService.UpdateMedicalhistory(medicalhistory));
return json;
}
@RequestMapping(value = "/admin/medicalhistory",method = RequestMethod.POST)
@ResponseBody
public JSONObject medicalhistoryAdd(@RequestBody Medicalhistory medicalhistory){
JSONObject json=new JSONObject();
json.put("message",medicalhistoryService.addMedicalhistory(medicalhistory));
return json;
}
}
package com.hospital.controller;



@Controller
public class AppointmentController {
@Autowired
AppointmentService appointmentService;
@Autowired
DoctorService doctorService;
@Autowired
PatientService patientService;
@RequestMapping("/admin/appointmentManage")
public String appointmentManage(HttpServletRequest request,@RequestParam(value = "doctorname",required = false)String doctorname,@RequestParam(value = "patientname",required = false)String patientname){
request.setAttribute("doctorname",doctorname);
request.setAttribute("patientname",patientname);
List<Appointment> appointmentList=appointmentService.getAllAppointments(doctorname,patientname);
request.setAttribute("appointments" ,appointmentList);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
        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";
}

}
package com.hospital.controller;



@Controller
public class MedicalhistoryController {
@Autowired
PatientService patientService;
@Autowired
MedicalhistoryService medicalhistoryService;
@Autowired
DoctorService doctorService;
@RequestMapping("/admin/medicalhistoryManage")


项目链接:
https://javayms.github.io?id=151122572008200sz
https://javayms.pages.dev?id=151122572008200sz