关于后端:基于java的预约挂号系统文档

5次阅读

共计 11208 个字符,预计需要花费 29 分钟才能阅读完成。


 项目名称

基于 java 的预约挂号零碎 + 文档

下载地址

基于 java 的预约挂号零碎 + 文档

视频演示

基于 java 的预约挂号零碎_哔哩哔哩_bilibili

零碎介绍

随着互联网技术的疾速提高,咱们的生存失去了极大的便当,同时也推动了许多行业的飞速发展。传统医院的挂号过程中,手动解决信息破费大量工夫,这种形式效率极低。预约挂号零碎的意义在于通过引入互联网技术,使预约挂号治理更加高效、便捷、通明,为医院和患者提供更好的服务。不便患者的就医体验,有利于医院信息化程度的进步,为推动国家医疗卫生信息化建设提供无力反对。

预约挂号零碎采纳成熟的 SpringBoot 框架,包含业务逻辑层、数据长久层、表示层和模块层四个档次。这些档次有助于开发人员搭建构造、保护零碎、框架重用等,同时为开发人员提供清晰、易懂、简洁明了的设计思路。SpringBoot 框架具备良好的可复用性和便于保护的特点,使零碎更加实用,同时简化了系统实施和保护过程。数据库设计方面抉择了 MySQL 数据库。

预约挂号零碎的次要角色包含主治医生、门诊部医生、住院部医生和药品部护士。他们别离从医院总体数据管理、门诊挂号治理、住院部门治理和药房出药治理几个方面进行综合业务解决。

该零碎残缺实现了医院医治流程中的治理、患者药品调配、患者手术我的项目、住院等业务。总体测试结果显示,该网站设计根本满足用户需要,可能达到用户满意度。

关键词:预约挂号;MySQL;患者住院;药房治理

3.1 需要剖析

3.1.1 零碎性能需要

各医疗机构中,绝大部分中小型医疗机构外部没有实现任何信息化治理,医院临床信息,业务流程的数据仍然采取纸质记录,造成数据容易失落,对医院造成重大损失。医院外部的挂号、免费、药房、药库、科室、病床的信息管理都存在缺漏,对患者的临床信息不能做到残缺保留,高效查问,数据的容易出错、脱漏,造成换院治病难,医院不敢治,错过最佳医治期等现状,对患者的医治造成重大的影响,这些问题与医院信息化管理系统的建设施行指标基本一致。

作为一个集医学、信息、治理等多种学科的综合零碎,实现更现代化、科学化、规范化的伎俩来增强医院的治理、进步医院的工作效率,改良医疗品质;它通过将人力资源、业务流程与业余技术进行无效的整合,使医院治理更无效、更高效,使患者可能失去及时的医治和服务。

达到以上规定的系统软件次要蕴含下列模块

 预约挂号治理模块:主治医生对系统的菜单、用户、角色等零碎服务进行治理,对医院的统计信息进行查看,对系统的科室、医生、仓库、计量单位等根底信息进行治理,对医院排版进行治理,仓库进行治理。门诊治理模块:门诊部医生对用户挂号、处罚划价、我的项目划价、药品缴费、门诊患者进行治理。住院治理模块:住院部医生对系统的入院注销、缴费治理、全身检查、药品记账、我的项目记账、入院结算等信息进行治理。药房治理模块:药房部护士对医院的药房治理、门诊取药、住院取药进行治理。

零碎性能需要图如下图 3-1 所示。

3.1.2 根底数据模块

 系统管理:主治医生对菜单治理、角色治理、用户进行治理。统计治理:主治医生查看门诊月度统计、住院月度统计、门诊年度统计、住院年度统计、医生统计比照、门诊当天支出。数据中心:主治医生对医院根底信息进行治理科室核心、医生列表、药品产地、我的项目大类、挂号类型、仓库、经办人、计量单位、供货商、药品分类、药品字典。

根底数据模块图如图 3-2 所示。

图 3-2   预约挂号治理模块图

3.1.3 门诊治理模块

 用户挂号:对患者进行挂号和列表查看。处方划价:门诊部医生对患者进行药品抉择和病因填写。我的项目划价:门诊部医生对患者进行的手术我的项目进行抉择。我的项目缴费:门诊部医生对患者手术我的项目进行缴费。我的项目查看:门诊部医生对患者进行查看。药品缴费:门诊部医生对患者进行药品的缴费。门诊患者库:门诊部医生治理门诊患者列表。

门诊治理模块图如图 3 -3 所示。

图 3 -3  门诊治理模块图

3.1.4 住院治理模块

 入院注销:住院部医生对患者入院进行注销。缴费治理:住院部医生对患者进行预交费治理。全身检查:住院部医生对患者进行查看。药品记账:住院部医生对患者药品进行记账。我的项目记账:住院部医生对患者进行手术项目管理。入院结算:住院部医生对患者入院结算进行治理。

住院治理模块性能图如图 3-4 所示。

图 3-4 住院治理模块性能图

3.1.5 药房治理模块

 药房详情:药房部护士对医院药品详情进行查看。门诊取药:药房部护士针对门诊患者取药。住院取药:药房部护士针对住院患者取药。

药房治理模块性能图如图 3-5 所示。

环境须要

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

应用阐明

  1. 应用 Navicat 或者其它工具,在 mysql 中创立对应名称的数据库,并导入我的项目的 sql 文件;
  2. 应用 IDEA/Eclipse/MyEclipse 导入我的项目,Eclipse/MyEclipse 导入时,若为 maven 我的项目请抉择 maven;
    若为 maven 我的项目,导入胜利后请执行 maven clean;maven install 命令,而后运行;
  3. 将我的项目中 springmvc-servlet.xml 配置文件中的数据库配置改为本人的配置;
  4. 运行我的项目,在浏览器中输出 http://localhost:8080/ 登录

运行截图

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

​编辑

 用户管理控制层:

package com.houserss.controller;

import javax.servlet.http.HttpSession;

import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.houserss.common.Const;
import com.houserss.common.Const.Role;
import com.houserss.common.ServerResponse;
import com.houserss.pojo.User;
import com.houserss.service.IUserService;
import com.houserss.service.impl.UserServiceImpl;
import com.houserss.util.MD5Util;
import com.houserss.util.TimeUtils;
import com.houserss.vo.DeleteHouseVo;
import com.houserss.vo.PageInfoVo;

/**

  • Created by admin
    */

@Controller
@RequestMapping(“/user/”)
public class UserController {

@Autowired
private IUserService iUserService;

/**
 * 用户登录
 * @param username
 * @param password
 * @param session
 * @return
 */
@RequestMapping(value = "login.do",method = RequestMethod.POST)
@ResponseBody
public ServerResponse<User> login(User user,String uvcode, HttpSession session){String code = (String)session.getAttribute("validationCode");
    if(StringUtils.isNotBlank(code)) {if(!code.equalsIgnoreCase(uvcode)) {return ServerResponse.createByErrorMessage("验证码不正确");
        }
    }
    ServerResponse<User> response = iUserService.login(user.getUsername(),user.getPassword());
    if(response.isSuccess()){session.setAttribute(Const.CURRENT_USER,response.getData());
    }
    return response;
}



}

管理员管理控制层:

package com.sxl.controller.admin;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sxl.controller.MyController;

@Controller(“adminController”)
@RequestMapping(value = “/admin”)
public class AdminController extends MyController {



@RequestMapping(value = "/index")
public String frame(Model model, HttpServletRequest request)throws Exception {return "/admin/index";}

@RequestMapping(value = "/main")
public String main(Model model, HttpServletRequest request)throws Exception {return "/admin/main";}

@RequestMapping(value = "/tj1")
public String tj1(Model model, HttpServletRequest request)throws Exception {String sql="select DATE_FORMAT(insertDate,'%Y-%m-%d') dates,sum(allPrice) price from t_order order by DATE_FORMAT(insertDate,'%Y-%m-%d')  desc";
    List<Map> list = db.queryForList(sql);
    model.addAttribute("list", list);
    System.out.println(list);
    return "/admin/tj/tj1";
}


@RequestMapping(value = "/password")
public String password(Model model, HttpServletRequest request)throws Exception {return "/admin/password";}


@RequestMapping(value = "/changePassword")
public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {Map admin = getAdmin(request);
    if(oldPassword.equals(admin.get("password").toString())){
        String sql="update t_admin set password=? where id=?";
        db.update(sql, new Object[]{newPassword,admin.get("id")});
        return renderData(true,"1",null);
    }else{return renderData(false,"1",null);
    }
}

}

批改明码业务逻辑:

package com.sxl.controller.admin;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.sxl.controller.MyController;

@Controller(“userController”)
@RequestMapping(value = “/user”)
public class UserController extends MyController {



@RequestMapping(value = "/index")
public String frame(Model model, HttpServletRequest request)throws Exception {return "/user/index";}

@RequestMapping(value = "/main")
public String main(Model model, HttpServletRequest request)throws Exception {return "/user/main";}


@RequestMapping(value = "/password")
public String password(Model model, HttpServletRequest request)throws Exception {return "/user/password";}


@RequestMapping(value = "/changePassword")
public ResponseEntity<String> loginSave(Model model,HttpServletRequest request,String oldPassword,String newPassword) throws Exception {Map user = getUser(request);
    if(oldPassword.equals(user.get("password").toString())){
        String sql="update t_user set password=? where id=?";
        db.update(sql, new Object[]{newPassword,user.get("id")});
        return renderData(true,"1",null);
    }else{return renderData(false,"1",null);
    }
}
@RequestMapping(value = "/mine")
public String mine(Model model, HttpServletRequest request)throws Exception {

Map user =getUser(request);Map map = db.queryForMap(“select * from t_user where id=?”,new Object[]{user.get(“id”)});model.addAttribute(“map”, map); return “/user/mine”;

}



@RequestMapping(value = "/mineSave")
public ResponseEntity<String> mineSave(Model model,HttpServletRequest request,Long id
    ,String username,String password,String name,String gh,String mobile) throws Exception{
    int result = 0;
        String sql="update t_user set name=?,gh=?,mobile=? where id=?";
        result = db.update(sql, new Object[]{name,gh,mobile,id});
    if(result==1){return renderData(true,"操作胜利",null);
    }else{return renderData(false,"操作失败",null);
    }
}
}

通用治理模块:

package com.sxl.controller;

import java.nio.charset.Charset;
import java.util.Locale;
import java.util.ResourceBundle;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;

import com.sxl.util.JacksonJsonUtil;
import com.sxl.util.StringUtil;
import com.sxl.util.SystemProperties;

public class BaseController {

public static final Long EXPIRES_IN = 1000 * 3600 * 24 * 1L;// 1 天

@Autowired
private SystemProperties systemProperties;

/**
 * 取得配置文件内容
 */
public String getConfig(String key) {return systemProperties.getProperties(key);
}

/**
 * 返回服务器地址 like http://192.168.1.1:8441/UUBean/
 */
public String getHostUrl(HttpServletRequest request) {String hostName = request.getServerName();
    Integer hostPort = request.getServerPort();
    String path = request.getContextPath();

    if (hostPort == 80) {return "http://" + hostName + path + "/";} else {return "http://" + hostName + ":" + hostPort + path + "/";}
}

/***
 * 获取以后的 website 门路 String
 */
public static String getWebSite(HttpServletRequest request) {String returnUrl = request.getScheme() + "://"
            + request.getServerName();

    if (request.getServerPort() != 80) {returnUrl += ":" + request.getServerPort();
    }

    returnUrl += request.getContextPath();

    return returnUrl;
}



/**
 * 初始化 HTTP 头.
 * 
 * @return HttpHeaders
 */
public HttpHeaders initHttpHeaders() {HttpHeaders headers = new HttpHeaders();
    MediaType mediaType = new MediaType("text", "html",
            Charset.forName("utf-8"));
    headers.setContentType(mediaType);
    return headers;
}

/**
 * 返回 信息数据
 * 
 * @param status
 * @param msg
 * @return
 */
public ResponseEntity<String> renderMsg(Boolean status, String msg) {if (StringUtils.isEmpty(msg)) {msg = "";}
    String str = "{\"status\":\"" + status + "\",\"msg\":\""+ msg +"\"}";
    ResponseEntity<String> responseEntity = new ResponseEntity<String>(str,
            initHttpHeaders(), HttpStatus.OK);
    return responseEntity;
}

/**
 * 返回 obj 数据
 * 
 * @param status
 * @param msg
 * @param obj
 * @return
 */
public ResponseEntity<String> renderData(Boolean status, String msg,
        Object obj) {if (StringUtils.isEmpty(msg)) {msg = "";}
    StringBuffer sb = new StringBuffer();
    sb.append("{");
    sb.append("\"status\":\"" + status + "\",\"msg\":\""+ msg +"\",");
    sb.append("\"data\":" + JacksonJsonUtil.toJson(obj) + "");
    sb.append("}");

    ResponseEntity<String> responseEntity = new ResponseEntity<String>(sb.toString(), initHttpHeaders(), HttpStatus.OK);
    return responseEntity;
}


/***
 * 获取 IP(如果是多级代理,则失去的是一串 IP 值)*/
public static String getIpAddr(HttpServletRequest request) {String ip = request.getHeader("x-forwarded-for");
    if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {ip = request.getHeader("Proxy-Client-IP");
    }

    if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {ip = request.getHeader("WL-Proxy-Client-IP");
    }

    if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {ip = request.getRemoteAddr();
    }

    if (ip != null && ip.length() > 0) {String[] ips = ip.split(",");
        for (int i = 0; i < ips.length; i++) {if (!"unknown".equalsIgnoreCase(ips[i])) {ip = ips[i];
                break;
            }
        }
    }

    return ip;
}

/**
 * 国际化取得语言内容
 * 
 * @param key
 *            语言 key
 * @param args
 * @param argsSplit
 * @param defaultMessage
 * @param locale
 * @return
 */
public static String getLanguage(String key, String args, String argsSplit,
        String defaultMessage, String locale) {
    String language = "zh";
    String contry = "cn";
    String returnValue = defaultMessage;

    if (!StringUtil.isEmpty(locale)) {
        try {String[] localeArray = locale.split("_");
            language = localeArray[0];
            contry = localeArray[1];
        } catch (Exception e) {}}

    try {
        ResourceBundle resource = ResourceBundle.getBundle("lang.resource",
                new Locale(language, contry));
        returnValue = resource.getString(key);
        if (!StringUtil.isEmpty(args)) {String[] argsArray = args.split(argsSplit);
            for (int i = 0; i < argsArray.length; i++) {returnValue = returnValue.replace("{" + i + "}",
                        argsArray[i]);
            }
        }
    } catch (Exception e) { }

    return returnValue;
}

}

正文完
 0