基于javaweb的SSM医院电子病历管理系统(java+ssm+jsp+easyui+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

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

适用

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

功能说明

340923551103

350923551103

360923551103

370923551103

380923551103

390923551103

基于javaweb的SSM医院电子病历管理系统(java+ssm+jsp+easyui+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. 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+css+javascript+jQuery+bootstrap+easyui

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中conf/jdbc.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,在浏览器中输入http://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
if (StringUtil.isNotEmpty(userMark4)) {
user.setUserMark4(userMark4);
}
if (StringUtil.isNotEmpty(userDate1)) {
user.setUserDate1(DateUtil.formatString(userDate1,
"yyyy-MM-dd hh:mm:ss"));
}
if (StringUtil.isNotEmpty(userDate2)) {
user.setUserDate2(DateUtil.formatString(userDate2,
"yyyy-MM-dd hh:mm:ss"));
}
if (StringUtil.isNotEmpty(userType1)) {
user.setUserType1(Integer.parseInt(userType1));
}
if (StringUtil.isNotEmpty(userType2)) {
user.setUserType2(Integer.parseInt(userType2));
}
if (StringUtil.isNotEmpty(roleId)) {
user.setRoleId(Integer.parseInt(roleId));
Role role = new Role();
role = roleService.getRole(Integer.parseInt(roleId));
user.setRoleName(role.getRoleName());
}
if (StringUtil.isNotEmpty(bumenId)) {
user.setBumenId(Integer.parseInt(bumenId));
Bumen bumen = new Bumen();
bumen = bumenService.getBumen(Integer.parseInt(bumenId));
user.setBumenName(bumen.getBumenName());
}
try {
if (StringUtil.isNotEmpty(userId)) {
userService.modifyUser(user);
result.put("success", "true");
ResponseUtil.write(response, result);
} else {
int total = userService.queryUsers(null, userName, 0, 0, null, null).size();
if (total==0) {
Date date = new Date();
user.setUserDate1(date);
user.setUserType1(0);
userService.save(user);
request.setAttribute("error", "注册成功,请登录!");
request.getRequestDispatcher("index.jsp").forward(request,
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
	}
if (StringUtil.isNotEmpty(spchuType)) {
spchu.setSpchuType(Integer.parseInt(spchuType));
}
if (StringUtil.isNotEmpty(spchuType1)) {
spchu.setSpchuType1(Integer.parseInt(spchuType1));
}
if (StringUtil.isNotEmpty(userId)) {
spchu.setUserId(Integer.parseInt(userId));
}
if (StringUtil.isNotEmpty(bumenId)) {
spchu.setBumenId(Integer.parseInt(bumenId));
}
if (StringUtil.isNotEmpty(shangpinId)) {
spchu.setShangpinId(Integer.parseInt(shangpinId));
}
try {
JSONArray jsonArray = new JSONArray();
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", "");
jsonObject.put("spchuName", "请选择...");
jsonArray.add(jsonObject);
jsonArray.addAll(JSONArray.fromObject(spchuService.querySpchus(spchu, 0, 0, null, null)));
ResponseUtil.write(response, jsonArray);
} catch (Exception e) {
e.printStackTrace();
}
}

@RequestMapping("/spchuTongji")
public void spchuTongji(HttpServletRequest request, HttpServletResponse response)
throws Exception {
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String sdate=request.getParameter("sdate");
String edate=request.getParameter("edate");
List<Integer> sptypeIds = new ArrayList<Integer>();
List<String> sptypeNames = new ArrayList<String>();
List<Integer> spchuZongshus = new ArrayList<Integer>();
List<Sptype> sptypes = new ArrayList<Sptype>();
List<Spchu> spchus = new ArrayList<Spchu>();
Spchu spchu = new Spchu();
Integer zongshu = 0;
try {
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
50
51
52
53
headCell = hssfRow.createCell(8);
headCell.setCellValue("备注2");
headCell.setCellStyle(cellStyle);

headCell = hssfRow.createCell(9);
headCell.setCellValue("备注3");
headCell.setCellStyle(cellStyle);

headCell = hssfRow.createCell(10);
headCell.setCellValue("备注4");
headCell.setCellStyle(cellStyle);

headCell = hssfRow.createCell(13);
headCell.setCellValue("标志1");
headCell.setCellStyle(cellStyle);

headCell = hssfRow.createCell(14);
headCell.setCellValue("备注2");
headCell.setCellStyle(cellStyle);

headCell = hssfRow.createCell(15);
headCell.setCellValue("职位");
headCell.setCellStyle(cellStyle);

headCell = hssfRow.createCell(16);
headCell.setCellValue("科室");
headCell.setCellStyle(cellStyle);

// 添加数据内容
for (int i = 0; i < str.length; i++) {
hssfRow = sheet.createRow((int) i + 1);
Yxinxi yxinxi = yxinxiService.getYxinxi(Integer.parseInt(str[i]));

// 创建单元格,并设置值
HSSFCell cell = hssfRow.createCell(0);
cell.setCellValue(yxinxi.getYxinxiId());
cell.setCellStyle(cellStyle);

cell = hssfRow.createCell(1);
cell.setCellValue(yxinxi.getYxinxiName());
cell.setCellStyle(cellStyle);

cell = hssfRow.createCell(7);
cell.setCellValue(yxinxi.getYxinxiMark());
cell.setCellStyle(cellStyle);

cell = hssfRow.createCell(16);
cell.setCellValue(yxinxi.getYxtypeName());
cell.setCellStyle(cellStyle);
}

// 保存Excel文件
try {
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
if (StringUtil.isNotEmpty(yonghuPhone)) {
yonghu.setYonghuPhone(yonghuPhone);
}
if (StringUtil.isNotEmpty(yonghuMark1)) {
yonghu.setYonghuMark1(yonghuMark1);
}
if (StringUtil.isNotEmpty(yonghuMark2)) {
yonghu.setYonghuMark2(yonghuMark2);
}
if (StringUtil.isNotEmpty(yonghuMark3)) {
yonghu.setYonghuMark3(yonghuMark3);
}
if (StringUtil.isNotEmpty(yonghuMark4)) {
yonghu.setYonghuMark4(yonghuMark4);
}
if (StringUtil.isNotEmpty(yonghuDate1)) {
yonghu.setYonghuDate1(DateUtil.formatString(yonghuDate1,
"yyyy-MM-dd hh:mm:ss"));
}
if (StringUtil.isNotEmpty(yonghuDate2)) {
yonghu.setYonghuDate2(DateUtil.formatString(yonghuDate2,
"yyyy-MM-dd hh:mm:ss"));
}
if (StringUtil.isNotEmpty(yonghuType1)) {
yonghu.setYonghuType1(Integer.parseInt(yonghuType1));
}
if (StringUtil.isNotEmpty(yonghuType2)) {
yonghu.setYonghuType2(Integer.parseInt(yonghuType2));
}
if (StringUtil.isNotEmpty(yhroleId)) {
yonghu.setYhroleId(Integer.parseInt(yhroleId));
Yhrole yhrole = new Yhrole();
yhrole = yhroleService.getYhrole(Integer.parseInt(yhroleId));
yonghu.setYhroleName(yhrole.getYhroleName());
}
if (StringUtil.isNotEmpty(yhbumenId)) {
yonghu.setYhbumenId(Integer.parseInt(yhbumenId));
Yhbumen yhbumen = new Yhbumen();
yhbumen = yhbumenService.getYhbumen(Integer.parseInt(yhbumenId));
yonghu.setYhbumenName(yhbumen.getYhbumenName());
}
try {
if (StringUtil.isNotEmpty(yonghuId)) {
yonghuService.modifyYonghu(yonghu);
result.put("success", "true");
ResponseUtil.write(response, result);
} else {
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
			cell.setCellValue(yonghu.getYonghuMark4());
cell.setCellStyle(cellStyle);

cell = hssfRow.createCell(13);
cell.setCellValue(yonghu.getYonghuType1());
cell.setCellStyle(cellStyle);

cell = hssfRow.createCell(14);
cell.setCellValue(yonghu.getYonghuType2());
cell.setCellStyle(cellStyle);

cell = hssfRow.createCell(15);
cell.setCellValue(yonghu.getYhroleName());
cell.setCellStyle(cellStyle);

cell = hssfRow.createCell(16);
cell.setCellValue(yonghu.getYhbumenName());
cell.setCellStyle(cellStyle);
}

// 保存Excel文件
try {
Date date = new Date();
String strdate = DateUtil.formatDate(date, "yyyyMMddhhmmss");
OutputStream outputStream = new FileOutputStream("D:/yonghu"
+ strdate + ".xls");
workbook.write(outputStream);
outputStream.close();
result.put("success", "true");
ResponseUtil.write(response, result);
} catch (Exception e) {
e.printStackTrace();
}
}
}
package com.action;




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
	}
}

@RequestMapping("/addYonghu")
public void addYonghu(HttpServletRequest request, HttpServletResponse response)
throws Exception {
JSONObject result = new JSONObject();
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
String yonghuName = (String) request.getParameter("yonghuName");
String yonghuPassword = (String) request.getParameter("yonghuPassword");
String yonghuAge = (String) request.getParameter("yonghuAge");
String yonghuXingming = (String) request.getParameter("yonghuXingming");
String yonghuSex = (String) request.getParameter("yonghuSex");
String yonghuPhone = (String) request.getParameter("yonghuPhone");
String yonghuMark1 = (String) request.getParameter("yonghuMark1");
String yonghuMark2 = (String) request.getParameter("yonghuMark2");
String yonghuMark3 = (String) request.getParameter("yonghuMark3");
String yonghuMark4 = (String) request.getParameter("yonghuMark4");
String yonghuDate1 = (String) request.getParameter("yonghuDate1");
String yonghuDate2 = (String) request.getParameter("yonghuDate2");
String yonghuType1 = (String) request.getParameter("yonghuType1");
String yonghuType2 = (String) request.getParameter("yonghuType2");
String yhroleId = (String) request.getParameter("yhroleId");
String yhbumenId = (String) request.getParameter("yhbumenId");
String yonghuId = (String) request.getParameter("yonghuId");
Yonghu yonghu = new Yonghu();

if (StringUtil.isNotEmpty(yonghuId)) {
yonghu = yonghuService.getYonghu(Integer.parseInt(yonghuId));
}
if (StringUtil.isNotEmpty(yonghuName)) {
yonghu.setYonghuName(yonghuName);
}
if (StringUtil.isNotEmpty(yonghuPassword)) {
yonghu.setYonghuPassword(yonghuPassword);
}
if (StringUtil.isNotEmpty(yonghuAge)) {
yonghu.setYonghuAge(Integer.parseInt(yonghuAge));
}
if (StringUtil.isNotEmpty(yonghuXingming)) {
yonghu.setYonghuXingming(yonghuXingming);
}
if (StringUtil.isNotEmpty(yonghuSex)) {
yonghu.setYonghuSex(Integer.parseInt(yonghuSex));
}


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