计算机毕业设计-基于Java+SSM架构的电子病历系统项目开发实战(附源码+论文)

大家好!我是职场程序猿,感谢您阅读本文,欢迎一键三连哦。

💞当前专栏:Java毕业设计

精彩专栏推荐👇🏻👇🏻👇🏻

🎀 Python毕业设计
🌎微信小程序毕业设计

开发运行环境

  • 框架:ssm
  • JDK版本:JDK1.8
  • 服务器:tomcat7
  • 数据库:mysql 5.7
  • 数据库工具:Navicat12
  • 开发软件:eclipse/myeclipse/idea
  • Maven包:Maven3.3.9
  • 浏览器:谷歌浏览器

源码下载地址:

https://download.csdn.net/download/m0_46388260/89282109

论文目录

【如需全文请按文末获取联系】
在这里插入图片描述
在这里插入图片描述

一、项目简介

本电子病历系统有管理员,护士,门诊医生,住院医生。
管理员功能有个人中心,医生管理,护士管理,患者管理,病房管理,门诊病历管理,住院病历管理,药品管理,公告管理,基础数据管理等。
门诊医生功能有个人中心,患者管理,病房管理,门诊病历管理,药品管理,公告管理等。
护士功能有有个人中心,患者管理,病房管理,门诊病历管理,药品管理,住院病历管理,公告管理等。
住院医生功能有个人中心,患者管理,药房管理,病房管理,住院病历管理,药品管理,公告管理等。

二、系统设计

2.1软件功能模块设计

本系统是基于B/S架构的网站系统,设计的功能结构图如下图所示:
在这里插入图片描述

2.2数据库设计

(1)公告服务信息的实体属性图如下:
在这里插入图片描述
(2)医嘱信息实体属性图如图4.13所示:
在这里插入图片描述
(3)管理员信息实体属性图如图4.14所示:
在这里插入图片描述

三、系统项目部分截图

3.1医生信息管理

电子病历系统的系统管理员可以对医生信息添加修改删除以及查询操作。具体界面的展示如图5.1所示。
在这里插入图片描述

3.2护士信息管理

系统管理员可以查看对护士信息进行添加,修改,删除以及查询操作。具体界面如图5.2所示。
在这里插入图片描述

3.3患者信息管理

系统管理员可以查看对患者信息进行添加,修改,删除以及查询操作。具体界面如图5.2所示。
在这里插入图片描述

3.4病房信息管理

系统管理员可以查看对病房信息进行添加,修改,删除以及查询操作。具体界面如图5.2所示。
在这里插入图片描述

四、部分核心代码

package com.controller;


import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.BingfangEntity;
import com.entity.BingfangYonghuEntity;
import com.entity.YonghuEntity;
import com.entity.view.BingfangYonghuView;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.StringUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 病房患者
 * 后端接口
 * @author
 * @email
 * @date 2021-04-30
*/
@RestController
@Controller
@RequestMapping("/bingfangYonghu")
public class BingfangYonghuController {
    private static final Logger logger = LoggerFactory.getLogger(BingfangYonghuController.class);

    @Autowired
    private BingfangYonghuService bingfangYonghuService;


    @Autowired
    private TokenService tokenService;
    @Autowired
    private DictionaryService dictionaryService;



    //级联表service
    @Autowired
    private BingfangService bingfangService;
    @Autowired
    private YonghuService yonghuService;


    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
     
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(StringUtil.isNotEmpty(role) && "用户".equals(role)){
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        }
        params.put("orderBy","id");
        PageUtils page = bingfangYonghuService.queryPage(params);

        //字典表数据转换
        List<BingfangYonghuView> list =(List<BingfangYonghuView>)page.getList();
        for(BingfangYonghuView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        BingfangYonghuEntity bingfangYonghu = bingfangYonghuService.selectById(id);
        if(bingfangYonghu !=null){
            //entity转view
            BingfangYonghuView view = new BingfangYonghuView();
            BeanUtils.copyProperties( bingfangYonghu , view );//把实体数据重构到view中

            //级联表
            BingfangEntity bingfang = bingfangService.selectById(bingfangYonghu.getBingfangId());
            if(bingfang != null){
                BeanUtils.copyProperties( bingfang , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setBingfangId(bingfang.getId());
            }
            //级联表
            YonghuEntity yonghu = yonghuService.selectById(bingfangYonghu.getYonghuId());
            if(yonghu != null){
                BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
                view.setYonghuId(yonghu.getId());
            }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody BingfangYonghuEntity bingfangYonghu, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,bingfangYonghu:{}",this.getClass().getName(),bingfangYonghu.toString());
        Wrapper<BingfangYonghuEntity> queryWrapper = new EntityWrapper<BingfangYonghuEntity>()
            .eq("yonghu_id", bingfangYonghu.getYonghuId())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        BingfangYonghuEntity bingfangYonghuEntity = bingfangYonghuService.selectOne(queryWrapper);
        if(bingfangYonghuEntity==null){
            bingfangYonghu.setCreateTime(new Date());
        //  String role = String.valueOf(request.getSession().getAttribute("role"));
        //  if("".equals(role)){
        //      bingfangYonghu.set
        //  }
            BingfangEntity bingfangEntity = bingfangService.selectById(bingfangYonghu.getBingfangId());
            if(bingfangEntity.getBingfangTypes() == 2){
                return R.error(511,"病房已被使用");
            }
            bingfangYonghuService.insert(bingfangYonghu); //新增病房用户

            bingfangEntity.setBingfangTypes(2);// 设置病房为已使用
            bingfangService.updateById(bingfangEntity);
            return R.ok();
        }else {
            return R.error(511,"该用户已经在另一个病房中");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody BingfangYonghuEntity bingfangYonghu, HttpServletRequest request){
        logger.debug("update方法:,,Controller:{},,bingfangYonghu:{}",this.getClass().getName(),bingfangYonghu.toString());
        //根据字段查询是否有相同数据
        Wrapper<BingfangYonghuEntity> queryWrapper = new EntityWrapper<BingfangYonghuEntity>()
            .notIn("id",bingfangYonghu.getId())
            .andNew()
            .eq("yonghu_id", bingfangYonghu.getYonghuId())
            ;
        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        BingfangYonghuEntity bingfangYonghuEntity = bingfangYonghuService.selectOne(queryWrapper);
        if(bingfangYonghuEntity==null){
            //  String role = String.valueOf(request.getSession().getAttribute("role"));
            //  if("".equals(role)){
            //      bingfangYonghu.set
            //  }
            BingfangYonghuEntity oldBingfangYonghuEntity = bingfangYonghuService.selectById(bingfangYonghu.getId());
            BingfangEntity oldBbingfangEntity = bingfangService.selectById(oldBingfangYonghuEntity.getBingfangId());
            oldBbingfangEntity.setBingfangTypes(1);

            BingfangEntity bingfangEntity = bingfangService.selectById(bingfangYonghu.getBingfangId());
            if(bingfangEntity.getBingfangTypes() ==2 && bingfangYonghu.getBingfangId() != oldBingfangYonghuEntity.getBingfangId()){
                return R.error(511,"病房正在被使用");
            }
            bingfangEntity.setBingfangTypes(2);
            bingfangYonghuService.updateById(bingfangYonghu);//根据id更新
            bingfangService.updateById(oldBbingfangEntity);
            bingfangService.updateById(bingfangEntity);
            return R.ok();
        }else {
            return R.error(511,"该用户已经在另一个病房中");
        }
    }



    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        bingfangYonghuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }






}


获取源码或论文

如需对应的论文或源码,以及其他定制需求,也可以下方微信联系我。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值