Java项目-医院挂号管理系统,java开发实战经典视频


在本系统中,主要分为三个角色,患者主要实现按照科室挂号,按照医生挂号,查看我的预约,查看我的诚心度,医生主要实现查看我的排班信息,我的申请,患者队列,我的信息,管理员主要实现查看我的基本信息,医生信息管理,患者信息管理,科室信息管理,排班申请管理。具体描述如下:

管理员:

基本信息:统计各个科室信息以及每周的预约信息,用柱状图显示。

医生信息管理:可以对医生进行模糊查询,添加医生。

患者信息管理: 查看患者信息。

排班申请管理:查看医生申请出诊信息

医生:

排班信息:可以查看自己的每周排班情况。

我的申请:查看自己申请出诊信息。

患者队列:查看患者预约信息,以及对预约进行就诊完成还是患者爽约操作。

我的信息:查看我的详细信息。

患者:

按照科室挂号:按照科室进行挂号操作,挂号需要在自己的163邮箱中收到预约验证码,正确填写验证码后才能挂号成功。

按照医生挂号:按照医生进行挂号操作,挂号需要在自己的163邮箱中收到预约验证码,正确填写验证码后才能挂号成功。

查看我的预约:可以查看自己预约信息,以及修改和取消预约,取消预约同样需要接受验证码。

查看我的诚心度:查看自己的诚信都是多少分。

本系统各模块如下图2.1所示:

3.系统设计

======

3.1登录


填写用户名或者密码,如果用户名或者密码错误,登录失败,反之登录成功。判断用户角色,如果是管理员跳转到admin/index.jsp,如果是医生跳转到doctor/login.jsp,如果是患者,跳转到index.jsp。

protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

String account = req.getParameter(“account”);

String password = req.getParameter(“password”);

String accounttype = req.getParameter(“accounttype”);

req.getSession().removeAttribute(“message”);

// System.out.println(url);

switch (accounttype){

case “管理员”:

AdminDao adminDao=new IAdminimpl();

List admins = adminDao.getAdmin(account);

if(admins.size()>0){

Admin admin = admins.get(0);

if(admin.getPassword().equals(password)){

req.getSession().setAttribute(“admin”,admin);

resp.sendRedirect(“admin/index.jsp”);

}

}

break;

case “医生”:

DoctorDao doctorDao=new DoctorDao();

String where=“where account =?”;

List doctors = doctorDao.query(where, new Object[]{account});

if(doctors.size()>0){

Doctor doctor = doctors.get(0);

if(doctor.getPassword().equals(password)){

req.getSession().setAttribute(“doctor”,doctor);

resp.sendRedirect(“doctor”);

return;

}

}

req.getSession().setAttribute(“message”,“用户名或密码错误!!”);

req.getRequestDispatcher(“doctor/login.jsp”).forward(req,resp);

break;

case “患者”:

PatientDao patientDao=new PatientDao();

List patients = patientDao.query(“account”,account);

if(patients.size()>0){

Patient patient = patients.get(0);

if(patient.getPassword().equals(password)){

req.getSession().setAttribute(“patient”,patient);

String url= (String) req.getSession().getAttribute(“url”);

if(url==null)

url=“index.jsp”;

resp.sendRedirect(url);

return;

}

}

req.getSession().setAttribute(“message”,“用户名或密码错误!!”);

resp.sendRedirect(“login.jsp”);

break;

}

}

3.2患者挂号


患者挂号包括按照科室挂号,按照医生挂号,选择挂号时间,点击确定后,点击发送验证码,在163邮箱中收到挂号验证码,填写正确后,挂号成功,反之失败,显示验证码错误。

public static boolean sendMail(String to, String content){

Properties prop = new Properties();

prop.setProperty(“mail.host”, host);

prop.setProperty(“mail.smtp.auth”, “true”);

prop.setProperty(“mail.transport.protocol”, “smtp”);

/* prop.put(“mail.smtp.ssl.enable”, true);*/

// 开启SSL加密,否则会失败

try {

MailSSLSocketFactory sf = new MailSSLSocketFactory();

sf.setTrustAllHosts(true);

prop.put(“mail.smtp.ssl.enable”, “true”);

prop.put(“mail.smtp.ssl.socketFactory”, sf);

Session session = Session.getInstance(prop);

/* prop.put(“mail.smtp.ssl.enable”, true);*/

Transport ts = session.getTransport();

// 连接邮件服务器:邮箱类型,帐号,授权码代替密码(更安全)

ts.connect(host,from, password);//后面的字符是授权码 // 创建邮件对象

MimeMessage message = new MimeMessage(session);

// 指明邮件的发件人

message.setFrom(new InternetAddress(from));

message.setRecipient(Message.RecipientType.TO, new InternetAddress(to));

// 邮件的标题

message.setSubject(“在线预约挂号系统”);

// 邮件的文本内容

/int code=100000+(int)(899999Math.random());

System.out.println(code);*/

message.setContent(content, “text/html;charset=UTF-8”);

// 发送邮件

ts.sendMessage(message, message.getAllRecipients());

ts.close();

return true;

} catch (Exception e) {

e.printStackTrace();

return false;

}

}

3.3患者我的预约


点击我的预约,可以查看我的预约信息,可以修改预约以及取消预约。

protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

Patient patient= (Patient) req.getSession().getAttribute(“patient”);

RecodeDao recodeDao = new RecodeDao();

/*String where=“where pid=? order by ordertime desc”;

List list = recodeDao.query(where, new Object[]{patient.getId()});*/

List<HashMap<String, String>> list = recodeDao.orderList(patient.getId());

req.setAttribute(“list”,list);

req.getRequestDispatcher(“orderList.jsp”).forward(req,resp);

}

3.4患者诚信度


点击诚信度,可以查看当前患者诚信度。

protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

String where =“where pid=? order by time desc”;

Patient patient = (Patient) req.getSession().getAttribute(“patient”);

IntegrityDao integrityDao=new IntegrityDao();

List<bean.Integrity> integrities = integrityDao.query(where, new Object[]{patient.getId()});

req.setAttribute(“integrities”,integrities);

req.getRequestDispatcher(“integrity.jsp”).forward(req,resp);

}

3.5医生排班信息


点击排班信息,可以查看医生排班信息。

protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

WorkDayDao workDayDao=new WorkDayDao();

String action

《一线大厂Java面试题解析+后端开发学习笔记+最新架构讲解视频+实战项目源码讲义》

【docs.qq.com/doc/DSmxTbFJ1cmN1R2dB】 完整内容开源分享

= Util.nullToString(req.getParameter(“action”));

switch (action){

case “offWork”:

String wid = req.getParameter(“wid”);

String set = “set state =‘停诊’ where id=?”;

workDayDao.update(set,new Object[]{wid});

break;

}

Doctor doctor = (Doctor) req.getSession().getAttribute(“doctor”);

//List workDays= workDayDao.queryWorkday1(doctor.getDid());

String where =" where did=? order by worktime asc";

List workDays = workDayDao.query(where,new Object[]{doctor.getDid()});

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值