capable of running sophisticated AIM programs - Europe PMC

0 downloads 0 Views 1MB Size Report
Implementation of Medical Knowledge-Bases in Hypercard. Gordon Banks, Ph.D., M.D.. Sean McLinden, M.D. and. Gina Carlos, B.A.. Decision Systems ...
Implementation of Medical Knowledge-Bases in Hypercard Gordon Banks, Ph.D., M.D. Sean McLinden, M.D. and Gina Carlos, B.A. Decision Systems Laboratory University of Pittsburgh Pittsburgh, PA 15261

the SUMEX-AIM computer facility maintained by the National Library of Medicine at Stanford University, and shared by those AI in Medicine (AIM) researchers who have access to SUMEX. However, the formats in which these knowledge-bases are stored is idiosyncratic to the particular program for which they were intended. Those wishing to make use of those knowledge-bases must first decipher them and then translate them into a form usable by their own programs or write their programs to read the data directly.

Abstract

on

Hypercard is a computer program which allows the creation of databases of linked It is textual and graphic information. extremely easy to use, even for naive users. We have transferred into Hypercard format portions of some of the expert system medical knowledge-bases developed over the years in our laboratory to investigate the feasibility of using Hypercard as an editor and browser for such data.

Attempts are currently underway to ameliorate this situation by trying to develop a standard language in which medical terms may be expressed (Unified Medical Language System, or UMLS), so that programs can interface with data bases made for other programs. 1 With the proliferation of high performance microcomputers, such as the 80386-based and 68000-series micros (the Macintosh II, for example), the hardware capable of running sophisticated AIM programs is becoming available to an increasing number of domain-experts who may be interested in constructing a knowledge base in their particular field of expertise.

Background During the past 15 years, medicine has been the domain of many knowledge-based artificial intelligence (AI) programs. A plethora of different methods and techniques have been used, but few programs have actually progressed beyond the "toy" stage, probably due to the lack of sufficiently detailed and complete knowledge-bases. While the design of algorithms and methods is exciting and suitable material for graduate theses, the years of dog-work necessary to build up a comprehensive knowledge-base, such as that used in INTERNIST-1, so far have daunted all In but the most indefatigable researchers. addition, there has been considerable reduplication in effort in that different programs have implemented much of the same knowledge over and over again in slightly different formats.

One of the bottlenecks in constructing expert systems has been the entry of the data into the knowledge-base. While the computer scientist may be comfortable entering knowledge in the form of frames or rules directly into Lisp code, the domain expert rarely is. In order for the domain expert to properly construct the knowledge-base, it has been necessary to have the simultaneous presence of a programmer or "knowledge engineer" or to design a sophisticated editor to allow the expert to examine the structure and

Ideally, once a knowledge-base has been constructed, it should be available for experimental use by designers of other knowledge-based Al programs. To a certain extent, this has been done by having such programs as MYCIN and INTERNIST available 434

0195-4210/88/0000/0434$01.00 0 1988 SCAMC, Inc.

perform useful functions are much more quickly developed in Hypercard than in While conventional programming languages. Hypercard is currently only available for Macintosh, the creator of the software has made the system specifications public and plans have been announced to create programss for IBM-compatible microcomputers which can share stacks with Hypercard. The system for the Macintosh is available for less than $50 and has spread very quickly among the user community.

linkages of the knowledge-base. The design of such an editor has not usually been trivial, its degree of difficulty depending on the structure and complexity of the knowledge-base. One approach to facilitating both construction and sharing of knowledge-bases might be to implement them in a commonly available standard database format. Such a database system would ideally have a userfriendly interface, allow the novice user to create linkages and browse the data, run on multiple types of computers, and have an associated programming language to allow for translation of the data into a form needed by the target expert system. We feel that many of these requirements are met by the recent introduction of Hypercard®9 by Apple Computer. A more complete description of the system is given in references on Hypercard2.

Methods and Results As an experiment to test the feasibility of using Hypercard as a knowledge-base editor, we created stacks for two of the knowledgebases which have been developed in our laboratory over the years. Those chosen for the experiment were the neuroanatomic knowledge-base5, which contains neurologic manifestations with their corresponding neuroanatomic and neurovascular correlates, and a fragment of the knowledge-base for

The Hypercard paradigm is related to the concept of the Hypertext computer-based media, first enunciated several years ago by Theodor Nelson3. In contrast to the nature of paper-based media, in which pages are turned sequentially, Hypertext allows the user to branch from one part of the document to other related parts by selecting (usually with a mouse) various "hot spots" placed there by the author. This allows the user to read from the more general to the more specific, obtaining more information on the topics of interest. Hypercard may be thought of as a stack of cards implemented in the computer. Upon each card may be placed fields which contain text or graphical information and buttons which, when activated by selecting them with the mouse, cause certain actions to be performed (for example, flipping to another card in the stack or in another stack). The stacks, cards, fields, and buttons all are implemented as objects which are associated with scripts written in the Hypertalk language4, which is a simple, Pascallike language with a syntax more like English than that of Pascal. Message passing facilities are provided for communication between these objects. The user interface is simple and intuitive, and even the novice user of Hypercard is generally able to access a great portion of the power and functionality of the Hypercard system, creating fields and buttons and making links between cards and stacks. Good facility in programming Hypertalk is easily acquired by those familiar with other programming languages, and stacks which

CADUCEUS6. The above knowledge-bases are in the This type of form of semantic networks. knowledge base essentially consists of frames This of information connected by links. translates well into the Hypercard format, since each frame can be represented by a card with various fields for the associated information for the frame (slots, if you will), and linkages between frames which can be made through the use of buttons.

Figure 1 shows the card for the manifestation alexia without agraphia from the neuroanatomic knowledge base. Presence of the clinical manifestations indicates likely involvement of some or all of the neuroanatomic structures contained in the Selection of any of these anatomy field. anatomic objects by clicking on them with the mouse activates a script which allows one to branch to that object's card in a stack containing all of the neuroanatomic objects in Cards for the the knowledge-base. data contain objects neuroanatomic representing the vascular supply, neural connectivity, and spatial relationships for the Using the Hypercard-implemented object. knowledge-base, the novice user can browse between the relationships through manifestations, anatomic objects, vascular 435

.!Y'MXs .

I

Maniestation:lalexia without aaraphia

Anatomy

Or

gy..cw..*i

.I .... an. akiiai ....

................................................ . ...................................... . ............................

................... ............ . ...................... .

-59a.m.

Or carlax ......... .... .......... . ............ . ...............

....

ocalaital wili

......

...................................................................................................

&e

..............................................................................................

... . ..............

................ ..... . ....

.................................................................................................................

.. ..... ............ . .. ....... ....... . ................... ... ......... . ... ..... ...

..... ..

-

.................................................................................................................

......................................................................... .............................-

.......... ................................... . ........ ........ ............................................

............................................................ .............................................q@.

..............................................

r

.

... .............................. .... .......

.. . .............

.........................................................................................................

........

it

.................. . ... ............ ........ ........ . ............ . .................. . ....

. ............... . ... ....... ............... . ...... ............. . ........ ... ...................

................................ . .................... .... ....... ....... ........ . ............

m

.I.Q. ...........4-19..

...............

....

............ .................................... . .................................................

.........................................................................................................I

....................................................................................................................

..................................... ....................................................................I

......................................................................................................................

.....................................................................................................................

......................................................................................................

I...... . ................................................. ............ . ... . .. . .................. . ...

( Comment )

i

( Definition

)

(Diagnostic Rnatomy)

Source

i

Is

43o

-a)|

Figure 1. Neuroanatomic Manifestation

MLani,festatton: alexia without aaraphia Or

I1

Anatomy

llnr nvri.W1e.... ............................................ annn ......

*s4nlenium

of

cornus

IIZZ

callosum.

I................................................ ................ ........ ............

I......................................................... . .. . ........................................................

=.......

*1

......

....

,..... ......................................................................... .......................................

,

....

. . ah ...... . ................I ..& .......................................................

white kqiA..g Al 1. Ium matter Im. um.".V..a. ........ occio'ital

,

...

..................................................................................................

Or

.....

......

... . .............................

... ....... .. . ... ......... .... ......................... .... . ........... . .. . .............................

&

.....

............... . ............................................................................ ...............I

.........................................................................................................

*....

..........................................................................................................

...................................................... ................................................... ........................................................

......................

.................

..............

....

.......................................................

Ability to write what the patih ant has himself written. Patient may b e able to read individual ................... letters. ....................................................... .......................................................

.

.....................

................................................ ................

...........................................................

................................................................

,.................................................................

......................................................

,....................................................

atomg

0

(Comment

Definition -

Figure 2.

Source

The Hidden Field "Definition"

436

v

Part-of

:

---I

fninf9estatoio:alexia without apraphia

I

1ftaqtnosttbc Anatoms

Anut-mie .

.

..............

I................8.....

......

Z5QI ..................... ...........

..................................................................... .................................

vaseular

lobJftA.I....... C..Q.Q.----*---X*-*--Z*--***-vv*--s ...... b*- - - - - - -*-* e---Z----*

................

8e Etiologic ........................................................................................................

......................................................................................................... I ,................... ..................

8e

..................

Return to main card 'q2

Figure 3.

Figure 4.

"Diagnostic Anatomy"

The Facet "Parkinsonism"

437

small buttons on the links allow editing of the structure of the links (figure 7). Other linkages (labelled T in figure 8) can be made which capture the temporal information in processes which occur over varing periods of time. An example is shown in figure 9 of the timecourse of the development of gaze palsies in progressive supranuclear palsy. The card in figure 9 allows the timecourse to be graphically visualized while the underlying machinereadable information is on a hidden field activated by the button with the magnifyingglass icon.

supply, and spatial relations. The graphical ability of Hypercard could permit cards containing digitized brain sections to be included to allow a more complete visualization of the spatial anatomy, although this has not been implemented at the present time. Hypercard also has the ability to control a video disc player, and linkage could be made to frames of analog visual material. Manifestations and objects can be added easily by creating a new card from the background template, filling in the fields with the pertinent information. Linkages between manifestation cards and anatomic objects can be provided automatically by scripts which look for an object card named for the selected object, provided such exists, thus freeing the user from the obligation of creating the links explicitly. Error handling can be built into the Hypertalk scripts to alert the user if he attempts to enter non-existent or misspelled objects into the manifestation fields. Figure 2 shows how buttons (in this case, the definition button) can activate the display of "hidden" fields. These fields contain information about the frame represented on the card which the user may want to access, which is not appropriate to display continually. When the data for a node does not all fit onto one card, links can be made to any number of other cards. Activation of the Diagnostic Anatomy button causes display of a supplementary card linked to the main card (figure 3.)

Using Hypercard to edit and construct a knowledge-base, the user does not need to know how to program in Lisp. When data is entered into a field, buttons are automatically scripted to allow branching to cards named after each facet entered. The user of the editor only needs to be responsible for filling in the names in the causal and hierarchic linkage cards. Once the knowledge base editing is completed, a script can be activated to compile the knowledge-base into the Lisp forms which are understood by CADUCEUS. Conclusion

The use of Hypercard to construct userfriendly, portable knowledge-bases for medical expert systems appears to be feasible. This may facilitate the creation of more expert systems since it allows domain experts who are often computer-naive to create knowledgebases with more sophisticated data structures. We have not attempted to implement rulebased knowledge in Hypercard, but this could be done, since fields can contain the rules, and the antecedents and actions could be linked with buttons. No attempt has yet been made to implement an actual expert system in Hypertalk, but this could be done, especially for limited domains. Hypertalk provides sufficient computational power to implement the logic. necessary to perform automatic branching, although speed may be a problem, since Hypertalk is an interpreted language. Even this limitation might be overcome by those who can program the Macintosh in other languages such as C and Pascal, since compiled functions and procedures in those languages can be linked into Hypercard stacks by means of the XCMD facility of Hypercard.

The knowledge base of CADUCEUS takes the form of a large semantic network of manifestations, diseases and. intermediate pathophysiologic states which explain the ways in which the diseases can produce their manifestations. The Hypercard implementation contains stacks for facets (manifestations, diseases, and pathophysiologic intermediates) and various types of structured linkages, of both causal and hierarchical types. Figure 4 shows the card for the facet parkinsonism. The user may browse or edit the relations for each facet by clicking the mouse on the buttons above (parental facets), below (child facets), to the left (manifestations of the facet) and right ("causes" of the facet). Figure 5 shows the card for the manifestations linkage to parkinsonism. Clicking on any of the buttons in the graph brings one to the card for the facet as labelled on the button. Figure 6 shows a similar graph the manifestations of Parkinson's Disease. The 438

Figure

Manifestations of Parkinsonism

5.

Figure 6.

Manifestations --L

Litik tremor QualifIer

Type

Frequency

Quality

variable Location

to

of Parkinson's Disease

-

-

IEvoke Fre !a 3 4

resting

L action

0 range(4,8) pill rolli ng | variable l | hand>arm>foot>leg>mandible lii1

I1

0

-

Value i

---L

IParkinson's disease

I

C

1 4 :iii

ii

ii

3

:lj:j1 4

11

E )

i. I

IiiI

'i

iii'

I

111111 Iit~ I II

I

1111

Figure 7.

Structured Link

439

(gaze palsy}:

Figure 8.

Manifestations of PSP

|to progressive supranuclear

Tt,wMULt* gaze palsy down gaze

palsy) weeks to months

ciup gaze palsy

t

left gaze palsy

right gaze palsy

right gaze palsy

left gaze

palsy

(complete gaze palsy Figure 9.

Temporal relationships of gaze palsy to PSP

References

lMiller RA, "From automated medical records to expert system knowledge bases: common problems in representing and processing patient data". Topics in Health Record Management 7, 3 (March, 1987), 23-35. Aspen Publications. 2Goodman D. Complete Hypercard Handbook. New York: Bantam, 1987. 3Nelson T. "A file structure for the complex, the changing, and the indeterminate." Proceedings of the 1965 ACM National Conference.

4Shafer D. Hypertalk Programming. Indianapolis: Hayden, 1988. 5Banks G, Weimer B, and McLinden S. "Symbolic coordinate anatomy for neurology (SCAN)." Journal of Medical Systems 8 (1984), 157-162. 6Pople H. "Evolution of an expert system from Internist to Caduceus." In Artificial Intelligence in Medicine, De Lotto and Stefanelli, eds. Amsterdam: Elsevier, 1985 pp. 179-208.

440