SSM-based inpatient monitoring and early warning information management system graduation design - with source code 021054

 SSM-based detection and early warning information management system for inpatients

Summary

The main functional modules of the inpatient detection and early warning information management system include: doctor work arrangement management, hospital bed management, admission information management, discharge information management, drug management, user balance, payment details management, etc., adopting an object-oriented development model for software development The development and hardware installation can well meet the needs of actual use, and the corresponding software installation and program coding work has been improved. MySQL is used as the main storage unit for background data, and ssm framework, Java technology, and Ajax technology are used for business The coding and development of the system have realized all the functions of the system. This report first analyzes the background, function and significance of the research, laying the foundation for the rationality of the research work. Analyze the requirements and technical problems of the inpatient detection and early warning information management system, prove the necessity and technical feasibility of the system, and then make a basic introduction to the technical software and design ideas that need to be used in the design system, and finally implement Inpatient detection and early warning information management system and deployment operation using it.

Key words: early warning information management; ssm framework; database

Inpatient detection and early warning information management system

Abstract

The main functional modules of the inpatient detection and early warning information management system include: doctor work arrangement management, hospital bed management, admission information management, discharge information management, drug management, user balance, payment details management, etc. the object-oriented development mode is adopted for software development and hardware erection, which can well meet the needs of actual use and improve the corresponding software erection and program coding, MySQL is used as the main storage unit of background data, and SSM framework, Java technology and Ajax technology are used to code and develop the business system, which realizes all the functions of the system. This report first analyzes the background, function and significance of the research, which lays a foundation for the rationality of the research work. This paper analyzes the various requirements and technical problems of the inpatient detection, detection and early warning information management system, proves the necessity and technical feasibility of the system, then introduces the technical software and design idea needed to design the system, and finally realizes the inpatient detection, detection and early warning information management system and deploys it.

Key words: Early warning information management; SSM framework; database

Table of contents

Chapter 1 Introduction

1.1  Research Background

1.2 Research content 

1.3  The structure of the thesis

Chapter 2 Introduction of Development Tools and Related Technologies

2.1  HTTP protocol

2.2  Java language and JDK development environment

2.3 SSM framework

2.4 Mysql database

Chapter 3 System Analysis

3.1  Feasibility analysis

3.1.1  Economic feasibility

3.1.2  Technical Feasibility

3.1.3  Operation Feasibility

3.2  Performance Analysis  

3.3  System operation process

3.3.1 User login process 9

3.3.2 Information adding process 10

3.3.3 Information deletion process 10

Chapter 4 System Design

4.1 System architecture design

4.2 Development process design

4.3 Database Design 1 2

4.3.1 Entity ER Diagram

4.3.2 Data Table 1 3

Chapter 5 System Implementation 1 7

5.1 Realization of database access layer 1 7

5.2 Realization of registration module 2 0

5. 3 Realization of user login module 2 3

5. 4 Realization of user data modification module 2 4

5.5 Realization of hospital bed module 2 8

5. 6 Realization of doctor management module 3 1

5.7 Department management module 3 3

5. 8 Realization of drug management module 3  4

5.9 Realization of hospital bed management module 3  4

Chapter 6 System Testing 3 5

6.1   Test purpose 3 5

6.2  Test scheme design 3 5

6.2.1 Testing strategy 3 5

6.2.2 Test Analysis 3 5

6. 3 Test results 3 6

Chapter 7 Summary and Outlook 3 7

References 3 8

Thanks 4 0

  1. introduction
    1. research background and meaning

Use the existing information system in the hospital to establish an inpatient detection and early warning information management system to carry out early warning and monitoring of the daily nursing risks of inpatients to reduce the occurrence of risk defects. Use the hospital computer network to establish a patient detection and early warning information management system to collect and input information, determine the detection and early warning indicators of inpatients and assign them values. At present, most hospitals in our country already have their own HIS, but the information of these hospitals has not been well integrated, which cannot meet the needs of hospital managers for decision-making. However, most of the existing systems are only designed for a certain aspect or a certain aspect of business, lacking a comprehensive understanding of the overall situation of the hospital, and unable to truly realize the automation and intelligence of the hospital's inpatient information management. Therefore, how to make full use of limited resources to improve management efficiency has become an urgent problem to be solved. In order to better accomplish the above tasks, we must transform the original information system. Based on the actual situation of our hospital, this paper designs a set of inpatient detection and early warning information management system based on SSM. Further improvement of hospital management level.

    1. research content

The development and implementation of the inpatient detection and early warning information management system, the required work content:

(1) First of all, determine the topic, determine the system to be built, and conduct a preliminary systematic confirmation of the background of the system and some problems currently facing it.

(2) After the system confirmation is completed, confirm the technology used in system development in combination with the requirements of system development. The development of the inpatient detection and early warning information management system uses the SSM framework, and the database is used to build and develop the platform, and the technology used is confirmed for technical analysis. , Whether the technology used can complete the realization of the system.

(3) Determine the technology used by the system, confirm the user roles divided by the system online, and determine the functional modules to be designed according to the division of user roles. The design of the inpatient detection and early warning information management system is mainly divided into administrators and users. Roles, and the functional modules used are also different, but the content of the system database is interactive, users can query information at any time according to their own needs, and system staff can process online information according to their assigned content. Operation, the administrator obtains the detailed data information of all users, and handles it as soon as possible according to the needs.

(4) Design the program and interface after the functional modules of the system are confirmed. The test method finds out the loopholes in the program, and solves the loopholes in the program online. If there is no problem in the test system, the system can be uploaded for formal operation.

    1. Thesis structure

According to the information data obtained from the market research, combined with the current research situation, and using the relevant system development and design methods, the inpatient detection and early warning information management system is finally designed.

There are seven chapters in this paper, as follows.

The first chapter outlines the research purpose and significance of the inpatient detection and early warning information management system; it summarizes the domestic and foreign research situation and future research trends concisely, and finally gives the composition structure of the thesis.

The second chapter gives a brief overview of the development techniques and tools used in this paper.

The third chapter briefly analyzes the needs and feasibility of each business process of the system.

The fourth chapter designs the management system of inpatient detection and early warning information.

The fifth chapter implements the inpatient detection and early warning information management system, and posts the screenshots of the relevant pages, and describes the operation method of the specific function realization in language.

The sixth chapter uses test cases to test some main functional modules of the inpatient detection and early warning information management system, and finally obtains the test results.

Chapter 7 summarizes the full text and makes an outlook on future research.

  1. Introduction to development tools and related technologies
    1. HTTP protocol

The Hypertext Transfer Protocol (HTTP) is a collaborative and distributed communication protocol that presupposes the exchange of information on the World Wide Web. HTTP is an international standard indicator of IEIF. In the formulation and implementation of relevant standards, W3C actively participates in it and plays an irreplaceable role. It can transfer documents between the server and the browser with the help of hypertext markup language. HTML is the markup language for structuring documents, and these documents will include links to relevant information. Users only need to click one of the links to access multimedia objects and images, and at the same time obtain the additional information of the link item.

    1. Java language and JDK development environment 

Java is a programming language launched by the American sun company. It can be applied on multiple platforms and has good compatibility. Furthermore, it is widely used in data centers, personal PCs and technological supercomputers by virtue of its own advantages. Currently the largest developer professional community.

JDK is a brand new product launched by the American sun company for java developers. If there is no JDK, the installed java program will not be able to run.

    1. SSM framework

The SSM (Spring+SpringMVC+MyBatis) framework set is composed of two open source frameworks, Spring and MyBatis (SpringMVC is part of Spring). Often used as a framework for web projects with simpler data sources.

1.1 Spring

Spring is like a large factory for assembling beans in the entire project. In the configuration file, you can specify specific parameters to call the constructor of the entity class to instantiate the object. It can also be called the glue in the project.

The core idea of ​​Spring is IoC (Inversion of Control), that is, programmers are no longer required to explicitly `new` an object, but let the Spring framework do it for you.

1.2 SpringMVC

SpringMVC intercepts user requests in the project. Its core Servlet, DispatcherServlet, assumes the role of intermediary or front desk, and matches user requests with the Controller through HandlerMapping. The Controller is the specific operation performed by the corresponding request. SpringMVC is equivalent to struts in the SSH framework.

1.3 apartment

mybatis is an encapsulation of jdbc, which makes the underlying operation of the database transparent. The operations of mybatis revolve around a sqlSessionFactory instance. Mybatis is associated to the Mapper file of each entity class through the configuration file. The Mapper file configures the SQL statement mapping required by each class to the database. Every time you interact with the database, get a sqlSession through sqlSessionFactory, and then execute the sql command.

The page sends a request to the controller, the controller calls the business layer to process the logic, the logic layer sends the request to the persistence layer, the persistence layer interacts with the database, and returns the result to the business layer, the business layer sends the processing logic to the controller, and the controller then Call the view to display the data.

    1. Mysql database

Databases are an integral part of the system development process. In terms of WEB applications, MySQL AB has developed a MySQL relational database management system with great advantages. MySQL can store data in different tables, which is very flexible, and can also improve the speed of the system in practical applications. Database access is most commonly used in the standard SQL language, and MySQL is used in the SQL language, so it is highly compatible. Database operations are essential, including functions such as adding, deleting, modifying, and querying database tables. Nowadays, databases can be divided into relational databases and non-relational databases. Mysql is a relational database. Mysql database is a small relational database. It has its own characteristics: small size, fast speed, low cost, etc. Mysql The database is by far the most popular open source database.

In WEB application technology, Mysql database supports different operating system platforms. Although the installation and configuration under different platforms are different, the difference is not very big. There are two installation methods of Mysql under Windows platform, binary version and installation-free Version. After installing the Mysql database, you need to start the service process, and the corresponding client can connect to the database, and the client can log in to the database through a command line or a graphical interface tool.

  1. system analysis
    1. Feasibility Analysis

The feasibility analysis of this system will be carried out from the perspectives of economy, technology and operation.

      1. economic feasibility

The entire system has rigorous steps from design to development and testing. All work tasks are completed by myself without external technical support, which saves all service costs and labor costs. In terms of hardware, a second-hand mobile phone is used to save costs. The workstation is used as the project deployment server and database server, and the cost is less than 10,000 yuan. The actual network deployment is also completed by myself without other labor costs involved. The entire development process is based on the principle of low cost and low consumption.

      1. technical feasibility

The purpose of the technical feasibility analysis is to confirm whether the system can be implemented using existing technologies, and to evaluate the development efficiency and completion. Technical feasibility refers to whether the development of computer software and hardware can meet the requirements of development under the current technical conditions. Because the development of the system is based on the SSM language, the software and hardware conditions required for the development of the system can be met on an ordinary computer. Because it takes up relatively little memory, there is theoretically no problem in developing and designing software with the Mysql database because it takes up too little memory. The above techniques can effectively guarantee the successful and efficient development of the system.

      1. operational feasibility

The user interface of the inpatient detection and early warning information management system is simple and easy to operate. Common interface windows are used to log in to the interface, and access operations are performed through computers. Users can access operations as long as they have used computers. The development of this system is developed by SSM technology. Humanization and perfection are the more prominent features of B/S structure development, which makes user operation more concise and convenient than others. Easy to operate, easy to manage, and good interactivity are fully reflected in the operation of this system.

3.2 Performance Analysis

For performance analysis, compared with the traditional management method, the traditional management method uses manual statistics and management of data information with paper and pen, and this method is more troublesome for storing and finding certain data information. With the advent of computer networks, this traditional method is difficult to adapt to the development of the current society. It not only reduces people's work efficiency, but also requires a lot of manpower and material resources, which is relatively high in terms of time and cost. To reduce costs, improve user efficiency, and develop a set of inpatient detection and early warning information management system based on computer and network technology.

The development and design of the inpatient detection and early warning information management system is an independent system, and the popular database is used for data storage and development, mainly to realize the user roles and corresponding functional modules of the inpatient detection and early warning information management system, so that inpatient detection The management of the early warning information management system will not have management differences and low efficiency, but is just the opposite of the traditional management information. The realization of the inpatient detection and early warning information management system can save resources, and the processing speed of the business is also improved. Efficient and powerful.

3.3 System operation process

3.3.1 User login process

The first hurdle for system security is that users who want to enter the system must enter their own login information through the login window before they can log in. Only after the information entered by the user is accurate can they enter the operating system interface and perform function modules. The corresponding operation, if the information entered by the user is incorrect, a prompt box will appear in the window, and the user fails to log in. Return to the first step to re-enter, as shown in Figure 3-1.

                                                                Figure 3-1 Login operation flowchart

 

3.3.2 Information adding process

For the inpatient detection and early warning information management system, it is necessary to add the required data information at any time. For the user to add information, it is necessary to fill in the data information to be added according to the addition interface and the content of the check box. After the information input is completed, it is judged whether the data information meets the requirements. Requirements, if the requirements are met, the addition is completed. If the information added by the user does not meet the requirements, you need to return to the first step, re-enter the data information, and then perform the judgment operation, as shown in Figure 3-2.

                                                  

 

Figure 3-2 Information adding flow chart

3.3.3 Information deletion process

No matter which user role enters the unreasonable system operation interface, it can perform different information content operation functions. For the deletion of system data information, once the user deletes the information, the deleted data information will not be restored. Therefore, the user When deleting data, it is necessary to judge whether the content to be deleted is determined to be deleted. After confirming that it is correct, choose to confirm the deletion operation, as shown in Figure 3-3.

 

Figure 3-3 Information deletion flow chart

  1. system design

4.1 System architecture design

Overview design analysis of the inpatient detection and early warning information management system project, the main content is the specific analysis of the inpatient detection and early warning information management system information, the database is designed, the data uses mysql database, and the system design adopts more humanized operations The design can deal with and give feedback to the error information in the system in a timely manner.

The design of the inpatient detection and early warning information management system is based on the existing network, which can realize detailed management of administrators: user management, doctor work arrangement management, hospital bed management, admission information management, discharge information management, drug information management, payment details management, etc. understanding and statistical analysis. The module relationship diagram established according to the system functional requirements is as follows:

                    

 

                 Figure 4-1 Administrator function module diagram

4.2 Development process design

The development of the inpatient detection and early warning information management system analyzes the management module and the database used by the system, writes generation development, planning and operation are the necessary three steps to build the information management application program, which determines whether the system can truly realize the preset functions And whether it can be implemented after successful design. In the development process, each stage must be developed in strict accordance with the linear sequence, and each work generated in the corresponding stage can be verified and checked by technology. Make sure that it is correct after the completion of one stage, and will not cause drag and drop phenomenon in the next stage, so that the system can be guaranteed after the design function is completed.

Judging from the successful development experience of the inpatient detection and early warning information management system, the above method has the most obvious effect and reduces the complexity of system development to the greatest extent. As shown in Figure 4-2.

 

Figure 4-2 Flow chart of the development system

4.3 Database design

Database is the foundation and core of information system. The quality of database design directly affects the success or failure of information system development. Creating a database table first determines the attributes of entities and the relationships between entities. Create a data table based on the relationship.4.3.1 Entity ER Diagram

The database is the most important step in the entire software programming. For the database problem, it is mainly to determine the number of databases and the creation of structural formulas. The display system uses Mysql to manage the database to ensure data security and stability.

Conceptual models are designed to abstract real-world information and model the information world. It is a powerful tool for database design. Database conceptual model design can describe the conceptual model of the real world through ER diagrams. An ER diagram of a system shows the links between entities in the system. Moreover, the Mysql database is a database with relatively strong self-protection capabilities. The following figure is mainly an ER diagram of database entities:

(1) Drug information entity diagram, as shown in Figure 4-3:

 

  Figure 4-3 Drug Information Entity Diagram

 (2) The physical map of hospital beds is shown in Figure 4-4:

 

Figure 4-4 Entity map of hospital beds

These functions can fully meet the needs of the inpatient detection and early warning information management system. The function of this system is relatively comprehensive, as shown in Figure 4-5 below the system function structure.

                                 

 

                            Figure 4-5 System function structure diagram

4.3.2 Data Sheet

According to the detailed analysis requirements of the data structure, we can analyze according to the requirements of the input and output data volume, determine what table, the relationship between the structure, we can verify, adjust and improve, query and browse the process, can realize the database, In order to make users have more requirements for data and functions.

Based on the characteristics of the database management system used by the system, the conceptual model of the database is converted and constructed. However, this system only needs to fully consider the functions of the inpatient detection and early warning information management system, and the organization is relatively clear.

name

type

length

not null

primary key

note

admission_information_id

int

11

yes

yes

Admission Information ID

hospital_floor

varchar

64

no

no

hospital floor

inpatient

int

11

no

no

inpatient

patient_name

varchar

64

no

no

patient name

inpatient_bed

varchar

64

no

no

hospital bed

number_of_beds

int

11

no

no

Number of beds

length_of_stay

date

0

no

no

hospital stay

doctor_number

int

11

no

no

doctor number

name_of_doctor

varchar

64

no

no

doctor name

patient_medical_record

text

0

no

no

patient medical records

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

department_management_id

int

11

yes

yes

Department Management ID

department_name

varchar

64

no

no

Department name

location

varchar

64

no

no

location

department_director

int

11

no

no

Department director

department_members

text

0

no

no

Department members

department_profile

text

0

no

no

Department Profile

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

discharge_information_id

int

11

yes

yes

Discharge information ID

hospital_floor

varchar

64

no

no

hospital floor

inpatient

int

11

no

no

inpatient

patient_name

varchar

64

no

no

patient name

number_of_beds

varchar

64

no

no

Number of beds

length_of_stay

date

0

no

no

hospital stay

discharge_time

date

0

no

no

discharge time

doctor_number

int

11

no

no

doctor number

name_of_doctor

varchar

64

no

no

doctor name

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

doctor_user_id

int

11

yes

yes

Physician User ID

name_of_doctor

varchar

64

no

no

doctor name

doctor_gender

varchar

64

no

no

doctor sex

doctor_number

varchar

64

yes

no

doctor number

examine_state

varchar

16

yes

no

Approval Status

recommend

int

11

yes

no

Intelligent Recommendation

user_id

int

11

yes

no

User ID

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

doctor_work_arrangement_id

int

11

yes

yes

Physician work schedule ID

doctor_number

int

11

no

no

doctor number

name_of_doctor

varchar

64

no

no

doctor name

department

varchar

64

no

no

Department

start_time

date

0

no

no

Starting time

end_time

date

0

no

no

End Time

organization_of_work

text

0

no

no

Working arrangements

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

drug_information_id

int

11

yes

yes

Drug Information ID

drug_name

varchar

64

no

no

Drug Name

drug_number

varchar

64

no

no

drug number

drug_picture

varchar

255

no

no

drug picture

functional_indications

varchar

64

no

no

Indications

main_components

text

0

no

no

main ingredient

matters_needing_attention

text

0

no

no

Precautions

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

hospital_beds_id

int

11

yes

yes

Hospital Bed ID

hospital_floor

varchar

64

yes

no

hospital floor

total_number_of_beds

int

11

no

no

Total number of beds

remaining_beds

int

11

no

no

remaining beds

department

text

0

no

no

Department

bed_configuration

text

0

no

no

Bed configuration

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

payment_details_id

int

11

yes

yes

Payment Details ID

patient_number

int

11

no

no

patient number

patient_name

varchar

64

no

no

patient name

user_card_number

varchar

64

no

no

User card number

payment_amount

int

11

no

no

payment amount

payment_time

datetime

0

no

no

payment time

doctor_number

int

11

no

no

doctor number

name_of_doctor

varchar

64

no

no

doctor name

payment_content

text

0

no

no

Payment content

recommend

int

11

yes

no

Intelligent Recommendation

create_time

datetime

0

yes

no

creation time

update_time

timestamp

0

yes

no

update time

name

type

length

not null

primary key

note

recharge_record_id

int

11

yes

yes

Recharge record ID

patient_number

int

11

no

no

patient number

patient_name

varchar

64

no

no

patient name

patient_gender

varchar

64

no

no

患者性别

user_card_number

varchar

64

用户卡号

recharge_amount

int

11

充值金额

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

user_balance_id

int

11

用户余额ID

patient_number

int

11

患者编号

patient_name

varchar

64

患者姓名

patient_gender

varchar

64

患者性别

user_card_number

varchar

64

用户卡号

user_balance

int

11

用户余额

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

  1. 系统实现
    1. 数据库访问层的实现

该系统是通过jdbc和MySQL达成连接的,新建一个jdbc.properties文件来填写与数据库连接所需要的驱动和参数。

jdbc.driverClass=com.MySQL.jdbc.Driver

jdbc.url=jdbc:MySQL://localhost:3306/tsi

jdbc.username=root

jdbc.password=123

第一个参数代表MySQL数据库的驱动,第二个参数代表要连接的数据库,第三个和第四个参数代表数据库连接名和密码。

后台与数据库访问主要是通过HQL语句来进行查询的,查询语句中的表名是表格的实体类名,在这种查询语句中*是不允许使用的,除非适合聚合函数一起使用才可以。

    1. 注册模块的实现

用户在填写数据的时候必须与注册页面上的验证相匹配否则会注册失败,注册页面的表单验证是通过JavaScript进行验证的,用户名的长度必须在6到18之间,邮箱必须带有@符号,密码和密码确认必须相同,你输入的密码,系统会根据你输入密码的强度给出指定的值,电话号码和身份证号码必须要求输入格式与生活相符合,当你前台验证通过的时候你点击注册,表单会将你输入的值通过name值传递给后台并保存到数据库中。

用户注册流程图如下图所示。

 

图5-1用户注册流程图

用户注册代码如下:

    /**

     * 注册

     * @return

     */

    @PostMapping("register")

    public Map<String, Object> signUp(HttpServletRequest request) throws IOException {

        // 查询用户

        Map<String, String> query = new HashMap<>();

        Map<String,Object> map = service.readBody(request.getReader());

        query.put("username",String.valueOf(map.get("username")));

        List list = service.selectBaseList(service.select(query, new HashMap<>()));

        if (list.size()>0){

            return error(30000, "用户已存在");

        }

        map.put("password",service.encryption(String.valueOf(map.get("password"))));

        service.insert(map);

        return success(1);

}

    public Map<String,Object> readBody(BufferedReader reader){

        BufferedReader br = null;

        StringBuilder sb = new StringBuilder("");

        try{

            br = reader;

            String str;

            while ((str = br.readLine()) != null){

                sb.append(str);

            }

            br.close();

            String json = sb.toString();

            return JSONObject.parseObject(json, Map.class);

        }catch (IOException e){

            e.printStackTrace();

        }finally{

            if (null != br){

                try{

                    br.close();

                }catch (IOException e){

                    e.printStackTrace();

                }

            }

        }

        return null;

    }

    public void insert(Map<String,Object> body){

        E entity = JSON.parseObject(JSON.toJSONString(body),eClass);

        baseMapper.insert(entity);

        log.info("[{}] - 插入操作:{}",entity);

}

    1. 用户登录模块的实现

主要由两部分组成,登录前的登录界面以及登录后的用户功能界面。登录界面,要求用户输入用户名和密码,当用户名和密码其中一个输入为空时,给出提示“用户名,密码不能为空”。获取用户名和密码后到数据库中查找,如果用户名存在,以及对应的密码正确,则登录成功,否则登录失败。登录失败后给出提示,并把焦点停在文本框中。登录成功后将该次会话的全局变量username设置为用户名。登录成功后进入会员的功能模块,主要有会员基本信息修改,已经发布族谱申报信息管理,发布信息,和退出功能。退出功能是清除全局变量username的值,并跳回到首页。

登录流程图如下图所示。

 

图5-1登录流程图

用户登录界面如下图所示。

 

图5-1登录流程图

登录代码如下:

    /**

     * 登录

     * @param data

     * @param httpServletRequest

     * @return

     */

    @PostMapping("login")

    public Map<String, Object> login(@RequestBody Map<String, String> data, HttpServletRequest httpServletRequest) {

        log.info("[执行登录接口]");

        String username = data.get("username");

        String email = data.get("email");

        String phone = data.get("phone");

        String password = data.get("password");

        List resultList = null;

        QueryWrapper wrapper = new QueryWrapper<User>();

        Map<String, String> map = new HashMap<>();

        if(username != null && "".equals(username) == false){

            map.put("username", username);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(email != null && "".equals(email) == false){

            map.put("email", email);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }

        else if(phone != null && "".equals(phone) == false){

            map.put("phone", phone);

            resultList = service.selectBaseList(service.select(map, new HashMap<>()));

        }else{

            return error(30000, "账号或密码不能为空");

        }

        if (resultList == null || password == null) {

            return error(30000, "账号或密码不能为空");

        }

        //判断是否有这个用户

        if (resultList.size()<=0){

            return error(30000,"用户不存在");

        }

        User byUsername = (User) resultList.get(0);

        Map<String, String> groupMap = new HashMap<>();

        groupMap.put("name",byUsername.getUserGroup());

        List groupList = userGroupService.selectBaseList(userGroupService.select(groupMap, new HashMap<>()));

        if (groupList.size()<1){

            return error(30000,"用户组不存在");

        }

        UserGroup userGroup = (UserGroup) groupList.get(0);

        //查询用户审核状态

        if (!StringUtils.isEmpty(userGroup.getSourceTable())){

            String res = service.selectExamineState(userGroup.getSourceTable(),byUsername.getUserId());

            if (res==null){

                return error(30000,"用户不存在");

            }

            if (!res.equals("已通过")){

                return error(30000,"该用户审核未通过");

            }

        }

        //查询用户状态

        if (byUsername.getState()!=1){

            return error(30000,"用户非可用状态,不能登录");

        }

        String md5password = service.encryption(password);

        if (byUsername.getPassword().equals(md5password)) {

            // 存储Token到数据库

            AccessToken accessToken = new AccessToken();

            accessToken.setToken(UUID.randomUUID().toString().replaceAll("-", ""));

            accessToken.setUser_id(byUsername.getUserId());

            tokenService.save(accessToken);

            // 返回用户信息

            JSONObject user = JSONObject.parseObject(JSONObject.toJSONString(byUsername));

            user.put("token", accessToken.getToken());

            JSONObject ret = new JSONObject();

            ret.put("obj",user);

            return success(ret);

        } else {

            return error(30000, "账号或密码不正确");

        }

}

    public String select(Map<String,String> query,Map<String,String> config){

        StringBuffer sql = new StringBuffer("select ");

        sql.append(config.get(FindConfig.FIELD) == null || "".equals(config.get(FindConfig.FIELD)) ? "*" : config.get(FindConfig.FIELD)).append(" ");

        sql.append("from ").append("`").append(table).append("`").append(toWhereSql(query, "0".equals(config.get(FindConfig.LIKE))));

        if (config.get(FindConfig.GROUP_BY) != null && !"".equals(config.get(FindConfig.GROUP_BY))){

            sql.append("group by ").append(config.get(FindConfig.GROUP_BY)).append(" ");

        }

        if (config.get(FindConfig.ORDER_BY) != null && !"".equals(config.get(FindConfig.ORDER_BY))){

            sql.append("order by ").append(config.get(FindConfig.ORDER_BY)).append(" ");

        }

        if (config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE))){

            int page = config.get(FindConfig.PAGE) != null && !"".equals(config.get(FindConfig.PAGE)) ? Integer.parseInt(config.get(FindConfig.PAGE)) : 1;

            int limit = config.get(FindConfig.SIZE) != null && !"".equals(config.get(FindConfig.SIZE)) ? Integer.parseInt(config.get(FindConfig.SIZE)) : 10;

            sql.append(" limit ").append( (page-1)*limit ).append(" , ").append(limit);

        }

        log.info("[{}] - 查询操作,sql: {}",table,sql);

        return sql.toString();

}

    public List selectBaseList(String select) {

        List<Map<String,Object>> mapList = baseMapper.selectBaseList(select);

        List<E> list = new ArrayList<>();

        for (Map<String,Object> map:mapList) {

            list.add(JSON.parseObject(JSON.toJSONString(map),eClass));

        }

        return list;

}

    1. 用户资料修改模块的实现

用户登录/注册成功之后可以修改自己的基本信息。修改页面的表单中每一个input的name值都要与实体类中的参数相匹配,在用户点击修改页面的时候,如果改后用户名与数据库里面重复了,页面会提示该用户名已经存在了,否则通过Id来查询用户,并将用户的信息修改为表单提交的数据。

    1. 医院床位模块的实现

如果医院床位需要修改,管理员可以通过查询数据库中的医院床位数据,查询医院床位数据是通过ajax技术来进行查询的,需要传递医院楼层等参数然后在返回到该页面中,可以选中要修改或删除的那条信息,如果选中了超过一条数据,页面会挑一个窗口提醒只能选择一条数,如果没有选中数据会挑一个窗口题型必须选择一条数据。当选择确认修改的时候,后台会根据传过来的id到数据库查询,并将结果返回到修改页面中,可以在修改页面中修改刚刚选中的信息当点击确认的时候from表单会将修改的数据提交到后台并保存到数据库中,就是说如果提交的数据数据库中存在就修改,否则就保存。

医院床位界面如下图所示。

 

图5-1医院床位界面

    1. 医生管理模块的实现

根据需求,需要对医生进行添加、删除或修改详情信息。删除或修改医生时,系统根据医生的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询医生状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加医生时,会给出数据填写的页面,该页面根据填写好的医生编号同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

医生管理流程图如下图所示。

 

图5-1医生管理流程图

医生管理页面设计效果如下图所示。

 

                                                 图5-1医生管理界面

医生管理关键代码如下所示。

@RequestMapping(value = "/del")

    @Transactional

    public Map<String, Object> del(HttpServletRequest request) {

        service.delete(service.readQuery(request), service.readConfig(request));

        return success(1);

}

    1. 科室管理模块

根据需求,需要对科室进行添加、删除或修改详情信息。删除或修改科室时,系统根据科室的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询科室状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加科室时,会给出数据填写的页面,该页面根据填写好的科室编号同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

科室管理流程图如下图所示。

 

图5-1科室管理流程图

科室管理页面设计效果如下图所示。

 

                                                图5-1科室管理界面

科室管理关键代码如下所示。

  @PostMapping("/add")

    @Transactional

    public Map<String, Object> add(HttpServletRequest request) throws IOException {

        service.insert(service.readBody(request.getReader()));

        return success(1);

    }

    @Transactional

    public Map<String, Object> addMap(Map<String,Object> map){

        service.insert(map);

        return success(1);

}

    1. 药品管理模块的实现

根据需求,需要对药品信息进行添加、删除或修改详情信息。删除或修改药品信息时,系统根据药品信息的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询药品信息状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加药品信息时,会给出数据填写的页面,该页面根据填写好的药品编号同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

药品信息管理流程图如下图所示。

 

图5-1药品信息管理流程图

药品信息管理页面设计效果如下图所示。

 

图5-1药品信息管理界面图

药品信息管理关键代码如下。

 public Map<String, Object> success(Object o) {

        Map<String, Object> map = new HashMap<>();

        if (o == null) {

            map.put("result", null);

            return map;

        }

        if (o instanceof List) {

            if (((List) o).size() == 1) {

               o =  ((List) o).get(0);

                map.put("result", o);

            }else {

                String jsonString = JSONObject.toJSONString(o);

                JSONArray objects = service.covertArray(JSONObject.parseArray(jsonString));

                map.put("result", objects);

            }

        } else if (o instanceof Integer || o instanceof String) {

            map.put("result", o);

        } else {

            String jsonString = JSONObject.toJSONString(o);

            JSONObject jsonObject = JSONObject.parseObject(jsonString);

            JSONObject j = service.covertObject(jsonObject);

            map.put("result", j);

        }

        return map

    1. 医院床位管理模块的实现

根据需求,需要对医院床位进行添加、删除或修改详情信息。删除或修改医院床位时,系统根据医院床位的状态判定为可删除状态下,才会给出删除和修改链接,点击删除链接按钮时,请求到达后台,还会先查询医院床位状态再次做出判定能否删除。点击修改链接按钮时,会跳转到修改信息的页面,重新填写好数据后,数据提交到后台会对数据库中相应的记录做出修改。

添加医院床位时,会给出数据填写的页面,该页面根据填写好的医院床位信息同样会事先发送Ajax请求查询编号是否已存在,数据填写好之后提交到后台,会调用相关服务在数据库中插入记录。

医院床位管理流程图如下图所示。

 

图5-1医院床位管理流程图

医院床位管理页面设计效果如下图所示。

 

图5-1医院床位管理界面图

医院床位管理关键代码如下。

 public Map<String, Object> success(Object o) {

        Map<String, Object> map = new HashMap<>();

        if (o == null) {

            map.put("result", null);

            return map;

        }

        if (o instanceof List) {

            if (((List) o).size() == 1) {

               o =  ((List) o).get(0);

                map.put("result", o);

            }else {

                String jsonString = JSONObject.toJSONString(o);

                JSONArray objects = service.covertArray(JSONObject.parseArray(jsonString));

                map.put("result", objects);

            }

        } else if (o instanceof Integer || o instanceof String) {

            map.put("result", o);

        } else {

            String jsonString = JSONObject.toJSONString(o);

            JSONObject jsonObject = JSONObject.parseObject(jsonString);

            JSONObject j = service.covertObject(jsonObject);

            map.put("result", j);

        }

        return map

  1. 系统测试
    1. 测试目的

程序设计不能保证没有错误,这是一个开发过程,在错误或错误的过程中难以避免,这是不可避免的,但我们不能使这些错误始终存在于系统中,错误可能会造成无法估量的后果 如系统崩溃,安全信息,系统无法正常启动,导致安装用户手机屏幕等,为了避免这些问题,我们需要测试程序,并发现这些问题,并纠正它们 ,并使系统更长时间稳定成熟,本章的作用是发现这些问题,并对其进行修改,虽然耗时费力,但长期非常重要和必要系统的开发。

软件测试与开发过程是一样的,都必须按照软件工程的正规原理进行,遵守管理学理论。不过,目前国内的软件测试已经积累了大量经验和方法,步骤相对成熟,软件测试的效率也越来越高。

住院病人检测预警信息管理系统的实现,对于系统中功能模块的实现及操作都必须通过测试进行来评判系统是否可以准确的实现。在住院病人检测预警信息管理系统正式上传使用之前必须做的一步就是系统测试,对于测试发现的错误及时修改处理,保证系统准确无误的供给用户使用。

    1. 测试方案设计

6.2.1 测试策略

1、功能测试

从用户的角度来看,测试时不了解新开发软件的内部结构,因此可以将系统与黑匣子进行比较,盲目输入后可以查看系统给出的反馈。这种测试属于黑盒测试,在测试中如果输入错误信息系统会报错。

2、性能测试

测试软件程序的整体状况(称为性能测试)通常使用自动化测试工具来检测系统的整体功能,在负载测试和压力测试之间进行分配,在某些情况下,将这两种情况结合起来。虽然压力测试可以检测到系统可以提供的最高级别的服务,但负载测试可以测试系统如何响应增加的负载。

6.2.2 测试分析

测试评估系统质量的方法不局限于系统编码和过程,应该与软件设计工作和历史需求分析密切相关。

软件测试应遵循以下原则:

(1)软件测试应尽快进行,整个测试部分应在软件开发和设计的整个过程中进行。如发现错误,立即处理,将大大减少软件开发的时间,并提高软件的质量。

(2)在软件的各种测试中,测试过程中使用的计划、报告等应妥善处理和存储。其主要目的是为了便于以后系统的维护。

(3)软件测试整个过程中的聚类现象应优先考虑。

(4)对于软件测试,我们应该尽量不去和自己设计的系统进行参考,而是要测试对方的程序,以确保软件测试结果的客观性和公平性。

(5)整个测试计划严格按照软件测试的具体实施细则进行。

(6)对整个测试结果进行综合检查,尽量避免重复错误。

本住院病人检测预警信息管理系统满足用户的要求和需求,本住院病人检测预警信息管理系统的使用能够有效的提高用户的使用率。

    1.  测试结果

测试后得到的性能和用例,系统具有足够的正确性、可靠性、稳定性,并且可以对输入数据进行准确的点击操作处理和响应测试用户的体验也得到了很好的反馈和响应时间。合理的范围,可以兼容所有主流浏览器,设计所需的效果。

  1. 总结与展望

通过住院病人检测预警信息管理系统的开发,本人巩固了之前学过的知识,如今将平时所学到的知识融合在设计中,在设计过程中,做了很多的准备,首先,在数据库系统的设计过程中,尤其是在数据库的工作原理、工作特点,对其深刻的讨论,与此同时,对于小型站点来说,最好服务器的选择,其次,利用所学的知识点分析所做的系统,并在此基础上设计。

目前本系统已经上线,正在试运行阶段,用户反馈良好,基本完成用户所需,试运行过程中没有出现阻断性问题,有一些不足和小问题也及时予以修正,系统上线后,为了保证数据的安全性,对系统进行了备份操作,系统备份是每两个月备份一次,数据库备份为每周备份一次,系统部署在租赁的云平台服务器中。

本次系统上线成功后,得到了用户的高度认可,但是在功能上和性能上还需做进一步的研究处理,使其有更高的性能和更好的用户体验。

系统在以后的升级过程中,需要解决一系列用户所提出的问题,例如打印过程中如何避免浏览器的兼容性问题,大量用户访问时,如何保持较高的响应速度,在系统今后的升级过程中将着重解决这些安全性问题。

参考文献

[1]艾信,田鹏,吉效科,白文雄,华剑.多算法融合管道泄漏检测预警系统试验研究[J].石油矿场机械,2021,50(06):26-33.

[2]宋鑫,张珣.智慧路灯场景下车祸检测预警系统设计与实现[J].软件导刊,2021,20(10):197-201.

[3]王江霖,黄彩霞,樊旭龙.基于SSM框架的网络资源共享平台的研究与实现[J].电脑知识与技术,2021,17(28):76-78.DOI:10.14004/j.cnki.ckt.2021.2999.

[4]蔡浪,刘彬.基于SSM框架的医院感染信息实时监测系统设计与实现[J].现代信息科技,2021,5(18):24-27.DOI:10.19850/j.cnki.2096-4706.2021.18.007.

[5]冯丽露,康耀龙,高晓晶,王涛.基于SSM框架的数据结构在线评测系统设计与实现[J].中国信息技术教育,2021(13):86-89.

[6]曹华山.SSM框架在Web应用开发中的设计与实现[J].无线互联科技,2021,18(11):108-109.

[7]刘佰强. 基于人脸视频智能分析的日间驾驶员不安全行为检测分类与预警系统[D].西安理工大学,2020.DOI:10.27398/d.cnki.gxalu.2020.000333.

[8]任锴,陈俊,叶宇煌,陈琪.基于SSD-MobileNet的火情检测预警系统[J].电气开关,2020,58(01):34-38.

[9]戴珂泱,周建峰,严风云.舟山跨海大桥基于视觉感知的新一代道路事件检测预警系统应用初探[J].中国交通信息化,2020(01):132-135.DOI:10.13439/j.cnki.itsc.2020.01.020.

[10]季昆,孟丽丽,薛迁,孙晓伟,王才华.基于JavaWeb的产品质量检测预警系统的设计与实现[J].数字技术与应用,2019,37(10):176-177.DOI:10.19695/j.cnki.cn12-1369.2019.10.96.

[11]李昕.电视台安全播出检测预警系统的设计和实施[J].广播与电视技术,2018,45(10):49-53.DOI:10.16171/j.cnki.rtbe.20180010006.

[12]李耀华,游峰,陈康,陈润丰,彭涵宇,方伟创.基于安全云平台和移动互联网的交通烟雾检测预警系统[J].计算机与现代化,2017(02):88-92.

致谢

时光飞逝,转眼间我在学校的这些年生活即将结束,回顾这几年的学习生活,收获良多,既有幸福也有难过,学校生活的结束对于我来说也是一个新的开始。论文即将完成,在此,我心中有许多想要感谢的人。首先感谢我的导师,不仅在学习研究方面加以指导,也在生活和为人处世上给予帮助。还要感谢授课老师,你们严谨的学术精神和积极向上的工作态度都在激励我的成长和进步。感谢多年来一直生活在一起的室友,谢谢你们多年来的陪伴和照顾。最后,要感谢各位论文评审老师,感谢您们在百忙之中抽空评阅本论文并给出宝贵的意见和建议。

点赞+收藏+关注 → 私信领取本源代码、数据库

Guess you like

Origin blog.csdn.net/weixin_61498557/article/details/131359657