Graduation project based on Springboot community resident health record management system - with source code 220940

springboot community resident health record management system

Summary

At present, as people's awareness of health continues to deepen, the concept of health is also changing from disease-free treatment to disease-free prevention. People begin to pay more attention to the quality of life and pursue healthier and longer life. Therefore, it is of great significance to develop a community resident health record management system that is oriented to individual community residents and centered on health record management. The research work of this thesis is carried out through the research and development of this system.

This paper firstly introduces the research background and research significance of the system, and expounds the necessity of developing a community resident health record management system. Then, according to the requirement analysis of the system, the overall design scheme of the system is put forward, and the architecture of mixed mode of C/S and B/S is chosen. Then, the functional modules of the front-end client and the back-end management are divided and designed respectively, and the database structure of the system is designed in detail. Afterwards, the development environment of the system is described, the database access is realized by using Mysql database access technology, the detailed design and implementation of the main modules of the system Web client, 3G client and management end are introduced, and the network communication based on springboot is realized by using Java technology . Finally, the operation effect of the system is shown.

At present, the functions of the community resident health record management system have been preliminarily realized, and the operation of the system shows that the overall design of the system is reasonable and the measures to solve the problem are feasible.

Key words: health record management; Spring boot framework; community

Springboot community resident health record management system

Abstract

At present, with the deepening of people's understanding of health, the concept of health is also changing from disease-free treatment to disease-free prevention. People begin to pay more attention to the quality of life and pursue healthier and longer life. Therefore, it is of great significance to develop a community residents' health records management system oriented to community residents and centered on health records management. The research work of this paper is carried out around the research and development of this system.

Firstly, this paper introduces the research background and significance of the system, and expounds the necessity of developing community residents' health archives management system. Then, according to the demand analysis of the system, the overall design scheme of the system is put forward, and the architecture of C / s and B / S mixed mode is selected. Then, the functional modules of foreground client and background management are divided and designed, and the database structure of the system is designed in detail. After that, it expounds the development environment of the system, realizes the database access by using MySQL database access technology, introduces the detailed design and implementation of the main modules of the system web client, 3G client and management end, and uses Java technology to realize the network communication based on springboot. Finally, the operation effect of the system is shown.

At present, the function of community residents' health archives management system has been preliminarily realized. The operation of the system shows that the overall design scheme of the system is reasonable and the measures to solve the problems are feasible.

Key words: Health records management; Spring boot framework; community

Table of contents

Chapter 1 Introduction 1

1.1 Research Significance and Significance 1

1.2 Research content 1

1.3 The structure of the thesis 2

Chapter 2 Introduction to Development Tools and Related Technologies 3

2.1 J2EE Technology 3

2.2 MVVM pattern 3

2.3 Mysql database 3

2.4 B/S structure 4

2.5 JavaScript running mode 4

2.6 Spring boot framework 4

Chapter 3 System Analysis 6

3.1 Feasibility Analysis 6

3.1.1 Economic feasibility6

3.1.2 Technical feasibility 6

3.1.3 Operational Feasibility 6

3.2 Performance Analysis 6

3.3 System operation process 9

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 11

4.1 System Architecture Design 11

4.2 Development Process Design 11

4.3 Database design 1 2

4.3.1 Entity ER Diagram 13

4.3.2 Data Table 1 3

Chapter 5 System Implementation 1 7

5.1 User front desk function module 1 7

5.2 Administrator function module 2 7

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.1 Research background and significance

With the development of medical and health services for urban residents in our country, community medical and health services have also achieved rapid development. In recent years, under the great attention of the country, my country's community medical and health undertakings have made significant progress. In an aging China, the development of community medical and health services is the progress of social civilization. However, we must also see that there are still some problems in the management of health records of urban community residents in our country. The emergence of these problems has seriously affected the development of community medical and health services. At present, the problems existing in the management of health records of urban community residents in our country are mainly manifested in: first, the health records are not perfect and there are omissions; second, the design of the records is not reasonable, which is not conducive to consultation; ; The fourth is that the network connection has not been realized; the fifth is that it has affected people's privacy.

With the development of information technology, the application of information technology in daily life is more and more extensive. Especially the application in the process of managing the health records of community residents has achieved good results. In the future management of health records of community residents, informatization will be an inevitable trend. The application of information technology in the management of community residents' archives can effectively improve management efficiency, and is of great significance for improving the management level and facilitating residents' access to archives. In the future management process, we must strengthen the network connection, and build a complete network structure of community residents' health records by means of network connection. Compared with paper archives, electronic archives are very convenient to consult and are not easily subject to regional restrictions. The content is also very complete and the continuity is guaranteed. Through the construction of informatization, medical personnel can timely and effectively understand the comprehensive health information of residents themselves no matter when and where they are. The informatization construction of residents' health records is very helpful for continuous and dynamic management.

1.2 Research content

The development and implementation of the community resident health record management system requires the following tasks:

(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, the technology used for system development shall be confirmed in combination with the needs of system development. The development of the community resident health record management system shall use the SSM framework, and the database shall be used for platform construction and development, and the technology used shall be 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 community resident health record management system is mainly divided into administrator and user roles , and the functional modules used are also correspondingly different, but the content of the database of the system is interactive, and users can conduct course information according to their own needs at any time, and system staff can process and operate online information according to their own assigned content , the administrator obtains the detailed data information of all users, and processes and solves 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.3 The structure of the thesis

According to the information and data obtained from market research, combined with the development status, and using relevant system development and design methods, the community resident health record 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 community resident health record 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 community residents' health records management system.

The fifth chapter implements the community resident health record management system, and posts screenshots of relevant pages, and describes the operation methods of specific functions.

The sixth chapter uses test cases to test some main functional modules of the community resident health record management system, and finally draws 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. J2EE technology

People can master many foreign languages, but what a computer scientist is proficient in is mostly programming languages, which are not human natural languages, such as C language, Java, Perl and so on. Since the "middleware" developed by different companies is not standardized enough, Sun launched J2EE and used this standard to solve the ills. It provides a good mechanism, allowing each layer to allow the corresponding server and components to run, making the system stable and usable, efficient in development, and easy to maintain.

  1. MVVM pattern

The MVVM model is a commonly used development model, which is mainly divided into M layer, V layer and C layer in terms of code implementation.

View (View) represents the user interaction interface. A web application may have many interfaces. In the MVVM mode, the view only handles data collection, processing, and user requests, and does not include the processing of business processes and business processes. Handled by the Model.

Model (Model) is the processing of business processes/states and the formulation of business rules. The process of the model processing the business process cannot be seen by other layers. It is like a black box. After receiving the data requested by the view, it returns the final processing result. The main core of MVVM is the design of the business model. A typical application example is the popular EJB model. It further divides the model from the perspective of application technology implementation in order to make full use of existing components, but it cannot be used as a A framework for applying design models.

The controller (Controller) can be understood as receiving the user's request, and then the view and the model are matched together to complete the user's request together. It has a very obvious role in dividing the control layer, and can clearly tell you that it is a distributor, which model and view to choose, and what kind of request from the user can be completed. The control layer does not do all the data processing, for example: the user clicks a connection, after the control layer receives the request, it does not process the business information, it just transmits the user's information to the model, and tells the model what to do, and then chooses the one that meets the requirements The view is returned to the user.

  1. MySQL database

The reason for using the MySQL software is that it can be accessed by multiple users, and there are Archives, etc. in it. It will classify the data first, and then store them in tables separately. Such special operations will improve the speed of the data management system itself, allowing the database to be used flexibly. The code of MySQL is public, and allows others to compile and upgrade it twice. This feature can reduce the cost of users, and form a good website system after matching with suitable software. Although it has shortcomings, it is the mainstream application object of users in all aspects.

  1. B/S structure

B/S (Browser/Server) is a more convenient architecture than its predecessor architecture. It uses the Web server to complete the data transfer and exchange. You only need to download the browser as the client, then the work will achieve a "slimming" effect, and there is no need to consider the problem of non-stop installation of software.

  1. JavaScript run mode:

JavaScript is a high-level scripting language belonging to the network. It has been widely used in the development of Web applications. It is often used to add various dynamic functions to web pages and provide users with smoother and more beautiful browsing effects. Usually, JavaScript scripts realize their own functions by embedding them in HTML.

2.5.1 is an interpreted scripting language (code is not precompiled ).

2.5.2 is mainly used to add interactive behavior to HTML ( an application under the Standard Universal Markup Language ) page.

2.5.3 Can be directly embedded in HTML pages, but written as a separate js file is conducive to the separation of structure and behavior .

2.5.4 Cross-platform feature, with the support of most browsers, it can run on multiple platforms (such as Windows , Linux , Mac , Android , iOS , etc.).

2.5.5 Like other languages, the JavaScript scripting language has its own basic data types, expressions and arithmetic operators , and the basic program framework of the program. JavaScript provides four basic data types and two special data types for processing data and text. Variables provide a place to store information, and expressions can complete more complex information processing.

  1. Spring boot framework

The Spring framework is an open source application framework on the Java platform that provides a container with inversion of control features. Although the Spring framework itself has no restrictions on the programming model, its frequent use in Java applications made it so popular that it was later used as a supplement or even a substitute for the EJB (EnterpriseJavaBeans) model. The Spring framework provides a series of solutions for development, such as using the core features of inversion of control, and implementing inversion of control through dependency injection to realize the containerization of the management object life cycle, using aspect-oriented programming for declarative transaction management, and integrating A variety of persistence technologies manage data access, provide a large number of excellent web frameworks to facilitate development, and so on. The Spring framework has the feature of inversion of control (IOC). IOC is designed to facilitate project maintenance and testing. It provides a method for unified configuration and management of Java objects through the Java reflection mechanism. The Spring framework uses the container to manage the life cycle of objects. The container can configure objects by scanning XML files or specific Java annotations on classes. Developers can obtain objects through dependency lookup or dependency injection. Aspect Oriented Programming(AOP) framework, the Spring AOP framework is based on the proxy mode, and can be configured at runtime; the AOP framework is mainly modularized for the cross concerns between modules. The AOP framework of the Spring framework only provides basic AOP features. Although it cannot be compared with the AspectJ framework, it can also meet the basic needs through integration with AspectJ. Functions such as transaction management and remote access under the Spring framework can be realized by using Spring AOP technology. Spring's transaction management framework brings an abstraction mechanism to the Java platform that enables local and global transactions, as well as nested transactions, to work with savepoints and in almost any environment on the Java platform. Spring integrates multiple transaction templates. The system can configure transactions through transaction templates, XML or Java annotations, and the transaction framework integrates functions such as messaging and caching. Spring's data access framework addresses common difficulties developers encounter when using databases in their applications. It not only provides support for all popular data access frameworks such as Java: JDBC, iBATS/MyBATIs, Hibernate, Java Data Objects (JDO), ApacheOJB and Apache Cayne, but also can be used with Spring's transaction management to provide data access Flexible abstraction. The Spring framework initially did not intend to build its own Web MVC framework . During the development process, its developers believed that the separation between the presentation layer and the request processing layer of the existing Struts Web framework and between the request processing layer and the model was not enough, so they created Spring MVC.

  1. system analysis

3.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 springboot language, the software and hardware conditions required to develop 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 community resident health record 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 in normal times. The development of this system is developed by springboot technology. Humanization and perfection are the more prominent features of B/S structure development, which makes user operations 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. Reduce costs, improve user efficiency, and develop a community resident health record management system based on computer and network technology.

The development and design of the community resident health record management system is an independent system, which uses popular databases for data storage and development, mainly to realize the user roles and corresponding functional modules of the community resident health record management system, so that the community resident health record management The management of the system will not have management differences and low efficiency, but is just the opposite of traditional management information. The realization of the community resident health record management system can save resources, and the processing speed of business is also improved, with fast speed, high efficiency, and functions 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 community resident health record 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 content of the check box on the adding interface, and judge whether the data information meets the requirements after the information input is completed. , the addition is completed if the requirements are met. 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

The overview design analysis of the system project of the community resident health record management system, the main content of the specific analysis of the information of the stray pet rescue system, the design of the database, the data uses the mysql database, and the design of the system adopts a more humanized operation design. System error messages can be processed and fed back in a timely manner.

The design of the community resident health file management system is based on the existing Internet, which can realize detailed understanding and statistical analysis of administrators: resident health file management, diagnosis and treatment records, hospitalization records, physical examination records, blood pressure records, blood sugar records, and health history management. 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

社区居民健康档案管理系统的开发对管理模块和系统使用的数据库进行分析,编写代开发,规划和操作是构建信息管理应用程序的必要三步曲,它决定了系统是否能够真正实现预设功能以及是否可以在成功设计后实施。在开发过程中,每个阶段必须严格按照线性顺序进行开发,并且在相应阶段生成的每个工作都可以通过技术进行验证和检查。确保一个阶段完成后是正确的,不会造成下一阶段拖拽现象,使系统完成设计功能后得到保证。

从社区居民健康档案管理系统的成功开发经验来看,上述方法效果最为明显,最大程度地降低了系统开发的复杂性。如图4-2所示。

图4-2开发系统流程图

4.3数据库设计

数据库是信息系统的基础和核心。数据库设计的好坏直接影响到信息系统开发的成败。创建数据库表首先确定实体的属性和实体之间的关系。根据关系创建一个数据表。4.3.1实体ER图

数据库是整个软件编程中最重要的一个步骤,对于数据库问题主要是判定数据库的数量和结构公式的创建。展示系统使用的是Mysql进行对数据库进行管理,进行保证数据的安全性、稳定性等。

概念模型的设计是为了抽象真实世界的信息,并对信息世界进行建模。它是数据库设计的强大工具。数据库概念模型设计可以通过E-R图描述现实世界的概念模型。系统的E-R图显示了系统中实体之间的链接。而且Mysql数据库是自我保护能力比较强的数据库,下图主要是对数据库实体的E-R图:

(1) 居民档案E-R图,如图4-3所示:

图4-3 居民档案实体图

(2)住院记录E-R图如图4-4所示:

图4-4住院记录实体图

(3)体检记录E-R图如图4-5所示:

图4-5体检记录实体图

这些功能可以充分满足社区居民健康档案管理系统的需求。此系统功能较为全面如下图系统功能结构如图4-5所示。

图4-5系统功能结构图

4.3.2数据表

我们可以根据数据结构的详细分析要求,我们根据输入和输出数据量的要求进行分析,确定什么表表,结构之间的关系,我们可以验证,调整和完善,查询和浏览过程,可以实现数据库,以使用户对数据和功能有更多要求。

基于系统使用的数据库管理系统的特点,对数据库的概念模型进行了转换和构建。但是,这个系统只需要充分考虑社区居民健康档案管理系统的功能,而且组织比较清晰。

名称

类型

长度

不是null

主键

注释

community_residents_id

int

11

社区居民ID

full_name

varchar

64

姓名

gender

varchar

64

性别

date_of_birth

varchar

64

出生年月

id

varchar

255

身份证

examine_state

varchar

16

审核状态

recommend

int

11

智能推荐

user_id

int

11

用户ID

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

resident_health_records_id

int

11

居民健康档案ID

file_number

varchar

64

档案号

resident

int

11

居民

full_name

varchar

64

姓名

gender

varchar

64

性别

age

varchar

64

年龄

nation

varchar

64

民族

occupation

varchar

64

职业

marriage

varchar

64

婚姻

date_of_birth

date

0

出生日期

home_address

varchar

64

家庭住址

blood_type

varchar

64

血型

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

physical_examination_record_id

int

11

体检记录ID

resident

int

11

居民

full_name

varchar

64

姓名

physical_examination_time

date

0

体检时间

physical_examination_hospital

varchar

64

体检医院

medical_examination_report

varchar

255

体检报告

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

hospitalization_record_id

int

11

住院记录ID

resident

int

11

居民

full_name

varchar

64

姓名

length_of_stay

date

0

住院时间

admission_note_

varchar

255

住院病历

inspection_report

varchar

255

检查报告

other

longtext

0

其他

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

health_history_id

int

11

健康史ID

resident

int

11

居民

full_name

varchar

64

姓名

past_history

text

0

既往史

personal_history

text

0

个人史

family_history

text

0

家族史

allergic_history

text

0

过敏史

marriage_and_childbearing_history

text

0

婚育史

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

diagnosis_and_treatment_records_id

int

11

诊疗记录ID

resident

int

11

居民

full_name

varchar

64

姓名

diagnosis_and_treatment_time

date

0

诊疗时间

medical_records_of_diagnosis_and_treatment

varchar

255

诊疗病历

inspection_report

varchar

255

检查报告

other

longtext

0

其他

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

blood_pressure_record_id

int

11

血压记录ID

resident

int

11

居民

full_name

varchar

64

姓名

record_time

date

0

记录时间

blood_pressure_value

varchar

64

血压值

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

名称

类型

长度

不是null

主键

注释

blood_glucose_record_id

int

11

血糖记录ID

resident

int

11

居民

full_name

varchar

64

姓名

record_time

date

0

记录时间

blood_glucose_value

varchar

64

血糖值

recommend

int

11

智能推荐

create_time

datetime

0

创建时间

update_time

timestamp

0

更新时间

  1. 系统实现

5.1用户前台功能模块

社区居民健康档案管理系统,在系统首页居民健康档案、诊疗记录、住院记录、血压记录、血糖记录、健康史等内容,如图5-1所示。

图5-1首页界面图

登录,在登录页面通过填写账号、密码等信息完成登录,如图5-3所示。

图5-2登录界面

登录系统主要代码如下。

/**

* 登录

* @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;

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

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

map.put("username", username);

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

}

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

map.put("email", email);

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

}

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

map.put("phone", phone);

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

}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.select(groupMap, new HashMap<>()).getResultList();

if (groupList.size()<1){

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

}

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

//查询用户审核状态

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

String sql = "select examine_state from "+ userGroup.getSourceTable() +" WHERE user_id = " + byUsername.getUserId();

String res = String.valueOf(service.runCountSql(sql).getSingleResult());

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, "账号或密码不正确");

}

}

用户注册,在用户注册页面可以填写账号、密码、昵称、邮箱、手机号码、身份、性别、身份证号码等详细内容进行注册,如图5-3所示。

图5-3用户注册界面

用户注册关键代码如下所示。

/**

* 注册

* @param user

* @return

*/

@PostMapping("register")

public Map<String, Object> signUp(@RequestBody User user) {

// 查询用户

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

query.put("username",user.getUsername());

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

if (list.size()>0){

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

}

user.setUserId(null);

user.setPassword(service.encryption(user.getPassword()));

service.save(user);

return success(1);

}

/**

* 用户ID:[0,8388607]用户获取其他与用户相关的数据

*/

@Id

@GeneratedValue(strategy = GenerationType.IDENTITY)

@Column(name = "user_id")

private Integer userId;

/**

* 账户状态:[0,10](1可用|2异常|3已冻结|4已注销)

*/

@Basic

@Column(name = "state")

private Integer state;

/**

* 所在用户组:[0,32767]决定用户身份和权限

*/

@Basic

@Column(name = "user_group")

private String userGroup;

/**

* 上次登录时间:

*/

@Basic

@Column(name = "login_time")

private Timestamp loginTime;

/**

* 手机号码:[0,11]用户的手机号码,用于找回密码时或登录时

*/

@Basic

@Column(name = "phone")

private String phone;

/**

* 手机认证:[0,1](0未认证|1审核中|2已认证)

*/

@Basic

@Column(name = "phone_state")

private Integer phoneState;

/**

* 用户名:[0,16]用户登录时所用的账户名称

*/

@Basic

@Column(name = "username")

private String username;

/**

* 昵称:[0,16]

*/

@Basic

@Column(name = "nickname")

private String nickname;

/**

* 密码:[0,32]用户登录所需的密码,由6-16位数字或英文组成

*/

@Basic

@Column(name = "password")

private String password;

/**

* 邮箱:[0,64]用户的邮箱,用于找回密码时或登录时

*/

@Basic

@Column(name = "email")

private String email;

/**

* 邮箱认证:[0,1](0未认证|1审核中|2已认证)

*/

@Basic

@Column(name = "email_state")

private Integer emailState;

/**

* 头像地址:[0,255]

*/

@Basic

@Column(name = "avatar")

private String avatar;

/**

* 创建时间:

*/

@Basic

@Column(name = "create_time")

@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")

private Timestamp createTime;

@Basic

@Transient

private String code;

}

住院信息通过填写姓名、诊疗时间、诊疗病例、检查报告等信息,并可以进行修改信息,如图5-4所示。

图5-4住院信息界面图

体检记录,在体检记录页面展示居民、姓名、体检时间、体检医院、体检报告等信息,如图5-5所示。

图5-5体检记录界面图

  1. 管理员功能模块

管理员登录,通过填写注册时输入的用户名、密码、进行登录,如图5-6所示。

图5-6管理员登录界面图

管理员登录进入社区居民健康档案管理系统后的主要功能是:后台首页、站点管理(公告栏、轮播图)用户管理(管理员、居民用户)内容管理(居民健康档案、诊疗信息、住院信息、健康档案、血压信息、血糖信息、健康史)等信息。还可以对社区居民健康档案管理系统等进行管理操作,如图5-7所示。

图5-7首页界面图

社区居民健康档案管理系统中的管理人员是可以对前台注册的居民用户信息进行管理的,也可以对管理员进行管控。界面如下图5-8所示。

图5-8用户管理界面图

用户管理关键代码如下所示。

@RequestMapping(value = "/del")

@Transactional

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

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

return success(1);

}

@Transactional

public void delete(Map<String,String> query,Map<String,String> config){

StringBuffer sql = new StringBuffer("DELETE FROM ").append("`").append(table).append("`").append(" ");

sql.append(toWhereSql(query, "0".equals(config.get(FindConfig.GROUP_BY))));

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

Query query1 = runCountSql(sql.toString());

query1.executeUpdate();

}

社区居民健康档案管理系统中的管理人员是可以对居民健康档案进行管控的,界面如下图5-9所示。

图5-9居民健康档案管理界面图

居民健康档案关键代码如下所示。

@PostMapping("/set")

@Transactional

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

service.update(service.readQuery(request), service.readConfig(request), service.readBody(request.getReader()));

return success(1);

}

public Map<String,String> readConfig(HttpServletRequest request){

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

map.put(FindConfig.PAGE,request.getParameter(FindConfig.PAGE));

map.put(FindConfig.SIZE,request.getParameter(FindConfig.SIZE));

map.put(FindConfig.LIKE,request.getParameter(FindConfig.LIKE));

map.put(FindConfig.ORDER_BY,request.getParameter(FindConfig.ORDER_BY));

map.put(FindConfig.FIELD,request.getParameter(FindConfig.FIELD));

map.put(FindConfig.GROUP_BY,request.getParameter(FindConfig.GROUP_BY));

map.put(FindConfig.MAX_,request.getParameter(FindConfig.MAX_));

map.put(FindConfig.MIN_,request.getParameter(FindConfig.MIN_));

return map;

}

public Map<String,String> readQuery(HttpServletRequest request){

String queryString = request.getQueryString();

if (queryString != null && !"".equals(queryString)) {

String[] querys = queryString.split("&");

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

for (String query : querys) {

String[] q = query.split("=");

map.put(q[0], q[1]);

}

map.remove(FindConfig.PAGE);

map.remove(FindConfig.SIZE);

map.remove(FindConfig.LIKE);

map.remove(FindConfig.ORDER_BY);

map.remove(FindConfig.FIELD);

map.remove(FindConfig.GROUP_BY);

map.remove(FindConfig.MAX_);

map.remove(FindConfig.MIN_);

return map;

}else {

return new HashMap<>();

}

}

@Transactional

public void update(Map<String,String> query,Map<String,String> config,Map<String,Object> body){

StringBuffer sql = new StringBuffer("UPDATE ").append("`").append(table).append("`").append(" SET ");

for (Map.Entry<String,Object> entry:body.entrySet()){

Object value = entry.getValue();

if (value instanceof String){

sql.append("`"+humpToLine(entry.getKey())+"`").append("=").append("'").append(value).append("'").append(",");

}else {

sql.append("`"+humpToLine(entry.getKey())+"`").append("=").append(value).append(",");

}

}

sql.deleteCharAt(sql.length()-1);

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

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

Query query1 = runCountSql(sql.toString());

query1.executeUpdate();

}

public String toWhereSql(Map<String,String> query, Boolean like) {

if (query.size() > 0) {

try {

StringBuilder sql = new StringBuilder(" WHERE ");

for (Map.Entry<String, String> entry : query.entrySet()) {

if (entry.getKey().contains(FindConfig.MIN_)) {

String min = humpToLine(entry.getKey()).replace("_min", "");

sql.append("`"+min+"`").append(" >= '").append(URLDecoder.decode(entry.getValue(), "UTF-8")).append("' and ");

continue;

}

if (entry.getKey().contains(FindConfig.MAX_)) {

String max = humpToLine(entry.getKey()).replace("_max", "");

sql.append("`"+max+"`").append(" <= '").append(URLDecoder.decode(entry.getValue(), "UTF-8")).append("' and ");

continue;

}

if (like == true) {

sql.append("`"+humpToLine(entry.getKey())+"`").append(" LIKE '%").append(URLDecoder.decode(entry.getValue(), "UTF-8")).append("%'").append(" and ");

} else {

sql.append("`"+humpToLine(entry.getKey())+"`").append(" = '").append(URLDecoder.decode(entry.getValue(), "UTF-8")).append("'").append(" and ");

}

}

sql.delete(sql.length() - 4, sql.length());

sql.append(" ");

return sql.toString();

} catch (UnsupportedEncodingException e) {

log.info("拼接sql 失败:{}", e.getMessage());

}

}

return "";

}

管理员在“健康史管理”这一菜单下是可以对居民健康史信息进行管理的,其管理界面如下图5-10所示。

图5-10健康史管理界面图

健康史管理关键代码如下所示。

@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);

}

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){

StringBuffer sql = new StringBuffer("INSERT INTO ");

sql.append("`").append(table).append("`").append(" (");

for (Map.Entry<String,Object> entry:body.entrySet()){

sql.append("`"+humpToLine(entry.getKey())+"`").append(",");

}

sql.deleteCharAt(sql.length()-1);

sql.append(") VALUES (");

for (Map.Entry<String,Object> entry:body.entrySet()){

Object value = entry.getValue();

if (value instanceof String){

sql.append("'").append(entry.getValue()).append("'").append(",");

}else {

sql.append(entry.getValue()).append(",");

}

}

sql.deleteCharAt(sql.length() - 1);

sql.append(")");

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

Query query = runCountSql(sql.toString());

query.executeUpdate();

}

}

  1. 系统测试

6.1测试目的

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

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

社区居民健康档案管理系统的实现,对于系统中功能模块的实现及操作都必须通过测试进行来评判系统是否可以准确的实现。在社区居民健康档案管理系统正式上传使用之前必须做的一步就是系统测试,对于测试发现的错误及时修改处理,保证系统准确无误的供给用户使用。

6.2测试方案设计

6.2.1 测试策略

1、功能测试

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

2、性能测试

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

6.2.2 测试分析

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

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

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

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

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

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

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

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

本社区居民健康档案管理系统满足用户的要求和需求,本社区居民健康档案管理系统的使用能够有效的提高用户的使用率。

6.3 测试结果

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

  1. 总结与展望

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

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

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

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

参考文献

[1]韩雪.健康档案在乡镇卫生院慢性病管理中的使用[J].黑龙江档案,2022(01):218-220.

[2]贾东月.大数据时代电子健康档案云服务建设研究[J].黑龙江档案,2022(01):66-68.

[3]吕冠艳,李奋华.个人健康档案管理系统设计与开发[J].电脑编程技巧与维护,2022(02):63-65.DOI:10.16184/j.cnki.comprg.2022.02.032.

[4]齐惠颖,李亚子.发达国家居民电子健康档案开放隐私保护政策研究[J].医学与社会,2022,35(02):135-139.DOI:10.13723/j.yxysh.2022.02.026.

[5]赵云,陈岗.大数据时代居民电子健康档案数据采集设计分析[J].兰台内外,2022(01):7-9.

[6]王建国,薄胜.基于区块链的电子健康档案安全共享模型[J].中国卫生信息管理杂志,2021,18(06):793-796+837.

[7]闫慧,吕风华.居民健康档案建立及健康管理对Framingham十年冠心病风险的影响[J].医学信息,2021,34(24):93-95.

[8]杨雯,王博,王芳,沈智瑛,张慧.健康档案数据管理平台辅助脑卒中护理决策研究[J].中国医学装备,2021,18(12):93-97.

[9]彭艳秋,刘润友,李羚,杨长虹,吕强.四川省基层医疗卫生管理信息系统健康档案管理模块的使用现状分析[J].职业卫生与病伤,2021,36(06):378-385.

[10]丁梅.社区居民健康档案管理的优化路径探微[J].兰台内外,2021(34):4-6.

[11]金秀凤.基于疫情控制的流动人口健康档案构建[J].档案管理,2021(06):126+128.DOI:10.15950/j.cnki.1005-9458.2021.06.048.

[12]张虹.大数据电子健康档案价值认知与应用研究[J].兰台内外,2021(31):79-81.

[13]王浩,周娟,曾雪,孟祥峰,张超,李佳戈.浅谈智能化快速部署医院健康档案数据集质量控制[J].中国医疗设备,2021,36(09):11-14.

[14]许薇娜.电子健康档案对慢性病目标管理的意义[J].黑龙江档案,2021(04):226-227.

[15]张咏梅.基于云计算的电子健康档案平台构建研究[J].黑龙江档案,2021(04):234-235.

[16]王晓君,周翔宇.居民健康档案数据整合与开发利用中的隐私安全探讨[J].卫生软科学,2021,35(08):79-81.

致谢

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

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

Guess you like

Origin blog.csdn.net/DZBS2000/article/details/129080770