You are on page 1of 73

1

Patient Management in Medical Information Management System Based on Mobile Equipment A Thesis in Computer Science

Presented to The Faculty of the International College, Zhejiang University of Technology In Fulfillment of the Requirements for the Degree Bachelor of Science in Computer Science

by
Wang Yijun June, 2013

On my honor as a University student, on this assignment I have neither given nor received unauthorized aid as defined by the Honor Guidelines for Papers in ZJUT Courses.

_________________Wang Yijun__________________

Approved (Technical Advisor)

Zhang Minxia

Approved (IE Advisor)

Zhang Minxia

java MYSQL E-R JAVA,MYSQL

Abstract Nowadays, with the development of medical, the use of medical information management System is needed by more and more people, which replace the paper and artificial management. And the name of our system is Patient Management in Medical Information Management System Based on Mobile Equipment . Based on the requirementsthe system is mainly used for medical system which manages the daily medical administration and calculation for patients and doctorsPatient Management in Medical Information Management System Based on Mobile Equipment can not only reduce the waste of resource and systematically manage the service and information but also decrease the use of labor force improve management efficiency and speed the pace of concerned national department automated information retrieval to standardize the managements[1] The system is wide and comprehensive in including most of the service items of curing plans such as patient information administration system, Patient visit management system, After visit management systemIn developing procedureI pursuer the comprehensiveness and commonality of the system So that it cannot only be applied in one medical institution In choosing the developing methods I combine the life style approach and the prototypebased approachapproach in four main steps system investigation system analysis system design and system implementationIn choosing the developing toolJAVA programming language is employedIn line of MYSQL to ensure the integrated ness and consistencyThis thesis mainly introduces the ideas of the Anglicizingdesigningimplementing and application of this system. It introduces the background of the field and the status of the domestic and international Medical System and the future direction of development. And then, it discusses the significance of the development of Medical system, the design of the project feasibility analysis. After that, analyzes the requirement of the project by object-oriented method, abstract and collect the management process to come to the main function modules which includes user management, visiting management, after-visit management with E-R diagram and the corresponding database table. Key wordsmobile medical systemJavaMYSQL

............................................................................................................................................. 2 Abstract ....................................................................................................................................... 3 ................................................................ 8 1.1 ............................................................................................................................. 8 1.2 ............................................................................................................................. 8 1.3 ........................................................................................................................... 11 1.4 ........................................................................................................................... 12 ......................................................... 13 2.1 ........................................................................................................... 13 2.2 ....................................................................................................................... 13 2.3 ....................................................................................................................... 13 ........................................................... 14 3.1 ........................................................................................................................... 14 3.2 .................................................................................................................................. 14 3.3 ........................................................................................................................... 18 3.3.1 ................................................................................................. 18 3.3.2 ................................................................................................. 18 3.3.3 ................................................................................................. 18 3.3.4 ................................................................................................. 19 3.3.5 ................................................................................................. 19 3.3.6 ......................................................................................... 19 3.4 ............................................................................................................................ 20 3.4.1 Microsoft Windows 7 ................................................................................. 20 3.4.2 C/S frame .................................................................................................... 20 3.4.3 JAVA .......................................................................................................... 20 3.4.4 MYSQL....................................................................................................... 21 3.4.5 Eclipse ......................................................................................................... 21 ........................................................... 22 4.1 ................................................................................................................... 22 4.1.1 ......................................................................................... 22 4.1.2 ............................................................................................. 22 4.1.3 ..................................................................................................... 22 4.1.4 ..................................................................... 24 4.2 ....................................................................................................................... 24 4.2.1 .......................................................................................................... 24 4.2.2 ............................................................................................. 25 4.2.3 E-R .................................................................................................... 26 4.2.4 ............................................................................................. 28 ........................................................... 31 5.1 ................................................................................................................................... 31 5.2 ................................................................................................................................... 31 5.2.1 ............................................................................................. 31

5.2.2 ......................................................................... 37 5.3 ................................................................................................................... 41 5.3.2 ................................................................................................. 41 5.3.3 ................................................................................................. 50 5.3.4 ................................................................................................. 57 5.3.5 ................................................................................................. 61 5.3.6 ................................................................................................. 64 5.3.7 ......................................................................................... 69 ............................................................... 71 6.1 ............................................................................................................... 71 6.2 ....................................................................................................... 71 .................................................................. 73 ...................................................................... 73

Table of content
............................................................................................................................................. 2 Abstract ....................................................................................................................................... 3 Chapter 1 Introduction ..................................................... 8 1.1 Background ......................................................................................................................... 8 1.2 Current situation.................................................................................................................. 8 1.3 Project significance ........................................................................................................... 11 1.4 Report Overview ............................................................................................................... 12 Chapter 2 Feasibility Study ............................................... 13 2.1 The feasibility of organizing and management ................................................................. 13 2.2 Economic feasibility ......................................................................................................... 13 2.3 Technical feasibility .......................................................................................................... 13 Chapter 3 Requirement analysis ............................................ 14 3.1 User group analysis ........................................................................................................... 14 3.2 Use cases .......................................................................................................................... 14 3.3 Function analysis .............................................................................................................. 18 3.3.1 Account system ....................................................................................... 18 3.3.2 Inquiry system ......................................................................................... 18 3.3.3 Communication system ........................................................................... 18 3.3.4 Recording system .................................................................................... 19 3.3.5 Reservation system ................................................................................. 19 3.3.6 Waiting inquiry system ........................................................................... 19 3.4 Development tools .............................................................................................................. 20 3.4.1 Develop System platformMicrosoft Windows 7 .................................... 20 3.4.2 System structural frameC/S frame .......................................................... 20 3.4.3 Programming languageJAVA ................................................................. 20 3.4.4 DatabaseMYSQL .................................................................................... 21 3.4.5 Eclipse ......................................................................................................... 21 Chapter 4 System design ................................................... 22 4.1 System interface design .................................................................................................... 22 4.1.1 System login interface............................................................................. 22 4.1.2 System main interface ............................................................................. 22 4.1.3 Menu block ............................................................................................. 22 4.1.4 Android client and server frame ............................................................. 24 4.2 Database design ................................................................................................................ 24 4.2.1 Overview ................................................................................................. 24 4.2.2 Database selection ................................................................................... 25 4.2.3 Entity Diagram for Each Table ................................................................... 26 4.2.4 Database Design...................................................................................... 28 Chapter 5 System implementation ........................................... 31 5.1 Overview ........................................................................................................................... 31 5.2 Class Diagram ................................................................................................................... 31

5.2.1 client part ................................................................................................ 31 5.2.2 Server part Class Design and Implement ................................................ 37 5.3 User Management Function Implements .......................................................................... 41 5.3.2 Account system ....................................................................................... 41 5.3.3 Inquiry system ......................................................................................... 50 5.3.4 Communication system ........................................................................... 57 5.3.5 Recording system .................................................................................... 61 5.3.6 Reservation system ................................................................................. 64 5.3.7 Waiting inquiry system ........................................................................... 69 Chapter 6 Conclusion ...................................................... 71 6.1 Conclusion ..................................................................................................... 71 6.2 Further work................................................................................................... 71 Reference ................................................................. 71 Acknowledgments ........................................................... 73

Chapter 1 Introduction
In contemporary China, only a few hospital has a well-functional e-medical system. This phenomenon means a huge cost on human resources and financial resources. A mobile information and communication systems in good medical information management system in clinical routine have the potential to greatly improve communication, facilitate information access, and increase quality of patient care in the long period. Maybe a software can not save a life, but it has the ability to improve the efficiency of hospital. A medical information management system can remind patients to do a lot of things. For example, remind patient to go to hospital, remind patient to eat pills which daily protective measures are really important for patients in the period of treatment. Besides these, the mobile medical service can give psychological comforting to patient, let them know the doctors are caring about them.

1.1

Background

Because the extremely huge population in China. Hospitalization and outpatient caring has been a serious problem for a long time even though the government and related department have put forward many solutions to solve this problem. Patients have different encounters when go to the hospitals and suffer pains at home. Also due to the low amount of doctors per thousand people, the medical system can not satisfy everyone's need. Consequently, the phrase "three long and one short" which means "the time of registration, the time of waiting to see the doctor and the time of waiting to pay are long. And the time for treatment is short" has become a topic often be discussed .Meanwhile, patients are not professional in the medical field, so lack of comprehension and communication between doctors and patients during treatment will cause some unexpected incidents. And the model for patients to receive treatment often lead to a huge cost on human resources ,financial resources and time resources, so everyone wants to seek a way to improve the situation. And Due to the rapidly development of technology, smart mobile phone has been permeated into people' daily lives. But unfortunately, medical software which can improve the efficiency is not widely used like the games and news software. Consequently, a mobile medical information management system can not only bring convenience to patient, but also help doctors to hand patient's condition.[2]

1.2

Current situation

Although the Chinese government has been realized the importance of dealing with relationship between doctors and patients, provide convenient service for both doctors

and patients, there still problems influence the development of e-hospitalization. The main problems are as follows. 1.2.1. Lack of communication Many problems exist in dealing with the patients in China, among which communication is one of the most important. The absence of universal and consistent standards for managing and exchanging clinical and administrative information has been identified as a main element which limits the utilization and improvement of the E-hospitalization. For example, a software develop company can develop an excellent system for hospital, but they do not know the medical information, so the system do not have good practicability. Therefore, one of priorities in national standardization actions is to speed up the development of essential, indispensable and self-contained exchange mechanism for E-hospitalization. In fact, after several years of widely using information systems, health providers recognized that communication were the basis for the information containing and running in most occasions. The government of China also realized this problem and has taken efforts to construct the health information platform and network for users to exchange ideas and professional information. [3] 1.2.2. Lack of standardization and supervision E-hospitalization developments began to speed up since the early 1990s in China. All levels of health administrations, hospitals and some information development companies realized the importance of E-hospitalization and they invested huge personnel and money into E-hospitalization developing. Especially in well-developed regions such as Beijing, Shanghai, Guangdong, Shandong, the E-hospitalization develop a lot and have larger scale. Yet the reasons those without plans as a whole and control for E-hospitalization by the related health administrations, without standards to comply with and without supervision by some related administrations. Consequently, this phenomenon leads to a non-normative E-hospitalization developing processes. And a reason may be that because standardization for health informatics is an authoritative field, in this authoritative area, market mechanism does not work well, so we can not judge this result in a normal way. Also, due to misalignment of incentives, a phenomenon often happens that the people who invest in standardization cannot gain benefit directly even they may get loss. Therefore they might prefer to invest in network and hardware than in standardization. The government may play a role to stimulate adoption by setting standards. In fact, the government had indeed taken measures to enforce the construction of standardization. Hospital information relate to medical treatment, education, medical research, personnel, money, and substance. Unification of the titles, the concept, the classification and the codes are the basic precondition for information interchange. But the most difficulty is that the standards are not unified. For example, the titles and codes of the case reports, drugs, personnel, equipment, inspection and examination differ in different hospitals. The definition, description and practice operation for the same thing are different. Owing to without unified and authoritative hospital standardization data dictionaries, as well as different E-hospitalization developed by

10

different companies with different codes and standards, two bad results come into being. The first one is that every hospital has to develop consumer dictionary, which result in tremendous waste of personnel, money, substance and time. The second one is that standards and user dictionaries are established differently, which affect the unit into the internet and can't share information. There are two poor results. The first one is that E-hospitalization were developed free, the software had no standards, the developed platform therefore varied. The second problem is that the E-hospitalization develop companies were in different levels, and many of them did not specialize in E-hospitalization develop and medical information, they were not familiar with the style of hospital management and workflows, or they only knew some specific hospitals. Moreover, there are actually some third-party software companies supply services which runs good, but due to the lack of official standard, these companies often charge a lot, individuals and hospitals cannot afford the cost and are not willing to use the service. 1.2.3 The management of hospital is lagging The models of hospitals management influences on E-hospitalization construction a lot. Due to China reform and opening-up to the outside world late in the world, the modern management style is not widely used in every hospital. And because of the complexity of hospitals management, workflows and circumstances in different hospitals differ very much. E-hospitalization implementation requires both technical technology and behavioral supervision, and development of E-hospitalization should be carried out within the context of the development itself. An application about E-hospitalization without studying or absorbing others' advantages has become one bottle neck for E-hospitalization development. Compared with hospitals' directors with managers who have MBA, who manage the hospitals, in developed countries, most of hospitals directors in China are good medicine experts but they are not familiar with modernization management. They have no experience in management methods, and did not know science and normative management. When constructing E-hospitalization in their hospitals, it was nonscientific and unreasonable when they usually requested the E-hospitalization accommodate with their existing management modes in spite of their management modes. 1.2.4 Difficult to carry To a certain extent, traditional medical systems solve some problems of patients. But only in the hospitals, the patients have the chance to do some actions about visiting the doctors, which phenomenon reflects a problem that people can not to see a doctor in the situation they can handle. Patients can not know the medical information unless they go to hospitals. A medical system based on mobile equipment can solve this problem.

11

1.3

Project significance

Nowadays, network makes it possible to use the new e-hospitalization management model to manage medical information in daily life without going to hospital. Thanks to the specific network management system, the dedicated medical managers can improve their work efficiency and make the coordination of medical management better, and it can also improve the utilization of e-hospitalization. On the other hand, people who related to medical manage can manage their own time and medical information to find the best time for them to get medical curing and communicate with their doctors in a timely which contribute to the development of the medical system actively. The medical management of enterprises can meet the development requirements of the times through the network of corporate medical management, and this measure can also improve the core competitiveness of enterprises greatly. Therefore, the significances of developing the small and micro-sized e-hospitalization management system are following: 1) Integrated information source The e-hospitalization can use a centralized database to unite the whole medical management information, this measure can reduce the original hospitalization staffs duplication effort and it can also ensure the compatibility of the information. In conclusion, this method improves work efficiency greatly, and enables the medical staffs who own multiple roles still have spare time for more creative work. 2) Easier to query, equity for everyone Through the integration of medical information, hospitals can transform the original process which depends on the human into the new process that depends on the computer system. Users enter the system to view related information by different accounts that include different authority. Integration of resources enhances the binding of the system, increase transparency, and avoid potential risks to a certain extent that reflects the principle of fairness. 3) Enhance service awareness Due to network transmission and remote access, medical management has changed from relatively closed to open that is helpful to enhance service and staffs in different departments are more closed. 4) Reduce management costs First of all, medical management system is an integral part of enterprises informatization that enables companies to achieve paperless office. In addition, a large number of administrative work can be done through the system, LAN and related network. It can also reduce the cost of corporate personnel, communications, travel and transportation costs expenses. 5) Improve the management level The reports and analysis that are generated by the e-hospitalization system can provide a scientific decision reference. To a certain extent, it can improve the level of enterprises decision management, and due to the openness of the system and the requirements of modern medical philosophy prompt managers to improve their

12

quality continuously. Thus, it would contribute to the overall improvement of the enterprises management level. 6) Promote technological upgrading There would take places many changes in the medical system because of the system. Most of daily administrative affairs can be done by the computer system and it just takes less effort and time. To this end, the ultimate goal of the medical management system is not just to improve the management but to achieve innovative management philosophy.

1.4

Report Overview

According to the method of software engineering, this report has analyzed the whole medical management system and the general design. This project will be constructed by the SQL Server which is a kind of high performance databases and efficient development environment Eclipse. After studying the issue of this system, the main task of this project includes the feasibility analysis, requirement analysis, system design, and system implementation. These entire tasks would be recorded in the following.

13

Chapter 2 Feasibility Study


Feasibility studies aim to objectively and rationally uncover the strengths and weaknesses of the existing business or proposed venture, opportunities and threats as presented by the environment, the resources required to carry through, and ultimately the prospects for success.[9]

2.1

The feasibility of organizing and management

This medical management system will be deployed in curing plan . The whole system includes several different function modules such as patient information administration system, Patient visit management system, After visit management system, etc. These data will be stored in the database and some important data should be kept in private. At this point, not every user can view those dates. Every common user in this system has the only authorities is that they can only use their accounts. Users need correct account name and password to log in the system.

2.2

Economic feasibility

At the present stage, the main task is to develop the medical management system and this report. Therefore, only one computer with appropriate software is enough. We do not need extra expenses. At the next step, when deploy the system for the real using, several computers are needed. One of these computers acts as the server which store data in the database. Others computers acts as the client, and using switches or routes link these computers together. After that, the deployment has finished and we can use the system to manage the medical information.

2.3

Technical feasibility
The development environment of the system is Eclipse, the mainly coding language is JAVA, and SQL Server is chosen as the database of the project. The medical management system can be executed on any computers with Windows XP/Vista/7 and .NET Framework.

14

Chapter 3 Requirement analysis


Feasibility studies aim to objectively and rationally uncover the strengths and weaknesses of the existing business or proposed venture, opportunities and threats as presented by the environment, the resources required to carry through, and ultimately the prospects for success[i].

3.1

User group analysis

The purpose of building this system is to build a medical system based on cellphone for patients to visit the doctors, which can provide convenient services for patients. Therefore, the main users of the system are the patients who get sick and will to see the doctors. Due to the main purpose is to provide convenience for patients, so the functions and interface of the system will be clean and sententiousness. The functions will only include the main problems which are much more considered by patients when the patients to go to hospitals. For some personal information consideration, one patient will only have one account, so reservation in a account only belong to one patient. Because the system setup on the personal cellphone, so the authority management will not be complicated.

3.2

Use cases

15

16

17

This use case shows the relationship between the every part of the system. The user is the actor in the use case. It means the user of the system, he could use any functions in the system to satisfy the requirement. The use case contains Reservation system, inquiry system and other thre additional functions. Through this use case, we could see the simple structure for the whole system. The detail function analysis will be mentioned under this section. The figures above are the main use cases and actors for the system.

18

3.3

Function analysis

3.3.1 Account system


User account management function is to keep user information. It mainly supplies login function, checking account and password in database function, checking information entered and feedback function. Only both account and password are correct, login function could operate success. When users use this system, they can register an account in database. After this step, user could keep all information including: user name, password, messages, case history and other setting of this user. All other functions are based on it.

3.3.2 Inquiry system


This module is one of the core modules in this project. It includes three parts: the doctor information inquiry, the medicine inquiry and the hospitals inquiry. The first part, the doctors information management is fairly significant for this system. The whole data about doctors is stored by this module. The operator can add new doctors or edit the issue about a specific doctor in the database. This information is stored in the database including the doctors name, talents competences, the charge, the address, the professional title and other related information about the doctors. In addition, the system can also save the photo of the doctors in this module which is more intuitive in some cases. The second part is the medicine inquiry. The whole data about medicine is stored by this module. The operator can add new drugs or edit the issue about a specific drug in the database. This information is stored in the database including the drugs name, place of production, the effect, the price, the type and other related information about the drugs. In addition, the system can also save the photo of the doctors in this module which is more intuitive in some cases. The third part is hospitals inquiry. The whole data about hospital is stored by this module. The operator can add new hospital or edit the issue about a specific hospital in the database. This information is stored in the database including the hospitals name, competences, the charge, the address, the professional title and other related information about the hospitals. Patients can see all of the information when they login and click on related buttons.

3.3.3 Communication system


This module is another core part in this project. A good communication can help doctor cure patients efficiently, so communication system can help improve the quality of curing a lot. Nowadays, communication has become an important part of

19

going to a doctor, but there are no available communication styles except phone call, it gives doctors and patients a lot of troubles, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a communication system is needed not only the patients but also the hospitals. This function can help them a lot. It includes the messages function. When patients suffer some problems, they can send a message to doctors, and the case history will be showed on the message interface, so doctors can communicate with patients about the disease very well.

3.3.4 Recording system


A good recording system can help doctor cure patients efficiently by knowing the patients case history, so recording system can help improve the quality of curing a lot. Nowadays, recording has become an important part of going to a doctor, but recording kept by patients only is the paper record, it is inconvenient for patients to carry a series of records. It gives patients a lot of troubles, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a recording system is needed not only the patients but also the hospitals. This function can help them a lot. It includes the case history record function. After patients finish the curing plan, they can record the curing plan, and the case history will be showed on the message interface, so next time people who check the case history can see the record.

3.3.5 Reservation system


This module is the major core part in this project. Nowadays, reservation has become an important part of going to a doctor, but due the huge population of China, it is hard for patients those who go to hospitals to get a reservation, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a Reservation system is needed not only the patients but also the hospitals. This function can help them a lot. It includes the reservation, the management of reservation and inquiry about reservation. When building a new reservation, these data would be sync into the report. And in the reservation condition, the operator can add or cancel some reservations according to the actual situation.

3.3.6 Waiting inquiry system


When patients go to hospitals, it is very annoyed that they have to wait for a long time before the cure. Patients do not want to wait for a long time in the history and hospitals need to do something reduce the number of waiting people in order to

20

manage the order in hospitals. It gives patients a lot of troubles, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a waiting inquiry system is needed not only the patients but also the hospitals. This function can help them a lot. In this system, patients can see how many patients are waiting before them so they can manage their time reasonably.

3.4 Development tools 3.4.1 Develop System platformMicrosoft Windows 7 3.4.2 System structural frameC/S frame

Client/Server structure is a software system architecture, By using this kind of system architecture, designer can take full advantage of the hardware circumstances by assign the tasks to client and server rationally. It reduces the cost of running a system. Nowadays, most application system use Client/Server frame. And because the software application programs are developing into Web application, Web and Client/Server applications can both deal the same business and share logic groupware by using different modules. So both the inner and outer users can access both new and existing application system, and using the existing application system to develop new application system. And this frame is the developing direction which the application system go towards.

3.4.3 Programming languageJAVA


Java is a language which can program in a cross-platform applications, object-oriented way. It is launched by Sun Microsystems, Inc. in May 1995. Java is

21

the generic terms of the Java programming language and the Java platform (ie JavaSE, JavaEE, and JavaME).Java technology has excellent versatility, efficiency, platform portability, and security, are widely used in personal PC, data center, gaming consoles, scientific supercomputers, mobile phones and the Internet, at the same time,it has the world's largest community of professional developers. Under the global cloud computing and mobile Internet industry environment, Java has significant advantages and broad prospects.

3.4.4 DatabaseMYSQL
MYSQL is Microsoft's database product, and MYSQL has been widely used. many e-commerce sites, enterprise internal information platform is based on the SQL Server product. Today's business environment requires different types of database solutions. Performance, scalability and reliability are the basic requirements, and the time to enter the market is also critical. In addition to these core enterprise qualities, MYSQL for data management and analysis brings flexibility allows the unit to respond to the rapidly changing environment calmly. MYSQL for the rapid development of a new generation of enterprise-class business applications for enterprises to win competitive advantage to open the door of victory. MySql is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases [10]. MySql is the worlds most popular open source database. Comparing to other large database system, although, its function didnt as strong as the same data base such as: SQL server and Oracle, MySql is cheaper and quicker. Because of its open source feature, many small companies and people choose it for keeping data [11].

3.4.5 Eclipse
In computer programming, Eclipse is a multi-language Integrated development environment (IDE) comprising a base workspace and an extensible plug-in system for customizing the environment. It is written mostly in Java. It can be used to develop applications in Java and, by means of various plug-ins, other programming languages including Ada, C, C++, COBOL, Fortran, Haskell, JavaScript, Perl, PHP, Python, R, Ruby (including Ruby on Rails framework), Scala, Clojure, Groovy, Scheme, and Erlang. It can also be used to develop packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++ and Eclipse PDT for PHP, among others. The initial codebase originated from IBM VisualAge.[2] The Eclipse software development kit (SDK), which includes the Java development tools, is meant for Java developers. Users can extend its abilities by installing plug-ins written for the Eclipse Platform, such as development toolkits for other programming languages, and can write and contribute their own plug-in modules.

22

Released under the terms of the Eclipse Public License, Eclipse SDK is free and open source software (although it is incompatible with the GNU General Public License[3]). It was one of the first IDEs to run under GNU Classpath and it runs without problems under IcedTea.

Chapter 4 System design


4.1 System interface design

4.1.1 System login interface


The whole interface should be friendly. When the system is executed, the login window would be shown at first. The login window is consisted of two Text fields and two buttons. The two Text fields are used to input account and password. These data would be checked in the database after click the button, and then then the man windows would be shown if they are correct. At the same time the system would check the account authorities. Another button on the window is used to exit this system.

4.1.2 System main interface


The main frame is divided into three main components including the menu block, the main block and the status strip. At the top of the main window is the menu block. The menu contains several menu buttons and several menu items. Almost all the functions can be loaded from these menu items. The main block is in the center of this main window. All those function modules would be shown in this area. At the bottom of the window is the status strip. It would show the current account name at the left of the strip. On the other side, it would show the current time.

4.1.3 Menu block


Almost the whole modules are called from the menu block. In this stage, there would be five menu buttons on this block including reservation, hospitals inquiry, waiting inquiry, and drugs inquiry , recording and communication. Clicking

23

every menu button, some menu items would be shown. The whole relationship in detail would be shown below.
The menu block of the project

Inquiry

Reservation

Waiting inquiry

Recording

Communication

Figure 4-1

Relationship in menu block

Inquiry Drugs inquiry Drugs information Hospitals inquiry Hospitals inquiry

Figure 4-2 Menu items in inquiry

Reservation Doctor inquiry Doctor information


Figure 4-3

Manage reservation Check reservation Cancel reservation

Reservation

Menu items in reservation


Waiting inquiry

Show number of waiting people

Figure 4-4

Menu items in waiting inquiry

Recording Message display


Figure 4-5 Menu items in record

Message blank

Send message

24

Communication

Message display

Message blank

Send message

Figure 4-6

Menu items in communication

4.1.4 Android client and server frame

Android applacation client

Request to send JSON response


Servlet (control unit layer) Service (business layer) Dao (Data Access Object) PO (Persisent Object) Databese (MySQL)

Figure 4-7 Android application and Jave EE integrate frame

4.2

Database design

4.2.1 Overview
The database plays a very important role in this project. All data and attribute information are stored in the database. In addition, most of operations are related to the database. The database of this system consisted of several tables, some tables are simple and others are a Bit complex. The simple tables are just made up of ID and name such as degree, charge, introduction, etc. Some complex tables are a Bit complex that include many variables such as the address, phone, etc. The whole tables of database in this project would be descripted below by the E-R diagrams and tables forms.

25

4.2.2 Database selection


MySQL is the world's most widely used[10][11] open source relational database management system (RDBMS)[12] that runs as a server providing multi-user access to a number of databases. It is named after co-founder Michael Widenius' daughter, My.[13] The SQL phrase stands for Structured Query Language. The MySQL development project has made its source code available under the terms of the GNU General Public License, as well as under a variety of proprietary agreements. MySQL was owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, now owned by Oracle Corporation.[14] MySQL is a popular choice of database for use in web applications, and is a central component of the widely used LAMP open source web application software stack (and other 'AMP' stacks). LAMP is an acronym for "Linux, Apache, MySQL, Perl/PHP/Python." Free-software-open source projects that require a full-featured database management system often use MySQL. There are many choices for database choose, but synthesize the cost and efficiency. In this system, MySql seems the best choice. As we know, MySql is open-source software, so the cost of the all system will reduce much than other big software. From the efficiency aspect the MySql also satisfied a better performance. Although, MySql is not as outstanding as Oracle or Microsoft SQL in both query speed and data capability, the support for Chinese language is well and the function is good enough for this system [15]. The most important reason for choosing MySql database is that it has well performance to accomplish tasks but it will cost much less than Oracle or Microsoft SQL. And it has many small tools for the visual create, as the same as itself, the tools is free or very cheap. So I choose the MySql for this systems database for its low cost and relative high efficiency.

26

4.2.3 Entity Diagram for Each Table

id

name

Doctors type degree

charge

Figure 4-8 Entity Diagram of doctors information

Table is doctors which used for doctor information inquiry. It stores the information about the doctors patients want to reserve.

id

name

Hospitals introduction address

phone

Figure 4-9 Entity-Diagram of detailinfo

27

Table is hospitals which used for hospital information inquiry. It stores the information about the hospital patients want to inquire.

id

name

Drugs

type
Introduction

charge

Figure 4-10 Entity-Diagram of fileinfo

Table is drugs which used for drug information inquiry. It stores the information about the drug patients want to know.

gender

ID

name

password

user

account

permission

remark

Figure 4-11 Entity-Diagram of user information

The table user is the table which will store the user detail information for personal information and login the system.

28

id

Messages messages

Figure 4-12 Entity-Diagram of messages information

The table messages is the table which will store the message information for communication.

id

record Case historu\

Figure 4-13 Entity-Diagram of record information

The table record is the table which will store the case history for patients and doctors.

4.2.4 Database Design


There are using six tables in this system, the descriptions below are the details about every table and its structure.

29

First table is doctor which used for reservation function. Table is doctors which used for doctor information inquiry. It stores the information about the doctors patients want to reserve. User could change any option in this table expect the id item. The id is the primary key of this database table and will increase automatically, it used for distinguish the different doctors and get in touch with different account. The name stores the doctors names. The type stores the doctor introduction. The money stores the charge of reservation. The zhicheng store the degree of the doctors

Table 4-14 doctor database table

Name id name type money Zhicheng

Data Type Int(11) Varchar(255) Varchar(255) Varchar(255) Varchar(255)

Primary key TRUE FALSE FALSE FALSE FLASE

Foreign Key FALSE FALSE FALSE FALSE FALSE

Auto_increase TRUE FALSE FALSE FALSE FALSE

Second table is hospitals which used for hospital inquiry function. Table is hospital which used for hospital information inquiry. It stores the information about the hospitals, so patients can choose the most suitable hospital to go. User could change any option in this table expect the id item. The id is the primary key of this database table and will increase automatically, it used for distinguish the different hospitals and get in touch with different accounts. The name stores the hospitals names. The address stores the addresses of the hospitals. The phone stores the phone number of the hospitals. The itro store the hospitals information.
Table 4-15 hospitals database table

Name id name address phone intro

Data Type Int(11) Varchar(255) Varchar(255) Varchar(255) Varchar(255)

Primary key TRUE FALSE FALSE FALSE FALSE

Foreign Key FALSE FALSE FALSE FALSE FALSE

Auto_increase FALSE FALSE FALSE FALSE FALSE

The third table is drugs which used for inquiry function. Table is drugs which used for drug information inquiry. It stores the information about the drugs patients want to know. User could change any option in this table expect the id item. The id is the primary key of this database table and will increase automatically, it used for distinguish the different doctors and get in touch with different account. The num

30

stores the drugs names. The personNum stores the drugs introduction. The flag stores the charge of drugs. The type store the drugs type.
Table 4-16 drugs database table

Name id num type personNum flag

Data Type Int(11) Varchar(255) Varchar(255) Varchar(255) Varchar(255)

Primary key TRUE FALSE FALSE FALSE FLASE

Foreign Key FALSE FALSE FALSE FALSE FALSE

Auto_increase TRUE FALSE FALSE FALSE FALSE

Then is the another table to store the user information for who register in the system is the table usertbl. The id is the primary key of this database table and will increase automatically, and it uses to distinguish the different account, every account has a unique one. The account stores the accounts names users need to type in when they login the system, the purpose is help to remember contrast with a group numbers. The password stores the account password for user. The name stores the users names users. The permission stores the accounts authority. The gender stores the users gender. The remark stores the note about the account.
Table 4-17 usertbl database table

Name name id password account gender Permission Remark

Data Type Varchar(40) Int(11) Varchar(40) Varchar(100) Varchar(20) Int(11) text

Primary key FALSE TRUE FALSE FALSE FALSE FALSE FALSE

Foreign Key FALSE FALSE FALSE FALSE FALSE FALSE FALSE

Auto_increase FALSE FALSE FALSE FALSE FALSE FALSE FALSE

Another simple table to store the message which patients send to doctors. The id is the primary key of this database table and will increase automatically, and it uses to distinguish the different account, every account has a unique one. The message stores the messages.
Table 4-18 message database table

Name id message

Data Type int text

Primary key TRUE FALSE

Foreign Key FALSE FALSE

Auto_increase TRUE FALSE

31

Last simple table to store is the case history table. The id is the primary key of this database table and will increase automatically, and it uses to distinguish the different account, every account has a unique one. The record1 stores the case history.
Table 4-19 record database table

Name id Record1

Data Type int text

Primary key TRUE FALSE

Foreign Key FALSE FALSE

Auto_increase TRUE FALSE

Chapter 5 System implementation


5.1 Overview
This system is developing in the eclipse-jee-juno-SR2-win32-x86_64 with the JAVA language. The advantage of this language is for its high integrated and support application. The GUI design become very easy, the system will produce the program for the interface automatically. Java is a language which can program in a cross-platform applications, object-oriented way. It is launched by Sun Microsystems, Inc. in May 1995. Java is the generic terms of the Java programming language and the Java platform (ie JavaSE, JavaEE, and JavaME).Java technology has excellent versatility, efficiency, platform portability, and security, are widely used in personal PC, data center, gaming consoles, scientific supercomputers, mobile phones and the Internet, at the same time,it has the world's largest community of professional developers. Under the global cloud computing and mobile Internet industry environment, Java has significant advantages and broad prospects. The advantage of MySql is very cheap relatively, and the efficiency seems enough for this system includes: the speed for reading, searching, and recording etc. For receive the mails and implement the database connect, two tools is necessary as follow as MySql.Data and OpenPop. The former is used for connect with database through this language, this tool is supported by the MySql and could download in the Internet. The latter is an open-source dll (Dynamic Link Library) file. The function of it is helping us to receive mails quickly and security including the mails decodes, get message header, get message body, exception handle. etc.

5.2

Class Diagram

Because the whole system is divided into two parts: the client and the server, so I will introduce two parts of the system.

5.2.1 client part


The class diagram of client part

32

There are about 17 classes in this client part. The class Program provides the main function and will lead the main frame to user. The class JsonArrayAdapter is the

33

connection between client and server. Data convey between JsonArrayAdapter and the class Encodingfliter in the server. The four classes: CheckTable, HospitalIntro, HttpUtil, Shop, are used to get the data from JsonArrayAdapter, and then return the data. The classes: ShopDisplayActivity, MainMenuActivity, HospitalIntroActivity, LoginActivity, DecTallAboutActivity, LogoutActivity, CheckTableActivity, are charge for the normal activities when user operate the system. The classes: DecCheckHist, DecDetialYaoWu, DecDetialYiYuan, DecDetial, are used to jump pages, convey data and connect the xml frame. Class diagram: In all class onCreate() method used to control the control widgets like edited content and buttons showed on the screen. MainMenuActivity class:

The class provide function for the main menu activities. The linstener methods are response to users click on the screen.

LoginActivity Class:

34

The class provide function for login, query() method will get the account and password the user typed in, and then validate() method will check if the account is accurate, then the login() method will return if the user can login. ShopDisplayActivity class:

Provide function to receive the data from server, and then response to the users operations, Provide functions to view and get the data from the CheckTable, HospitalIntro, Shop classes, and provide functions to jump to xml pages. initView() method get the layout, and initData() method display the data. Onclick() and onItemClick() provide the reservation function, when user click the doctor they want to reserve, the doctor will display and saved in xml. And parseJsonMulti() charges for the data exchange between server and client

Dec classes:

35

Provide functions to view and get the data from the CheckTable, HospitalIntro, Shop classes, and provide functions to jump to xml pages. initView() method get the layout, and initData() method display the data. CheckTable, HospitalIntro, Shop classes:

36

Receive data from database, get() and set() methods charge for data dealing. HttpUtil:

Provides function for connecting with database and server. getHttpGet() used for receiving the url address, getHttpPost() method used to post url address. getHttpResponse() and getHttpResponse() used for dealing with request from client. Query() methods used to url and request data exchange.

37

5.2.2 Server part Class Design and Implement

Servlet (control unit layer)

Service (business layer)

Dao (Data Access Object)

PO (Persisent Object)

The figure above is the server workflow. And here is the class diagram of server. ,Lo

There are 19 classes in the server. The entity packages which include Hospitals, User, CheckTable, Shop classes is define the methods used in Dao layer, which is more concrete. In these classes, parameters and variables are defined.

38

The Dao package which include UserDao, ShopDao, HopistalDao, CheckTableDao classes are mainly the interfaces which define some methods used to data operation.

39

The Daoimpl packages which include HospitalsDaoImpl, UserDaoImpl, CheckTableDaoImpl, ShopDaoImpl classes DaoImpl is the Daos implementation.

The Servlet package which include CheckHospitalServlet, LoginServlet, CheckShopServlet, CheckTableServlet classes is used to connect the server and client

40

The DBUtil class used for method get data from database.

41

5.3

User Management Function Implements

5.3.2 Account system


Function Description
User account management function is to keep user information. It mainly supplies login function, checking account and password in database function, checking information entered and feedback function. Only both account and password are correct, login function could operate success. When users use this system, they can register an account in database. After this step, user could keep all information including: user name, password, messages, case history and other setting of this user. All other functions are based on it.

Activity Diagram

Login operation

Cancel the login

Login system

Enter Check Check

Check databa

Operate success

42

Implement the function

The main frame when user opens the system. The buttons are available when user login the system. It also the main frame, other function will implement from this.

The system will give above suggestion if any of the input information is wrong, maybe it does not exist or the password not fit the user name.

43

And after login, the main menu will be like this, all the functions of the system will be displayed on the main menu. If the user register the account, and the user name, password are right by contrast with the database. The other functions in main frame could be use by user. All of the function will use the database. The system will display the login interface. The message box will give the corresponding mentioned for each situation.

Code
public class MainMenuActivity extends Activity { public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("-"); setContentView(R.layout.main_menu); GridView gridview = (GridView) findViewById(R.id.gridview); gridview.setAdapter(new ImageAdapter(this)); } // BaseAdapter public class ImageAdapter extends BaseAdapter { // private Context mContext; // public ImageAdapter(Context c) {

44

mContext = c; } // public int getCount() { return mThumbIds.length; } // public Object getItem(int position) { return null; } // id public long getItemId(int position) { return 0; } // public View getView(int position, View convertView, ViewGroup parent) { // TextView text; if (convertView == null) { // text = new TextView(mContext); // text.setLayoutParams(new GridView.LayoutParams(100, 100)); text.setPadding(8, 8, 8, 8); } else { text = (TextView) convertView; } // text.setText(mThumbIds[position]); // switch (position) { case 0: text.setOnClickListener(orderLinstener); break; case 1: text.setOnClickListener(unionTableLinstener); break; case 2: text.setOnClickListener(changeTableLinstener1); break; case 3: text.setOnClickListener(numberLinstener); break;

45

case 4: text.setOnClickListener(changeTableLinstener); break; case 5: text.setOnClickListener(hospitallinstener); break; // final SharedPreferences sp = MainMenuActivity.this.getSharedPreferences(LoginActivity.name, 1); // final String str = sp.getString("str", ""); // final String [] strs = str.split(";"); // int index = 0 ; // for(int i=0;i<strs.length;i++){ // if(strs[i].equals("")){ // continue; // }else{ // index++; // } // } // Toast.makeText(MainMenuActivity.this, ""+index, Toast.LENGTH_LONG).show();

default: break; } return text; } private String[] mThumbIds = { "", "", "", "", "", "" }; } OnClickListener hospitallinstener = new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent();

46

intent.setClass(MainMenuActivity.this, HospitalIntroActivity.class); startActivity(intent); } }; OnClickListener checkTableLinstener = new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(); intent.setClass(MainMenuActivity.this, CheckTableActivity.class); startActivity(intent); } };

OnClickListener orderLinstener = new OnClickListener() { @Override public void onClick(View v) { Intent intent = Intent(MainMenuActivity.this,ShopDisplayActivity.class); startActivity(intent); } }; OnClickListener exitLinstener = new OnClickListener() { @Override public void onClick(View v) { logout(); } }; OnClickListener numberLinstener = new OnClickListener() { @Override public void onClick(View v) { final SharedPreferences sp MainMenuActivity.this.getSharedPreferences(LoginActivity.name, 1); final String str = sp.getString("str", ""); final String [] strs = str.split(";"); int index = 0 ; for(int i=0;i<strs.length;i++){ if(strs[i].equals("")){ continue; }else{ index++; } }

new

47

Toast.makeText(MainMenuActivity.this, " "+index, Toast.LENGTH_LONG).show(); } }; OnClickListener changeTableLinstener = new OnClickListener() { @Override public void onClick(View v) { Intent intent = Intent(MainMenuActivity.this,DecTallAboutActivity.class); startActivity(intent); } };

new

OnClickListener unionTableLinstener = new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainMenuActivity.this,CheckTableActivity.class); startActivity(intent); } }; OnClickListener changeTableLinstener1 = new OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainMenuActivity.this,Decrecord.class); startActivity(intent); } }; private void logout(){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("") .setCancelable(false) .setPositiveButton("", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { SharedPreferences pres = getSharedPreferences("user_msg", MODE_WORLD_WRITEABLE); SharedPreferences.Editor editor = pres.edit(); editor.putString("id", ""); editor.putString("name", ""); Intent intent = new Intent(); intent.setClass(MainMenuActivity.this, LoginActivity.class); startActivity(intent); }

48

}) .setNegativeButton("", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); AlertDialog alert = builder.create(); alert.show(); } }

public class LoginActivity extends Activity { private Button cancelBtn,loginBtn; private EditText userEditText,pwdEditText; public static String name; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle("-"); setContentView(R.layout.login_system); cancelBtn = (Button)findViewById(R.id.cancelButton); loginBtn = (Button)findViewById(R.id.loginButton); userEditText = (EditText)findViewById(R.id.userEditText); pwdEditText = (EditText)findViewById(R.id.pwdEditText); cancelBtn.setOnClickListener(new OnClickListener() { public void onClick(View v) { finish(); } }); loginBtn.setOnClickListener(new OnClickListener() { public void onClick(View v) { if(validate()){ if(login()){ name = userEditText.getText().toString(); Intent intent = new Intent(LoginActivity.this,MainMenuActivity.class); startActivity(intent); }else{ showDialog("");

49

} } } }); } private boolean login(){ String username = userEditText.getText().toString(); String pwd = pwdEditText.getText().toString(); String result=query(username,pwd); if(result!=null&&result.equals("0")){ return false; }else{ saveUserMsg(result); return true; } } private void saveUserMsg(String msg){ String id = ""; String name = ""; String[] msgs = msg.split(";"); int idx = msgs[0].indexOf("="); id = msgs[0].substring(idx+1); idx = msgs[1].indexOf("="); name = msgs[1].substring(idx+1); SharedPreferences pre = getSharedPreferences("user_msg", MODE_WORLD_WRITEABLE); SharedPreferences.Editor editor = pre.edit(); editor.putString("id", id); editor.putString("name", name); editor.commit(); } private boolean validate(){ String username = userEditText.getText().toString(); if(username.equals("")){ showDialog(""); return false; } String pwd = pwdEditText.getText().toString(); if(pwd.equals("")){ showDialog("");

50

return false; } return true; } private void showDialog(String msg){ AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(msg) .setCancelable(false) .setPositiveButton("", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { } }); AlertDialog alert = builder.create(); alert.show(); } private String query(String account,String password){ String queryString = "account="+account+"&password="+password; String url = HttpUtil.BASE_URL+"servlet/LoginServlet?"+queryString; return HttpUtil.queryStringForPost(url); } }

5.3.3 Inquiry system


Function Description
This module is one of the core modules in this project. It includes three parts: the doctor information inquiry, the medicine inquiry and the hospitals inquiry. The first part, the doctors information management is fairly significant for this system. The whole data about doctors is stored by this module. The operator can add new doctors or edit the issue about a specific doctor in the database. This information is stored in the database including the doctors name, talents competences, the charge, the address, the professional title and other related information about the doctors. In addition, the system can also save the photo of the doctors in this module which is more intuitive in some cases. The second part is the medicine inquiry. The whole data about medicine is stored by this module. The operator can add new drugs or edit the issue about a specific drug in the database. This information is stored in the database including the drugs name, place of production, the effect, the price, the type and other related information about the drugs. In addition, the system can also save the photo of the doctors in this module which is more intuitive in some cases. The third part is hospitals inquiry. The whole data about hospital is stored by this module. The operator can add new hospital or edit the issue about a specific hospital in the

51

database. This information is stored in the database including the hospitals name, competences, the charge, the address, the professional title and other related information about the hospitals. Patients can see all of the information when they login and click on related buttons.

Activity Diagram

The main frame

Medicine inquiry

Hospitals inquiry

Click Check information

52

Implement the Function

This is the main frame of drug inquiry when user clicks the drug inquiry. Users can see a list of drugs when they enter this menu. And they can choose the drug they want to know to check.

After choosing a drug to check the information of the drug will be seen in this frame. It shows the drugs name, price, type and introduction.

53

This is another drugs introduction.

This is the main frame of hospital inquiry when user clicks the hospital inquiry. Users can see a list of hospitals when they enter this menu. And they can choose the hospital they want to know to check.

54

After choosing a hospital to check the information of the hospital will be seen in this frame. It shows the drugs name, phone, address and introduction.

This is another hospitals introduction.

Code:
public class HospitalIntroActivity extends Activity implements OnItemClickListener{ private GridView gv; private int count; private List<HospitalIntro> list = new ArrayList<HospitalIntro>();

55

protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(""); setContentView(R.layout.hospitalintro); gv = (GridView) findViewById(R.id.hospitalintro); getHospitals(); gv.setAdapter(new ImageAdapter(this)); gv.setOnItemClickListener(this); } private void getHospitals(){ String url = HttpUtil.BASE_URL+"servlet/CheckHospitalsServlet"; String result = HttpUtil.queryStringForPost(url); parseJsonMulti(result); } private void parseJsonMulti(String strResult) { try { JSONArray jsonObjs = JSONObject(strResult).getJSONArray("hospitallist"); String s = ""; for(int i = 0; i < jsonObjs.length() ; i++){ JSONObject jsonObj ((JSONObject)jsonObjs.opt(i)).getJSONObject("hospital"); HospitalIntro hospitals = new HospitalIntro(); hospitals.setName(jsonObj.getString("name")); hospitals.setPhone(jsonObj.getString("phone")); hospitals.setIntro(jsonObj.getString("intro")); hospitals.setAddress(jsonObj.getString("address")); list.add(hospitals); } } catch (JSONException e) { System.out.println("Jsons parse error !"); e.printStackTrace(); } } public class ImageAdapter extends BaseAdapter { private Context mContext; public ImageAdapter(Context c) { mContext = c; } public int getCount() {

new

56

return list.size(); } public Object getItem(int position) { return null; } public long getItemId(int position) { return 0; } public View getView(int position, View convertView, ViewGroup parent) { LayoutInflater inflater = LayoutInflater.from(HospitalIntroActivity.this); View v = null; ImageView imageView =null; TextView tv =null; if (convertView == null) { v = inflater.inflate(R.layout.check_hospital_view,null); v.setPadding(8, 8, 8, 8); } else { v = (View) convertView; } imageView = (ImageView) v.findViewById(R.id.check_hospital_ImageView01); tv = (TextView) v.findViewById(R.id.check_hospitalTextView01); HospitalIntro ct = (HospitalIntro) list.get(position); tv.setText(ct.getName()+""); return v; } } @Override public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) { Intent intent = new Intent(HospitalIntroActivity.this,DecDetialYiYuan.class); Bundle bundle = new Bundle(); bundle.putSerializable("hospital", list.get(arg2)); intent.putExtras(bundle); HospitalIntroActivity.this.startActivity(intent); } }

57

5.3.4

Communication system

Function Description
This module is another core part in this project. A good communication can help doctor cure patients efficiently, so communication system can help improve the quality of curing a lot. Nowadays, communication has become an important part of going to a doctor, but there are no available communication styles except phone call, it gives doctors and patients a lot of troubles, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a communication system is needed not only the patients but also the hospitals. This function can help them a lot. It includes the messages function. When patients suffer some problems, they can send a message to doctors, and the case history will be showed on the message interface, so doctors can communicate with patients about the disease very well.

Activity Diagram

The main frame

Check messages

Send messages

Click

58

Implement the Function

This is the frame after users click the communication button. Users can type in the message they want to type in the under blank and then click the send button.

This is the frame after users click the sent button. The message user sent will be showed on the screen.

59

And if there were case history recorded in the record system, the case history will be showed in the communication system, so both the patients and doctors can see the case history, which will help the curing plan.

Code:
public class DecTallAboutActivity extends Activity{ private EditText edit; private LinearLayout layout; private Button button; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setTitle(""); setContentView(R.layout.dectall_about); initView(); } private void initView() { edit = (EditText)findViewById(R.id.edit); layout = (LinearLayout)findViewById(R.id.layout); button = (Button)findViewById(R.id.button); SharedPreferences sp DecTallAboutActivity.this.getSharedPreferences("about", 1); Editor editor = sp.edit(); =

60

String str = sp.getString(LoginActivity.name, ""); String [] strs = str.split(";"); layout.removeAllViews(); for(int i =0;i<strs.length;i++){ if(!strs[i].equals("")){ TextView tx = new TextView(DecTallAboutActivity.this); tx.setText(strs[i]); layout.addView(tx); } } button.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { if(edit.getText().toString().equals("")){ Toast.makeText(DecTallAboutActivity.this , "", Toast.LENGTH_LONG).show(); return; } SharedPreferences sp = DecTallAboutActivity.this.getSharedPreferences("about", 1); Editor editor = sp.edit(); String str = sp.getString(LoginActivity.name, ""); str = str+";"+LoginActivity.name+""+edit.getText().toString(); editor.putString(LoginActivity.name, str); editor.commit(); TextView tx = new TextView(DecTallAboutActivity.this); tx.setText(LoginActivity.name+""+edit.getText().toString()); layout.addView(tx); edit.setText(""); } }); }

61

5.3.5

Recording system

Function Description
A good recording system can help doctor cure patients efficiently by knowing the patients case history, so recording system can help improve the quality of curing a lot. Nowadays, recording has become an important part of going to a doctor, but recording kept by patients only is the paper record, it is inconvenient for patients to carry a series of records. It gives patients a lot of troubles, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a recording system is needed not only the patients but also the hospitals. This function can help them a lot. It includes the case history record function. After patients finish the curing plan, they can record the curing plan, and the case history will be showed on the message interface, so next time people who check the case history can see the record.

Activity Diagram

The main frame

Check case history

Create case history

Click

62

Implement the Function

This is the frame after users click the case history button. Users can type in the message they want to type in the under blank and then click the send button.

This is the frame after users click the sent button. The message user sent will be showed on the screen.

63

This is the frame after users click the sent button. The message user sent will be showed on the screen.

When change the account, the stored case history will not be seen in another account, which means one account only have one case history database.

64

This is the frame after users click the sent button. The message user sent will be showed on the screen.

5.3.6

Reservation system

Function Description
This module is the major core part in this project. Nowadays, reservation has become an important part of going to a doctor, but due the huge population of China, it is hard for patients those who go to hospitals to get a reservation, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a Reservation system is needed not only the patients but also the hospitals. This function can help them a lot. It includes the reservation, the management of reservation and inquiry about reservation. When building a new reservation, these data would be sync into the report. And in the reservation condition, the operator can add or cancel some reservations according to the actual situation.

65

Activity Diagram

Reservation system

reserve

Doctor inquiry

Reservation management

Select doctor

Cancel reservation

Check reservation

Save

66

Implement the Function

This is the main frame of reservation when user clicks the reserve and inquiry. Users can see a list of doctors when they enter this menu. And they can choose the doctor they want to know to check. And also, on the right corner, there is an button for patients who want to manage their reservations.

This is the frame of doctor inquiry when user clicks the doctors name. After choosing a doctor to check the information of the doctor will be seen in this frame. It shows the doctors name, charge, degree and introduction. And a button can be used to reserve, if patients want to reserve this doctor, they just need to click the reserve button.

67

This is another doctors introduction.

After reserving, the users can manage their reservations by clicking the button-manage my reservation .This is the frame of doctor inquiry when user clicks the doctors name. And patients can cancel the reservation by clicking the delete button right to the reservation.

68

After clicking the delete button, the reservation will be missing.

When change the account, the stored reservation will not be seen in another account, which means one account only have one reservation database.

69

5.3.7

Waiting inquiry system

Function Description
When patients go to hospitals, it is very annoyed that they have to wait for a long time before the cure. Patients do not want to wait for a long time in the history and hospitals need to do something reduce the number of waiting people in order to manage the order in hospitals. It gives patients a lot of troubles, and also, the hospitals is hoping to have some things can help solving the problem to improve their work efficiency. Therefore, building a waiting inquiry system is needed not only the patients but also the hospitals. This function can help them a lot. In this system, patients can see how many patients are waiting before them so they can manage their time reasonably.

Activity Diagram

The main frame

Waiting inquiry

Click Check information

70

Implement the Function

When patients want to know how many patients are waiting, they can click the waiting inquiry button to know how many patients reserve the doctor.

71

Chapter 6 Conclusion
6.1 Conclusion
According to the current serious hospitalization situation in China, people need some solutions to deal with the hospitalization problem, at least ease the pressure of hospitals, patients, doctors. Mobile medical software can be able to achieve the full range of medical services and customer groups at all ages. After all, the more kinds of appointment can meet different customer needs. This kind of software is basically a blank in China. Therefore, based on the huge customer basement of the phone, the mobile registered doctor service can help patient to see the doctor in a one-stop way, and the improvement of the efficiency of the doctors visit is very large. This software is very bright prospects. When the whole project is finally finished, I felt very happy and exciting for the successful of the project. According to the present situation, the system works pretty well. However, the current system is a still a beta version, which means that is only a test-version program. Currently, some main function modules are implemented in the project. In the account management modules, the user can login with the account with only data. In the inquiry system, the operators can inquiry what they want to konw. In the communication system module, the operators can send and save messages. In the recording system module, operators can record the case history. In the reservation system, the operators can inquire the information, reserve and manage the reservation.

6.2 Further work


Although this paper basically achieved to design a remote medical monitoring system to the mobile phone, but many points need to improve. (1)The function of this software is not strong enough. It can't fully meet the needs of users. (2)The UI of the software is relatively backward. It can't give users a good experience (3)Graphic chart of processing requires further elaboration. In future work, in order to improve the stability and practicability, we will not only devote ourselves to further work of refinement but also according to the needs of special to custom development upper management software and improve the medical platform. In reality, due to the tight schedule as well as the limit of the ability on design and programming, minor omissions are inevitable. Therefore, I am awaiting your kind criticism and correction. Thank you so much.

72

Reference
[1]S. Su, C.L. Shih, Managing a mixed-registration-type appointment system in outpatient clinics, Int. J. Med. Inf. 70 (1) (2003) 3140. [2] K.J. Klassen, T.R. Rohleder, Scheduling outpatient appointment in a dynamic environment, J. Opera Manage. 14 (1996) 83101. [3] V. Anantharaman, H.L. Swee, Hospital and emergency ambulance link: using IT to enhance emergency pre-hospital care, Int. J. Med. Inf. 61 (23) (2001) 147161. [4]
Lahle Wolfe, Feasibility Study Course Lesson1 What is a Feasibility Study?,http://womeninbusiness.about.com/od/businessplans/a/feasibilitystud.htm, 2011. [5] Silva, Vladimir (11 March 2009). Practical Eclipse Rich Client Platform Projects (1st ed.). Apress. p. 352. ISBN 1-4302-1827-4. [6] Burnette, Ed (12 August 2005). Eclipse IDE Pocket Guide (1st ed.). O'Reilly Media.p.128.ISBN 978-0-596-10065-0. [7]Holzner, Steve (1 May 2004). Eclipse (1st ed.). O'Reilly Media. p. 317. ISBN 0-596-00641-1.

[8] Michael Kofler, The Definitive Guide to MySQL 5 2009-4pp195~198 [9]Robin Schumacher, Arjen Lentz. "Dispelling the Myths". MySQL AB. Retrieved 2007-02-10 [10] "Market Share". Why MySQL?. Oracle. Retrieved 17 September 2012. [11]"DB-Engines Ranking". Retrieved 26 February 2013. [12]Schumacher, Robin; Lentz, Arjen. "Dispelling the Myths". MySQL AB. Archived from the original on 6 June 2011. Retrieved 17 September 2012. [13]"History of MySQL". MySQL 5.1 Reference Manual. MySQL AB. Retrieved 26 August 2011. [14]"Sun Microsystems Announces Completion of MySQL Acquisition; Paves Way for Secure, Open Source Platform to Power the Network Economy" (Press release). Sun Microsystems. 26 February 2008. Archived from the original on 28 February 2008. Retrieved 17 September 2012. [15] HIS [J],,2010,(20):12 5-126 [16] ,, , ,,. .[J] ,2009,(19):3810-3812 [17]android , , , .2011.9 [18],android ,,2009.7

73

Acknowledgments
At the end of this thesis, I would like to say thank you to those people who have helped me a lot. First and foremost, I would like to show my deepest gratitude to my advisor Zhang minxia, a respectable, responsible and resourceful scholar, who has provided me with valuable guidance in every stage of this project. Without her enlightening instruction, impressive kindness and patience, I could not have completed this project. Her keen and vigorous academic observation enlightens me not only in this project but also in my future study. I shall extend my thanks to the classmates for all their kindness and help. Some of them taught me the method to develop the fundamental and essential academic competence. In addition, they gave a lot of advices on this project in the development stage which is fairly helpful for me. And they also helped me to test some modules in this project. Last but not least, I would like to thank all my friends, especially my lovely roommates, for their encouragement and support.

You might also like