——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SSM医院住院管理系统(java+ssm+jsp+bootstrap+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项目:否;
技术栈
- 后端:Spring+SpringMVC+Mybatis 2. 前端:JSP+CSS+JavaScript+jquery+bootstrap
使用说明
- 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行; 3. 将项目中db.properties配置文件中的数据库配置改为自己的配置; 4. 运行项目,输入localhost:8080/ 登录
——————————CodeStart——————————
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
| String leaveTime = map.get("leaveTime").toString(); map.put("leaveTime", leaveTime); String admissionTime = map.get("admissionTime").toString(); map.put("admissionTime", admissionTime); String birth = map.get("birth").toString(); map.put("birth", birth); } JSON json = JSONSerializer.toJSON(new JsonResult<List<Map<String, Object>>>(list)); return json.toString(); }
@RequestMapping(value = "/patientStatistics.do", produces = "application/json;charset=utf-8") @ResponseBody public String patientStatistics(String startTime, String endTime) throws ParseException { Map<String, Object> map = new HashMap<String, Object>(); map.put("startTime", BaseUtils.toDate(startTime)); map.put("endTime", BaseUtils.toDate(endTime)); List<Map<String, Object>> list = patientService.patientStatistics(map); JSON json = JSONSerializer.toJSON(new JsonResult<List<Map<String, Object>>>(list)); return json.toString(); }
} package com.qut.controller;
@Controller @RequestMapping("/common") public class CommonController {
|
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
| } package com.qut.controller;
@Controller @RequestMapping("/common") public class CommonController { @Resource(name = "commonService") private CommonService commonService; @Resource(name = "doctorService") private DoctorService doctorService; @Resource(name = "patientService") private PatientService patientService; @Resource(name = "wardService") private WardService wardService; Logger log = Logger.getLogger(Log4jLogsDetial.class);
@RequestMapping(value = "/list.do", produces = "application/json;charset=utf-8") @ResponseBody public String titleQuery(@Param("name") String name) { List<Common> list = commonService.titleQuery(name); log.info("职称查询"); JSON json = JSONSerializer.toJSON(new JsonResult<List<Common>>(list)); return json.toString(); }
@RequestMapping(value = "/parameterQuery.do", produces = "application/json;charset=utf-8") @ResponseBody public String parameterQuery() {
|
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
| JSON json = null; PatientCode patientCode = new PatientCode(); String patientCerificateNo = BaseUtils.toString(cerificateNo); patientCode.setCerificateNo(patientCerificateNo); patientCode.setOutStatus(0); List<Map<String, Object>> list = patientService.patientQuery(patientCode); log.info("执行患者检查"); if (list.size() == 0) { json = JSONSerializer.toJSON(new JsonResult<User>(1, "可以住院", null)); log.info("患者" + cerificateNo + "可以住院"); } else if (list.size() > 0) { json = JSONSerializer.toJSON(new JsonResult<User>(2, "当前患者还未出院", null)); log.info("患者" + cerificateNo + "未出院"); } return json.toString(); }
@RequestMapping(value = "/patientUpdate.do", produces = "application/json;charset=utf-8") @ResponseBody public String patientUpdate(HttpServletRequest request) { String patientId = BaseUtils.toString(request.getParameter("patientId")); Integer departmentNo = BaseUtils.toInteger(request.getParameter("departmentNo")); Integer typeNo = BaseUtils.toInteger(request.getParameter("typeNo")); Integer new_ward_No = BaseUtils.toInteger(request.getParameter("wardNo")); Integer new_bed_No = BaseUtils.toInteger(request.getParameter("bedNo")); Integer doctorNo = BaseUtils.toInteger(request.getParameter("doctorNo")); Integer old_bed_Num = BaseUtils.toInteger(request.getParameter("ybed")); Integer old_ward_Num = BaseUtils.toInteger(request.getParameter("yroom")); Patient patient = new Patient(); patient.setPatientId(patientId); patient.setDepartment(departmentNo); patient.setRoomType(typeNo); patient.setBedNo(new_bed_No); patient.setRoomNo(new_ward_No); patient.setDoctorId(doctorNo);
patientService.patientUpdate(patient); log.info("患者" + patient.getName() + "转病房:更新患者信息"); wardService.logWard(patient); log.info("患者" + patient.getName() + "转病房:记录到病房转移");
|
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
| patientCode.setOutStatus(0); List<Map<String, Object>> list = patientService.patientQuery(patientCode); log.info("执行患者检查"); if (list.size() == 0) { json = JSONSerializer.toJSON(new JsonResult<User>(1, "可以住院", null)); log.info("患者" + cerificateNo + "可以住院"); } else if (list.size() > 0) { json = JSONSerializer.toJSON(new JsonResult<User>(2, "当前患者还未出院", null)); log.info("患者" + cerificateNo + "未出院"); } return json.toString(); }
@RequestMapping(value = "/patientUpdate.do", produces = "application/json;charset=utf-8") @ResponseBody public String patientUpdate(HttpServletRequest request) { String patientId = BaseUtils.toString(request.getParameter("patientId")); Integer departmentNo = BaseUtils.toInteger(request.getParameter("departmentNo")); Integer typeNo = BaseUtils.toInteger(request.getParameter("typeNo")); Integer new_ward_No = BaseUtils.toInteger(request.getParameter("wardNo")); Integer new_bed_No = BaseUtils.toInteger(request.getParameter("bedNo")); Integer doctorNo = BaseUtils.toInteger(request.getParameter("doctorNo")); Integer old_bed_Num = BaseUtils.toInteger(request.getParameter("ybed")); Integer old_ward_Num = BaseUtils.toInteger(request.getParameter("yroom")); Patient patient = new Patient(); patient.setPatientId(patientId); patient.setDepartment(departmentNo); patient.setRoomType(typeNo); patient.setBedNo(new_bed_No); patient.setRoomNo(new_ward_No); patient.setDoctorId(doctorNo);
patientService.patientUpdate(patient); log.info("患者" + patient.getName() + "转病房:更新患者信息"); wardService.logWard(patient); log.info("患者" + patient.getName() + "转病房:记录到病房转移"); Bed old_bed = new Bed(); old_bed.setWardNo(old_ward_Num); old_bed.setBedNo(old_bed_Num); old_bed.setState(0); bedService.bedUpdate(old_bed); log.info("患者" + patient.getName() + "转病房:更新旧床位状态"); Bed new_bed = new Bed(); new_bed.setWardNo(new_ward_No); new_bed.setBedNo(new_bed_No); new_bed.setState(1);
|
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
|
@Controller @RequestMapping("/log") public class LogController { @Resource(name = "LogService") private LogService logService; Logger logg = Logger.getLogger(Log4jLogsDetial.class);
@RequestMapping(value = "/LogsQuery.do", produces = "application/json;charset=utf-8") @ResponseBody public String LogsQuery(@Param("type") String type, @Param("startTime") String startTime, @Param("endTime") String endTime) throws ParseException { Log log = new Log();
if ("".equals(type)) { type = null; log.setType(type); } else { Integer type_T = BaseUtils.toInteger(type); String type_s = new String(); if (type_T == 1) { type_s = "ERROR"; log.setType(type_s); logg.info("设置日志类型为ERROR"); }
|
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
| @RequestMapping(value = "/categoryQuery.do", produces = "application/json;charset=utf-8") @ResponseBody public String categoryQuery(@Param("id") Integer id, @Param("type") Integer type, @Param("name") String name) { List<Category> list = categoryService.categoryQuery(new Category()); log.info("查询参数" + id); JsonConfig jc = new JsonConfig(); jc.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor("yyyy-MM-dd")); JSON json = JSONSerializer.toJSON(new JsonResult<List<Category>>(list), jc); return json.toString(); }
@RequestMapping(value = "/categoryUpdate.do", produces = "application/json;charset=utf-8") @ResponseBody public String categoryUpdate(HttpServletRequest request, HttpServletResponse response) { Integer total = BaseUtils.toInteger(request.getParameter("total")); for (int i = 0; i < total; i++) { Integer id = BaseUtils.toInteger(request.getParameter("id" + i)); Float updatePrice = BaseUtils.toFloat(request.getParameter("updatePrice" + i)); Category category = new Category(); if (updatePrice != 0) { category.setId(id); category.setPrice(updatePrice); categoryService.categoryUpdate(category); log.info("更新参数" + id); } } JsonConfig jc = new JsonConfig(); jc.registerJsonValueProcessor(Date.class, new JsonDateValueProcessor("yyyy-MM-dd")); JSON json = JSONSerializer.toJSON(new JsonResult<Category>(new Category()), jc); return json.toString(); } } package com.qut.util;
public class CommonInterceptor implements Filter {
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=272322092805200mf
https://javayms.pages.dev?id=272322092805200mf