概述
基于SSM的智慧问诊系统
随着信息技术的不断发展,给许多领域都带来了深刻变革。包括对病患数据的远程诊断、会诊和护理等医学活动在内的远程医疗,就是其中之一。根据世界卫生组织的表述,远程医疗是指利用交互式视频和信息通讯技术进行诊断、治疗及咨询等医疗照护行为及卫生教育和医疗信息的传递,具体形式包括远程诊断、远程会诊及护理、远程教育、远程医疗信息服务等等。
在此背景下,突如其来的新冠疫情成为了远程医疗迅速成长的一个契机。一方面,远程医疗能防止交叉感染、减轻医院负担、保障患者获取急需的医疗服务。对远程医疗的需求激增,进一步刺激了服务供应数量上升、形式增加。另一方面,政策对远程医疗的关注和扶持力度显著提升,尤以要求远程与门诊就医对等支付,将常见病、慢性病线上复诊服务纳入医保基金支付范围等措施为标志。
很多时候基层医院并不缺乏先进的医疗仪器,缺少的是经验丰富的高级医师和阅片专家,如果能有大型医院的专家能连接基层医院的医疗仪器,实现远程阅片诊断,不仅能帮助解决一些困难的疾病问题,并且在此过程中建立长期的远程带教模式,还能提高基层医院医生规范拍片、报告和阅片的能力。所以我们所做的本项目要开发的是基于局域网和互联网的远程医疗问诊系统
架构
本产品使用 B/S 架构,整体可分为:用户层,应用层,处理层,储存层。
spring、springmvc、mybatis、jsp、log4j、tomcat9、mysql5.7
多角色权限实现
在项目多角色管理中分为四类:游客、患者、医生、管理员。用户登录页面默认使用游客身份访问,游客是未登录状态,不可以挂号和发起会话。请求中不携带session,只能访问主页面和介绍页面。
需求分析文档
项目报告
项目代码
package com.hospital.action;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hospital.entity.Admin;
import com.hospital.service.AdminService;
import com.hospital.util.PageHelper;
//定义为控制器
@Controller
// 设置路径
@RequestMapping("/admin")
public class AdminAction extends BaseAction {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
@Resource
private AdminService adminService;
// 修改密码
@RequestMapping("editpwd.action")
public String editpwd() {
String adminid = (String) this.getSession().getAttribute("adminid");
String password = this.getRequest().getParameter("password");
String repassword = this.getRequest().getParameter("repassword");
Admin admin = this.adminService.getAdminById(adminid);
if (password.equals(admin.getPassword())) {
admin.setPassword(repassword);
this.adminService.updateAdmin(admin);
} else {
this.getRequest().setAttribute("message", "旧密码错误");
}
return "admin/editpwd";
}
// 管理员退出登录
@RequestMapping("exit.action")
public String exit() {
this.getSession().removeAttribute("adminid");
this.getSession().removeAttribute("adminname");
this.getSession().removeAttribute("realname");
return "admin/index";
}
// 准备添加数据
@RequestMapping("createAdmin.action")
public String createAdmin() {
return "admin/addadmin";
}
// 添加数据
@RequestMapping("addAdmin.action")
public String addAdmin(Admin admin) {
this.adminService.insertAdmin(admin);
return "redirect:/admin/createAdmin.action";
}
// 通过主键删除数据
@RequestMapping("deleteAdmin.action")
public String deleteAdmin(String id) {
this.adminService.deleteAdmin(id);
return "redirect:/admin/getAllAdmin.action";
}
// 批量删除数据
@RequestMapping("deleteAdminByIds.action")
public String deleteAdminByIds() {
String[] ids = this.getRequest().getParameterValues("adminid");
for (String adminid : ids) {
this.adminService.deleteAdmin(adminid);
}
return "redirect:/admin/getAllAdmin.action";
}
// 更新数据
@RequestMapping("updateAdmin.action")
public String updateAdmin(Admin admin) {
this.adminService.updateAdmin(admin);
return "redirect:/admin/getAllAdmin.action";
}
// 显示全部数据
@RequestMapping("getAllAdmin.action")
public String getAllAdmin(String number) {
List<Admin> adminList = this.adminService.getAllAdmin();
PageHelper.getPage(adminList, "admin", null, null, 10, number, this.getRequest(), null);
return "admin/listadmin";
}
// 按条件查询数据 (模糊查询)
@RequestMapping("queryAdminByCond.action")
public String queryAdminByCond(String cond, String name, String number) {
Admin admin = new Admin();
if (cond != null) {
if ("username".equals(cond)) {
admin.setUsername(name);
}
if ("password".equals(cond)) {
admin.setPassword(name);
}
if ("realname".equals(cond)) {
admin.setRealname(name);
}
if ("contact".equals(cond)) {
admin.setContact(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.adminService.getAdminByLike(admin), "admin", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/queryadmin";
}
// 按主键查询数据
@RequestMapping("getAdminById.action")
public String getAdminById(String id) {
Admin admin = this.adminService.getAdminById(id);
this.getRequest().setAttribute("admin", admin);
return "admin/editadmin";
}
public AdminService getAdminService() {
return adminService;
}
public void setAdminService(AdminService adminService) {
this.adminService = adminService;
}
}
```java
package com.hospital.action;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hospital.entity.Advice;
import com.hospital.entity.Asign;
import com.hospital.entity.Doctor;
import com.hospital.entity.Users;
import com.hospital.service.AdviceService;
import com.hospital.service.AsignService;
import com.hospital.service.DoctorService;
import com.hospital.service.UsersService;
import com.hospital.util.PageHelper;
import com.hospital.util.VeDate;
//定义为控制器
@Controller
// 设置路径
@RequestMapping("/advice")
public class AdviceAction extends BaseAction {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
@Resource
private AdviceService adviceService;
@Autowired
@Resource
private UsersService usersService;
@Autowired
@Resource
private DoctorService doctorService;
@Autowired
@Resource
private AsignService asignService;
// 准备添加数据
@RequestMapping("createAdvice.action")
public String createAdvice(String id) {
Asign asign = this.asignService.getAsignById(id);
this.getRequest().setAttribute("asign", asign);
return "admin/addadvice";
}
// 添加数据
@RequestMapping("addAdvice.action")
public String addAdvice(Advice advice) {
advice.setAddtime(VeDate.getStringDateShort());
this.adviceService.insertAdvice(advice);
String asignid = this.getRequest().getParameter("asignid");
Asign asign = this.asignService.getAsignById(asignid);
asign.setStatus("完成");
this.asignService.updateAsign(asign);
return "redirect:/asign/getDoctorAsign.action";
}
// 通过主键删除数据
@RequestMapping("deleteAdvice.action")
public String deleteAdvice(String id) {
this.adviceService.deleteAdvice(id);
return "redirect:/advice/getAllAdvice.action";
}
// 批量删除数据
@RequestMapping("deleteAdviceByIds.action")
public String deleteAdviceByIds() {
String[] ids = this.getRequest().getParameterValues("adviceid");
for (String adviceid : ids) {
this.adviceService.deleteAdvice(adviceid);
}
return "redirect:/advice/getAllAdvice.action";
}
// 更新数据
@RequestMapping("updateAdvice.action")
public String updateAdvice(Advice advice) {
this.adviceService.updateAdvice(advice);
return "redirect:/advice/getAllAdvice.action";
}
// 显示全部数据
@RequestMapping("getAllAdvice.action")
public String getAllAdvice(String number) {
List<Advice> adviceList = this.adviceService.getAllAdvice();
PageHelper.getPage(adviceList, "advice", null, null, 10, number, this.getRequest(), null);
return "admin/listadvice";
}
@RequestMapping("getDoctorAdvice.action")
public String getDoctorAdvice() {
String doctorid = (String) this.getSession().getAttribute("adminid");
Advice advice = new Advice();
advice.setDoctorid(doctorid);
List<Advice> adviceList = this.adviceService.getAdviceByCond(advice);
this.getRequest().setAttribute("adviceList", adviceList);
return "admin/xlistadvice";
}
// 按条件查询数据 (模糊查询)
@RequestMapping("queryAdviceByCond.action")
public String queryAdviceByCond(String cond, String name, String number) {
Advice advice = new Advice();
if (cond != null) {
if ("ano".equals(cond)) {
advice.setAno(name);
}
if ("usersid".equals(cond)) {
advice.setUsersid(name);
}
if ("doctorid".equals(cond)) {
advice.setDoctorid(name);
}
if ("contents".equals(cond)) {
advice.setContents(name);
}
if ("addtime".equals(cond)) {
advice.setAddtime(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.adviceService.getAdviceByLike(advice), "advice", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/queryadvice";
}
// 按主键查询数据
@RequestMapping("getAdviceById.action")
public String getAdviceById(String id) {
Advice advice = this.adviceService.getAdviceById(id);
this.getRequest().setAttribute("advice", advice);
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
List<Doctor> doctorList = this.doctorService.getAllDoctor();
this.getRequest().setAttribute("doctorList", doctorList);
return "admin/editadvice";
}
public AdviceService getAdviceService() {
return adviceService;
}
public void setAdviceService(AdviceService adviceService) {
this.adviceService = adviceService;
}
}
package com.hospital.action;
import java.io.IOException;
import java.io.PrintWriter;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hospital.entity.Drugs;
import com.hospital.entity.Sell;
import com.hospital.service.DrugsService;
import com.hospital.service.SellService;
import com.hospital.util.VeDate;
//定义为控制器
@Controller
// 设置路径
@RequestMapping(value = "/ajax")
public class AjaxAction extends BaseAction {
@Autowired
@Resource
private SellService sellService;
@Autowired
@Resource
private DrugsService drugsService;
@RequestMapping("save.action")
public void save(HttpServletResponse response) {
String str = this.getRequest().getParameter("str");
System.out.println(str);
String[] s = str.split(",");// 接收参数并转化成数组
PrintWriter out = null;
Drugs drugs = this.drugsService.getDrugsById(s[0]);
Sell sell = new Sell();
sell.setSellid("S" + VeDate.getStringId());
sell.setDrugsid(s[0]);
sell.setNum(s[1]);
sell.setSno(s[2]);
sell.setPrice(drugs.getPrice());
sell.setTotal("" + (Double.parseDouble(sell.getNum()) * Double.parseDouble(sell.getPrice())));
sell.setAddtime(VeDate.getStringDateShort());
this.sellService.insertSell(sell);
try {
response.setCharacterEncoding("UTF-8");
out = response.getWriter();
} catch (IOException ex) {
}
out.write(sell.getSellid());
out.close();
}
}
package com.hospital.action;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hospital.entity.Article;
import com.hospital.service.ArticleService;
import com.hospital.entity.Banner;
import com.hospital.service.BannerService;
import com.hospital.util.PageHelper;
import com.hospital.util.VeDate;
//定义为控制器
@Controller
// 设置路径
@RequestMapping("/article")
public class ArticleAction extends BaseAction {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
@Resource
private ArticleService articleService;
@Autowired
@Resource
private BannerService bannerService;
// 准备添加数据
@RequestMapping("createArticle.action")
public String createArticle() {
List<Banner> bannerList = this.bannerService.getAllBanner();
this.getRequest().setAttribute("bannerList", bannerList);
return "admin/addarticle";
}
// 添加数据
@RequestMapping("addArticle.action")
public String addArticle(Article article) {
article.setAddtime(VeDate.getStringDateShort());
article.setHits("0");
this.articleService.insertArticle(article);
return "redirect:/article/createArticle.action";
}
// 通过主键删除数据
@RequestMapping("deleteArticle.action")
public String deleteArticle(String id) {
this.articleService.deleteArticle(id);
return "redirect:/article/getAllArticle.action";
}
// 批量删除数据
@RequestMapping("deleteArticleByIds.action")
public String deleteArticleByIds() {
String[] ids = this.getRequest().getParameterValues("articleid");
for (String articleid : ids) {
this.articleService.deleteArticle(articleid);
}
return "redirect:/article/getAllArticle.action";
}
// 更新数据
@RequestMapping("updateArticle.action")
public String updateArticle(Article article) {
this.articleService.updateArticle(article);
return "redirect:/article/getAllArticle.action";
}
// 显示全部数据
@RequestMapping("getAllArticle.action")
public String getAllArticle(String number) {
List<Article> articleList = this.articleService.getAllArticle();
PageHelper.getPage(articleList, "article", null, null, 10, number, this.getRequest(), null);
return "admin/listarticle";
}
// 按条件查询数据 (模糊查询)
@RequestMapping("queryArticleByCond.action")
public String queryArticleByCond(String cond, String name, String number) {
Article article = new Article();
if (cond != null) {
if ("title".equals(cond)) {
article.setTitle(name);
}
if ("bannerid".equals(cond)) {
article.setBannerid(name);
}
if ("image".equals(cond)) {
article.setImage(name);
}
if ("istop".equals(cond)) {
article.setIstop(name);
}
if ("isflv".equals(cond)) {
article.setIsflv(name);
}
if ("contents".equals(cond)) {
article.setContents(name);
}
if ("addtime".equals(cond)) {
article.setAddtime(name);
}
if ("hit".equals(cond)) {
article.setHits(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.articleService.getArticleByLike(article), "article", nameList, valueList, 10, number, this.getRequest(),
"query");
name = null;
cond = null;
return "admin/queryarticle";
}
// 按主键查询数据
@RequestMapping("getArticleById.action")
public String getArticleById(String id) {
Article article = this.articleService.getArticleById(id);
this.getRequest().setAttribute("article", article);
List<Banner> bannerList = this.bannerService.getAllBanner();
this.getRequest().setAttribute("bannerList", bannerList);
return "admin/editarticle";
}
public ArticleService getArticleService() {
return articleService;
}
public void setArticleService(ArticleService articleService) {
this.articleService = articleService;
}
}
package com.hospital.action;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hospital.entity.Asign;
import com.hospital.service.AsignService;
import com.hospital.entity.Users;
import com.hospital.entity.Dept;
import com.hospital.entity.Doctor;
import com.hospital.service.UsersService;
import com.hospital.service.DeptService;
import com.hospital.service.DoctorService;
import com.hospital.util.PageHelper;
import com.hospital.util.VeDate;
//定义为控制器
@Controller
// 设置路径
@RequestMapping("/asign")
public class AsignAction extends BaseAction {
// 注入Service 由于标签的存在 所以不需要getter setter
@Autowired
@Resource
private AsignService asignService;
@Autowired
@Resource
private UsersService usersService;
@Autowired
@Resource
private DeptService deptService;
@Autowired
@Resource
private DoctorService doctorService;
// 准备添加数据
@RequestMapping("createAsign.action")
public String createAsign() {
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
List<Dept> deptList = this.deptService.getAllDept();
this.getRequest().setAttribute("deptList", deptList);
List<Doctor> doctorList = this.doctorService.getAllDoctor();
this.getRequest().setAttribute("doctorList", doctorList);
return "admin/addasign";
}
// 添加数据
@RequestMapping("addAsign.action")
public String addAsign(Asign asign) {
this.asignService.insertAsign(asign);
return "redirect:/asign/createAsign.action";
}
// 通过主键删除数据
@RequestMapping("deleteAsign.action")
public String deleteAsign(String id) {
this.asignService.deleteAsign(id);
return "redirect:/asign/getAllAsign.action";
}
// 批量删除数据
@RequestMapping("deleteAsignByIds.action")
public String deleteAsignByIds() {
String[] ids = this.getRequest().getParameterValues("asignid");
for (String asignid : ids) {
this.asignService.deleteAsign(asignid);
}
return "redirect:/asign/getAllAsign.action";
}
// 更新数据
@RequestMapping("updateAsign.action")
public String updateAsign(Asign asign) {
this.asignService.updateAsign(asign);
return "redirect:/asign/getAllAsign.action";
}
// 显示全部数据
@RequestMapping("getAllAsign.action")
public String getAllAsign(String number) {
List<Asign> asignList = this.asignService.getAllAsign();
PageHelper.getPage(asignList, "asign", null, null, 10, number, this.getRequest(), null);
return "admin/listasign";
}
@RequestMapping("getDoctorAsign.action")
public String getDoctorAsign() {
String doctorid = (String) this.getSession().getAttribute("adminid");
Asign asign = new Asign();
asign.setDoctorid(doctorid);
asign.setOrderdate(VeDate.getStringDateShort());
asign.setStatus("未完成");
List<Asign> asignList = this.asignService.getAllAsign();
// List<Asign> asignList = this.asignService.getAsignByCond(asign);
this.getRequest().setAttribute("asignList", asignList);
return "admin/xlistasign";
}
// 按条件查询数据 (模糊查询)
@RequestMapping("queryAsignByCond.action")
public String queryAsignByCond(String cond, String name, String number) {
Asign asign = new Asign();
if (cond != null) {
if ("ano".equals(cond)) {
asign.setAno(name);
}
if ("usersid".equals(cond)) {
asign.setUsersid(name);
}
if ("deptid".equals(cond)) {
asign.setDeptid(name);
}
if ("doctorid".equals(cond)) {
asign.setDoctorid(name);
}
if ("orderdate".equals(cond)) {
asign.setOrderdate(name);
}
if ("status".equals(cond)) {
asign.setStatus(name);
}
if ("memo".equals(cond)) {
asign.setMemo(name);
}
}
List<String> nameList = new ArrayList<String>();
List<String> valueList = new ArrayList<String>();
nameList.add(cond);
valueList.add(name);
PageHelper.getPage(this.asignService.getAsignByLike(asign), "asign", nameList, valueList, 10, number, this.getRequest(), "query");
name = null;
cond = null;
return "admin/queryasign";
}
// 按主键查询数据
@RequestMapping("getAsignById.action")
public String getAsignById(String id) {
Asign asign = this.asignService.getAsignById(id);
this.getRequest().setAttribute("asign", asign);
List<Users> usersList = this.usersService.getAllUsers();
this.getRequest().setAttribute("usersList", usersList);
List<Dept> deptList = this.deptService.getAllDept();
this.getRequest().setAttribute("deptList", deptList);
List<Doctor> doctorList = this.doctorService.getAllDoctor();
this.getRequest().setAttribute("doctorList", doctorList);
return "admin/editasign";
}
public AsignService getAsignService() {
return asignService;
}
public void setAsignService(AsignService asignService) {
this.asignService = asignService;
}
}
github
DandelionConvention
最后
以上就是昏睡豌豆为你收集整理的基于SSM的智慧问诊系统基于SSM的智慧问诊系统的全部内容,希望文章能够帮你解决基于SSM的智慧问诊系统基于SSM的智慧问诊系统所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复