java design springcloud design and implementation of medical seeking and medicine seeking system based on Netty

Welcome to like, collect, follow and comment. Due to limited space, only part of the core code is shown.

Article directory

  • Preface
  • 1. Project introduction
  • 2. Development environment
  • 3. Function introduction
    • Database design overview
  • 4. Core code
  • 5. Effect drawing
  • 6. Article Table of Contents

Foreword

This paper mainly discusses how to use JAVA language to develop a system platform for seeking medical treatment and asking for medicine. This system will strictly follow the software development process to carry out work at each stage, using B/S architecture and object-oriented programming ideas for project development. In the introduction, the author will discuss the current background of the medical-seeking and medicine-seeking system platform and the purpose of system development. Subsequent chapters will strictly follow the software development process to analyze and design the system at each stage.
Through the smart medical consultation system, patients can seek medical treatment at the nearest hospital no matter where they are, enjoy the fastest and best medical methods, ensure timely medical treatment, eliminate the need to queue up for registration, choose a doctor, and intuitively see the diagnosis certificate and public information solution. At the same time, it will also liberate hospital staff from tedious and boring writing work. They can obtain the latest information on all aspects of the hospital in a timely and accurate manner so as to adjust their work status and concentrate on solving the patient’s condition. The hospital will also greatly reduce costs and improve the work efficiency and level of the entire hospital, making the hospital no longer just a place for medical treatment, but also a service institution for the public to consult and provide health care.

1. Project introduction

There are still many problems in my country’s medical care: the uneven distribution of medical resources, the lack of medical and health resources, and the vast majority of medical resources concentrated in big cities. The extremely uneven distribution of resources makes medical care a difficult problem. The low level of medical services in urban and rural areas has resulted in hospitals in big cities being very crowded, while small community clinics are deserted. The medical field is very complex, and my country’s medical care is seriously lacking in design and planning, resulting in more than 90% of medical information systems being unable to achieve interconnection. The phenomenon of “information chimneys” and “information islands” is very serious. “Smart medical” systems in the medical field It is related to the health of the whole people. The use of advanced information technology to change the current uneven distribution of medical resources in my country is difficult. In the era of interconnection, the use of networks is deeply rooted in the hearts of the people. It also provides a broad space for the expansion of applications in the medical field and is convenient for the public. , conducive to the development of the medical industry.
With the development of social economy and the improvement of people’s living standards, people’s demand for medical services continues to grow. Many countries around the world are using information technology to support corresponding medical system reforms. The establishment of a medical seeking and seeking medicine system can Clarify the functions of each department in the hospital, carry out intelligent and timely response, preliminary analysis of the condition, department-oriented diversion, and good patient information management, etc., and use information technology to achieve functional differentiation of the hospital and cooperation among various departments. Medical integration aims to use the Internet and information technology to improve disease prevention, treatment and research, effectively combine medical consultation and medical management systems, achieve a truly integrated consultant, and optimize the traditional cumbersome process of seeking medical advice. , it is of great significance for hospitals to build medical information systems.

2. Development environment

Development language: Java
Framework: springcloud
JDK version: JDK1.8
Server: tomcat7
Database: mysql
Database tool: Navicat11
Development software: eclipse/myeclipse/idea
Maven package: Maven
—————-

3. Function introduction

Based on actual needs, we have designed the following functions for this system, which mainly include the following function templates.
(1) Front desk functions: homepage, doctor, message board, backend management, online consultation, personal center.
(2) User functions: home page, personal center, doctor appointment management, medical record diagnosis management, and prescription management.
(3) Doctor functions: homepage, personal center, doctor appointment management, medical record diagnosis management, and prescription management.
(4) Administrator functions: home page, personal center, user management, doctor management, department management, drug information management, appointment doctor management, medical record diagnosis management, medication prescribing management, message board management, and system management.
In terms of the functional design of the system, the design goal of the medical-seeking and medicine-seeking system is to facilitate people to consult doctors and purchase medicines. Therefore, basic use cases that meet the basic business needs of administrators and users are extracted, as shown in Figures 3-1 and 3-2. Show.

Figure 3-1 Administrator function use case diagram

Figure 3-2 User function use case diagram

When designing this system, the detailed functions are determined. These functions are mainly obtained through research and analysis in the demand stage. The specific functional modules are as shown in the figure below, as shown in Figure 4-1.

Figure 4-1 System structure diagram

Database design overview

Database design is an important step in development. You need to design the overall table first and determine the project. You must determine a few tables, design the structure of the tables, the relationships between tables, etc. Only in this way can the stability of the system be ensured. . The database is mainly used to store the data of the entire project and ensure data security. The entire table contains various fields and attributes of the entities in the project. We usually use a conceptual model to design it, which is the E-R model.

4. Core code

Part of the code:

package com.example.controller;

import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.SecureUtil;
import com.example.common.Result;
import com.example.common.ResultCode;
import com.example.entity.Caiwu;
import com.example.exception.CustomException;
import com.example.service.CaiwuService;
import com.example.utils.MapWrapperUtils;
import com.example.utils.jwt.JwtUtil;
import com.example.vo.CaiwuVo;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping(value = "/caiwu")
public class CaiwuController {<!-- -->

    @Resource
    private CaiwuService caiwuService;

    @PostMapping
    public Result<Caiwu> add(@RequestBody CaiwuVo caiwu) {<!-- -->
        caiwuService.add(caiwu);
           return Result.success(caiwu);
    }
\t
\t

    @PostMapping("/deleteList")
    public Result<Caiwu> deleteList(@RequestBody CaiwuVo caiwu) {<!-- -->
        caiwuService.deleteList(caiwu.getList());
        return Result.success();
    }

    @DeleteMapping("/{id}")
    public Result delete(@PathVariable Long id) {<!-- -->
        caiwuService.delete(id);
        return Result.success();
    }

    @PutMapping
    public Result update(@RequestBody CaiwuVo caiwu) {<!-- -->
        caiwuService.update(caiwu);
        return Result.success();
    }

    @GetMapping("/{id}")
    public Result<Caiwu> detail(@PathVariable Integer id) {<!-- -->
        Caiwu caiwu = caiwuService.findById(id);
        return Result.success(caiwu);
    }

    @GetMapping
    public Result<List<Caiwu>> all() {<!-- -->
        return Result.success(caiwuService.list());
    }

    @PostMapping("/page")
    public Result<CaiwuVo> page(@RequestBody CaiwuVo caiwuVo) {<!-- -->
        return Result.success(caiwuService.findPage(caiwuVo));
    }
@PostMapping("/login")
    public Result login(@RequestBody Caiwu caiwu, HttpServletRequest request) {<!-- -->
        if (StrUtil.isBlank(caiwu.getZhanghao()) || StrUtil.isBlank(caiwu.getMima())) {<!-- -->
            throw new CustomException(ResultCode.PARAM_LOST_ERROR);
        }
        Caiwu login = caiwuService.login(caiwu);
// if(!login.getStatus()){<!-- -->
// return Result.error("1001","Status restriction, unable to log in to the system");
// }
        if(login != null) {<!-- -->
            HashMap hashMap = new HashMap();
            hashMap.put("user", login);
            Map<String, Object> map = MapWrapperUtils.builder(MapWrapperUtils.KEY_USER_ID,caiwu.getId());
            String token = JwtUtil.creatToken(map);
            hashMap.put("token", token);
            return Result.success(hashMap);
        }else {<!-- -->
            return Result.error();
        }
    }
    @PutMapping("/updatePassword")
    public Result updatePassword(@RequestBody Caiwu info, HttpServletRequest request) {<!-- -->
        Caiwu caiwu = caiwuService.findById(info.getId());
        String oldPassword = SecureUtil.md5(info.getMima());
        if (!oldPassword.equals(caiwu.getMima())) {<!-- -->
            return Result.error(ResultCode.PARAM_PASSWORD_ERROR.code, ResultCode.PARAM_PASSWORD_ERROR.msg);
        }
        info.setMima(SecureUtil.md5(info.getNewPassword()));
        Caiwu caiwu1 = new Caiwu();
        BeanUtils.copyProperties(info, caiwu1);
        caiwuService.update(caiwu1);
        return Result.success();
    }
}

5. Renderings

Please add an image description

Please add a picture description
Please add an image description
Please add image description
Please add image description

6. Article directory

Table of contents
1Introduction 1
1.1 Background of project research 1
1.2 Research status 1
1.3 Development significance 1
1.4 Project research content and structure 2
2Introduction to Development Technology 3
2.1 B/S architecture 3
2.2 Java language 3
2.3 SSM framework 3
2.4 Introduction to MySQL 4
2.5 MySQL environment configuration 5
3 System Analysis 5
3.1 Feasibility analysis 5
3.1.1 Technical feasibility 6
3.1.2 Operational feasibility 6
3.1.3 Economic feasibility 6
3.2 Performance requirements analysis 6
3.3 Functional analysis 7
3.4 Process Analysis 8
3.4.1 User management process 9
3.4.2 Personal Center Management Process 10
3.4.3 Login process 10
4System Design 11
4.1 Software function module design 11
4.2 Database design 11
4.2.1 Concept model design 11
4.2.2 Database logical structure design 13
4.2.3 Physical model design 13
5 system detailed design 16
5.1 Login 16
5.2 Administrator function module 17
5.2.1 Administrator interface 17
5.2.2 User management 17
5.2.3 Schedule classification management 18
5.2.4 Personal schedule management 18
5.2.5 System Management 19
6 System Test 20
7Summary and experience 21
7.1 Summary 21
7.2 Experience 21
Reference 23
Acknowledgments 24