PRELOG: Precedence Logic Inference Software for Blood Donor Deferral James M. Sorace, M.D. Jules J. Berman, M.D., Ph.D. Gary E. Carnahan, M.D., Ph.D G. William Moore, M.D., Ph.D.

Department of Pathology, VA Medical Center, Baltimore Department of Pathology, University of Maryland School of Medicine Department of Pathology, The Johns Hopkins Medical Institutions Missouri/Illinois American Red Cross Blood Center, St. Louis Abstract

Materials and Methods

Blood collection facilities have recently witnessed a substantial increase in the complexity of tests used to detect infectious disease in donor populations, and there is a stringent regulatory effort by the Food and Drug Administration (FDA) to validate the software for managing this information. PRELOG is precedence-based inference software used to determine a donor's suitability for continued donations and whether the donation can be released for transfusion. PRELOG accepts ternary input for test results (positive, negative, or undetermined), and solves the logic rules sequentially, so that the rulebase can be validated in a concise and consistent manner.

PRELOG (PREcedence LOGic) [2,3] has syntax akin to PROLOG (PROgramming in LOGic) [4], a popular inference method for expert systems research. A PRELOG program is a set of 'clauses', and each clause either a 'fact' or a 'rule'. A PRELOG rule is the assertion that the 'head term', H, is true if all 'predicate terms', say P1, P2, ... in the rule are true. A PRELOG fact is a rule with no predicate terms. Each PRELOG rule is assigned a precedence score which is used to sort it in descending order of its position in the rulebase. The system first solves therule (i.e., obtains the value of the head-term) with the highest precedence score for which its head-term is not yet evaluated and for which all predicate-terms have values. The newly-obtained headterm now has a value, and the system again solves the rule with the highest precedence score for which its head-term is not yet evaluated but all predicate-terms have values. If a rule's head-term is inconsistent with a previously-obtained head-term (i.e., a head-term with a higherprecedence score), the low precedence rule is discarded. The process continues to exhaustion. Precedence logic can be used to great effect in Blood Banking. For example, rules that would defer a donor (preventing therelease of a unit) receive a higher precedence than those which allow the donor unit to be released for use. Thus, only the high precedence rules need to be validated to be certain that a worst case scenario will not occur. Low precedence rules that may inappropriately release a donor unit would be pre-empted by the higher precedence rules [3]. In addition to PRELOG, the current expert system has three other features which increase its fault tolerance. First, it is modular. Each test has a mini-module which defers the donors. An "Executive Module" monitors the output of the mini-modules and determines the disposition of the donated unit. Second, rules are written which detect missing data. Third, rules are written that detect inappropriate combinations of test results (e.g., test pattems which must result from data entry mistakes).

Introduction

Approximatelytwelvemillionunitsofhumanblood are donated annually in the United States of America. Blood collection facilities have witnessed a substantial increase in the number of tests performed to detect infectious diseases in the donor populations, now including syphilis (SYPH), hepatitis B surface antigen (HBSAg), human immunodeficiency virus (HIV), alanine aminotransferase (ALT), hepatitis B core antibody (HBCAB), human T-lymphocyte virus (HTLV) I/II, and hepatitis C (HC) [1]. The blood center must determine whether the donor can continue to donate and whether any component from the current donated unit can be used. An incorrect decision may result in the transmission of a fatal disease. Thus, software validation is extremely important. The present demonstration is a medical expert system designed to handle blood donor information, using nine smaller expert systems called in sequence to obtain the fmal result. Each expert system module accepts ternary input test values (positive, negative, or undeter-

mined). Each rule is assigned a precedence score, to resolve inconsistencies and to assure that certain rules always have precedence over others.

0195-4210/91/$5.00 C) 1992 AMIA, Inc.

976

The demonstration operates on HyperPAD (BrightbillRoberts, Inc.), an object-oriented scripting environmentfor the IBM PC or compatibles, akin to HyperCard for the Macintosh. Input test data reside in the 'input' page field; the rulebase resides in the 'rulebase' page field. When the user selects a test panel, a HyperPAD script executes the contents of a PRELOG rulebase sequentially as described above, and places the results into a 'results' page field. The current rulebase was written to be consistent with current American Association of Blood Banks (AABB) policies. Blood Banking is changing at a rapid rate, and rulebases used here may need to be changed. The appropriate regulatory agencies (i.e., U.S. Food and Drug Administration, AABB) should be consulted before implementation.

References 1. Sandler SG and AuBuchon JP: Qualifications and Management of Blood donors. In, Clinical Practice of Transfusion Medicine, 2nd edition, Petz LD and Swisher SN, eds. Churchill Livingstone, New York, 1989. pp. 223238.

2. Sorace JM, Berman JJ, Brown LA, and Moore GW: Blood Donor Deferrals by Expert System. Symp Comp Appl Medical Care, 1990, pp. 610-613.

3. Sorace JM: Precedence Logic in the DevelopmentofaBloodBankExpert System. Artif Intell Medicine, 3:149-159, 1991.

Discussion

4. Clocksin WF and Mellish CS: Programming in Prolog. Springer-Verlag, Heidelberg, 1981.

Over the past decade, the logic for releasing donated blood has greatly increased in complexity. Blood bank deferral systems must comply with the Food and Drug Administration (FDA) Code of Federal Regulations that govern manufacturing processes of blood and blood products. Recently, much attention has focussed on the validation of software used in the production and distribution of biological products [5-8]. Our approach has several advantages. First, rules are precedence-ordered, so that fail-safe rules with high precedence scores can be written that override potential accidents caused by other, poorly-formulated rules. Second, the rulebase can be upgraded without introducing any changes in the PRELOG software algorithm. Finally, the modular approach lends itself to easy upgradeability. Proposed logic can be published and approved by regulatory agencies before implementation in the field, and interested parties can scrutinize the published logic. Changes can be introduced into an existing system without expensive reprogramming.

5. U.S. Department of Health and Human Services, Public Health Service, Food and Drug Administration: Technical Reference on Software Development Activities, 1987. 6. Brunning RC: Computer Systems Validation -- How to get started. Pharmaceutical Engineering 7:11-14,

1987. 7. Kuzel NB: Fundamentals of computer system validation and documentation in thepharmaceutical industry. Pharmaceutical Technology 9:60-76, 1985.

8. Kuzel NB: Quality Assurance auditing of Computer Systems. Pharmaceutical Technology 11:3442, 1987.

977

PRELOG: precedence logic inference software for blood donor deferral.

Blood collection facilities have recently witnessed a substantial increase in the complexity of tests used to detect infectious disease in donor popul...
295KB Sizes 0 Downloads 0 Views