Java项目:springboot医院管理系统

作者主页:夜未央5788

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

项目介绍

医院管理系统,分为管理员、医生、病人三种角色;

管理员主要功能包括:
首页、系统管理:医生管理、患者管理、药品管理;预约管理;病史管理;住院信息管理;管理员用户管理;
医生主要功能包括:首页、就医/查看病史;

病人主要功能包括:首页、病史、住院信息、挂号;

环境需要

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.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 

6.数据库:MySql 5.7版本;

技术栈

1. 后端:SpringBoot

2. 前端:Layui+Freemaker

使用说明

1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;

2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;

若为maven项目,导入成功后请执行maven clean;maven install命令

3. 将项目中application.yml配置文件中的数据库配置改为自己的配置,配置tomcat,然后运行;

4. 运行项目,输入http://localhost:8088 登录

运行截图

 

 

 

 

 

 

 

 代码相关

预约管理控制器

@Controller
public class AppointmentController {
    @Autowired
    AppointmentService appointmentService;
    @Autowired
    DoctorService doctorService;
    @Autowired
    PatientService patientService;
    @RequestMapping("/admin/appointmentManage")
    public String appointmentManage(HttpServletRequest request,@RequestParam(value = "doctorname",required = false)String doctorname,@RequestParam(value = "patientname",required = false)String patientname){
        List<Appointment> appointmentList=appointmentService.getAllAppointments(doctorname,patientname);
        request.setAttribute("appointments" ,appointmentList);
        return"admin/appointmentManage";
    }
    @RequestMapping("/admin/appointmentAdd")
    public String appointmentAddPage(HttpServletRequest request){
        request.setAttribute("patients",patientService.getAllPatients());
        //request.setAttribute("doctors",doctorService.getAllDoctor());
        return"admin/add/appointmentadd";
    }
    @RequestMapping(value = "/admin/appointment/{id}",method = RequestMethod.DELETE)
    @ResponseBody
    public JSONObject delAppointment(@PathVariable Integer id){
        JSONObject json=new JSONObject();
        json.put("message",appointmentService.delAppointment(id));
        return json;
    }
    @RequestMapping(value = "/admin/appointment/{id}",method = RequestMethod.GET)
    public String AppointmentInfo(@PathVariable Integer id,HttpServletRequest request){
        request.setAttribute("patients",patientService.getAllPatients());
        request.setAttribute("doctors",doctorService.getAllDoctor());
        request.setAttribute("appointment",appointmentService.getAppointment(id));
        return "admin/info/appointmentInfo";
    }
    @RequestMapping(value = "/admin/appointment",method = RequestMethod.PUT)
    @ResponseBody
    public JSONObject AppointmentUpdate(@RequestBody Appointment appointment){
        JSONObject json=new JSONObject();
        json.put("message",appointmentService.UpdateAppointment(appointment));
        return json;
    }
    @RequestMapping(value = "/admin/appointment",method = RequestMethod.POST)
    @ResponseBody
    public JSONObject AppointmentAdd(@RequestBody Appointment appointment){
        System.out.println(appointment);
        JSONObject json=new JSONObject();
        json.put("message",appointmentService.addAppointment(appointment));
        return json;
    }
}

医生管理控制器

@Controller
public class DoctorController {
    @Autowired
    DoctorService doctorService;
    @Autowired
    AppointmentService appointmentService;
    @Autowired
    PatientService patientService;
    @Autowired
    DrugsService drugsService;
    @Autowired
    HospitalizationService hospitalizationService;
    @Autowired
    MedicalhistoryService medicalhistoryService;
    @RequestMapping("/admin/doctorManage")
    public String doctorManage(HttpServletRequest request,@RequestParam(value="name",required = false) String name,@RequestParam(value="certId",required = false) String certId){
        request.setAttribute("doctors",doctorService.getAllDoctor(name,certId));
        return "admin/doctorManage";
    }
    @RequestMapping(value = "/admin/doctor/{id}",method = RequestMethod.DELETE)
    @ResponseBody
    public JSONObject delDoctor(@PathVariable Integer id){
        JSONObject json=new JSONObject();
        json.put("message",doctorService.delDoctor(id));
        return json;
    }
    @RequestMapping(value = "/admin/doctor/{id}",method = RequestMethod.GET)
    public String doctorInfo(@PathVariable Integer id,HttpServletRequest request){
        request.setAttribute("doctor",doctorService.getDoctor(id));
        return "admin/info/doctorinfo";
    }
    @RequestMapping(value = "/admin/doctor",method = RequestMethod.POST)
    @ResponseBody
    public JSONObject AddDoctor(@RequestBody Doctor doctor){
        JSONObject json=new JSONObject();
        json.put("message",doctorService.addDoctor(doctor));
        return json;
    }
    @RequestMapping(value = "/admin/doctor",method = RequestMethod.PUT)
    @ResponseBody
    public JSONObject updateDoctor(@RequestBody Doctor doctor){
        JSONObject json=new JSONObject();
        json.put("message",doctorService.upDoctor(doctor));
        return json;
    }
    @RequestMapping("/admin/doctorAdd")
    public String doctorAddPage(){
        return "admin/add/doctoradd";
    }

    @RequestMapping("/doctor/seekMedicalAdvice")
    public String seekMedicalAdvice(HttpServletRequest request, HttpSession session,@RequestParam(value = "patientname",required = false)String patientname,@RequestParam(value = "time",required = false)String time){
        Login login=(Login)session.getAttribute("login");
        Doctor doctor=doctorService.getDoctorByLoginId(login.getId());
        request.setAttribute("appointments" ,appointmentService.selectByDoctorId(doctor.getId(),patientname,time));
        return "doctor/seekMedicalAdvice";
    }
    @RequestMapping("/doctor/seek/{id}")
    public String seek(@PathVariable Integer id,HttpServletRequest request){
        request.setAttribute("patient",patientService.getPatient(id));
        request.setAttribute("drugs",drugsService.getAllDrugs());
        return "doctor/seek";
    }
    @RequestMapping(value = "/doctor/drug",method = RequestMethod.PUT)
    @ResponseBody
    public JSONObject drug(@RequestBody Map map){
        JSONObject json=new JSONObject();
        Patient patient=new Patient();
        System.out.println(map);
        patient.setDrugsids(DrugsUtils.vaild(map));
        patient.setId(Integer.parseInt((String)map.get("patientid")));
        json.put("message",patientService.seek(patient));
        return json;
    }
    @RequestMapping(value = "/doctor/zation",method = RequestMethod.POST)
    @ResponseBody
    public JSONObject zation(@RequestBody Hospitalization hospitalization){
        JSONObject json=new JSONObject();
        json.put("message",hospitalizationService.AddHospitalization(hospitalization));
        return json;
    }
    @RequestMapping(value = "/doctor/medicalhistory/{id}")
    public String medicalhistory(@PathVariable Integer id,HttpServletRequest request){
        request.setAttribute("medicalhistorys",medicalhistoryService.getMedicalhistoryByPatientId(id));
        return "doctor/medicalhistory";
    }

    @RequestMapping( value = "/doctor/{department}",method = RequestMethod.GET)
    @ResponseBody
    public JSONObject getDoctorByDepartment(@PathVariable String department){
        JSONObject json=new JSONObject();
        json.put("doctors",doctorService.getDoctorByDepartment(department));
        return json;
    }

}

药品管理控制器

@Controller
public class MedicalhistoryController {
    @Autowired
    PatientService patientService;
    @Autowired
    MedicalhistoryService medicalhistoryService;
    @RequestMapping("/admin/medicalhistoryManage")
    public String medicalhistoryManage(HttpServletRequest request,@RequestParam(value = "doctorname",required = false)String doctorname,@RequestParam(value = "patientname",required = false)String patientname){
        request.setAttribute("medicalhistorys",medicalhistoryService.getAllMedicalhistorys(doctorname,patientname));
        return "admin/medicalhistoryManage";
    }
    @RequestMapping("/admin/medicalhistoryAdd")
    public String medicalhistoryAddPage(HttpServletRequest request){
        request.setAttribute("patients",patientService.getAllPatients());
        return"admin/add/medicalhistoryadd";
    }
    @RequestMapping(value = "/admin/medicalhistory/{id}",method = RequestMethod.DELETE)
    @ResponseBody
    public JSONObject delmedicalhistory(@PathVariable Integer id){
        JSONObject json=new JSONObject();
        json.put("message",medicalhistoryService.delMedicalhistory(id));
        return json;
    }
    @RequestMapping(value = "/admin/medicalhistory/{id}",method = RequestMethod.GET)
    public String medicalhistoryInfo(@PathVariable Integer id,HttpServletRequest request){
        request.setAttribute("patients",patientService.getAllPatients());
        request.setAttribute("medicalhistory",medicalhistoryService.getMedicalhistory(id));
        return "admin/info/medicalhistoryInfo";
    }
    @RequestMapping(value = "/admin/medicalhistory",method = RequestMethod.PUT)
    @ResponseBody
    public JSONObject medicalhistoryUpdate(@RequestBody Medicalhistory medicalhistory){
        JSONObject json=new JSONObject();
        json.put("message",medicalhistoryService.UpdateMedicalhistory(medicalhistory));
        return json;
    }
    @RequestMapping(value = "/admin/medicalhistory",method = RequestMethod.POST)
    @ResponseBody
    public JSONObject medicalhistoryAdd(@RequestBody Medicalhistory medicalhistory){
        System.out.println(medicalhistory);
        JSONObject json=new JSONObject();
        json.put("message",medicalhistoryService.addMedicalhistory(medicalhistory));
        return json;
    }
}

如果也想学习本系统,下面领取。回复:052springboot

一、项目简述 功能:该项目是用springboot+layui+shiro写的医院管理系 统,该系统的业务比较复杂,数据库一共有36张表。 项目分为门诊管理、住院管理、系统管理、统计管理、数 据中心、排班管理、仓库管理、药房管理 本系统重点是门诊和住院管理 填写患者的详细信息,如姓名,年龄、手机号、性别、身 份证号、选择科室挂号类型医生、会出来相对的挂号费, 点击提交的时候会判断你输入的各项信息是否正确,如果 该手机号或者该身份证号正在就诊,则会提示该手机号或 者该身份证号正在就诊。挂号页面会根据单选按钮来查询 全部的挂号,当天的挂号和预细勺挂号,并且可以针对当 天的挂号去给用户进行一系列操作,如转入住院,如果该 病人有正在进行的项目则不能转入住院,需要把相关费用 交完后才能转入住院 门诊管理的功能: 用户挂号、处方划价、项目划价、项目缴费、项目检查、 药品缴费、门诊患者库 住院管理的功能: 入院登记、缴费管理、药品记账、项目记账、出院结算 系统管理功能: 菜单管理、角色管理、用户管理、图标管理、数据源监控 管理,其中数据源的登陆账号和密码是:admin/admin 统计管理: 门诊月度统计、住院月度统计、门诊年度统计、住院年度 统计、医生统计、门诊当天统计 数据中心 科室中心管理、医生列表管理、药品产地管理、项目大类 管理、挂号类型管理、仓库管理、经办人管理、供货商管 理、药品分类管理、药品字典管理 排班: 医生排班U里 仓库管理: 入库单管理、库存查询、出库单管理、操作记录管理等 药房管理: 药房详情管理、门诊取药管理、住院取药管理 二、项目运行 环境配置: Jdk1.8 + Tomcat8.5 + mysql + Eclispe (IntelliJ IDEA,Eclispe,MyEclispe,Sts 都支持) 项目技术: JSP +Springboot+ SpringMVC + MyBatis + html+ css + JavaScript + JQuery + Ajax + Layui+ maven等等
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

夜未央5788

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值