SpringBoot+Vue+Element-UI实现医患档案管理系统

目录

前言介绍 

系统展示 

管理员页面

患者管理

 诊疗信息管理

病历信息管理

处方信息管理

患者页面

医生页面

部分核心代码 

病历信息

上传文件

数据库配置

前言介绍 

随着信息技术和网络技术的飞速发展,人类已进入全新信息化时代,传统管理技术已无法高效,便捷地管理信息。为了迎合时代需求,优化管理效率,各种各样的管理平台应运而生,各行各业相继进入信息管理时代,医患档案管理系统就是信息时代变革中的产物之一。

任何平台都要遵循平台设计的基本流程,本平台也不例外,同样需要经过市场调研,需求分析,概要设计,详细设计,编码,测试这些步骤,基于java语言设计并实现了医患档案管理系统。该系统基于B/S即所谓浏览器/服务器模式,应用java技术,选择MySQL作为后台数据库。平台主要包括平台首页,个人中心,患者管理,医生管理,诊疗信息管理,病历信息管理,处方信息管理。

系统展示 

管理员页面

患者管理

 诊疗信息管理

病历信息管理

处方信息管理

患者页面

医生页面

部分核心代码 

病历信息

/**
 * 病历信息
 * 后端接口
 * @author 
 * @email 
 * @date 2022-04-23 18:27:37
 */
@RestController
@RequestMapping("/binglixinxi")
public class BinglixinxiController {
    @Autowired
    private BinglixinxiService binglixinxiService;
 
 
    
 
 
    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,BinglixinxiEntity binglixinxi,
		HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yisheng")) {
			binglixinxi.setYishengzhanghao((String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("huanzhe")) {
			binglixinxi.setHuanzhezhanghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<BinglixinxiEntity> ew = new EntityWrapper<BinglixinxiEntity>();
		PageUtils page = binglixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, binglixinxi), params), params));
 
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,BinglixinxiEntity binglixinxi, 
		HttpServletRequest request){
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yisheng")) {
			binglixinxi.setYishengzhanghao((String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("huanzhe")) {
			binglixinxi.setHuanzhezhanghao((String)request.getSession().getAttribute("username"));
		}
        EntityWrapper<BinglixinxiEntity> ew = new EntityWrapper<BinglixinxiEntity>();
		PageUtils page = binglixinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, binglixinxi), params), params));
        return R.ok().put("data", page);
    }
 
	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( BinglixinxiEntity binglixinxi){
       	EntityWrapper<BinglixinxiEntity> ew = new EntityWrapper<BinglixinxiEntity>();
      	ew.allEq(MPUtil.allEQMapPre( binglixinxi, "binglixinxi")); 
        return R.ok().put("data", binglixinxiService.selectListView(ew));
    }
 
	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(BinglixinxiEntity binglixinxi){
        EntityWrapper< BinglixinxiEntity> ew = new EntityWrapper< BinglixinxiEntity>();
 		ew.allEq(MPUtil.allEQMapPre( binglixinxi, "binglixinxi")); 
		BinglixinxiView binglixinxiView =  binglixinxiService.selectView(ew);
		return R.ok("查询病历信息成功").put("data", binglixinxiView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        BinglixinxiEntity binglixinxi = binglixinxiService.selectById(id);
        return R.ok().put("data", binglixinxi);
    }
 
    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        BinglixinxiEntity binglixinxi = binglixinxiService.selectById(id);
        return R.ok().put("data", binglixinxi);
    }
    
 
 
 
    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody BinglixinxiEntity binglixinxi, HttpServletRequest request){
    	binglixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(binglixinxi);
        binglixinxiService.insert(binglixinxi);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody BinglixinxiEntity binglixinxi, HttpServletRequest request){
    	binglixinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(binglixinxi);
    	binglixinxi.setUserid((Long)request.getSession().getAttribute("userId"));
        binglixinxiService.insert(binglixinxi);
        return R.ok();
    }
 
    /**
     * 修改
     */
    @RequestMapping("/update")
    @Transactional
    public R update(@RequestBody BinglixinxiEntity binglixinxi, HttpServletRequest request){
        //ValidatorUtils.validateEntity(binglixinxi);
        binglixinxiService.updateById(binglixinxi);//全部更新
        return R.ok();
    }
    
 
    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        binglixinxiService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<BinglixinxiEntity> wrapper = new EntityWrapper<BinglixinxiEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}
 
		String tableName = request.getSession().getAttribute("tableName").toString();
		if(tableName.equals("yisheng")) {
			wrapper.eq("yishengzhanghao", (String)request.getSession().getAttribute("username"));
		}
		if(tableName.equals("huanzhe")) {
			wrapper.eq("huanzhezhanghao", (String)request.getSession().getAttribute("username"));
		}
 
		int count = binglixinxiService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
 
 
 
 
 
 
 
}

上传文件

/**
 * 上传文件映射表
 */
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
	@Autowired
    private ConfigService configService;
	/**
	 * 上传文件
	 */
	@RequestMapping("/upload")
	public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
		if (file.isEmpty()) {
			throw new EIException("上传文件不能为空");
		}
		String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
		File path = new File(ResourceUtils.getURL("classpath:static").getPath());
		if(!path.exists()) {
		    path = new File("");
		}
		File upload = new File(path.getAbsolutePath(),"/upload/");
		if(!upload.exists()) {
		    upload.mkdirs();
		}
		String fileName = new Date().getTime()+"."+fileExt;
		File dest = new File(upload.getAbsolutePath()+"/"+fileName);
		file.transferTo(dest);
		/**
  		 * 如果使用idea或者eclipse重启项目,发现之前上传的图片或者文件丢失,将下面一行代码注释打开
   		 * 请将以下的"D:\\springbootq33sd\\src\\main\\resources\\static\\upload"替换成你本地项目的upload路径,
 		 * 并且项目路径不能存在中文、空格等特殊字符
 		 */
//		FileUtils.copyFile(dest, new File("D:\\springbootq33sd\\src\\main\\resources\\static\\upload"+"/"+fileName)); /**修改了路径以后请将该行最前面的//注释去掉**/
		if(StringUtils.isNotBlank(type) && type.equals("1")) {
			ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
			if(configEntity==null) {
				configEntity = new ConfigEntity();
				configEntity.setName("faceFile");
				configEntity.setValue(fileName);
			} else {
				configEntity.setValue(fileName);
			}
			configService.insertOrUpdate(configEntity);
		}
		return R.ok().put("file", fileName);
	}
	
	/**
	 * 下载文件
	 */
	@IgnoreAuth
	@RequestMapping("/download")
	public ResponseEntity<byte[]> download(@RequestParam String fileName) {
		try {
			File path = new File(ResourceUtils.getURL("classpath:static").getPath());
			if(!path.exists()) {
			    path = new File("");
			}
			File upload = new File(path.getAbsolutePath(),"/upload/");
			if(!upload.exists()) {
			    upload.mkdirs();
			}
			File file = new File(upload.getAbsolutePath()+"/"+fileName);
			if(file.exists()){
				/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
					getResponse().sendError(403);
				}*/
				HttpHeaders headers = new HttpHeaders();
			    headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    
			    headers.setContentDispositionFormData("attachment", fileName);    
			    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
			}
		} catch (IOException e) {
			e.printStackTrace();
		}
		return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
	}
	
}

数据库配置

# Tomcat
server:
    tomcat:
        uri-encoding: UTF-8
    port: 8080
    servlet:
        context-path: /springboot7ld2o
 
spring:
    datasource:
        driverClassName: com.mysql.jdbc.Driver
        url: jdbc:mysql://127.0.0.1:3308/springboot7ld2o?useUnicode=true&characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
        username: root
        password: 123456
 
#        driverClassName: com.microsoft.sqlserver.jdbc.SQLServerDriver
#        url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=springboot7ld2o
#        username: sa
#        password: 123456
 
    servlet:
      multipart:
        max-file-size: 300MB
        max-request-size: 300MB
    resources:
      static-locations: classpath:static/,file:static/
 
#mybatis
mybatis-plus:
  mapper-locations: classpath*:mapper/*.xml
  #实体扫描,多个package用逗号或者分号分隔
  typeAliasesPackage: com.entity
  global-config:
    #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
    id-type: 1
    #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
    field-strategy: 1
    #驼峰下划线转换
    db-column-underline: true
    #刷新mapper 调试神器
    refresh-mapper: true
    #逻辑删除配置
    logic-delete-value: -1
    logic-not-delete-value: 0
    #自定义SQL注入器
    sql-injector: com.baomidou.mybatisplus.mapper.LogicSqlInjector
  configuration:
    map-underscore-to-camel-case: true
    cache-enabled: false
    call-setters-on-nulls: true
    #springboot 项目mybatis plus 设置 jdbcTypeForNull (oracle数据库需配置JdbcType.NULL, 默认是Other)
    jdbc-type-for-null: 'null' 

 

 此源码非开源,若需要此源码可扫码添加微信或者qq:2214904953进行咨询!

2600多套项目欢迎咨询

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/598727.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

美易官方:英伟达业绩将难以撑起股价?

美股市场似乎总是对各大公司的业绩表现抱有极大的期待&#xff0c;就像一个永远填不饱的“巨胃”。在这样的市场环境下&#xff0c;即使是业绩骄人的公司也可能难以支撑其股价。英伟达&#xff0c;这家在图形处理单元&#xff08;GPU&#xff09;领域享有盛誉的公司&#xff0c…

翻译《The Old New Thing》 - Double-clicking radio buttons

Double-clicking radio buttons - The Old New Thing (microsoft.com)https://devblogs.microsoft.com/oldnewthing/20050804-10/?p34713 Raymond Chen 在 2005年08月04日 让对话框单选按钮支持双击确定 提示 本文提供了一种让对话框窗口上的控件支持双击确定窗口返回的方法 …

HG-KN73J-S100 三菱伺服电机(750W型)

HG-KN73J-S100属于三菱MR-JE系列伺服系统&#xff0c;可以与伺服驱动器MR-JE-70A、MR-JE-70B、MR-JE-70C配套使用。HG-KN73J-S100完全替换HF-KN73J-S100。HG-KN73J-S100规格、HG-KN73J-S100参数。 HG-KN73J-S100参数说明&#xff1a;MR-JE低惯性/小容量、0.75Kw三菱伺服电机HG-…

【问题解决】关于linux环境下在使用onvif进行网络摄像头扫描发现时soap_send___wsdd__Probe返回-1

【问题背景】 在使用MTK+OPENWRT的方案进行开发时,有一个新需求是需要将检测网络摄像头信息,在使用onvif进行摄像头检测时,发现函数soap_send___wsdd__Probe总是返回-1,导致失败。 但是在编译服务器上使用gcc编译链而不使用交叉编译链时,运行正常,并且可以检测到网络摄像…

Leetcode—933. 最近的请求次数【简单】

2024每日刷题&#xff08;128&#xff09; Leetcode—933. 最近的请求次数 实现代码 class RecentCounter { public:RecentCounter() {}int ping(int t) {q.push(t);while(t - 3000 > q.front()) {q.pop();}return q.size();} private:queue<int> q; };/*** Your Re…

揭秘 IEEE/ACM Trans/CCF/SCI,谁才是科研界的王者?

会议之眼 快讯 在学术探索的浩瀚星海中&#xff0c;每一篇论文都像是一颗璀璨的星辰&#xff0c;而那些被顶级期刊或会议收录的论文&#xff0c;则无疑是最耀眼的几颗。 在众多评价标准中&#xff0c;IEEE/ACM Transactions、CCF推荐期刊和会议、SCI分区期刊&#xff0c;它们…

一、vue3专栏项目 -- 1、项目介绍以及准备工作

这是vue3TS的项目&#xff0c;是一个类似知乎的网站&#xff0c;可以展示专栏和文章的详情&#xff0c;可以登录、注册用户&#xff0c;可以创建、删除、修改文章&#xff0c;可以上传图片等等。 这个项目全部采用Composition API 编写&#xff0c;并且使用了TypeScript&#…

阴影渲染在AI去衣技术中的关键作用

引言&#xff1a; 随着人工智能技术的飞速发展&#xff0c;深度学习在图像处理领域取得了突破性的进展。其中&#xff0c;AI去衣技术作为一种高度复杂的图像到图像的转换过程&#xff0c;不仅要求算法能够精确地识别并处理衣物纹理和结构&#xff0c;还要求生成的结果具有高度的…

进制乘法表(任意进制均可以)

#include <iostream> // 包含输入输出流库 #include <vector> // 包含向量库&#xff0c;未使用&#xff0c;可以删除 #include <string> // 包含字符串库using namespace std; // 使用标准命名空间// 将十进制数转换为P进制形式的字符串 string toBase(…

Mac数据恢复软件快速比较:适用于Macbook的10佳恢复软件

数据丢失导致无数个人和组织每天损失大量资金。更糟糕的是&#xff0c;某些文件具有货币价值和情感意义&#xff0c;使它们不可替代&#xff0c;并使数据恢复成为唯一可行的选择。最好的消息是Mac用户可以从各种数据恢复程序中进行选择。为了帮助您尽可能快速、轻松地恢复丢失的…

品鉴中的音乐搭配:如何为红酒选择合适的音乐伴侣

品鉴红酒时&#xff0c;音乐是一个不可忽视的元素。合适的音乐能够增强红酒的口感&#xff0c;提升品鉴体验。对于云仓酒庄雷盛红酒而言&#xff0c;如何为其选择合适的音乐伴侣&#xff0c;是一个值得探讨的话题。 首先&#xff0c;了解红酒的风格和特点至关重要。云仓酒庄雷…

vin码查询接口快速对接

vin码查询接口全称叫VIN车辆识别代码查询接口&#xff0c;也叫车架号查询接口&#xff0c;指的是通过车辆VIN&#xff08;车架号&#xff09;查询车辆相关信息&#xff0c;如车辆品牌、车型、油耗、车身形式、排量等等。那么vin查询接口如何快速对接呢&#xff0c;接下来我们聊…

ODOO17数据库安全策略一(ODOO17 Database Security Policy I)

ODOO17作为ERP软件&#xff0c;其核心优势在于数据安全。凭借强大的原生安全机制及灵活的配置&#xff0c;确保数据安全无忧&#xff1a; ODOO17, as an ERP software, boasts its significant advantage in exceptional data security performance. It effectively ensures wo…

##06 神经网络训练基础:一步步构建和完善你的第一个模型

文章目录 前言开始之前&#xff1a;理解神经网络的构成第一步&#xff1a;初始化你的网络和数据第二步&#xff1a;选择损失函数和优化器第三步&#xff1a;训练循环第四步&#xff1a;评估模型和调整第五步&#xff1a;迭代改进示例项目&#xff1a;手写数字识别结语 前言 在…

C#简单创建DLL文件并调用

DLL是Dynamic Link Library的缩写&#xff0c;意为动态链接库。动态链接库其实是由编译器将一系列相关的类型编译、链接并封装成一个独立的文件&#xff0c;与对其进行调用的程序分开。这样一个独立的文件相当于程序的一个模块&#xff0c;如果需要对程序进行更新&#xff0c;只…

大模型日报|今日必读的 3 篇大模型论文

大家好&#xff0c;今日必读的大模型论文来啦&#xff01; 1.清华团队提出“智能体医院”&#xff1a;医生智能体可实现自我进化 在这项工作中&#xff0c;来自清华大学的研究团队提出了一种名为“智能体医院”&#xff08;Agent Hospital&#xff09;的模拟医院&#xff0c;…

火山引擎数据飞轮携手美宜佳 探索拓店营销新思路

在刚刚过去的 3 月&#xff0c;美宜佳又交出了门店增长的高分答卷。 最新数据显示&#xff0c;美宜佳在全国的连锁店数已经超过 35000 家&#xff0c;每年净增 3000-4000 家店&#xff0c;月均服务顾客超 2 亿人次&#xff1b;同时&#xff0c;在中国连锁经营协会(CCFA)近日发布…

本机MySQL数据库服务启动了,但是cmd登录不上10061

注意&#xff1a;不建议安装MySQL8&#xff0c;建议直接使用phpstudy中自带的MySQL5.7 错误信息 ERROR 2003 (HY000): Cant connect to MySQL server on x.x.x.x (10061) 原因 可能是端口号错误。比如修改了my.ini中&#xff0c;或者phpstudy中数据库端口的配置&#xff0c;…

PLX82-EIP-61850 主要特点是什么?

PLX82-EIP-61850是一种基于以太网的电力线通信&#xff08;PLC&#xff09;设备&#xff0c;用于在现有的电力线网络上实现数据通信。这种设备通常用于智能电网、智能家居和工业自动化等领域&#xff0c;以实现远程监控和控制功能。 PLX82-EIP-61850的主要特点包括&#xff1a…

小心电子合同这个坑:PS章

近期&#xff0c;我发现网上有很多教程教大家如何自己动手用PS制作电子章&#xff0c; 看似方便&#xff0c;实则危机四伏&#xff01; 通过PS技术&#xff0c;你可以生成任何一家公司的印章&#xff0c; 用以冒充电子章&#xff0c;或打印出来冒充实体章。 甚至还能进行做旧…
最新文章