An Expert System for Poisoning Diagnosis and Management - CiteSeerX

13 downloads 3366 Views 2MB Size Report
Riza Theresa B. Batista-Navarro1, Diana A. Bandojo1,. Ma. Jaymee Krisette A. ... curriculum. ... care in the Philippines through the use of information technology.
ESP: An Expert System for Poisoning Diagnosis and Management Riza Theresa B. Batista-Navarro1, Diana A. Bandojo1, Ma. Jaymee Krisette A. Gatapia1, Reggie Nicolo C. Santos1, Alvin B. Marcelo2, Lynn Crisanta R. Panganiban3, Prospero C. Naval Jr.1 1

Department of Computer Science, University of the Philippines-Diliman 2 National Telehealth Center, University of the Philippines-Manila 3 National Poison Management Control Center, University of the Philippines-Manila

ABSTRACT We describe a clinical decision support system (CDSS) designed to provide timely information germane to poisoning. The CDSS aids medical decision making through recommendations to clinicians for immediate evaluation. The system is implemented as a rule-based expert system with two major components: the knowledge base and the inference engine. The knowledge base serves as the database which contains relevant poisoning information and rules that are used by the inference engine in making decisions. This expert system accepts signs and symptoms observed from a patient as input, and presents a list of possible poisoning types with the corresponding management procedures which may be considered in making the final diagnosis. A knowledge acquisition tool (KAT) that allows toxicological experts to update the knowledge base was also developed. This paper describes the architecture of the fully-featured system, the design of the CDSS and the KAT as web applications, the utilization of the inferencing mechanism of CLIPS (C Language Integrated Production System), which is an expert system shell that helps the system in decisionmaking tasks, the methods used as well as problems encountered. We also present the results obtained after testing the system and propose some recommendations for future work.

I. Introduction The shortage of attending medical experts for the diagnosis and recommended treatment prescription of poisoning-related cases in the underserved regions in the Philippines is the primary motivation of this research. Statistics show that in 2005, the doctor to patient ratio in the Philippines is 1:80000, while the recommended ratio by the World Health Organization is at least 1:20000. Among medical specialists, 87% are located in urban areas where 62% of the total population is situated [1]. Lack of access to human resources plagues the country's rural health system. Doctors migrate to more economically secure urban areas, thus professional services are scarce in hard-to-reach areas. The fact that the country is an archipelago makes many of the provinces or regions inaccessible by conventional transportation and therefore do not have enough professional medical services especially in cases when they are immediately needed. Contributing to the high disparity in the estimated doctor to patient ratio is the efflux of doctors to developed countries due to more favorable salary and working conditions. Similar conditions extend to the delivery of expert toxicological care. A limited number of toxicologists is usually found in medical centers of urban areas. Patients would have to be transported to these urban health centers if they need medical expertise in poisoning. This will definitely require costly transportation and medical fees. Poisoning-related cases require immediate treatment, which can only be properly administered if correct diagnosis has been given. Time spent in transporting the patient could be used in diagnosing and prescribing treatment for the patient. Another concern is the fact that high-expertise centers for toxicology are resource-intensive and expensive to maintain, making it difficult to replicate these services in underserved regions. Furthermore, there is no existing information system for poisoning which local health professionals could readily access. Finally, there is only one institution in the country which includes the teaching of toxicology in its curriculum. The implementation of the Expert System for Poisoning (ESP) alleviates these health care problems through the use of technology. This diagnostic system with decision support automates the diagnosis and treatment prescription for poisoning-related cases. Signs and symptoms observed from a patient coming from remote areas are submitted by a medical attendant into the system located at selected health centers. The system will then output the possible poisoning types, among which one could be selected by the attendant as the diagnosis for the patient's case. Also included in the output are recommended treatment and more information about other possible poisoning types with similar symptoms. The medical attendant at the health center will analyze the results and decide whether to follow the recommended actions given by the system. There are already a number of CDSSs or expert systems that have been developed and implemented in different parts of the world and have proven their worth in assisting medical practitioners thus improving the quality of health care. Some of these are: TraumAID which provides decision support throughout the initial management of severely injured patients in Pennsylvania [2] and a CDSS for lung diseases implemented in Sweden [3]. Existing CDSSs specific to poisoning are the following:

a case-based CDSS from the Inreca European project built in Russia for diagnosing poison cases caused by psychotropes[4], a decision tree-based Expert System for Toxicological Help (ESTHER) which provides diagnostics of poisonings caused by overdose or misuse of widespread medicines in Russia [5], and the case-based SETH which gives specific advice concerning treatment and monitoring of drug poisoning developed at Rouen University in France [6]. These existing CDSSs for poisoning are limited to those which are caused by drugs only. ESP aims to address a wider range of poisoning, including those caused by shellfish and other chemicals. Due to the unavailability of actual patient cases, a rule-based approached was chosen in developing ESP. In the same way that these existing CDSSs have improved the quality of health care in their respective countries, ESP can play a crucial role in boosting the quality of health care in the Philippines through the use of information technology. ESP is a possible answer to the country's lack of human resources for toxicological health care. Deploying this system would be more practical and less costly than building additional toxicological centers or assigning toxicologists to rural areas. It provides a dynamic information system for poisoning which will educate the health professionals in both urban and rural areas. Since the system can handle poisoning cases in a short length of time, it will facilitate the toxicological diagnostic process. Furthermore, it extends the reach of the medical experts even to the underserved regions. Costly transportation fees and time spent in transportation are minimized by remote access to the CDSS. ESP also provides a template in making expert systems for other diseases and medical conditions such as trauma and common seasonal diseases. This project can be used by other researchers in the design and development of other expert systems for health care. Since ESP is a web application, it can be easily integrated with other web-based system to share and acquire relevant data with and from other applications whose focus is also on the medical domain. In this study, a rule-based approach is applied in building an expert system to be used for decision-making tasks in toxicological diagnosis. This approach was chosen because it enables the system to give optimal answers and makes it extensible. The data that the researchers have acquired are convertible into rules which are readable by medical experts. In constructing the expert system, we designed and implemented the knowledge base around the CLIPS 6.24 expert system shell [7]. Knowledge encoded in the knowledge base is in the form of rules. Most of the data currently stored in the knowledge base are based on the book Algorithms of Common Poisonings Part 1 [8]. On the other hand, the inference engine, which is also built on CLIPS, uses the RETE algorithm [9] in classifying the poisoning type given a patient's symptoms. The inference engine is accessible to Java through JClips [10] and can be queried by the user through a webbased user interface. It returns a list of the possible poisoning types. With each poisoning type, the probability of this type being the cause of the given symptoms is indicated. The specific management or treatment procedures for each poisoning type in the list are also displayed. After designing and developing these two modules, the researchers constructed a database and developed the knowledge acquisition tool. Developing this tool involved creating a web-based user interface for the knowledge

engineers and implementing the CLIPS converter component which automatically converts input data from toxicologists into rules that are stored in the knowledge base as CLIPS files.

II. Methodology A. System Architecture The architecture of ESP is divided into two major components: the clinical decision support system (CDSS) or the decision-making component of the system, and the knowledge acquisition tool (KAT). The CDSS contains two subcomponents: the knowledge base and the inference engine (Fig. 1).

Fig. 1: The System Architecture The system caters to two types of users: a toxicological expert and a medical attendant. In hospitals and clinics in rural areas or in other areas needing toxicologists'

help, a medical attendant may observe the patient suffering from poisoning-related manifestations or may directly ask the patient how he or she feels. The medical attendant then enters the signs and symptoms observed from the patient into the webbased CDSS user interface (Fig. 2). These patient data are converted to decision rules which are submitted to the inference engine. This engine will make conclusions based on the patient data converted into rules and other existing rules in the knowledge base, through the help of the CLIPS expert system tool. After performing the inferencing procedure, the inference engine returns a list of possible poisoning types as results. The CDSS will also display the corresponding management procedures of the possible poisoning types, as well as other necessary poisoning information that would help the medical attendants make their final diagnosis.

Fig. 2:The CDSS interface The toxicological expert, on the other hand, acts as a knowledge engineer, from whom accurate and useful poisoning information will come. This toxicologist then inputs knowledge through the user interface of the knowledge acquisition tool (KAT). This tool would then save the data in the poisoning database and submit it to the CLIPS Converter of the KAT in order to update the decision rules in the knowledge base.

B. Implementation 1. The Clinical Decision Support System (CDSS) 1.a. The Knowledge Base

Knowledge in the form of rules enables expert systems to come up with intelligent decisions. In ESP, the knowledge base has two subcomponents: the poisoning database and the CLIPS file system. MySQL is the relational database management system used to add and maintain tables of toxicological classes. The database contains information on toxicological classes and subclasses, signs and symptoms as well as their relationships with the different poisoning types, weights of symptoms, and the management procedures for each type of poisoning. These management procedures include history, physical and laboratory exams which must be performed, general measures, specific measures depending on the type or severity of poisoning, and treatment of specific problems which may also be experienced by the patients. This database will be maintained by the knowledge engineer through the knowledge acquisition tool. It can also be used by knowledge engineers and other users as reference and for instructional purposes. Rules are stored as CLIPS files in the file system and are loaded into the inference engine when needed. In ESP, one CLIPS file is generated for every toxicological subclass. In addition to these files, control rules for the CDSS are also written for managing the entire inference engine. The engine infers from all rules of different poisoning types and comes up with a list of possible toxicants after the inferencing process is completed. Like the poisoning database, these decision rules are also maintained through the use of the knowledge acquisition tool. Through the CLIPS converter, rules in the file system are automatically generated or updated when information is added or updated in the poisoning database. 1. b. The Inference Engine ESP's inference engine is considered as the core of the system and simulates a toxicological expert's skills in making decisions regarding toxicological diagnosis. It is developed through the CLIPS expert system tool. The inferencing process employed in the system defines a parameter called the hit ratio which measures the intersection of the set of symptoms being manifested by a patient with the set of classifying signs and symptoms of a certain poisoning type. 2. The Knowledge Acquisition Tool (KAT) The Knowledge Acquisition Tool provides a means for toxicologists or medical experts to add an unlimited number of poisoning types and to update the knowledge contained in the system.

Figure 3: Adding a new toxicological class in the Knowledge Acquisition Tool Through the user interface of the KAT (Fig. 3), the knowledge engineer may add, edit or delete a toxicological class, subclass or a sign or symptom of a specific toxicological subclass. The knowledge acquisition tool is constructed for the knowledge engineers or toxicological experts to easily modify and maintain the knowledge base without requiring them to have technical or programming skills. This tool makes the following main functionalities available to the user via the user interface: Manage Toxicological Classes, Manage Toxicological Subclasses and Manage Symptoms. These allow the knowledge engineer to search, view and update the knowledge base by adding, editing or deleting toxicological classes, subclasses, and signs and symptoms. An important subcomponent of the Knowledge Acquisition Tool is the CLIPS Converter which was developed to automatically generate decision rules by creating or updating CLIPS files when the poisoning database is updated by the knowledge engineer. From the data entered by the user via the user interface, the CLIPS Converter extracts specific poisoning information such as toxicological subclass, type, severity, and the set of identifying signs and symptoms, and writes them in a file following the CLIPS format. 3. Knowledge Representation and Management The knowledge base in the expert system shell is primarily composed of a working memory for facts and a production memory for decision rules which can then be used by the inference engine. CLIPS keeps a fact list, a rule list, and an agenda. Facts in CLIPS are simple expressions consisting of fields in parentheses. As an example, to

express that a patient has the symptoms vomiting and weakness, the following fact is created: (assert (symptom vomiting yes) (symptom weakness yes)) Each fact is added to the fact list that CLIPS keeps in its working memory. The Javabased user interface submits these facts to the inference engine through JClips. Rules in CLIPS consist of patterns (usually related to facts) and corresponding actions. A rule is activated and put on the agenda when all of its patterns match the facts in the fact list. The agenda is a collection of activated rules. When the agenda contains multiple activations, CLIPS automatically assigns to each of the activations a salience, depending on which the corresponding rule will fire and execute actions [11]. In ESP, one global variable definition and four rules are automatically constructed by the CLIPS Converter for each toxicological subclass.The global variable represents the total number of identifying symptoms matched. The four rules, on the other hand, represent the functions necessary for checking if the toxicological subclass is a possible match and for computing the hit ratio. These definitions are stored in a file. Aside from the automatically-generated CLIPS file for each subclass, there also exists a CLIPS file which contains control rules used for returning the results to the user interface through the help of JClips functions. 4. Decision Making in ESP Signs and symptoms are the basis for identifying the nature and cause of poisoning of a patient as well as the specific management procedures that must be followed or considered. ESP intelligently generates results given the signs and symptoms entered into the system by the medical attendants. 4.a. The Hit Ratio In ESP's decision-making tasks, a simple algorithm is incorporated into the decision rules by defining a parameter called the hit ratio. This hit ratio is the percentage of the given signs and symptoms matching the identifying symptoms of a particular toxicological subclass. The identifying symptoms are assumed to have equal weights. The hit ratio factor of each toxicological subclass may be described as follows: Let {x1, x2, x3,…, xi,..., xn } ∈ X, where X is the set of input symptoms and {y1, y2, y3,…, yi,..., ym } ∈ Y, where Y is the set of identifying symptoms of a toxicological subclass. Compute-Hit Ratio (X,Y) for i ←1 to length [X] if xi ∈ Y hits ← hits + 1 hit ratio ← (hits/length[Y]) ⋅100

For example, the toxicological subclass Chronic Salicylate Toxicity has four identifying symptoms. If among the input symptoms there are only two which match the identifying symptoms, the hit ratio would be 50%. 4. b. Pathognomonic Signs and Symptoms In some toxicological subclasses, pathognomonic signs and symptoms may exist. A pathognomonic sign or symptom is known to be so characteristic of a disease that its presence alone is enough to make a diagnosis. Pathognomonic signs and symptoms that determine more than a single disease are very rare. However, there are only a few poisoning types which have pathognomonic signs or symptoms. ESP handles such cases by giving the instantiated poisoning type a 100% hit ratio. In cases where pathognomonic signs and symptoms may exist, although a certain toxicological subclass is assigned a 100% hit ratio, ESP will still display other possible poisoning types with their corresponding hit ratios and let the medical attendants further evaluate or analyze the results.

Experiments and Results After the design and the construction of the knowledge base and inference engine, a validation process was performed to test whether the system is able to return correct results. Gathering Test Data For the prototype, 50 test cases were used, each test case consisting of patient symptoms and the expected poisoning type (Table 1). These test cases are derived from the book Algorithms of Common Poisonings, Part 1 [8] and from actual patient cases gathered from different resources in the Internet such as .[12] and [13]. Test Data No. 1

2

3

Symptoms

Expected Results

Coma Convulsions Organophosphate (Severe) Abdominal Pain Hypertension Motor Incoordination Organophosphate (Severe) Muscle Fasciculation Muscular Cramps Muscular Paralysis Nausea Numbness/Tingling Sensation Thirst Paralytic Shellfish Vertigo Vomiting Weakness Table 1: Sample test cases (Test Case Nos. 1-3)

Performing the Tests Each of the test cases is presented to the system by entering the symptoms in the CDSS. The generated output is then analyzed to determine if it matches the expected result. The output of the CDSS is a list of possible toxicological classes from which a patient may be suffering as well as the corresponding hit ratio. It has been observed that there are some poisoning types which have similar symptoms; hence, it is recommended that the final diagnosis of a case be left to the medical attendant. Below is an example to illustrate the above observation. A test case (Test Case No.2) consists of the following: Symptoms: hypertension, motor incoordination, muscle fasciculation, muscular cramps, muscular paralysis Expected result: Moderate Organophosphate Poisoning After entering the symptoms into the system, the CDSS returned the results shown in the table below: Rank 1 2 3 4

Poison Organophosphate (Moderate) Paralytic Shellfish Organophosphate (Severe) Phencyclidine (Severe)

Hit Ratio 30.77 % 12.50 % 11.11 % 7.69 %

The highest hit ratio was given to moderate Organophosphate poisoning which is the expected result. This means that 30.77% of the input symptoms in the test case matches the list of symptoms in the knowledge base for the Moderate Organophoshate type of poisoning. However, there are also some cases when the expected result ranks second or third in the list. An example is the result of the CDSS for Test Case No. 8: Symptoms: headache, nausea, agitation, weakness, hypersalivation Expected result: Mild Organophosphate Poisoning The list of possible poisoning types which the system outputs is shown in the following table: Rank 1 2 3 4 5

Poison Salicylate (Acute) (Mild) Paralytic Shellfish Organophosphate (Mild) Phencyclidine (Moderate) Phencyclidine (Mild)

Hit Ratio 25.0 % 18.75 % 12.50 % 9.09 % 9.09 %

The reason for this result is the fact that some poisoning types or toxicological classes have similar identifying symptoms. This problem is usually encountered in cases where the input symptoms are only few and not characteristic enough to identify a particular poisoning type.

Summary of Results The results of the validation process are summarized in the table below: Top 1 Top 2 Top 3 All

Percentage of Test Cases 42.0 % 82.0 % 96.0 % 100.0 %

This table shows for the percentage of test cases the top, top 2, top 3 and all results returned by the CDSS match the expected result. The first row, for example, means that for 42% of the 50 test cases, the top-ranking result of the CDSS matches the expected poisoning type. For 96% of the 50 test cases, any of the top three actual results of the CDSS matches the expected toxicological class or subclass. The average hit ratios of the top-ranking classes are shown in the following table: Rank 1 2 3 4

Average Hit Ratio 31.20 % 24.85 % 20.81 % 15.00 %

One can observe that there is a very good correlation between the average hit ratio and rank. This means that hit ratios of the highest-ranking class are higher than those of the second highest-ranking class. The lowest-ranking classes, on the other hand, have the lowest hit ratios. Limitations ESP has some limitations. Due to the lack of sources of poisoning data wherein signs and symptoms of each poisoning type are actually ranked or assigned weights, it is currently assumed that identifying signs and symptoms are of equal weights. In some cases, when some identifying symptoms are common to many types of poisoning, several of the poisoning types are displayed as results having the same hit ratio. On the other hand, there are test cases for which one of the results of the CDSS matches the expected result but with a low hit ratio. This can be attributed to poisoning types which are characterized by only a few signs and symptoms.

The validation process has to be further improved. The system must be validated again when more poisoning classes and subclasses have been added to the knowledge base. Instead of coming from the Internet, the test cases should come from actual patient cases in hospitals and clinics in the country. With actual patient cases, the system can be evaluated with respect to the actual toxicological diagnostic process in hospitals or clinics so that it can be determined if the system results coincide with the medical expert's diagnosis. In terms of speed, ESP performs well as it was able to come up with the results quickly, in just a matter of seconds. Together with this, the graphical user interface of ESP allows the medical attendants to make their final diagnosis in a short period of time. Through the available management procedures, medical attendants can also help in giving medication or treatment to the patients. Recommendations There are some recommendations for ESP which may be considered for future work. If more resources for poisoning data become available, the weights of identifying signs and symptoms of each poisoning type can be factored into the system. This would significantly improve the quality of the results. The system may also be extended so as to consider other important patient data aside from signs and symptoms such as the amount of toxicant ingested. Furthermore, ESP may be integrated into other systems to provide decision support and to acquire additional useful data. Examples of such applications are electronic health record systems which can provide detailed diagnoses of past patient cases, and the Unified Medical Language System (UMLS) for an improved knowledge representation in the knowledge base.

Conclusion We described the design and implementation of a rule-based clinical decision support system for poisoning. The basic components of ESP are the knowledge base, the inference engine and the knowledge acquisition tool. The CDSS or the toxicological diagnosis component has been validated using 50 test cases, and for 96% of these cases, the CDSS was able to give the expected result. The knowledge acquisition tool allows knowledge engineers to interact with the knowledge base and to automatically update decision rules. Furthermore, this study has shown that knowledge and information in the domain of toxicology are convertible to decision rules, and that the rule-based approach can be efficiently used in building expert systems for medical domains. This system can improve the quality of health care in the country as patients needing urgent medical attention, especially those in the underserved regions of the country, can be attended to immediately.

Acknowledgments The authors would like to thank the authors of the "black book" [8] of the National Poison Management Control Center which was crucial to the success of this project. They are also grateful to the nurses of the Philippine General Hospital for patiently answering their endless queries.

References [1] Marcelo AB, Instituting the Philippine National Telehealth Service Program: Research and Development Project Proposal, National Telehealth Center, University of the Philippines, Manila, 2007. [2] Clarke JR, Webber BL and Rymon R, Flexible support for trauma management through goal-directed reasoning and planning, University of Pennsylvania, Tech. Rep., July 1991. [3] Toor AI, Decision Support System for Lung Diseases, Master's thesis, Department of Computer Science and Electronics, Malardalen University, Sweden, November 2006. [4] Althoff KD, Bergmann R, Wess S, Manago M, Auriol E, Larichev OI, Bolotov A, Zhuravlev YI and Gurov SI, Case-based reasoning for medical decision support tasks: The INRECA approach, Artificial Intelligence in Medicine Journal, 1998; 12 (1) : 2541. [5] Larichev OI, Asanov A, Naryzhny Y and Strahov S, ESTHER -- Expert System for the Diagnostics of Acute Drug Poisonings, In: Applications and Innovations in Intelligent Systems IX, A. Macintosh, M. Moulton and A. Preece, editors, 2001, pp. 159-168. [6] Darmoni SJ, Massari P, Droy J, Mahe N, Blanc T, Moirot E and Leroy J, SETH: an expert system for the management on acute drug poisoning in adults., Computer Methods and Programs in Biomedicine, 1994, 43 (3-4) : 171-176. [7] CLIPS: A Tool for Building Expert Systems. [Internet]. Available from: http://clipsrules.sourceforge.net/ (Access Date: Feb. 16, 2009) [8] Cortes-Maramba NP and Panganiban LCR, Algorithms of common poisonings: Part1, 2nd edition, National Poison Control and Information Service, Manila, Philippines1998. [9] Forgy C, Rete: A Fast Algorithm for the Many Pattern/Many Object Pattern Match Problem, Artificial Intelligence, 1982, 19:17-37. [10] SourceForge.net: JClips. http://sourceforge.net/projects/jclips/

[Internet].

Available

from:

[11] Karagiannis S, Dounis AI, Chalastras T, Tiropanis P and Papachristos D, Design of Expert System for Search Allergy and Selection of the Skin Tests using CLIPS, International Journal of Information Technology, 2006; 3(2) : 74-77. [12] Cia JYS and ChanYC, Case report: paracetamol poisoning in a 2-year old child – from international overview to the role of the Hong Kong Poison Information Centre. Hong Kong Journal of Emergency Medicine, 13(4):225-231, October 2006. [13] Banks D. Organophosphate www.krpc.com/proffed/op/op.cfm

pesticides.

[Internet].

Available

from: