Expert systems in medicine have been utilized in areas such as diagnosis, prognosis, interpretation of images, and physiological monitoring, as well as in providing advice concerning treatment.1, 2 One of the most important aspects of medical work, the constant need to prioritize among a set of well-justified tasks, however, is only rarely considered as a suitable application for computerized expert systems. This is understandable, as the need to prioritize is usually of greatest importance in situations of clinical urgency, where the consultation of an expert system may be considered unfeasible.
Waiting lists are of fundamental interest to patients and physicians alike. In the United Kingdom, the government has introduced targets for such lists, such as the need to “achieve a maximum wait of 6 months for inpatients by December 2005”.3 Prioritization of these lists is of specific importance not only in the United Kingdom, but equally in other countries such as New Zealand and Canada, where the national health system is unable to deliver surgical services at a rate that would allow patients to avoid unnecessary periods of waiting. This disparity between medical desirability and financial sustainability has led to a situation where waiting lists are managed not infrequently in a rather non-transparent fashion. Not uncommonly, decisions concerning prioritization are left at the subjective discretion of the operating physician.
Prioritization of patients placed on such surgical or diagnostic waiting lists is part of the day-to-day management of patients within a hospital environment. The accurate management of these lists is especially important in domains where the potential consequences of wrongly delaying a procedure are very high, such as treatment of adults and children with congenital cardiac disease. Unfortunately, the management of waiting lists is often inconsistent, and variations of the degree of priority between patients with the same diagnosis can be large at times. When managing waiting lists, specifically in the domain of congenital cardiac disease, where the degree of urgency often depends on the age of a patient, it can be difficult to maintain an appropriate order of priority. For example, a patient with a large ventricular septal defect considered to be at low priority at the age of two months, may have become high priority by the age of five months.
In clinical practice, furthermore, it is not uncommon that a patient is considered to be of a higher degree of priority by the operating cardiac surgeon if the responsible cardiologist emphasizes the need for surgery very strongly. As a result, a patient recommended for surgery may not necessarily represent the highest clinical priority, but highlight the fact that the cardiologist responsible argued strongly for the surgery to be performed.
Much of the knowledge and reasoning on which cardiologists base their decisions is not very well defined, indeed, it is rather fuzzy. The pulmonary vascular resistance in patients with a large ventricular septal defect, for example, increases very gradually from a few weeks of age until it reaches a stage where it is elevated to a degree where certain patients become inoperable due to irreversible pulmonary vascular disease. The precise point in time at which the process becomes irreversible is difficult to predict for individual patients.
The concept of “Fuzzy Sets” was introduced as far back as 1965.4 Its suitability to medicine results from the fact that medical science is not always sufficiently precise to fit with other concepts, such as probability theory, and firm boundaries are rarely appropriate in medical decision-making. Without doubt a patient, with transcutaneous arterial saturations of 35 percent would be considered as severely cyanosed, and the same would apply to values of 36 percent, 37 percent, or 38 percent. Saturations of 65 percent, however, may be considered to represent severe cyanosis to one observer, whilst another might interpret this value as representing moderate cyanosis. An increase in arterial saturation of 1% does not change significantly the clinical state of a given patient, and firm divisions between moderate and severe cyanosis in such settings would be inappropriate. Fuzzy set theory accommodate these limitations by allowing, to a variable degree, a crisp numeric value to be part of different fuzzy sets.
Representation of knowledge and decision-making
Unlike mathematics, medicine is an imprecise science. For many areas of the medical decision-making process, there is not always a clear right or wrong solution, with more than one appropriate alternative frequently being available. This is specifically true when comparing the urgency of two different patients. The following two patients highlight this dilemma:
- Patient A: Was aged five months, and presented with a large atrial septal defect. The patient had been born prematurely, had significant attributable symptoms, but normal distal pulmonary arterial pressures. The patient was listed for surgical closure.
- Patient B: Was aged two months, and presented without any significant symptoms with a large non-restrictive ventricular septal defect. This patient was also listed for surgical closure.
The patient with the ventricular septal defect would require the defect to be closed surgically within the first six months of life so as to avoid irreversible pulmonary vascular disease. In contrast, the patient with the atrial defect could potentially wait for a long time without encountering any serious adverse events, or being exposed to a suboptimal long-term outcome. When analyzing the clinical benefit in terms of reduction of symptoms, nonetheless, the patient with the atrial defect is likely to benefit to a much larger extent than the other patient. In this situation, it may well be justified to operate first on the patient with the atrial septal defect, provided guarantees can be given that the other patient will be submitted to surgical correction within an acceptable time-frame, specifically within the first 4 to 6 months of life.
Prioritization is even further complicated through geographical differences in the infrastructure of health services. For example, in some poorer developing countries with very limited resources, it would clearly be an unwise decision to use limited medical resources on a patient with hypoplastic left heart syndrome, who even with the best care in the world would only have a very limited chance of medium- and long-term survival. In contrast, within the United States of America, prioritization of waiting lists would not represent an issue, since patients generally are referred for surgery as soon as the medical need has been identified.
So, how do paediatric cardiologists in the United Kingdom prioritize their patients? In Figure 1, we show a flowchart of this decision-making process, developed through evaluation of the discussions that have been taking place between cardiologists and cardiac surgeons at the weekly cardiosurgical conferences. In general, cardiologists and cardiac surgeons ask themselves four essential questions, which we can specify as the main impact factors, when prioritizing any specific patient:
- What is the risk of adverse events in this patient while waiting for the procedure?
- How long can the patient safely wait without adversely effecting the predicted long-term outcome?
- How long can the patient wait without increasing the procedural risk?
- What clinical benefit can be expected from the procedure?
Adverse events include, for example, sudden death, hypercyanotic spells and stroke, whilst reduced long-term outcome may refer to the risk of persistent systemic hypertension after repair of aortic coarctation, or persistent right ventricular dilation after replacement of the pulmonary valve. Procedural risks include, for example, those of pulmonary hypertensive crises in patient who undergo surgery at an older age with larger ventricular septal defects, whilst the clinical benefit refers among others to the significant reduction in hospital admissions due to congestive cardiac failure in a patient after closure of a large ventricular septal defect.
The procedure, diagnosis, and many clinical parameters have to be reviewed for each patient to be able to answer these clinical questions. These various parameters can be separated broadly into five different categories:
- General demographic parameters
- Diagnosis and proposed procedure
- Clinical data
- Echocardiographic data
- Catheterization data.
It is at this stage of prioritization that clinicians usually use fuzzy variables. As an example, it is important to identify patients that are severely cyanosed rather than analyzing the specific value of transcutaneous arterial saturations of oxygen. With the information provided through these parameters, the main impact factors, such as risk of adverse events, can be determined, which in return allows patients to be placed in one of several categories for timing. These categories are time-frames in which a patient ideally should undergo surgery. Categories that are frequently used among paediatric cardiologists include periods of within one week, one month, three months, six months, 12 months, and an elective period.
At the next step of the process of prioritization, patients within the same category are compared to each other. In many circumstances, the procedure and underlying diagnosis are sufficient to make a decision on which patient deserves a higher priority. In other cases, in contrast, patients within the same diagnostic or procedural category, such as cyanotic cardiac disease, are compared based on important clinical parameters for the relevant subgroup. In the patients with cyanotic cardiac disease, this may be the arterial saturation of oxygen. In some circumstances, patients waiting for the same procedure, and stratified within the same category of timing, are compared based on age, weight, or other parameters such as the number of cancellations or the period elapsed on the waiting list. All comparisons are made in a staged fashion, which allows more important criterions to be evaluated first. Only if these evaluations do not provide an answer to the problem of prioritization in question does the analysis shift to the level of the next criterion.
Importantly, at this final level of prioritization, crisp data is frequently used to compare the priority between patients. For example, if a patient has arterial saturations of oxygen of just 1 percent lower to another, then he or she may be classified as more urgent. This is in contrast to the earlier stages of prioritization, where the fuzzy value of cyanosis was considered to be of greater importance.
Using this staged approach to prioritization permits the clinician finally to reach a clear decision when prioritizing two different patients.
Research question
In our article, we describe the results of researching the medical decision-making process when prioritizing patients with congenital cardiac disease for cardiac surgical procedures. The research attempts to identify an appropriate representation of knowledge, and illustrates a proposed conceptual model using a prototype of a fuzzy rule-based expert system developed using FuzzyCLIPS,5 embedded into a C++-coded graphical user interface.
Methods
Setting
The project was conducted within the setting of one of the largest tertiary referral centres in the United Kingdom for the management of patients with the full spectrum of congenital cardiac abnormalities. Within this centre, about 450 cardiac surgical procedures are performed each year by two consultant cardiac surgeons. All patients are managed by five consultant paediatric cardiologists. Over the last five years, at any given time, there were between 50 and 150 patients waiting for a cardiac surgical procedure.
Design and implementation of the PrioHeart expert system
Considerations of knowledge. It was not feasible to represent an exhaustive pathophysiological concept that underlies the theoretical decision-making process when prioritizing cardiac surgical patients. Because of this, we chose a shallow structure for representation of knowledge. The most appropriate strategy with which to search and approach the problem of the waiting list was data-driven reasoning. In deciding upon the surgical priority of a specific patient, cardiologists usually analyze a moderate amount of data specific to the patient before making their conclusion. The scheme of representation of knowledge chosen for our project was based on rules of production, which are very intuitive to medical experts and very suitable for a forward-chaining data-driven approach. When analyzing the domain, it became clear that many of the inherent facts and parameters within the domain were non-exact or non-crisp, and therefore the support of fuzzy structures for data and reasoning was included as one of the basic requirements of the design.
Examples of fuzzy variables included weight, the period of waiting, the mean pulmonary arterial pressure and ventricular function, whilst examples of crisp variables included the primary diagnosis, history of cyanotic spells, and failure to thrive. Other variables, such as transcutaneous saturations of oxygen were used as crisp as well as fuzzy variables. They could be fuzzy, for example, when a patient awaiting completion of a Fontan procedure was assigned a high clinical urgency based on arterial saturations of oxygen being extremely low, whilst the crisp equivalent might be used when comparing two almost identical patients and ultimately forcing a decision on clinical urgency based on the crisp value of the saturations of oxygen.
Basic design. As shown in Figure 2, the main components required to design an appropriate expert system solution to the problem of the waiting list included:
- The expert system inference engine
- The base of knowledge
- The backend database
- A graphical user interface
The choices of hardware and software made in the process of design were not only influenced by the requirements of the system itself, but also by the environment and constraints of the local hospital, which required to make use of already available resources to limit the expenditure and increase local compatibility.
The inference engine and base of knowledge. The requirements for the chosen inference engine included the following essential components:
- Rule-based representation of knowledge
- Support for fuzzy reasoning with or without support of certainty factors
- A code-base that is freely available, well documented, easily extensible and preferably written in a C-language (C++, C, or C#).
On researching the available options, it became clear very quickly that FuzzyCLIPS, developed by the National Research Council of Canada to “implement a fuzzy expert system shell on top of CLIPS”5 was the only available system that conformed to a variable degree to all of the above requirements. FuzzyCLIPS is an extension to the expert system tool CLIPS (“C language Integrated Production System”), which was originally developed by Software Technology Branch of NASA, Lyndon B. Johnson Space Centre as an academic tool.6 CLIPS is extremely useful for implementing a production system which, in essence, consists of a collection of rules, a working memory that holds all facts, as well as an algorithm that, using the available appropriate rules, creates new facts from those already existing.7 One of the main tasks of a production system is to match the left-hand side of rules in order to be able to pick the appropriate rules that are eligible for firing. The left-hand side of a rule specifies any facts that have to be present for a rule to fire, whilst the right-hand side of a rule specifies the action that is taken, or in other words the consequence of firing of the rule.
For this task of pattern-matching, which is one of the integral components of the inference engine, CLIPS uses the Rete algorithm, which is “intended to improve the speed of forward-chained rule systems by limiting the effort required to recompute the conflict set after a rule is fired”.7 One of the main “theoretical” advantages of FuzzyCLIPS as opposed to many other freely available expert system shells was the fact that it “is designed so that it can be called from a host language such as a C++ program, do its function, and then return control to the host program”.7
The knowledge base was syntactically implemented using the “deftemplates” and “defrules” of FuzzyCLIPS. In total, more than 370 rules were implemented within “PrioHeart”. An example of the syntax of such a FuzzyCLIPS rule is listed below, using a pseudocode syntax as shown in next page.
Essentially, this rule asserts that a patient, aged between 4 and 5 months, with a non-restrictive ventricular septal defect or an atrioventricular septal defect with common valvar orifice in the absence of banding of the pulmonary trunk, has an increased operative risk within one month with a certainty of 0.8, and a reduced operative outcome within three month with a certainty of 0.8.
In addition to fuzzy facts, certainty factors were used to implement uncertainty, either through assertion of facts with variable factors of certainty, as in the above rule, or through assigning factors of certainty to complete rules. These factors of certainty were initially based on the intuition of the expert and, during the process of testing and evaluation, fine and incremental changes were made to produce the most appropriate results in prioritization.
The facility to edit templates and rules individually, and save them grouped within larger construct files that could be “loaded” into the FuzzyCLIPS engine at the beginning of an execution, was an important requirement, and greatly enhanced a distinct separation between the inference engine and the base of knowledge, as well as the C++-coded front-end. It also facilitated the debugging process of the rule base separately from the rest of the “PrioHeart” system.
The feature of salience of FuzzyCLIPS was used to categorize rules in order of priority, and to guarantee that rules with higher salience would be fired preferentially if more than one rule or rules proved eligible. As an example, one rule used with very low salience differentiates the urgency of two patients based upon the longest crisp waiting time. This rule will only “fire” if two patients have not been differentiated with regards to urgency after virtually all other rules have been assessed.
The back-end database and the graphical user interface. One of the essential requirements of the expert system solution was to allow the specialist to add and edit the data from individual patients as a means of changing the clinical priority. For example, in a situation where a patient was found during a clinical review to have suffered a significant reduction in arterial saturations of oxygen, the consultant would be enabled to update the clinical data electronically, thereby allowing “PrioHeart” objectively to recalculate the priorities, rather than just subjectively highlighting this fact to the cardiac surgeon.
PrioHeart was developed to require only the planned procedure and date of birth as a minimal dataset. For each patient, PrioHeart automatically asserts a basic set of main impact factors, such as clinical benefit, assuming by default the lowest possible urgency for the specific type of procedure. To achieve appropriate prioritization, and a higher assigned degree of urgency, other clinical and demographic variables have to be entered to the database. The more details that are provided, the more likely the patient will achieve the appropriate prioritization. This had the added benefit of being an incentive to the physician to provide as many details as possible of the patient if priority needed to be expedited.
Microsoft Access 2003 was used as the preferred database system during development and testing, as it allowed greater portability. “PrioHeart” was finally implemented, however, using the SQL Server 2000 database management system.
Of great importance was the need to keep the amount of data collected limited to essential information specific to the patient, to avoid overwhelming the consultants with the amount of data they are being asked to maintain on a regular basis. Other requirements of the database included the need to keep relationships and structures of data very simple to facilitate the transfer of database data into FuzzyCLIPS fact assertions.
Windows XP professional was used as the standard operating system, and Visual Studio.net 2003 as the development environment. An object-oriented design was chosen to implement the graphical user interface.
Testing and evaluation
For the purpose of evaluating the rule base, we created a set of 59 virtual patients, incorporating all basic procedures and all important variables. A specialist in paediatric cardiology was asked to prioritize these virtual patients. These efforts at prioritization highlighted the difficulty that, even with expert knowledge, there was not always a single solution to the problem of prioritization, and frequently a variation of five positions up or down in hierarchy was perfectly acceptable, and often justifiable from a different clinical perspective. Initially, therefore, we used a threshold of ten positions between the order of priority as suggested by “PrioHeart” and the suggestion of the expert to identify and refine those rules that could reduce these differences.
Using an iterative process, rules were added and modified to the rule base until the difference between the priority of a patient as suggested by “PrioHeart” and the priority as assessed by the expert did not vary by 10 or more for any particular patient out of the group of 59 virtual patients. The suggested order of priority was frequently examined in detail, and further modifications made to the rule base whenever a prioritization appeared clearly inappropriate. At this stage of fine tuning, we added and modified the factors of certainty to achieve the most appropriate prioritization. The overall threshold for a rule to fire was set at a certainty of 0.3.
Once all errors were eradicated, and the result of prioritization represented a perfectly adequate order of priority, we analysed using “PrioHeart” a group of 20 patients recently prioritized by a group of consultants in paediatric cardiology in a clinical effort unrelated to the expert system. The results were acceptable, with none of the patients differing in order of priority by more than three.
Results
After initial testing was completed, the expert system was further evaluated using a randomly selected set of 25 virtual patients (Table 1) whose details were printed and submitted to three different consultants in paediatric cardiology for the purpose of prioritization. At the same time, “PrioHeart” was used to calculate the relevant priorities.
In Table 2, we display the result of these efforts, illustrating a fairly wide range of variation between cardiologists, even though the overall trend was similar. “PrioHeart” prioritized in a fashion that was frequently in between that provided by the various specialists.
When analyzing in more detail the results of prioritization by the individual consultants, it became apparent that, in many circumstances, different listings could be regarded as an acceptable order of priority. The prioritization produced by “PrioHeart” did not appear to include any obvious clinical erroneous decisions, and represented an acceptable clinical order of priority.
When correlating the prioritization achieved by “PrioHeart” with the results obtained by the individual consultants, and using simple linear regression, there was in all cases a significant correlation observed, with p less than 0.0001, and with correlation coefficients ranging from 0.826 to 0.918 (Table 2, Fig. 3).
Discussion
Our purpose in carrying out this project was to analyze the medical decision-making process when prioritizing patients with congenital cardiac malformations for cardiac surgical procedures, identifying an appropriate representation of knowledge, and transferring this knowledge into the design and implementation of an expert system called “PrioHeart”. The project was to a large extent conducted as a feasibility study, accepting compromises in various areas for the benefit of being able to demonstrate the practical workability of the solution.
It could be argued that the problem of prioritization of waiting lists would be better served using an algorithmic solution. Such solutions, however, are rarely appropriate in problems of diagnosis and management within the domain of congenital cardiac disease. Franklin et al.8 described an algorithmic solution to diagnosis and early management of neonates born with congenital cardiac lesions. This involved the evaluation of a series of questions focussing on symptoms and signs present in neonates with potential congenital cardiac abnormalities, as a result of which a potential diagnostic category and relevant early options for management were selected. Unfortunately, algorithmic solutions are unsuitable to deal with situations where, for example, a certain symptom is present in 99% of cases of a specific diagnosis. In these situations, algorithmic solutions may wrongly exclude a specific diagnosis purely because of its rarity. Franklin et al.8 compared this algorithmic approach to a probabilistic solution using a system of scoring, which has the advantage that “a single atypical observation should not lead to a dismissal of a diagnosis”.8 They concede, nonetheless, that disadvantages obviously include the complexity of the probabilistic approach, not least related to the difficulties in obtaining all the required frequencies that form the backbone of this type of approach.
“PrioHeart” uses a shallow structure for representation of knowledge, which is in keeping with the fact that most articles that have focussed in part on the domain of congenital cardiac disease used reasoning that is strongly influenced by heuristic rules, rather than deep or model-based reasoning. Even though patho-physiological mechanisms have been represented in simplified models of a solitary congenital cardiac lesion, such as ventricular septal defect,9 this type of deep or model-based reasoning is unsuitable when applied to prioritization of waiting lists, because the knowledge required for making appropriate decisions with regards to such prioritization is too extensive, as it virtually spans the complete domain of congenital cardiac disease.
An example of a program that uses a process of deep reasoning in the diagnosis of acquired heart disease is the “Heart Disease Program”, which uses a Bayesian probability network, and extends upon this paradigm to include other aspects such as temporal reasoning.10 A requirement for such an approach is the availability of accurate probabilities of findings or combinations of findings,10 data which is unfortunately frequently unavailable when prioritizing patients for cardiac surgical interventions, not least because some important variables may be hidden from direct clinical observation. An example of such hidden information is the degree of pulmonary vascular disease, which is an important clinical parameter when prioritizing patients for cardiac surgical procedures, but which is not directly observable, unless one would perform a direct lung biopsy. In addition, Long and colleagues10 point out that a probabilistic approach is rather different from the reasoning typically chosen by physicians, who “tend to think in terms of evidence rather than probabilities”, and therefore tend to prefer “causes that can be ‘ruled in’ or ‘triggered’ by findings” rather than being “based on probabilities”.
One of the problems of probability is that inherent imprecision, or fuzziness, is easily lost when vague expertise is encoded into probabilities: Ng et al.11 very nicely state that with “probability theory, either an event occurred or did not”. This is where the possibility approach using fuzzy set theory4 becomes extremely helpful, as it “replaces the binary logic of probability with multivalued logic”, thereby making partial “matching natural and elegant by using compositional inference and interpolation”.11 Certainty factors almost feel like an extension of fuzzy logic and have a similar benefit of avoiding the “need for prior probabilities”.11
Various other criterions and tools have been reported as facilitating the process of prioritization, and increasing its transparency. MacCormick et al.12 described several potential problems with the use of tools for prioritization relating to the ethical basis, the criterions to be used, the methods used to give weight and summate the criterions, as well as internal and external validation. They reviewed 41 articles that examined the prioritization of adults waiting for general surgical procedures within the setting of a public system for health, based on various novel criterions. The majority of articles used “urgency of need” as the ethical basis, whereas others primarily focused on “capacity to benefit”. Most studies used specific criterions for certain operative procedures rather than generic ones, which tended to be less objective. Methods used for the development of these criterions included methods of consensus, multiple regression, qualitative methods, and others. Tools used for prioritization differed markedly with regards to the method of summation of the criterions, as well as the weighting of different criterions.12 Virtually all studies used some form of scoring for priority based on weighted linear methods, as well as non-linear and matrix summation methods. Many of the tools, unfortunately, have not been formally validated, and are not applicable to the domain of surgical patients with congenital cardiac disease.
The problem of the waiting list is universally present within the National Health Service of the United Kingdom, and is certainly not confined to paediatric cardiology and cardiac surgery. As a result, the approach to managing such lists in the context of clinical priority may be transferable to other specialities. The essential questions of the clinical risk of adverse events, the clinical benefit obtainable, as well as the chance of reducing outcome or increasing the risk of the procedure through prolonged waiting, are important not only in cardiology and cardiac surgery, but also in many other medical specialities. The overall algorithm of prioritizing patients (Fig. 1), therefore, may be transferable to other specialities, even though a different rule base would need to be developed for each speciality, taking account of the individual domain-specific variables.
Even though “PrioHeart” performed well on selected number of patients, there are a number of limitations. We should emphasize that no exhaustive testing has been performed to test and evaluate a larger number of combinations of patients, symptoms, diagnosis, and procedure. The system at this stage is imperfect, and compromises have been made that allowed a quicker cycle of development, but reduced scalability of the solution. Besides its promising early results, we should also emphasize that the system has not been introduced and tested in routing day-to-day clinical use over a longer period of time. As such, conclusions that can be drawn are obviously limited. Modifications and further refinements to the rule base may be beneficial. Many, if not all, procedural categories would benefit from the addition of more refined rules that make full use of the number of available clinical variables. The inclusion of further categories for timing, such as within two months, four months, and five months may further contribute to a more refined prioritization. The same applies to the addition of further morphological variables, or some measure of complexity of a lesion. In addition, it is acknowledged that the expert system does not take account of the human factor, an example being individual performance that would render a patient to be delayed until a specific operator becomes available. Most importantly, there can be no doubt that a regular detailed review of all patients on a surgical waiting list, using updated and complete clinical information and the presence of all clinicians, should in general deliver the most appropriate prioritization, even though the performance of PrioHeart against a group of clinicians has not been formally evaluated.
At this stage, the expert system was developed as a prototype that defines surgical priority purely based on clinical priority. The use of such a system, even if refined, is unlikely fully to replace clinical prioritization, but should help to avoid gross inconsistencies in prioritization between different clinicians, and could be used as a quick reference guide that allows surgeons to select a specific patient for an available surgical slot.
Acknowledgements
The project is based on a dissertation delivered to obtain the degree of Master of Science in Information Technology at the University of Liverpool. It was developed within and with the support of the cardiac department of the Royal Liverpool Children's National Health Service Trust. We acknowledge the help and support of Marco Pozzi and Antonio Corno, who gave the authors valuable insight into the surgical decision-making process.