• 基于SpringBoot医院信息管理系统源码


     hisystem

    1. 用idea打开项目,并且配置maven下载依赖
    2. 导入数据库 hisystem.sql
    3. 修改application.yml数据库相关配置
    4. 用户注册,验证邮件的邮箱考虑到安全问题,暂不提供授权码,如有需求可使用自己邮箱,开启POP3/SMTP服务后,配置到项目里。  

    host: smtp.qq.om

    password:授权码

    username:邮箱

    5. 运行后端项目 `HisystemApplication`启动类
    6. 访问 http://localhost:8090/
    7. 账号:123456@qq.com  密码:123

    源码效果视频:

    【java毕业设计】基于SpringBoot医院信息管理系统源码

     

     

     

    Admin关键代码: 

    1. package com.xgs.hisystem.controller;
    2. import com.xgs.hisystem.pojo.bo.BaseResponse;
    3. import com.xgs.hisystem.pojo.vo.PageRspVO;
    4. import com.xgs.hisystem.pojo.vo.*;
    5. import com.xgs.hisystem.service.IAdminService;
    6. import io.swagger.annotations.Api;
    7. import io.swagger.annotations.ApiImplicitParam;
    8. import io.swagger.annotations.ApiOperation;
    9. import org.springframework.beans.factory.annotation.Autowired;
    10. import org.springframework.validation.annotation.Validated;
    11. import org.springframework.web.bind.annotation.*;
    12. import java.util.List;
    13. /**
    14. * @description:
    15. */
    16. @RestController
    17. @RequestMapping(value = "/admin")
    18. @Api(tags = "管理员操作API")
    19. public class AdminController {
    20. @Autowired
    21. private IAdminService iadminService;
    22. /**
    23. * 新建角色
    24. *
    25. * @param roleVO
    26. * @return
    27. */
    28. @RequestMapping(value = "/createRole", method = RequestMethod.POST)
    29. public BaseResponse<String> createRole(@RequestBody @Validated RoleVO roleVO) {
    30. return iadminService.createRole(roleVO);
    31. }
    32. /**
    33. * 后台添加账户
    34. *
    35. * @param reqVO
    36. * @return
    37. */
    38. @RequestMapping(value = "/adduser", method = RequestMethod.POST)
    39. public BaseResponse<String> saveUserAndSendEmailTemp(@RequestBody @Validated UserRegisterReqVO reqVO) {
    40. return iadminService.saveUserAndSendEmailTemp(reqVO);
    41. }
    42. /**
    43. * 后台添加角色
    44. *
    45. * @param addRoleVO
    46. * @return
    47. */
    48. @RequestMapping(value = "/addRole", method = RequestMethod.POST)
    49. public BaseResponse<String> addRole(@RequestBody @Validated AddRoleVO addRoleVO) {
    50. return iadminService.addRole(addRoleVO);
    51. }
    52. /**
    53. * 获取审核角色
    54. *
    55. * @param
    56. * @return
    57. */
    58. @GetMapping(value = "/getRoleApply")
    59. public PageRspVO<applyRspVO> getRoleApply(BasePageReqVO reqVO) {
    60. return iadminService.getRoleApply(reqVO);
    61. }
    62. /**
    63. * 修改角色状态
    64. *
    65. * @param status
    66. * @param email
    67. */
    68. @PostMapping(value = "/changeRoleStatus")
    69. public void changeRoleStatus(@RequestParam String status, @RequestParam String email) {
    70. iadminService.changeRoleStatus(status, email);
    71. }
    72. /**
    73. * 公告
    74. *
    75. * @param reqVO
    76. * @return
    77. */
    78. @PostMapping(value = "/addAnnouncement")
    79. public BaseResponse<String> addAnnouncement(@RequestBody @Validated AnnouncementVO reqVO) {
    80. return iadminService.addAnnouncement(reqVO);
    81. }
    82. @GetMapping(value = "/getAnnouncement")
    83. public PageRspVO<AnnouncementVO> getAnnouncement(BasePageReqVO reqVO) {
    84. return iadminService.getAnnouncement(reqVO);
    85. }
    86. @PostMapping(value = "/changeAnnouncement")
    87. public BaseResponse<String> changeAnnouncement(@RequestBody @Validated AnnouncementVO announcementVO) {
    88. return iadminService.changeAnnouncement(announcementVO);
    89. }
    90. @PostMapping(value = "/deleteAnnouncement")
    91. public BaseResponse<String> deleteAnnouncement(@RequestParam String id) {
    92. return iadminService.deleteAnnouncement(id);
    93. }
    94. @PostMapping(value = "/showAnnouncement")
    95. public BaseResponse<String> showAnnouncement(@RequestParam String id) {
    96. return iadminService.showAnnouncement(id);
    97. }
    98. @PostMapping(value = "/hiddenAnnouncement")
    99. public BaseResponse<String> hiddenAnnouncement(@RequestParam String id) {
    100. return iadminService.hiddenAnnouncement(id);
    101. }
    102. @PostMapping(value = "/adddepartment")
    103. @ApiOperation(value = "添加科室", httpMethod = "POST", notes = "添加科室")
    104. @ApiImplicitParam(name = "reqVO",value = "添加科室", dataType = "AddDepartmentReqVO")
    105. public BaseResponse<String> addDepartment(@RequestBody @Validated AddDepartmentReqVO reqVO) {
    106. return iadminService.addDepartment(reqVO);
    107. }
    108. @PostMapping(value = "/getDepartment")
    109. @ApiOperation(value = "获取所有科室", httpMethod = "POST", notes = "获取所有科室")
    110. public List<GetDepartmentRspVO> getDepartment() {
    111. return iadminService.getDepartment();
    112. }
    113. }

     

     

     

    1. package com.xgs.hisystem.controller;
    2. import com.xgs.hisystem.config.ServerConfig;
    3. import com.xgs.hisystem.pojo.bo.BaseResponse;
    4. import com.xgs.hisystem.pojo.vo.AnnouncementVO;
    5. import com.xgs.hisystem.pojo.vo.applyRspVO;
    6. import com.xgs.hisystem.service.IAdminService;
    7. import com.xgs.hisystem.service.IUserService;
    8. import io.swagger.annotations.Api;
    9. import org.springframework.beans.factory.annotation.Autowired;
    10. import org.springframework.stereotype.Controller;
    11. import org.springframework.ui.Model;
    12. import org.springframework.web.bind.annotation.GetMapping;
    13. import org.springframework.web.bind.annotation.RequestMapping;
    14. import org.springframework.web.bind.annotation.RequestMethod;
    15. import javax.servlet.http.HttpServletRequest;
    16. import java.text.ParseException;
    17. import java.util.List;
    18. @Controller
    19. @Api(tags = "页面跳转")
    20. public class PageController {
    21. @Autowired
    22. private IUserService iUserService;
    23. @Autowired
    24. private IAdminService iAdminService;
    25. @Autowired
    26. private ServerConfig serverConfig;
    27. @GetMapping(value = "/")
    28. public String login() {
    29. return "login";
    30. }
    31. /**
    32. * 主页
    33. *
    34. * @param model
    35. * @return
    36. */
    37. @GetMapping(value = "/main")
    38. public String main(Model model) {
    39. return "main";
    40. }
    41. /**
    42. * 邮件发送成功
    43. *
    44. * @param request
    45. * @param model
    46. * @return
    47. */
    48. @GetMapping(value = "/fmail")
    49. public String fmail(HttpServletRequest request, Model model) {
    50. String email = request.getParameter("email");
    51. model.addAttribute("email", email);
    52. model.addAttribute("url", serverConfig.getUrl());
    53. return "email/fmail";
    54. }
    55. /**
    56. * 激活用户状态
    57. *
    58. * @param email
    59. * @param validateCode
    60. * @return
    61. * @throws ParseException
    62. */
    63. @RequestMapping(value = "/activation", method = RequestMethod.GET)
    64. public String activation(String email, String validateCode, Model model) throws ParseException {
    65. BaseResponse baseResponse = iUserService.activation(email, validateCode);
    66. model.addAttribute("url", serverConfig.getUrl());
    67. if (baseResponse.getStatus() == 1) {
    68. return "email/dmail";
    69. } else {
    70. return "error";
    71. }
    72. }
    73. @GetMapping(value = "/accountset")
    74. public String accountSet() {
    75. return "accountset";
    76. }
    77. @GetMapping("/toApply")
    78. public String toApply() {
    79. return "/admin/roleApply";
    80. }
    81. @GetMapping(value = "/register")
    82. public String getUserID() {
    83. return "register/register";
    84. }
    85. /**
    86. * 导航栏通知数量显示,角色审核
    87. *
    88. * @param model
    89. * @return
    90. */
    91. @GetMapping(value = "/getRoleNotice")
    92. public String getRoleNotice(Model model) {
    93. List applyRspList = iAdminService.getRoleNotice();
    94. model.addAttribute("applyRspList", applyRspList);
    95. return "common/common_head::notice";
    96. }
    97. @GetMapping(value = "/toUserinfo")
    98. public String toUserinfo() {
    99. return "userInfo";
    100. }
    101. @GetMapping(value = "/announcement")
    102. public String announcement() {
    103. return "admin/announcement";
    104. }
    105. /**
    106. * 首页公告显示
    107. *
    108. * @param model
    109. * @return
    110. */
    111. @GetMapping(value = "/annDisplay")
    112. public String annDisplay(Model model) {
    113. List annList = iUserService.annDisplay();
    114. model.addAttribute("annList", annList);
    115. return "main::ann";
    116. }
    117. /**
    118. * 获取当前用户所有角色
    119. *
    120. * @param model
    121. * @return
    122. */
    123. @GetMapping(value = "/getAccountRole")
    124. public String getAccountRole(Model model) {
    125. List accountRoleList = iUserService.getAccountRole();
    126. model.addAttribute("accountRole", accountRoleList);
    127. return "accountset::accountRole";
    128. }
    129. @GetMapping(value = "/registerRecord")
    130. public String registerRecord() {
    131. return "register/registerRecord";
    132. }
    133. @GetMapping(value = "/outpatient")
    134. public String outpatient() {
    135. return "outpatient/outpatient";
    136. }
    137. @GetMapping(value = "/storageManage")
    138. public String storageManage() {
    139. return "drugStore/storageManage";
    140. }
    141. @GetMapping(value = "/outpatientToll")
    142. public String outpatientToll() {
    143. return "toll/outpatientToll";
    144. }
    145. @GetMapping(value = "/examinationToll")
    146. public String examinationToll() {
    147. return "toll/examinationToll";
    148. }
    149. @GetMapping(value = "/takingdrug")
    150. public String takingdrug() {
    151. return "takingdrug/takingdrug";
    152. }
    153. @GetMapping(value = "/medicalExamination")
    154. public String medicalExamination() {
    155. return "medicalExamination/medicalExamination";
    156. }
    157. @GetMapping(value = "/drugManage")
    158. public String drugManage() {
    159. return "drugStore/drugManage";
    160. }
    161. @GetMapping(value = "/medicalRecord")
    162. public String medicalRecord() {
    163. return "outpatient/medicalRecord";
    164. }
    165. }

     

     

     

    1. package com.xgs.hisystem.controller;
    2. import com.xgs.hisystem.pojo.bo.BaseResponse;
    3. import com.xgs.hisystem.pojo.vo.outpatient.*;
    4. import com.xgs.hisystem.pojo.vo.register.GetCardIdInforReqVO;
    5. import com.xgs.hisystem.service.IOutpatientService;
    6. import io.swagger.annotations.Api;
    7. import io.swagger.annotations.ApiOperation;
    8. import org.springframework.beans.factory.annotation.Autowired;
    9. import org.springframework.validation.annotation.Validated;
    10. import org.springframework.web.bind.annotation.*;
    11. import java.util.List;
    12. @RestController
    13. @RequestMapping(value = "/outpatient")
    14. @Api(tags = "门诊管理API")
    15. public class OutpatientController {
    16. @Autowired
    17. private IOutpatientService iOutpatientService;
    18. /**
    19. * 读取就诊卡,获取病人信息
    20. *
    21. * @return
    22. */
    23. @PostMapping(value = "/getCardIdInfor")
    24. public PatientInforRspVO getCardIdInfor(@RequestBody GetCardIdInforReqVO reqVO) throws Exception {
    25. return iOutpatientService.getCardIdInfor(reqVO);
    26. }
    27. /**
    28. * 修改患者基础信息
    29. *
    30. * @param reqVO
    31. * @return
    32. */
    33. @PostMapping(value = "/changePatientInfor")
    34. public BaseResponse<String> changePatientInfor(@RequestBody OtherPatientInforReqVO reqVO) {
    35. return iOutpatientService.changePatientInfor(reqVO);
    36. }
    37. /**
    38. * 就诊,稍后处理
    39. *
    40. * @param reqVO
    41. * @return
    42. */
    43. @PostMapping(value = "/ProcessLaterMedicalRecord")
    44. public BaseResponse<String> processLaterMedicalRecord(@RequestBody MedicalRecordReqVO reqVO) {
    45. return iOutpatientService.processLaterMedicalRecord(reqVO);
    46. }
    47. /**
    48. * 从稍后处理恢复到队列
    49. *
    50. * @param registerId
    51. * @return
    52. */
    53. @PostMapping(value = "/restorePatientInfor")
    54. public PatientInforRspVO restorePatientInfor(@RequestParam String registerId) throws Exception {
    55. return iOutpatientService.restorePatientInfor(registerId);
    56. }
    57. /**
    58. * 所有药品名
    59. *
    60. * @return
    61. */
    62. @PostMapping(value = "/getAllDrug")
    63. public List<String> getAllDrug() {
    64. return iOutpatientService.getAllDrug();
    65. }
    66. /**
    67. * 单个药品规格
    68. *
    69. * @param drug
    70. * @return
    71. */
    72. @PostMapping(value = "/getDrugInfor")
    73. public DrugRspVO getDrugInfor(String drug) {
    74. return iOutpatientService.getDrugInfor(drug);
    75. }
    76. /**
    77. * 就诊完成,保存病历
    78. *
    79. * @param reqVO
    80. * @return
    81. */
    82. @PostMapping(value = "/addMedicalRecord")
    83. public BaseResponse<String> addMedicalRecord(@RequestBody @Validated MedicalRecordReqVO reqVO) {
    84. return iOutpatientService.addMedicalRecord(reqVO);
    85. }
    86. /**
    87. * 就诊获取体检信息
    88. *
    89. * @param prescriptionNum
    90. * @return
    91. */
    92. @PostMapping(value = "/getMedicalExamination")
    93. public medicalExaminationInfoRspVO getMedicalExamination(@RequestParam String prescriptionNum) {
    94. return iOutpatientService.getMedicalExamination(prescriptionNum);
    95. }
    96. @PostMapping(value = "/getalloutpatientqueue")
    97. @ApiOperation(value = "获取当前医生下所有门诊队列患者", httpMethod = "POST", notes = "获取当前医生下所有门诊队列患者")
    98. public List<GetAllOutpatientQueueRspVO> getAllOutpatientQueue() {
    99. return iOutpatientService.getAllOutpatientQueue();
    100. }
    101. }

  • 相关阅读:
    HttpClient / Http客户端
    【自动驾驶】路径规划—— Dubins 曲线推导(基于向量的方法)
    js正则表达式匹配特殊字符
    Vuex 和 Redux 的区别?
    前端导入导出
    【网络工程】计算机网络专业术语概述全面整理
    计算机组成原理(一)系统概论
    .NET餐厅管理系统sql数据帮助类执行SQL返回DataReader数据集、执行SQL语句,返回影响的记录数、执行多条SQL语句,实现数据库事务。
    成功解决 java.lang.NumberFormatException
    Android开发自定义实现炫酷的进度条
  • 原文地址:https://blog.csdn.net/weixin_46437112/article/details/128120455