Design and implementation of a medical expert system for diagnosis and prescription

This project work focuses on computerization of medical diagnosis and prescription system to increase medical services and enhancement of logistic efficiency. The aim is to produce approach which through computer programs and files carefully created, written, designed and integrated from an application package that accepts both physical states of patients. Disease symptoms (input data) and as such one which is able to store, access, manipulates as much information as possible. The ease and speed of processing, storage and versatility of the computer make it possible for easy diagnosis and prescription interestingly; the end results is the ability analysis of the disease by producing the input data and provide summaries of the total treatment bill, lab result and other disease investigation and confirmation for a particular patient.


Introduction
With the recent development and proliferation of information technology, it is obvious that computer is indispensable tool in every aspect of human activities.
The use of computer simplified the way businesses are done, it touches and changes our daily lives in a profound way. Therefore, computer in medical is guided by a sense of purpose rationally aimed at automatically computerized system and commitment is more likely to have a successful outcome in terms of diagnostic and drugs prescription role of a doctor in the hospital than a situation whose future is left to guess work and chance.

Background to the study
Computer technology is found in diagnosis and drug prescription ways, ranging from routine to the highly sophisticated works. Just as the versatile computer serves various purpose in business and industry, it performs many functions in the health care field. Medical researcher stressed computer technology in several areas and have recorded some developments in areas like medical statistics, diagnosis and drug prescription, data capitalization, simulation and medical care and astronomic increase in patients' treatment in various hospitals made proper view of the current method of medical service for a scientific and efficient approach in dealing with patients problems more especially in case of emergency. This has been to some extent since the introduction of computer to the field. To eradicate poor health maintenance, the introduction of medical expert for diagnosis and drug prescription has other fundamental group. This research has other details of medical expert system for diagnosis and drug prescription for patients.
In the medical profession, the problems associated with doctors can be evidently seen as it affects various areas of human and social endeavors, Therefore, this research found computer as a microcosm to develop and re-camp human life in our hospitals. Clearly stated, after a careful study of the old medical service, the following are seen as some of the problems affecting the hospital.

COST
The researcher gathered that there are high cost of personnel maintenance in the hospital to the

Government
Some of these personnel are not serious with their work while others repeat a particular task.

Errors
There is always a problem of errors are manual in nature as an outcome of the old system, also, human activities are subjected to errors, and medical doctors are no exception, patients are carefully mis-manipulated and correct diagnosis and prescription are not performed as a result of this loss of life.

Daily work required
There is an inability of the institution to cope with the daily work lead as complicated nature of operation is involved. There is no guarantee of storage and retrieval of medical information and analysis of patients' treatment.

Absenteeism
The researcher described the habitual absence from place of duty as one of the facts affecting the medical treatment of patients in the hospital. The doctors, nurses and other medical and non-medical personnel feel less concerned and take being absent as granted in their duty post.
Applying computer services will facilitate medical diagnosis and drug prescription. Therefore to eradicate these problems this research is primarily aimed at investigating, analyzing and designing an expert system for diagnosis and drug prescription which will have the capability of:  To develop a medical diagnosis system  To implement a medical prescription system based diagnosis  To develop a knowledge based system

Literature review
This paper is all about the application of medical expert system in diagnosis and prescription. With this, a patient may go through an interrogative section and after which diagnosis could be made and prescription given.
These expert systems may be used to supplement, replace or assist our scare human expertise, who may not readily be available at all time. Besides, some patients are ashamed of telling all about them to people and seek to hold back some information.
This stage introduced the concept of expert system, the history of expert system, the definitions of expert system, the advantages and disadvantages of expert system and it's relevant to information technology.

Definition of Expert System
Expert Systems are computer programs that are derived from a branch of computer science research called Artificial Intelligence (AI). AI's scientific goal is to understand intelligence by building computer programs that exhibit intelligent behavior. It is concerned with the concepts and methods of symbolic inference, or reasoning, by a computer, and how the knowledge used to make those inferences will be represented inside the machine (R. Davis, 1982).
Of course, the term intelligence covers many cognitive skills, including the ability to solve problems, learn, and understand language; AI addresses all of those. But most progress to date in AI has been made in the area of problem solving concepts and methods for building programs that reason about problems rather than calculate a solution (R. O. Duda and J. G. Gaschnig, 1981).
AI programs that achieve expert-level competence in solving problems in task areas by bringing to bear a body of knowledge about specific tasks are called knowledge-based or expert systems. Often, the term expert systems is reserved for programs whose knowledge base contains the knowledge used by human experts, in contrast to knowledge gathered from textbooks or non-experts. More often than not, the two terms, expert systems (ES) and knowledge-based systems (KBS), are used synonymously. Taken together, they represent the most widespread type of AI application. The area of human intellectual endeavor to be captured in an expert system is called the task domain. Task refers to some goal-oriented, problem-solving activity. Domain refers to the area within which the task is being performed. Typical tasks are diagnosis, planning, scheduling, configuration and design (F. Hayes-Roth, D. A. Waterman, and D. B. Lenat, 2002). Building an expert system is known as knowledge engineering and its practitioners are called knowledge engineers. The knowledge engineer must make sure that the computer has all the knowledge needed to solve a problem. The knowledge engineer must choose one or more forms in which to represent the required knowledge as symbol patterns in the memory of the computer --that is, he (or she) must choose a knowledge representation. He must also ensure that the computer can use the knowledge efficiently by selecting from a handful of reasoning methods. The practice of knowledge engineering is described later. We first describe the components of expert systems.

Advantages of an Expert System
The goal of knowledge-based systems is to make the critical information required for the system to work explicit rather than implicit (A. Barr, E. A. Feigenbaum, and P. R. Cohen, 1981). In a traditional computer program the logic is embedded in code that can typically only be reviewed by an IT specialist. With an expert system the goal was to specify the rules in a format that was intuitive and easily understood, reviewed, and even edited by domain experts rather than IT experts. The benefits of this explicit knowledge representation were • Rapid development: with an expert system shell it was possible to enter a few rules and have a prototype developed in days rather than the months or year typically associated with complex IT projects. • Ease of maintenance: Ease of maintenance is the most obvious benefit. This was achieved in two ways. First, by removing the need to write conventional code many of the normal problems that can be caused by even small changes to a system could be avoided with expert systems. Essentially, the logical flow of the program (at least at thehighest level) was simply a given for the system, simply invoke the inference engine.
A claim for expert system shells that was often made was that they removed the need for trained programmers and that experts could develop systems themselves. In reality this was seldom if ever true. While the rules for an expert system were more comprehensible than typical computer code they still had a formal syntax where a misplaced comma or other character could cause havoc as with any other computer language. In addition, as expert systems moved from prototypes in the lab to deployment in the business world, issues of integration and maintenance became far more critical. Inevitably demands to integrate with and take advantage of large legacy databases and systems arose. To accomplish this integration required the same skills as any other type of system.

Disadvantages
The most common disadvantage cited for expert systems in the academic literature is the knowledge acquisition problem. Obtaining the time of domain experts for any software application is always difficult but for expert systems it was especially difficult because the experts were by definition highly valued and in constant demand by the organization. As a result of this problem a great deal of research in the later years of expert systems was focused on tools for knowledge acquisition, to help automate the process of designing, debugging, and maintaining rules defined by experts. However, when looking at the life-cycle of expert systems in actual use other problems seem at least as critical as knowledge acquisition. These problems were essentially the same as those of any other large system: integration, access to large databases, and performance.
Performance was especially problematic because early expert systems were built using tools such as Lisp, which executed interpreted rather than compiled code. Interpreting provided an extremely powerful development environment but with the drawback that it was virtually impossible to match the efficiency of the fastest compiled languages of the time, such as C. System and database integration were difficult for early expert systems because the tools were mostly in languages and platforms that were neither familiar to nor welcomed in most corporate IT environments -programming languages such as Lisp and Prolog and hardware platforms such as Lisp Machines and personal computers. As a result, a great deal of effort in the later stages of expert system tool development was focused on integration with legacy environments such as COBOL, integration with large database systems, and porting to more standard platforms. These issues were resolved primarily by the client-server paradigm shift as PCs were gradually accepted in the IT world as a legitimate platform for serious business system development and as affordable minicomputer servers provided the processing power needed for AI applications.

History / origin of expert system
Expert systems were introduced by the Stanford Heuristic Programming Project led by Feigenbaum, who is sometimes referred to as the "father of expert systems". The Stanford researchers tried to identify domains where expertise was highly valued and complex, such as diagnosing infectious diseases (Mycin) and identifying unknown organic molecules (Dendral)  In addition to Feigenbaum key early contributors were Edward Shortliffe, Bruce Buchanan, and Randall Davis. Expert systems were among the first truly successful forms of AI software.
Research on expert systems was also active in France. In the US the focus tended to be on rule-based systems, first on systems hard coded on top of LISP programming environments and then on expert system shells developed by vendors such as Intellicorp. In France research focused more on systems developed in Prolog. The advantage of expert system shells was that they were somewhat easier for non-programmers to use. The advantage of Prolog environments was that they weren't focused only on IF-THEN rules. Prolog environments provided a much fuller realization of a complete First Order Logic environment (George F. Luger and William A., 2000) .

The Components of an Expert System
2.3.1. An expert system is typically composed of at least three primary components. These are the inference engine, the knowledge base, and the User interface. We will introduce these components below.

Knowledge Base
The knowledge base is a collection of rules or other information structures derived from the human expert. Rules are typically structured as If/Then statements of the form:

Inference Engine
The inference engine is the main processing element of the expert system. The inference engine chooses rules from the agenda to fire. If there are no rules on the agenda, the inference engine must obtain information from the user in order to add more rules to the agenda. It makes use of knowledge base, in order to draw conclusions for situations. It is responsible for gathering the information from the user, by asking various questions and applying it wherever necessary. It seeks information and relationships from the knowledge base and to provide answers, predictions and suggestions the way a human expert would.

User Interface
A user interface is the method by which the expert system interacts with a user. These can be through dialog boxes, command prompts, forms, or other input methods. Some expert systems interact with other computer applications, and do not interact directly with a human. In these cases, the expert system will have an interaction mechanism for transactions with the other application, and will not have a user interface.

Proposed system
The design of the system will help reduce some of the problems encountered in the analysis of the old system of which some of them are • The hospital should be able to take any risk that may arise in the implementation as the case of further training of staff. • The programming language required would cause the implementation to take a new dimension. • Validation which determines that only correct data are to enter in the program by users. • The medical care services will take a new dimension. • Lastly, the management of the hospital should be able to provide enough funds for the implementation. The range of the design has been restricted to diagnosis and prescription of drugs. The new system which is known as "Software" will employ an interactive on-line mode, thereby all the central processing unit (CPU) and information reflecting current activity is produced into the system as soon as it occurs.

Input specification
The input specification design specified what is input to the system. These specifications include patient names, patient sex, age, disease, signs and symptoms. The medium of input to the new system is the enhanced electronic keyboard and the mouse

Output specification
The output of a program determines the input and procedure format. It is necessary to consider what is required from a system before deciding on how to set about producing it. The system analyst will need to consider content, format, and frequency of documents to be produced

System implementation
System implementation is an act of putting a new system into its working mode. It can also be seen as the specific way in which the new system is made to fulfill its functions by using it as a replacement on the old system.

Choice of programming language
The selection of Visual Basic used for software design was based on the fact that this language is among the latest languages still invoked currently.

Operating system requirement
The new system can run perfectly in any of these operating systems: Windows Operating system, Android Operating system, iOS and Linux.

Software Testing and User Manual
How to install the software This is a formalized detailed record containing the design of the new system. It outlines the techniques and methods used to correct the problem areas in the existing system as described in the statement of problems.
Documentation provides the guide and ability for future reuse of the package. The main objective of documentation is to create a complete, permanent comprehensive and intelligible record of the made of program of the new system.

Algorithm
• Open the Program • Click any Option:

Respond to other instructions
 load the program from the start button  select the type of account (Account type: Administrator and user)  Type in the correct name and password and click OK button  The main form appears offering menu options. Choose the desirable menu and view the submenu for desirable executions  Follow the instructions given or encountered in each form as it is interactive in nature.  The previous page can be referred to with "EXIT" and it goes back to the main form.

Conclusion
In the course of this project, the target which was to determine the problem of the existing system, to analyze problems and to propose solution to them was clear in focus. In the ongoing chapters, diagnosis and treatment of infectious diseases was shown and illustrated. The need for computerization of the diagnosis of infectious diseases was specified and the treatment was clearly explained. Finally, the provision of useful information to effectively diagnose and treatment of infectious diseases was provided.