International J. Eng. Tech 6(2): 501-507, June 2009 A publication of “G-Science Implementation & Publ ication” website: www.gscience.net AN APPROACH OF DEVELOPING A HOSPITAL MANAGEMENT SYSTEM USING NATURAL LANGUAGE TECHNOLOGY 1
2
3
MD. NOBIR UDDIN , MD. GEAUR RAHMAN , MD. SALAHUDDIN SARKAR and ABDUS SALAM SHAH
4
ABSTRACT This paper presents a new approach of developing a complete Hospital Management System using Natural Language Technology (English query). In this system, we have used English Query that helps users to find database information using plain English instead of a formal query language. The English Query application uses English commands, statements and questions as input, determines their meaning and then writes and executes a database query. At first, the application is built by creating a model. The model is the collection of all information that is known about the objects in the English Query application. It includes the specified database objects such as tables, fields and joins and semantic objects such as entities, the relationships between them and a dditional dictionary entries. It also includes global model default options. Using SQL Analysis Server and Microsoft SQL Server has done the details analysis and design of this system. The overall logical structure of the database has been expressed by using E-R diagram. The database has been normalized to reduce data inconsistency, redundancy and loss of information. Finally, this system provides high security to restrict unauthorized access and facilitate all the services to manage a hospital. Study period: January 2003 to April 2005.
Keywords: Natural Language Technology, English Query, Semantic Object, E-R diagram, Normalization and SQL Analysis Server.
INTRODUCTION Hospital is a charitable institution all over the world that plays a vital role for human beings to cure from various diseases and the demand of hospitalization is increased day by day. This is why, it is the major components of hospital concerned with various related activities including patient’s admission, doctor’s information, diagnostic and pathology information and manage employee’s records. To replace the existing manual process of patient’s admission, managing diagnostic report and the management of employee’s using Natural Language Technology (NLT) for this system with a complete and automated management information system, Hospital Management System (HMS) has been introduced. The HMS provides ready information about patient’s admission, drug list, response against drug and payments, report of diagnostics and pathology, daily cash transaction and scheduling and controlling system of employee. All through the design and implementation phases in the process of development the NLT i.e. English Query (EQ) has adopted which provides the commands, statements, questions and phrasing system in constructing Entity-Relationship (E-R) and Phrasing-Entity-Relationship (P-E-R) diagram. EQ interprets English questions and statements as commands to display a set of data. The essential ideas about NLT and EQ System architecture and relation between Semantic object and Database object are discussed in the following sections. MATERIAL AND METHODOLOGY Natural language technology The NL is language that a newborn baby automatically captured from her/his family. Especially, NL English is a global language that delegates over the others. However, NLT is a technology (EQ) retrieves information from database that satisfies user requirements. The NTL system allows users to ask questions in English, rather than in a computer language such as SQL and gives end users the ability 11
Programmer, Planning, Training & Communication Division, Bengalidesh Jute Research Institute, Manik Mia Avenue, Dhaka1207, Bangladesh, Email:
[email protected],
[email protected], 2Assistant Professor, Department of Computer Science and Mathematics, Bengalidesh Agricultural University, Mymensingh-2202, Bangladesh, Email:
[email protected], 3Programmer, Cabinet Division, Bangladesh Secretariat, Dhaka-1000, Bangladesh, Email:
[email protected]., 4Data Analyst, NATP, Hortex Foundatin, Dhaka, Bangladesh. Email:
[email protected]
501
to pose queries in English without knowing any structure or syntax of language. In NLT system, the end user need not required to memorize a lot of syntax of language such as SQL. For example, fig. 1 Shows the Syntax tree of a simple English sentence (Tremblay and Sorenson, 1985). Sentence
Subject phrase
Article
Verb phrase
Noun
Verb
Ob ect
Noun
Article
The
doctor
treats
the
Noun
patients
Fig 1. Syntax tree for an English sentence. English query environment: Components The English Query Model Editor appears within the Microsoft Visual Studio.NET InterDevelopment Environment. To test the English Query model before compiling it into an application to make sure that the questions users are likely to ask are supported by the model. After satisfied with the performance of the model, build it into a compiled English Query application (.eqd file). The Model knowledge tools build the project in compiled EQ Model and load it by EQ run-time engine that received question and generate equivalent SQL. EQ Model Editor retrieved data from database with the help of this SQL. The English Query Environment (Components) is shown in fig. 2.
Microsoft SQL server
Database Structure
English query
Data
Model editor
Model knowledge Project (.eqp)
Save
SQL Test tool
SQL
Build
Question
English query run-time engine
Load
Compiled English query model (.egd)
Fig. 2. Architecture of EQ application. Semantic and database objects relationship This paper provides Semantic objects that can be represented by a database object or other real-world object. Semantic objects such as entities, the relationships between them and additional dictionary entries; Database objects are tables, fields and joins. Fig 3 shows the relation between semantic and database objects. PROPOSED DEGIN ISSUES OF HMS The Entity-Relationship diagram, flowchart and functional modules and sub- modules of the HMS are discussed below: 502
Database Objects OLAP
Fields
Tables
Relationships
Objects
Project Pro erties
Entities
Dictionary entities values loaded from database
Semantic Objects
Phrasings
Fig. 3. Relation between semantic and database objects. Entity-relationship model of HMS: The Entity-relationship (E-R) data model is based on a perception of a real world that consists of a set of basic objects called entities. It was developed to facilitate database design by allowing the specification of an enterprise schema, which represents the logical structure of a database (Silberschatz et al., 1997). The following E-R model represents the major requirements for the HMS. Patient_Admission_ Date Doctor_Contact_N
Patient_Addr
Doctor_Designatio
Patient_Age
Joining Date
Payment_Dat
Patient_Paren
Doctor_Dept
Patient_Sex
Doctor_Salar Patient_Nam
Doctor_Addres
Patient_Diseas
Doctor_Nam
Doctor
Treatment
Patient
Transaction
Payment_N
Payment_ Amt
Payment
Nurse Staff
Worke
Works-for
Balance
Mana LEGEND
Employee Entity sets Emp_ADDRE
Emp_No
Attributes
Emp_Dep
Emp_Nam
Relationship sets
Contact_No
Fig. 4. E-R diagrams for HMS. Flow Chart, Functional Modules and Sub-Modules of HMS: The continues flow of patient’s of Indoor and Outdoor section, Pathology and diagnostic section and all possible flow of patient’s including drug section are shown in fig. 5. The functional module and sub-module of HMS depicted in fig. 6. The functional modules of this system are patients, doctors, diagnostics and employee including balance. Each modules of this system are divided into several sub-modules (Pressman, 1997). 503
Synonyms EQ includes a dictionary containing thousands of common English words. This dictionary provides an EQ application with the terminology needed to answer most questions posed in English. For example, the synonyms of Doctor_Contact_No are phone, phone number, cell phone, cellular phone, handset, headset, mobile phone, receiver, telephone, touchtone phone etc. Patient
Indoor Patients
Outdoor patients
Admission
Outdoor treatment
Bed/Cabin Diagnostic and Pathology Section
Advice, Treatment, And Others Facilities
Drug
N
Diagnostic Report Delivery
N
Due ?
N
Release Stop
Fig. 5. Flowchart of HMS
HMS Module Doctor
Patient
Diagnostic
Employee
Balance Sub-Module
Release
FNAC
Archives O/T Initial checkup Advance Admission
Provident Pay scale Schedule Dept info Biodata
Stool Urine Blood Histopatholog Hematology
Provident Pay scale Schedule Dept info Biodata
Yearly C/D Monthly C/D Weekly C/D Daily Debit Daily Credit
Fig. 6. Functional modules and Sub-modules of HMS system. Deployment diagram: This HMS is suitable not only offline (Fig. 7) between account section, managing section and other sections using LAN and a centralized database server, but also supports the web deployment (online) ( Fig. 8) In web deployment, an end user of an EQ application connects to the Web page through Microsoft Internet Explorer (or another Web browser) and enters a question. Internet Explorer then passes the question to Microsoft Internet Information Services (IIS), along with the URL of the Active Server Pages (ASP) page that executes the script passes the question to EQ for translation 504
into SQL. EQ uses a model of the target database (in the form of a compiled EQ model) to parse the question and translate it into SQL. The script then retrieves the SQL code, executes it using Microsoft Active Data Objects (ADO) and displays the results (Award, 1999; Tanveer et al., 2003). EQ Application
Database Admin
Operator
SQL Server
LAN
EQ Application
EQ Application
Accountant
Manager
Fig. 7. Offline deployment diagram. Question
World Wide Web
Microsoft LAN Active Web Server(IIS) Server Pages
Result
Data Result Question
Compiled English Query Model (*.egd)
Question
SQL
EQ runtime engine
SQL
Primary DB SQL Server
Back up DB
Client Web Browser
Fig. 8. Online deployment diagram. Phrasing and sentence structure of EQ Phrasings are a way of expressing relationships among entities. The types of phrasings and their sentence structures in EQ are used as shown in table 5. Table 5.1. Phrasings and sentence structures in EQ. Phrasing Name/ID Phrasing Trait Phrasing Preposition Phrasing Adjective Phrasing
Sentence Structure Entity that is Name/ID+ are the name of +Entity being Named Subject+ have+ Object
Verb Phrasing
Subject +Verb, Subject +Verb+ Object Subject +Verb+ Object +Object
Subject+ are +Preposition+ Object Subject+ Adjective type+ Entity that contains Adjective
Object + are +Verb, Object + are +Verb+ Object
505
Example Patient_P_Name are the name of Patients. Ex: List/show/Display all the P_Name Doctors have Doctor_Contact_No . Ex: List the Doctor and their Contact_No Patients are in Patient_Bed_Cabin_no. Ex: Which patient are in b101 Doctor_Doc_Department are adjective describing Doctors. Ex: List the doctor where department Surgery Doctors _treat_ Patients Ex: Who treats “Md. Nobir Uddin”
RESULTS AND DISCUSSION Relationship between entity and phrasing and some snapshot: Fig. 9(a) shows the relationship between Name/Id and Trait phrasing and Fig 9(b) and Fig 9(c) shows the details and only patient name that retrieve using these two phrasing and with the help of two questions “List all the Patient details” and “List all the Patient N ame” respectively. LEGEND
TP:Trait Phrasing
NP: Name/ID Phrasing
TP
TP
NP
Entity
TP
TP
Phrasing TP
TP
TP TP
TP
TP Sub-Entity
Fig. 9(a). Relation between Name/Id and Trait phrasing. English Question: List all the Patient details
Fig. 9(b). Snapshot of patient’s details information using Name/Id and Trait phrasing.
English Question: List all The Patient Name Name/Id Phrasing
Entity Fig. 9(c). Snapshot of only patient’s name using only Name/Id phrasing. 506
Fig 9(d) shows the relationship between entity and Trait phrasing and the information doctors that retrieve using this phrasing and with the help of questions “List the Doctor and their Contact_No” and Fig 9(e) shows the relationship between entity and preposition phrasing and the information that retrieve using this phrasing and with the help of two questions “Which patient is in b101”. English Question: List the Doctor and their Contact_No Trait Phrasing
Entity
Fig. 9(d). Snapshot of doctor’s name and Contact_No using only trait phrasing. CONCLUSION We have developed a complete Hospital Management System using Natural Language Technology (English query). In this system, we have used English Query that helps users to find database information using plain English instead of a formal query language. The E nglish Query application uses English commands, statements and questions as input, determines their meaning and then writes and executes a database query. At first, the application is built by creating a model. The model is the collection of all information that is known about the objects in the English Query application. It includes the specified database objects such as tables, fields and joins and semantic objects such as entities, the relationships between them and additional dictionary entries. It also includes global model default options. Using SQL Analysis Server and Microsoft SQL Server has done the details analysis and design of this system. The overall logical structure of the database has been expressed by using E-R diagram. The database has been normalized to reduce data inconsistency, redundancy and loss of information. Finally, this system provides high security to restrict unauthorized access and facilitating all the services to manage a hospital. REFERENCES Award, M. Elias. 1999. “System Analysis and Design”, 2 nd Edition, Galgotia PublicationsLtd., New Delhi, India. Pressman, R. S. 1997. “Software Engineering – A Practitioner’s Approach”, 4 th Edition, The McGraw-Hill Book Companies, New Delhi, India. Silberschatz, A., F. Henry, S. S. Korth, 1997. “Database System Concepts”, 3 rd Edition, The McGraw-Hill Book Companies, New Delhi, India. Tanveer. A., M. Mahbubuzzaman, S. Siddique. 2003. “Blood Bank Management System Using Unified Process Methodology”, Proceedings of 6 th International Conferences on Computer & Information Technology (ICCIT), Jahangirnagar University, Savar, Dhaka, Bangaldedsh. Tremblay J. P and P. Sorenson. 1985. “The Theory and Practice of Compiler Writing”, McGraw-Hill Book Company, New Delhi, Inida.
507