Method for production of medical records and other technical documents6684188Abstract A computer implemented system for the production of medical records, legal documents and other frequently produced semi-technical documents. This is accomplished by generating an intelligent computer-guided interview and the use of serialized scriptable objects. Major program elements include a knowledge base text file, a parse engine, and an execution module. The knowledge base uses a unique rule syntax. The parse engine converts the textual knowledge base file to a compiled binary representation which can then be interpreted by the execution module. The execution module leads the user through the interview by generating a series of questions and presents possible answers in the form of pick lists. The data is recorded with a computer pen and collated into a document file. This file is coded in binary format and can be written to and recalled from disk. If the file is recalled from disk the user can continue to answer questions or change answers previously given. The result is a mobile computing system whereby data is input in a structured format. When the program is executed the user is prompted for answers to questions and, based upon the user's response, the final document can change considerably. Depending upon each answer, the program may change the subsequent questions being asked, change the list associated with a question, change the text being generated, or change the entire structure of the document. The data collected may be also be stored in a database for analysis at a later date. Finally, the data collected is output in a narrative text format which can be tailored according to the traditions and expectations of the user's profession. The program will output the text via a printer or it can be transmitted via electronic means. Claims We claim: Description FIELD OF INVENTION
REFERENCE NUMBERS
Ref.
# Description FIG. #
100 complete CaD program 1, 44
102 User, e.g. physician 1, 6, 43, 44,
45
104 Interviewee, e.g. patient 1, 44, 45
106 structured interview process 1
108 user input 1
110 document produced - end result 1, 6, 44, 45
112 binary knowledge base file 1, 5, 6, 44
114 real time retrieval (SCT files) 1
118 user editing process 1
120 text file storage - TXT files 1
122 archival storage - TXT, SCT, DB files 1, 6
124 data analysis 1
130 hand-held computing device 1, 2
132 desktop computing device 1, 2
134 wireless LAN transmitter/receiver 2, 3, 4
140 central processing unit - CPU 3, 4
142 read only memory - ROM 3, 4
144 random access memory - RAM 3, 4
146 mass storage device - hard disk drive 3, 4
148 keyboard input device 3
150 mouse input device 3
152 computer monitor - display screen 3
154 printer device 3
156 LCD screen/digitizeddigitalized input device 4
158 pen input device 4
200 knowledge from domain expert 5
202 syntax language definitions 5
204 ASCII knowledge base file 5
208 parse engine 5
210 persistent objects - POs 5, 6
212 binary code format definitions 5
214 parse module of CaD editor program 5, 6
216 execution module of CaD editor program 6
218 knowledge base manager 6
220 view manager 6
222 display manager 6
224 object manager 5, 6
226 inference manager 6
228 reusable document file - SCT file 6
231 chart (document) persistent object 7
232 section persistent object 7
233 node persistent object 7
234 text persistent object 7
235 rule persistent object 7, 43
235 node rules 43
236 list persistent object 7
237 variable persistent object 7
238 variable set persistent object 7
240 Kbknowledge base syntax - [LISTS] division 8, 17a, 43
242 Kbknowledge base syntax - [TEMPLATES] 8, 17b
division
244 Kbknowledge base syntax - [VARS] - variable 8, 17c
division
246 Kbknowledge base syntax - [NODES] division 8, 17d
248 Kbknowledge base syntax - [INFERENCE] 8, 17e, 43
division
248 Inferences 43
250 Kbknowledge base syntax - [SECTIONS] 8, 17e, 43
division
252 list name 9, 17a
254 list sort flag 9, 17a
256 sample list/list contents 9, 17a
262 template name 10
264 template subvariables 10
268 VAR name 11, 42
270 variable attribute - value 11, 42, 43
272 variable attribute - state 11
274 variable attribute - longname 11, 17c
276 variable attribute - associated list 11, 17c
278 variable attribute - default value 11, 17c
280 variable attribute - help text 11, 17c
282 variable attribute - type 11
284 modal dialog data entry form - MR # 12
286 numerical entry buttons 12
288 numerical display box 12
290 "OK" - enter button - MR # modal dialog entry 12
292 node - name 13
294 node execution - line by line 13, 43
300 nodal program control - straight transfer 14
302 nodal program control - conditional branch 14
304 nodal program control - return of control 14
306 nodal program control - transfer to 14
310 typical 3 letter abbreviation 15
312 compound name syntax 17a, 43
312 node name syntax 43
314 commonly accepted abbreviation 15
316 inference table - input variable 16, 17e
318 inference table - output variable 16, 17e
334 [NEW] example of a list keyword 17a
338 menu text.backslash.output text 17a
340 subvariable name line 17b
342 example of a simple rule in a node 17d
344 template definition 17c
354 variable - TYPE = MULTSELECTABLE 17c
356 variable - TYPE = OMITTABLE 17c
358 variable - TYPE = INFER_ONLY 17c
360 variable - TYPE = RATCHET 17c
362 variable - TYPE = NUMERIC_ENTRY 17c
363 variable - TYPE = DRAWING
364 variable - TYPE = FILENAME 17c
366 list of nodes to executed as a section 17e
370 simple text output 17d, 43
372 .backslash.n = insert carriage return 17d
374 %VAR% variable substitution in text fragment 17d
376 VAR = insert variable value 17d
378 routine node redirection 17d
380 IF rule 17d
382 ELSE rule 17d
384 SETTEMPLATE variable set reassignment 17d
386 VAR .backslash.NODISP variable option 17d
387 .backslash.ARTICLE 17d
388 .backslash.ABORT action 17d
390 .backslash.TEXT action 17d
392 .backslash.SETVARIABLE command 17d
393 .backslash.SETVARFROMSUM command 17d
394 DO .backslash.action syntax 17d
398 section - display flag 17e
400399 document title definition 17f
404 title bar with file ID 18, 21
406 menu bar 18, 21
408 tool bar 18, 21, 24
410 prompt window 18, 21, 24,
25, 36
412 parse from text button 18
414 File menu - parse from text menu selection 19
416 execute Chart menu - interview mode 20
417 execute Chart menu - edit mode 20
419 execute Chart menu - expert mode 20
420 execute Chart menu - document sections 20
422 execute (run) program (currently) loaded KB 21
424 toggle between interview mode &and edit mode 21
426 omit current question button 21
428 open drawing window button 21
430 list window with active pick list 18, 21, 24
432 "OK" button for quick pen input 18, 21, 24,
25
434 text edit window 18, 21, 24
436 edit button - text edit mode 18, 21
438 standard windows scroll bar 21
440 print file button 21
442 text edit button - green check = question 22
answered
444 text edit button - green question, optional 22
446 text edit button - omitted question 22
448 text edit button - red question, mandatory answer 22
450 User menu - use to log in, open dialog 23, 24
452 log in dialog box 23
454 log in button 24
456 log out button 24
458 d/c interview and return to edit mode 24
502 pick list with chest pain selected 25
504 text output of "chest pain" in chief complaint 25
506 text output of "chest pain" later in HPI 25
512 gastrointestinal symptoms include nausea 26
514 respiratory symptoms include cough 27
516 Chart section = "Review of Systems" 28
518 example of .backslash.SETVARFROMVAR command 28
520 example of VAR .backslash.CONVERSE command 28
522 flow chart question - chief complaint 29
524 flow chart question - mechanism of injury? 29
526 flow chart question - which seat? 29
528 flow chart question - location of laceration? 29
530 flow chart question - laceration mechanism? 29
532 chief complaint answer = neck injury 30
534 mechanism answer = motor vehicle accident 31
536 chief complaint answer = laceration 323
538 which seat answer = driver's 332
540 location answer = hand 34
542 mechanism answer = broken glass 35
552 "occupation" pick list 36
554 variable longname prompt window 36
556 selection = clerical worker 36
558 selection = disabled 36
562 complaint #1 = twisted left ankle 37
564 complaint #2 = right knee pain 37
566 left knee exam - minimal 37
568 right knee exam - detailed 37
570 left ankle exam - detailed 37
572 right ankle exam - minimal 37
574 Dr. Lewis - younger doctor 38
576 Dr. Lewis' preferences 38
580 Dr. Welby - older doctor 38
582 Dr. Welby's preferences 38
584 text annotation, drawing window 39, 40
586 keyboard overlay, pen input device 39
588 drawing template 40
590 clear button 40
592 cancel button 40
594 "OK" (enter) button 40
598 record definitions (filenames) 42
610 impact of user selections 43
620 document structure 43, 44
632 medical history 44, 45
634 physical examination findings 44, 45
636 diagnosis 44
638 clinical judgment of physician 44
654 medical traditions 44
656 physician's past experience &and training 44
658 local hospital rules 44
672 secondary user - RN 44
674 secondary user - technician 44
676 minor historical details 44
702 take notes 45
704 sit down &and dictate 45
706 transcription 45
708 dictated note 45
710 repeat similar information in each note 45
712 information gathered by staff members 45
714 fax transmission 45
716 optical scanner 45
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT An Overview of the Process--FIG. 1 FIG. 1 shows an overview of the process of computer-assisted documentation according to the present invention and abbreviated as CaD. This invention comprises a scriptable object system 100 for generating and running intelligent computer-based interviews 106. Essential elements include a user 102, an expert 200, and the computer-assisted documentation software itself 100. The software must be loaded into a suitable computer 130 as outlined below. In the preferred embodiment, the process includes an individual being interviewed 104. This individual 104 serves a source of new and unique data to be recorded to produce a document 110. CaD allows knowledge domain experts 200 to create knowledge base (KB) text files 204. These files are then compiled into binary knowledge base files 1112 by the software. This binary knowledge base (KB) file 112 is then used to direct the program to prompt the user for information 106 and produce text 110 based on the answers received. When the program executes, it prompts 106 the user for answers to questions. The original knowledge base file 112 is reused to produce scaffolds for new documents. The modified file 112 may be saved to disk 146 and restored, in which case the user 102 can continue to answer questions, or change answers 118 previously given to questions. Finally, the CaD software will output a report in textual format either to disk 120, FIG. 6 or printed as a usable hard copy document 110. The CaD program will output data in a variety of formats and archived for later use 122. This data may be analyzed 124 at some later time for the purpose of research or outcomes analysis. It may also be retrieved for billing or legal purposes. Hardware--FIGS. 2, 3 FIG. 2 shows an overview of the hardware configuration of an apparatus according to the present invention. The crucial piece of hardware is a hand-held tablet computer 130 with a pen interface. Such units are commercially available from several manufacturers including FUJITSU.TM., IBM.TM., DAUPHIN.TM.,BADGER.TM., NORAND.TM., PANASONIC.TM., TELXON.TM., TELEPAD.TM., and others. According to the preferred embodiment, the hand-held unit communicates with a desktop computer 132 via a wireless LAN (local area network) 134. FIG. 3 shows the typical configuration of desktop personal computer equipment such as an IBM PC or a PC-compatible computer. In the preferred embodiment computing equipment 132 includes a CPU 140 such as an 80486-processor operating at 66 MHz or greater. The CPU 140 executes program instructions such as operator selected applications programs stored in RAM memory 144 or specialized functions such as start-up programs or BIOS stored in ROM memory 142. Computing equipment 132 further includes a wireless local area network interface 134 that provides an interface to a local area network whereby the computing equipment 132 can communicate with the hand-held mobile unit 130. Computing equipment 132 further includes a monitor 152, a keyboard 148 and a mouse 150 for allowing operator manipulation and input of information. Mass storage memory 146, such as a fixed disk or a floppy disk drive, is accessible to the CPU 140. Mass storage 146 typically includes stored program instruction sequences such as an instruction sequence according to the invention. Other information and data processing programs may be stored in mass storage device 146 as well. Data may also be stored on mass storage memory 146 as desired by the operator. The desktop computer 132 connects to a suitable printer 154 for output of text. A standard laser printer with a resolution of at least 300 dpi would be suitable. FIG. 4 shows the similar configuration of the hand-held computer 130. This computer would also be an IBM PC-compatible computer. Computer 130 includes a CPU 140 such as an 80486-processor operating at 50 MHz or greater. The RAM 144, ROM 142, wireless LAN or WAN 134 are all essentially the same as outlined above. Significant differences between the two computers include the fact that the hand-held unit 130 has no mouse 150 or printer 154. In place of the mouse is the pen 158 designed to transmit an electromagnetic impulse to the specially designed LCD screen 156. This screen is an integral part of the hand-held unit 130 and replaces a conventional monitor 152 but it also serves as an input device. Consequently, no keyboard 148 is used for data entry. The pen 158 is functionally almost identical to a mouse. Mass storage memory 146, consists of a fixed drive of at least 340 Mbytes, accessible to the CPU 140. There is no floppy drive in the hand-held unit. As in the desktop unit, and like most computers, the mass storage 146 includes stored program instruction sequences including the computer-assisted documentation program. An Overview of Software Function--FIGS. 5, 6 The structure of the CaD software 100 reflects the fact that the program must be executed in two stages. FIG. 5 outlines the first stage, the parsing of the knowledge base file 204. The expertise of a given domain expert 200 is used to create a knowledge base file 112 that can be reused multiple times. Later the CaD program is executed by a user 102 who may be the original expert or another (nonexpert) individual. At this later point in time the execution of the program serves to guide the user through an interview 106 and facilitate the recording and output of data in a specific organized fashion. FIG. 6 illustrates the execution phase of this process. FIG. 5 is a flow chart illustrating the components of the preliminary or preparatory portions of the CaD program 214. This preliminary activity culminates in the parsing of the knowledge base file 112. It can be seen in FIG. 5 that this process begins with a domain expert 200. This individual's expertise is translated into a knowledge bags text file 204 according to the syntax in the language definitions 202. The notion of a scripting language is certainly not new. This particular knowledge base language and syntax are, however, newly created. What is unique is the degree to which this language allows dynamic control and redirection of text and variables during the execution phase of document production. Unique features of this language include the combination of standard procedural language constructs for flow control, variable assignment, query, grouping, and indirect reference. These features are also combined with built-in facilities for constructing inference relationships between the value (or content) of a variable and other variables. This inference can change the value of the subsequent variables or the lists associated with the second variable. Inference can also directly affect the text as it is displayed and output to the final document. Variables also control the way a user is prompted for new material. The details of the knowledge base language definition are outlined in a subsequent section. Further details concerning the function of the program are found in the appropriate section of the specification. There are two parts of the complete CaD editor program 100, the parse module 214 and the execution module 216. These two modules are outlined in FIGS. 5 and 6 respectively. After the domain expert 200 has produced a knowledge base text 204 file written in the CaD knowledge base language 202, this file is processed by the parse engine producing a binary knowledge base file 112. This binary executable knowledge base file contains CaD persistent objects (POs). POs 210 can be stored to disk and recalled or held in RAM 144 where their order dictates the flow of the interview 106. These POs can be stored to disk and later recalled for editing and subsequent output. These POs 210 are defined according to predetermined formats 212 and produced by the parse engine 208. The rules and interpretations of this syntax are stored in rule POs 235 which contain unique byte code. These rule POs are used to translate the knowledge base into persistent core objects 210 written in a machine readable language. All of the POs for a given knowledge base 204 are interrelated, and when stored on disk, make up the binary knowledge base file 112. FIG. 6 is a flow chart that illustrates the components of the run time or execution module of the CaD program. The execution phase requires that a binary knowledge base file 112 exist, having been previously prepared according to the parse routine 214 as outlined in FIG. 5. The CaD execution program 216 consists of six primary software components. These include the knowledge base manager 218, the view manager 220, the persistent core objects 210, the display manager 222, the object manager 224, and the inference manager 226. The view manager 220 is responsible for constructing and communicating with the display manager 222. The view manager 220 is also responsible for constructing and communicating with the list display. This is in order to display the list associated with the current question. The view manager 220 is also responsible for executing the current knowledge base at the proper times and determining the current question. The display manager 222 can wrap the text into the display as it is generated and keeps track of the objects associated with each piece of text. The display manager 220 also controls the display buttons representing questions and handles mouse input when the user clicks on a list selection or the "OK" button 432. The display manger 222 controls the translation of the data into a textual format which can be saved to disk as a text file 120, FIG. 1 or printed out as a hard copy 110. The data file may also be saved in a binary file consisting of serialized persistent objects. We call this an SCT file. It is one type of archival storage 122. An SCT file can be reopened for editing or adding additional material. It may also be shared with another user. The knowledge base manager 218 is responsible for performing open, save, and close functions on the current knowledge base 112. The knowledge base manager 218 is also responsible for performing open, save, and close functions on the newly created document file 228. This file 228 can be modified by the user 102 and stored to disk. This document file 228 can be recalled 114 for later editing. The Inference table manager 226 manages information on disk regarding inference rules as originally defined in a knowledge base text file but created in inference table format during parse time. Values are assigned to variables due to a user answering a question, or to an inference rule assigning a value to a variable. The inference table manager then determines if there are any rules defined for the variable-value pair currently being assigned, and if any are found, it executes the inferences. The persistent core objects (PO) 210 consist of several objects as outlined below. The object manager 224 is responsible for saving and restoring the POs to and from disk 146. The CaD program utilizes eight major types of POs. These are illustrated in FIG. 7. The document PO 231 maintains a list of sections which are important to define the structure of the document. The document PO may also contain other document specific information e.g. an identifying number to reference that particular record. This number is contained in a special variable object which is used to generate unique filenames. The section PO 232 maintains a list of nodes that will be executed for the section of the document they represent. The section PO also contains policy information regarding the display and execution of the section. The node POs 233 maintain a list of zero or more executable POs. These POs can be of one of five classes. The five classes include text, rule, variable, node, and template POs. These five classes as well as the "DO" command are discussed in more detail under the discussion of the node division. The text PO 234 contains text, which will be displayed when a node executes them. The rule PO 235 contains the binary code representations of the flow control logic and actions associated with the condition(s) in the knowledge base rules. The list POs 236 are referenced by variable objects 237 and maintain lists of possible answers to questions represented by variable objects. The Variable POs 237 maintain zero or more selections and maintain a reference to 0 or 1 List objects. Variable POs also maintain a reference to 0 or 1 variable set objects, and a set of CaD specific attributes. These attributes specify the behavior of the CaD executing software regarding whether the question represented by the variable has been answered or not. If an answer was manually selected by a user, then that user's "user level" is recorded as well. In addition, variable objects may store the results of inferences only. Such variables exist only to be referenced by a rule object and never represent a question that the user can answer. The variable set POs 238 provide the ability to group variables in a single object. The POs also provide the ability to provide multiple instances of such groups so that the same Node and Rule objects can use indirect references to more than one actual instance of such variable groupings. The basic CaD execution program 216 combines all of the above components. The knowledge base manager 218, the view manager 220, the display manager 222, the object manager 224, and the inference manager 226 are combined with the persistent objects 210 themselves 231-238 to form the execution program. A CaD editor program combines the execution program outlined above along with the parse function diagrammed in FIG. 5. Knowledge Base Language Definitions The essence of the CaD program is a script language with newly developed rules and syntax. This language is created for the particular types of activities described herein. Namely, the production of technical documents based upon the results of an interview and guided by the knowledge of a domain expert. The knowledge base text file 204 is written as ASCII text. There are, however, specific keywords with unique meanings as well as specific rules with a defined syntax. The knowledge base text file 204 is translated into a binary form 112. This process is outlined in FIG. 5. The knowledge base text file 204 consists of six divisions as illustrated in FIG. 8. These divisions include lists 240, templates 242, variables 244, nodes 246, inference 248, and sections 250. Each of these represents a type of PO 210 which can be written to disk and recalled to computer memory where it can perform its role in generating a document. The document is produced as the appropriate POs are linked together in a serial manner in the correct order for display and output. FIGS. 17a-17f represent sample consisting of actual knowledge base text file code 204 which may serve as a useful reference throughout the following sections. In contirast FIGS. 7-16 are schematic representations of the various components of the knowledge base language 202. FIGS. 17a-17f serves to illustrate the knowledge base language syntax described below. This file is markedly abbreviated but shows examples of each of the major syntax features 202. Each new division is noted to be introduced by the division name or keyword in square brackets [ ] e.g. [LISTS] 224. Reference numbers between 334 and 400 are found in the sample KB file. Other reference numbers are found in the appropriately referenced figure. FIG. 8 illustrates the 6 divisions of the knowledge base file 204 as noted. The LISTS division 240 defines names of lists and choices 256 within each list. Lists 256 are referenced by variables. I.e. a list contains the possible choices from which a selection may be made. This selection, once made becomes the variable value. The TEMPLATES division 242, FIG. 17b, defines the types or templates from which groups of variables or compound variables can be derived. The VARS division 244, FIG. 17c, defines the variables. Variables can be simple variables or compound variables based upon a template. The NODES division 246, FIG. 17d, defines the various nodes that make up the document decision tree. The INFERENCES division 248, FIG. 17e, defines tables of inferences that are used to set the inferred selections (and optionally lists) for variables and/or bitmaps based on the value of another variable. The SECTIONS division 250 gives a section name and a list of nodes for each section in the document. In the example of the medical record these sections might include such topics as history, physical exam, and treatment. Divisions of the Knowledge Base Text File FIGS. 9-16 The list division begins with [LISTS] 240. FIG. 9 illustrates the structure of the list object. Lists are referenced by variables 276. The list is displayed as a pick list when a variable 244 is queried. A list is always associated with or called by a variable 276. The same list 256 may be referenced by several different variables. Each list begins "NAME=name" 252. A list can contain special keywords that are interpreted internally by the program. Special keywords 334 are enclosed in square brackets [ ]. Such keywords are not written to screen or text. An example of such a keyword is [NEW]. This causes an input modal dialog to pop up so that the user can input a choice not on the list. The next line many contain a "SORT=TRUE/FALSE" flag 254. If no SORT=flag is specified, the list will default to non-sorting. Every non-empty line after that will be considered an entry in that list 2564, until another line with NAME=is encountered. Another tool that adds flexibility to the way the text is handled is a means of distinguishing between menu text and display text. The menu text shows up on the pick list on the screen and the display text is what appears in the printed document. When a node contains a VAR statement, the result of such a statement is to display the text associated with the value of that variable. The text selected from the menu is known as the menu text and the text which is output by the VAR command is the display text. If separate display text is used there is always a one to one correlation between menu text and display text. In each entry line, the backslash character (.backslash.), if present, separates the list entry's menu text from its display text 338. The display text might be an expanded form of the menu text but in some cases it might be an abbreviated form. This could be used in cases where technical abbreviations are used in the final document 110. If there is no backslash entry, then the entry's menu text will be used as its displayed text. An alternative way to convey more information is by using the %VAR% construction 374. Whenever text is output to the document 110, the use of the %VAR% construction will cause the display text to be inserted in that position. The template division begins with [TEMPLATES]. FIG. 10 illustrates the structure of the template object. The use of templates allows dynamic redirection during program execution. Templates also allow for greater efficiency by reusing of components. An example of the particular utility of templates would be in the case of a medical record where an examiner might want to examine duplicate (i.e. left and right) organs. A template 242 is a list or a set of variables. Simple variables (variables that are defined in the VARS section without referencing a template) contain only one value. Variable sets use a template, and contain multiple component variables. Because some rules can reference a template name rather than a variable name, the knowledge base programmer 200 must choose template names 262 which are unique, not only for templates, for but variables as well. For more info on this, see the VARS section and RULES section. Each template begins with "NAME=name". Following the name line 262, there must be one or more of the following component variable descriptions 264. These are identical in syntax to the simple variable descriptions in the VARS section, except that rather than NAME=, they begin with SUBVAR=. Each component variable section -264 is indicated in the knowledge base with a "SUBVAR=name" line 340. FIG. 17b. The name supplied here is used in conjunction with the main variable name, with a "." in between them. Thus each SUBVAR 264 has a compound name that can be used to reference a new unique value. For example, if the template is named COM (complaint) and there is a component variable defined with the name SUBVAR=LOC (location), a variable called COM1 may be derived from a template called COM. Then a rule a rule may be constructed to test the value of COM1.LOC 342 i.e. the location of complaint # 1. Following the SUBVAR=line the same kinds of lines may be used as were utilized in the VAR sections. The SUBVAR sections can be repeated indefinitely for each template. Note that, in order to make the file easier to read, the SUBVAR lines are indented The variable division begins with [VARS]. FIG. 11 illustrates the structure of the variable object. Each variable has a unique name 268. Variables store information selected by the user during document generation. The information stored is known as the value 270 of the variable. The value could also be thought of as the contents of the variable. The value 270 is a dynamic attribute and usually comprises a text string. The other important dynamic variable attribute is its state 272. Variables can have one or more static attributes as shown. These attributes include longname 274, list 276, default 278, helptext 280, and type 282. The information stored in a variable is selected in one of two ways. It may be based on user selection of an item from a variable's associated list (manual selection). Alternately the value may be an inferred selection because of an inference that occurred when the user selected some previous variable. Each simple variable definition begins with "NAME=name 268. There is an optional template parameter, " TEMPLATE=template.sub.13 name". Usually it is omitted in which case the variable would be a simple variable. A compound variable could also be defined by using a template 242. This type of variable definition requires the use of template definition syntax, "NAME=name <TEMPLATE=template_name>" 344. If the "TEMPLATE=" parameter is used then the variable in question is defined as a compound variable. The newly created group of variables are defined according to the attributes of the various subvariables 264 of the template 262. The use of the SUBVAR syntax is reviewed in the template section above. As a simple example of variable redirection and substitution suppose a template named COM (complaint) had two subvariables known as IS (what is the complaint) and LOC (location). Then the template could be reused and redefined for multiple complaints. The syntax NAME=COM1 TEMPLATE=COM, would cause the subvariables from the COM template to be reused and renamed as subvariables of COM1. This process can be repeated for COM2. If complaint #1 was a laceration to the hand and complaint # 2 was a bruise on the head then the final syntax and variable values could look like this: COM1.IS=laceration COM2.IS=bruise COM2.LOC=hand COM2.LOC=head Later rules can be written to assign COM to one of three instances, and then evaluate COM.IS in a generic sense. In this case the rule would consider either the value of COM1.IS and COM2.IS. Assuming COM2 was the most recent reassignment then this would be the variable evaluated by the rule. Alternately a rule could be written in a specific way to evaluate only COM1.IS and ignore COM2, COM3 etc. Thus the CaD software has the ability to generate compound variable names and create new variables which are logically related or interdependent. Thus nodes and rules can be reused for different instances of related sets of variables. This is one of the properties which creates the unique power and, flexibility of CaD. Static Variable Attributes The following types of static variable attributes can appear on the lines immediately following the NAME line for each variable. Static attributes are defined by the knowledge base author or domain expert 200. They are written into the knowledge base 204. The dynamic attributes are volatile and their values change at run time depending upon user actions. The most basic attribute of a variable of course is its value 270. The second dynamic attribute in the CaD program is the variable's state 272. These two attributes are discussed later in this section. The following represent the user defined or static attributes. These can appear in any order in the knowledge base. The first line of each paragraph represents the correct syntax for that attribute. LONGNAME text--string The LONGNAME attribute line 274 simply supplies a more descriptive term to describe the variable. This is the phrase which is displayed on the prompt line 410 on the screen to prompt the user to answer the question. The longname attribute may also employ the %VAR% syntax whereby a variable is embedded in a line of text. This is used to communicate context specific information to the user. LIST list_name The LIST attribute line 276 references the name of a list object 252, a list of possible choices for the value of the variable. Note that while every variable must have an associated list of some sort even if it is embedded in the variable, there is not a strict one to one correlation between a list and a variable. A single list may be referenced by multiple variables. The list associated with a variable may be changed dynamically by the use of inference tables and inference rules. Thus a single variable may use different lists and not simply different choices on the list. This process is dynamic and context specific. An embedded list can be created in the variable division of the knowledge base. All non-empty lines following NAME and not using a recognized keyword will be considered entries in an embedded list for that variable. An embedded list will be created for a variable only if there is not a LIST line for that variable. Embedded lists are given the same name as the variable. DEFAULT choice_menu_text. The DEFAULT attribute 278 indicates an initial default value for the variable in question. This will also cause the variable to behave just as if that value had been inferred to the variable. This default value may be overridden with manual input from the user. HELP help_text string (Not Enclosed in Quotes) The HELP attribute 280 is used to list a help text string which supplies additional information if necessary. The text is not enclosed in quotes. TYPE Command Keyword(s) The most complex of the variable attributes is the variable TYPE 282. Then syntax is TYPE "keyword". The TYPE attribute is set by a TYPE keyword. Multiple keywords may be used. If multiple keywords are used they are separated by blanks 282. By defining a variable's type the specific functional characteristics of the variable are defined. These characteristics define how the variable can be used at execution time. This data structure enables the CaD software to function in unique ways. Possible keywords that may be used to define a variable type are defined in the next section. TYPE Keywords NODEFAULT The variable cannot be considered inferred. It requires manual input by the user. MULTSELECTABLE 354 The variable can receive multiple values. Without this keyword, only one value may be contained in the variable. OMITTABLE 356 The variable can be omitted manually by the user 102 or by way of inference even though it is called by the program. No text value will be output and no questions will be asked. This refers to a specific act of omission by the user 102 or the program 100. Other variables are simply not called by the program during a particular execution. This has no bearing on the concept of omission. If a variable is omitted, this is tracked in the variable's state 272. INFER_ONLY 358 The user will not be asked to select a choice for the value of the variable. The value can only be input by a rule or inference. RATCHET 360 The value of the variable must be numeric. Its value may be increased by subsequent inference rules but the value can never decrease. If an inference rule attempts to set the variable at a lower value it will simply be ignored. This data structure is utilized to indicate that a more complex level of documentation is required for some reason. It is important that this not be overlooked. Rules can then be written based on the value of the ratchet type variable. NUMERIC_ENTRY 362 If the edit dialog is opened on this variable by selecting the [NEW] keyword then a special modal dialog window is opened which facilitates entry of numeric data with a pen. This input dialog is illustrated in FIG. 11. DRAWING <[initial.bmp]> If a variable is of the DRAWING TYPE this allows a pop-up window 588 to be opened when the variable is selected or active. The pop-up window may be blank or contain a drawing template. The [initial.bmp] filename is optional. If a file name is specified in this way then a drawing will appear when the window is opened. The user can then edit or and to this drawing. IMPORT The import keyword means that the value of the variable can be read into CaD from a database file. The name of the database file to search is noted in the CaD.INI file. This input database must contain only one record, i.e., only one value per field. The CaD program will search for a field with the same name as the current variable. If a mach is found the value will be input into the CaD variable. EXPORT The export keyword means that the value of the variable can be exported from CaD to a database file. The name of this output database file is noted in the CaD.INI file as well. This output database will then contain summary information from all the documents produced by the CaD device. This database can them be sorted, filtered or queried by a user or reviewer. A wide variety of reports can be generated to analyze procedures and outcomes or to conduct scientific research. An additional unique feature of the database export feature is that the state 272 of a variable 244 can be tracked and exported as well as its value 270. Thus it can be measured whether a certain choice was made by a particular user or if a user omitted a certain choice FILENAME The use of reserved variable names is allowed for special purposes. In the preferred embodiment the variable name "MRN" 364 is the variable designated with the specific type flag set with the filename command. This variable MRN is the name of the variable designated to contain the "medical record number". This unique eight digit number is assigned to identify an individual patient in the hospital setting. The CaD program automatically uses this number to create a unique filename when the document is saved to disk. The default settings for the variable TYPE, if not otherwise specified, are DEFAULTABLE, (not) MULTSELECTABLE, (not) OMITTABLE, (not) INFER_ONLY. This means that the default type of variable is one which may have a default and only one selection may be made from a list. The variable may not be omitted from the document if the variable is reference by the internal flow of the program. Finally, the default state for a variable is that it may be manually selected by the user. Dynamic Variable Attributes--Value 270 Fundamental to the concept of a variable in mathematics or computer languages is the concept of a name 268 for the variable which is constant and defines the variable and a value 270 which can change. The use of these terms in CaD is consistent with this understanding. In the CaD program the value of a variable is generally defined when a user makes a selection from a list. In CaD a variable may have a value or contents that contain more than one selection if it is defined a multi-selectable 354 by the type attribute 282. A variable can also be of the infer-only type 3586 and thus it is not available for user input. In the preferred embodiment the value 270 of a variable can also be inferred in one of four ways. It can be set to equal the value of another variable by the command .backslash.SETVARFROMVAR. It can be set internally by the program by use of the .backslash.SETVARIABLE command 392. The value of a variable may be the sum of the values of two other variables by use of the .backslash.SETVARFROMSUM 393 command. In the CaD program this syntax is used not for numerical data but for combining multiple selections (string variables) from different lists 518. The value of the new variable is not a numerical sum but rather a concatenation of the values of the two previous variables. The fourth way in which the value 270 of a variable can be inferred is by the use of an inference 248 table. The syntax for the inference table is described in a subsequent section. In CaD an inference table is usually used when the value of a certain variable has implication for the values of more than one other variable. This is the structure that allows a given user to specify defaulted personal preference values for commonly used variables. These values can be selected in advance at the time the knowledge base is prepared, i.e., a variable default 278. These values can also be inferred and a wide variety of complex ways using combinations of conditional rules, inference commands and inference tables. These newly inferred variable values can then be inserted into the document automatically. Dynamic Variable Attributes--State 272 One of the unique features of the CaD language is the use of the variable state 272. In its simplest sense the state of a variable could be considered selected as opposed to not selected. I.e., has the user selected a value for the variable from an associated list. In CaD this concept is expanded considerably. The state attribute 272 tracks whether each variable: 1) has been selected at all, either manually or by inference or by default, 2) has been manually selected by a user 108, 3) has been inferred by the CaD program, 4) contains a default value, or 5) contains multiple selected values. In addition to tracking whether on not the variable has been manually selected, the CaD program records the user level of the person who selected the value. Thus, if the CaD programs were being used by an expert and an assistant to prepare the same document, it could be set up so that the assistant was not able to override the data input by the expert user. This has very important ramifications in the case of an expert system. One of the significant limitations of expert systems is the garbage in, garbage out phenomenon. In many cases the output of the expert system is compromised because the actual data input requires expert interpretation in order to be of any real value. The CaD system can be setup to prohibit a less experienced user from overriding data supplied by a more expert user. CaD would also prohibit a less experienced user from omitting a selection made by a more expert user. In situations where text is output to either the screen or to the document a standard %VAR% syntax 374 can be used. This will cause the value of the variable to be written to the document at that position. This syntax can also be used in the "LONGNAME" text 274 to provide more accurate feedback to the user on the prompt line. This enables the CaD interview 106 to be a very dynamic process. Node Division The node division 246 of the knowledge base FILE begins with [NODES]. FIG. 13 illustrates the structure of the node object or node syntax in the knowledee base file 204. A node is the basic structural element of the document. A document is generated as a user is guided through a series of nodes. A node is like a small program. A node definition begins with a line, "NAME=node_name" 292. The node is executed, line by line 294, and ends up with a Boolean status of executed or not executed. Nodes are executed either a) because they are included in a section's node list 366, or b) because a rule in another node invoked them 378, or c) because they were directly invoked by another node 300. The top level nodes are anchored to sections (see the SECTIONS division below). Other nodes may be referenced only as the result of particular selections made by the user at run time. The use of nodes allows for dynamic control of the flow of information and the structure of the document. The node 246 and section 250 divisions work together to define a huge tree structure of potential pathways through the document. Typically a given document would utilize only a small fraction of the nodes defined in the knowledge base. Part of the ability of the user to customize the knowledge base for his/her individual needs comes from the ability to create new nodes and name them in any fashion the user chooses. Naming schemes or syntaxes can be created for different fields. According to the preferred embodiment a naming syntax is devised for use in the knowledge base. This naming syntax has particular application in the field of emergency medicine but serves to illustrate how such a syntax can create a near infinite variety of possible branching points in the node structure. A small fragment of the index for the naming scheme is recorded in FIG. 15. This is included only as an example of one possible method for systematically naming nodes and other components of the CaD knowledge base. The general pattern is to reduce all significant words to a three letter abbreviation 310. These abbreviations are then linked in the form A_B_C 312 where A,_B, and C represent appropriately abbreviated names. If a commonly used abbreviation exists 314 this is used instead and the three letter convention is not strictly enforced. It is common to nest these node names three deep. Sometimes four layers are used but this is unusual. This sort of naming convention avoids duplicate names and yet the meaning of the abbreviation is usually intuitively apparent. As an example, the location of pain in the chest might be listed as CHE_PAI_LOC. This name could then be used to name a node, a variable, or a list. The same name could be used for all three types of objects. Similar naming conventions could be created for other professions. Using this system, with 35 alpha-numeric possibilities for each character space in each of nine potential character spaces, allows for the generation of more than five trillion unique names. This naming syntax is one more tool used to create variety and flexibility in the CaD program. Although the number of possible nodes is potentially astronomical, this fact alone does not begin to adequately explain the degree of variation and individuality attainable with CaD software. Any individual node generally references one or more variables. Each of these variables can contain different values 270. The list 276 for each given variable can be changed as well resulting in further variation and individuality in the resultant document. Optionally, the next line following the name can contain help text. This is identical to the construction used in the VAR division discussed above. The syntax is HELP help_text (text not enclosed in quotes). Remarks can be made within the individual node section as well. Typical syntax remark (REM_) is used. Each non-empty line 294 until the next NAME=contains an appropriate key word or instruction. Each keyword represents one of five classes of POs 210. What actually happens at execution time is that the PO 210 represented by the keyword is recalled from disk and executed as a subroutine to generate the text at the next position in the document. Lines of code containing these keywords can appear in any order and each type of keyword can be repeated indefinitely. These are the possible object classes represented by each keyword and what each means during execution time. The correct syntax is noted on the first line of each paragraph. TEXT "sample line of text" 370 The text from the object is inserted at the next point in the document. An alternative syntax allows the use of %VAR% 374_whereby the value of the variable VAR is inserted at the current position in the text. Lines of text may be interspersed with VAR commands and rule commands. A special text command is represented by the syntax "n" 374. This causes a line feed or carriage return to be inserted into the document. VAR var_name 376 The variable by the name of var_name is queried for its value 270. Normally this will result in a list 256 being presented to the user 102. The user then makes a selection and the result is output into the document. If the variable is multi-selected, i.e., it contains more than one value, then the appropriate grammar and punctuation are automatically incorporated when the values are printed in the document. The multi-selected values will be automatically printed as A, B, and C when they are displayed in the document. There are several variations of the VAR command. They are listed as options or switches of the VAR command in a separate section below. NODE node_name 378 Nodes allow the use of sequential, branching, and looping program structures illustrated in FIG. 14. Nodes generally execute in a linear or sequential manner 300. The section division in a knowledge base contains a list of nodes which are executed in this way. When the NODE command 378 is used, the control of program execution is transferred in the same unconditional way to the node identified. This is the simplest and most direct method of program execution. Control of routing or branching can also be accomplished via the use of rules. With a rule, the control of the program is transferred conditionally 302 depending upon the results of the rule execution. Program execution continues based on the status of that node. If there are more lines to be executed in the first node, then control will return to the first node 304 to execute the subsequent lines after the second node has been executed. Nested subroutines 306 are created in this way. Looping routines can be created as well. The syntax for this function is different if it is used as a result of a rule. When a rule initiates transfer of program control to another node the "NODE" command keyword is omitted. The name of the node is used alone. IF (A=B) .backslash.ACTION 380 If/then rules can be created, to test various conditions and take actions based upon the results. The syntax is IF (A=B) .backslash. ACTION, where (A=B) is some expression representing a test condition that can be evaluated and return a value of true or false. The rule in its simplest configuration involves a test condition and an action. Program execution is directed, based on the status of the rule. A rule begins with a keyword. Standardized logical constructions are utilized. These include the terms IF 380, ELSE IF, and ELSE 382. The rules use standard if/then logic. Typical Boolean constructs utilizing AND/OR and complex constructions using parentheses may be utilized. If/then logical constructs are obviously not new concepts. However, the actions performed as a result of these test conditions are new and unique. Node actions are noted in a separate section below. SETTEMPLATE template_name=var_name 384 This action assigns a new unique name to particular variable instances. Compound variables are built from a template. This causes any rules that reference a generic template_name rather than a variable name to use the particular variable named by var_name. The general template name (template_name) is replaced by the more specific variable name (var_name). A complex variable or a template, then it must have the form var_name.component_name, as in COM.LOC (complaint location). E.g., after executing a SETTEMPLATE command, COM=COM1, a more specific variable is created. A subvariable might have the name LOC, thus the newly created compound variable would have the name COM1.LOC. Then any rules in the nodes that are executed that reference the general variable COM.LOC will now actually reference the particular variable COM1.LOC. A node line may also contain a DO action using the syntax DO .backslash. ACTION. This will cause a rule action to be executed unconditionally. This concept is explained further under the a subsequent section entitled rule actions. VAR Command Options used for Document Control The normal use of the VAR 244 command is to output a selected list item to the final document. The value of a variable may be a single word, a text fragment or a short list of items. Some of the multiple variations of the use of the variable have been described above. Further permutations of the VAR command are listed in the following sections. Any of these commands can be used in a node 246 wherever a typical VAR construction could be used. The following commands control the appearance of text in the document and the way the computer interacts with the user. .backslash.NODISP var_name 386 This is the same as the VAR command in that the user will still be queried for input but no text is written to the document or to the screen. .backslash.NOQUERY var_name This is the opposite of VARNODISP. The user is not queried for input even if the variable is in an unselected state. The value of the variable is output to the document. .backslash.DRAWING var_name This causes a pop-up window to open with a drawing area for graphical user input. If a bitmap has been defaulted then this bitmap will serve as a backdrop or template for the user's drawing input. This is the function as clicking on the drawing button. This command is imbedded within the knowledge base and causes the drawing window to open automatically upon execution. VAR Command Options Used for Grammar Control The following commands are used to manipulate the text to maintain correct grammar. .backslash.ARTICLE var_name 387 This is the same as the VAR command, except that the value of the variable is prefaced with an article, a or an, depending on the first letter of the value. .backslash.CONVERSE var_name 520 The CONVERSE command displays all the entries in the variable's list that are NOT selected. If there are multiple selections, the last will be preceded by "OR" rather than "AND". This is generally used with a relatively short pick list and a multi-selected variable. The VAR options may be combined on the same line separated by a space. .backslash. Therefore VAR.backslash.ARTICLE.backslash.NOQUERY.backslash.CONVERSE would not query the user but would instead place the converse (unselected value) of a variable into the text preceded by the appropriate article (a or an). Rule Actions Rule actions are conditional actions executed by a specific keyword in capital letters. As noted above, any node line may contain a test condition preceded by an IF of ELSE keyword. If the test condition is true then the subsequent rule action listed on the same line is executed. If the rule test condition is false, then the action will be omitted and control of execution will be transferred to the next line of the program. Rule action keywords are preceded by a backslash ".backslash.". The following keywords are recognized: .backslash.ABORT 388 The ABORT keyword means to terminate execution of the current node immediately and exit the node, and return to the node or section that called it. TEXT "text to display" 390 This has the same function as TEXT in a node, but cannot contain embedded VAR references (%VAR%). The text will be printed in the document if the rule's condition is true. .backslash.SETVARIABLE var_name list name selection 392 This will reset the specified variable with a new value. It will override a manual selection, unlike inference tables. This is a type of inference. This action can also be used to set a bitmap to be associated with a certain variable. .backslash.VARFROMVAR vartoname.backslash.varfromname (target.backslash.source) This will copy the value of one variable into another variable. It will also override manual selection. This too, is a type of inference. .backslash.SETVARFROMSUM var1name.backslash.var2name.backslash.var3name 393 This will concatenate the values of two variables and enter the values into a third variable. (var1=var2+var3) It will also override manual selections. This is a type of inference as well. .backslash.ENABLESECTION section.sub.13 name This will turn on display of section name and execution of its nodes. .backslash.DISABLESECTION section.sub.13 name This will turn off display of section name and execution of its nodes. Any word which appears without the ".backslash." construction will be interpreted as the name of a node to "call". This is identical to the unconditional NODE action except it occurs as a result of a rule execution. The keyword NODE is not necessary in this situation. The control of program execution will be transferred to the new node and return once the new node has been executed 302. DO .backslash.action 394 Where the action specified is any of the same actions that can follow a condition in the IF/ELSE rules. The commands SETVARIABLE, VARFROMVAR, and SETVARFROMSUM are all forms of variable inference actions which are generally executed from rules as a result of some test. The DO command is different than the rule command in the sense that rule commands are conditionally executed. The DO action allows the knowledge base author to cause one of these actions to always be executed unconditionally from a given node. There is no rule to be evaluated in a DO command line. Another unique language construction designed explicitly to increase the power of the CaD program is the inference table or object. The inference division 248 begins with [INFERENCES]. FIG. 16 illustrates the structure of the inference object. Inference means that the value of variable B is inferred by or dependent upon a certain value of variable A. The inference division consists of a series of small tables, each consisting of one or more lines. Each table begins with INFERENCE varname=value 316, where value is a text string that corresponds to one of the selections from the list associated with the variable. Each subsequent non-blank line after the INFERENCE is formatted in the form: I inferred_variable_name .backslash.list-name .backslash.selection .backslash.<selection .backslash.<selection .backslash.>> Each subsequent line contains instructions to reset an inference output variable 318. An inference commnand begins with an "I" to initiate a set-variable rule. An inference table is executed automatically whenever the variable named in the first line receives a value. Inferred_variable_name is the name of a variable that has been defined in the [VARS] division. It could be either a simple variable name, or a compound variable name like "COM.LOC". Selection is a text string that corresponds to one of the selections from the list associated with the variable. List-name is the name of a list defined in the Lists division. There can be from 1 to 3 selections listed, which match menu text entries from the specified list. If the list is omitted (two .backslash..backslash.) then the list is unchanged. Note that the last character must be a backslash. The sections division 250 begins with [SECTIONS]. The name of each section is simply followed by a list of nodes 366. The unconditional, sequential execution of these nodes comprises that section of the document. The specification of sections allows the document structure to be defined in a manner according to professional traditions and expectations. The concept of the section is that sections are the top of the decision tree--they will always be "executed" during document generation. The section divisions are utilized as a means of organizing and navigating through the document. The user may select a section name 420 from the drop down chart menu as noted in FIG. 20. This allows the user to jump quickly to another section of the document. The makeup and content of the various sections and even their presence or absence can be variable and dynamic. Each new document section begins with "NAME=section.sub.13 name" similar to other divisions of the knowledge base. After a name section, the optional keyword DISP=may appear 398. By default, display is YES. The display of a section name may be disabled by setting DISP=NO. Every non-empty non-keyword line after NAME=is the name of a node. Each section contains one or more nodes. The section.sub.13 name text will be displayed with the formatting characteristics currently selected for section titles. If there is no text generated for the section, the section will be omitted (considered irrelevant) from the printed document. Note that if the resulting text is empty, the section is irrelevant for this document based on the rules in the nodes in the section. In this case, the section title will be omitted from the printed version of the document. There is also a special keyword TITLE which can appear in the SECTIONS division. The syntax is TITLE="text" 400, FIG. 17f The text inside the quotes following the TITLE=keyword will be displayed at the top of the document, in the formatting characteristics for Title. The TITLE=line must be the last line in the SECTIONS division. CaD Table File Structure When a knowledge base text file is parsed into a binary knowledge base file, another file is created. This is a CaD table file. The CaD table file is the binary representation of the inference relationships described in the knowledge base file. The table file causes a top level table to be created, which is used by the CaD program to look up a variable-value pair. For each entry there is a list of entries describing other variables and the values, list, and/or bitmaps to infer into each of these variables. Database Interface According to this invention, pieces of data are recorded in variables. The variables 244 can be thought of as receptacles which contain individual pieces of data as the value 270. These individual pieces of data can be imported from or exported to a data base. Each variable 596 in the CaD program can correspond to a field 597 in a database. Once copied to a database, this information can be sorted, filtered or queried. Various analyses can be performed and suitable reports printed. Screen Design/User Interface FIGS. 18-24 The screen design for the current embodiment is illustrated in FIG. 18. The screen design or GUI is designed to be totally independent of the main function of the CaD program. Thus, multiple alternative embodiments could be envisioned or designed. The overall appearance of the user interface is consistent with the commonly accepted Microsoft Windows.COPYRGT. standard. There is a title bar 404 that indicates the name of the file which is currently loaded. Some typical WINDOWS.COPYRGT. features may be noted in both the menu bar 406 and the tool bar 408. A status bar located below the toolbar prompts the user with the current question 410. The text which appears in this widow is the longname 274 of the currently active variable 244. The menu structure is quite similar to that found in many other windows programs. The Edit, View, and Help menus are similar to those found in other windows programs. The File menu shown in FIG. 19 is similar to other programs. The only menu functions that might be construed as unusual are the parse functions. The parse functions are found only in the editor's version of the program. "Parse from text" 414 will convert a knowledge base text file 204 into a binary knowledge base file 112. "Deparse to text" is simply the reverse procedure. The most notable difference in the menu structure is the addition of a new menu choice, Chart, shown in FIG. 20. The menu choices under Chart control the manner in which the program is executed. The first choice is Interview mode 416. This mode causes the program to wait for user input at each new question. The entire node tree of the CaD program is not re-executed nor is the text window repainted after each menu selection. From the user's perspective, the result is faster progression through the interview process. The Execute choice 417 simply begins execution from the menu. The initial mode of execution is specified in the CaD.INI file. Expert Mode 419 causes the program to jump ahead and fill in any default or inferred values automatically. The user always has the option of editing the document at a later time. In expert mode the program will stop for a user response only when it encounters a variable which is not selected, defaulted, or inferred. Tool bar buttons are noted in FIG. 21. There is a button 412 to parse a knowledge base text file 204 to a binary knowledge base file 112. This button is available only on the editor's version of the program 100. There is a button 422 which will initiate the execution of the CaD program after a knowledge base has been opened. This will begin the interview process 106. This button 422 is functionally equivalent to the Execute choice 417 on the Chart menu. Another button 424, toggles the program function between interview mode and text edit mode. In text edit mode the program runs slower but the changes are immediately apparent. Text edit mode also allows the user to select text for editing or revision. There is a button 426 to omit the current question. Another button 428 opens a window which allows drawing or free text entry which is saved in bitmap format. A typically appearing "print" button 440, will cause the currently loaded document to be output in printed format 110. When the program is executed the current list is shown in a window 430 below the prompt line 410. The appropriate choice can be identified in this window. Scroll buttons are available when needed. Sometimes multiple selections are allowed as outlined in a previous section. A large "OK" button is present 432. This serves as the pen equivalent to the <ENTER> key on a conventional IBM PC compatible computer. This button allows for rapid data entry. If the user wished to accept the highlight (default) selection then only one stroke of the pen is required. The output text 114 appears in the window 434 as it is being produced. Edit buttons 436 appear in the text window. Clicking on these buttons while in text edit mode allows the user to go back and edit portions of the document. Clicking on such a button will call up the list associated with that variable to allow for a new selection. There is a conventional scroll bar 438 which aids in navigating through the document as it appears on screen. FIG. 22 illustrates 4 buttons which can be found in the text editing window 434. A green check mark 442 indicates the question has been answered. Clicking on this button will reopen the question and the pick list. The previously given answer can be changed. A green question mark [?] 444 indicates the question has not yet selected or answered and that the question is optional. It is not required to be answered. The omit icon 446 indicates that the question or variable has been omitted. A red question mark [?] 448 indicates the question has not yet been selected or answered. This question represents a mandatory field and cannot be omitted. The text window is normally activated for editing after the questions have been answered in interview mode. The user has the option of exiting interview mode at any time by clicking on the appropriate toolbar button 424. The user can then move ahead or back and answer any question. Login Additional interface components of the preferred embodiment of the CaD program are noted in FIG. 23. These include login functions for password access. This is accessed for the first time by clicking on the User menu 450. This causes a password dialog box to appear 452. The user's name and password can them be entered into the appropriate boxes. This is necessary to track the user's level and may also be necessary if any of the documents are confidential in nature. FIG. 24 illustrates the CaD user interface and identifies two additional buttons. These are the login 454 and logout 456 buttons. Clicking on the login button 454 will call up the same password dialog as the login choice on the User menu. The logout button 456 and menu choice likewise have the same function. Activating either one of these will log the user out of the CaD program. When the program is running in interview mode a large button will be visible at the top of the pick list 458. By clicking on this button 458 the user may exit interview mode and return to edit mode. Technical Description of Major Source Code Components According to the current invention the execution module is written in C++programming language. It could presumably be written in another computer language. The following section is a listing of the component modules of the source code according the preferred embodiment of the present invention. According to C++convention all *.H files are header files and all *.CPP files are the actual source code modules. Because the actual source code consists of more than 65,000 lines of code the most important source modules will be described conceptually. SCPARSE.CPP is the module 208 which performs the parse function which converts the knowledge base text file 204 into a knowledge base binary file 112. SCPARSE.H is the corresponding header file. The parse engine 208 translates the knowledge base text file 204 into the knowledge base binary file 112. All of the syntax rules 202 listed above are accordingly translated. These syntax rules are uniquely translated at the source code level. This syntax is not found in commercially available subroutines. RMLOGGER.H is a definition file for a logger function. The logger is used to trouble shoot and debug the knowledge base as part of the parse process 208. It contains fairly standardized subroutines. Because this invention is not based upon a word processor or a database the fundamental units of the program comprise persistent objects (POs) 210 which can be written to disk and later recalled. Some of the most basic and fundamental source code is demonstrated in FIGS. 25 and 26. RMPRSOBJ.H is the CaD PO base class definition file FIG. 25. All POs derive from this class. (Uses some Rogue Wave functions) SCDEFS.H is a file comprising definition of numeric constants used by all CaD POs. This file is shown in FIG. 23. The following files contain the Object Class definitions 212 which are used to create the multitude of POs 210 used by the program. The various types of POs are noted in FIG. 7. Each file name listed below consists of a *.CPP implementation file and a corresponding *.H header file. SCCHART is the definition of CaD document PO class 231. SCDRWNG is the definition of CaD drawing PO class 239. SCLIST is the definition of CaD list PO class 236. SCNODE is the definition of CaD node PO class 233. SCVAR is the definition of CaD variable PO class 237. SCSECT is the definition of CaD section PO class 232. SCVARSET and SCVARPTR comprise a set of files used to define templates and variables which are defined by pointing to other variables 238 SCTEXT is the definition of CaD text fragment PO class 234. SCRULE is the definition of CaD rule PO class 235. The CaD program 100 can exist in one of two forms. The CaD program generally executed by a user 102 comprises the basic runtime or execution or run-time program 214. There are two CaD files, CaD.CPP and CaD.H, that coordinate the overall functioning of the program. These files control such functions as list box displays used for opening and closing appropriate files and setting program defaults and preferences as recorded in an INI file. Additional CaD_EDIT files comprise an additional editing and parsing function 214 to be used by knowledge base developers 200. Several of the PO classes 210 use C++programming language modules or classes from ROGUE WAVE TOOLS.H++.TM.. The persistent object (PO) manager 224 class and the inference table manager 226 class use Rogue Wave's RWFileManager class software modules to perform allocation, reallocation, and de-allocation of space in files on disk. These same two classes also use Rogue Wave's RWBTreeOnDisk to perform binary tree access on various types of keyed data, including looking up the data on disk for a persistent object by its object id key, and looking up various components of inference tables on disk by their various keys. Several classes use Rogue Wave's RWBTreeDictionary to perform binary tree access to information stored in memory. These classes include the parse module 214, the PO manager 224, and the inference table manager 226. Several classes use the Microsoft Foundation Class library (MPC), which encapsulates the Windows API. These windows API calls interact with the display, mouse, and keyboard. The classes which utilize these calls include the view manager 220, which is derived from MFC's CView class, and the display manager 222, which uses some MFC functions and is closely tied to the view manager. As in any MFC application, there are also classes derived from CWinApp, CFrameWnd, and various instances of classes derived from CDialog. SCEDVIEW files comprise the view manager 220 which creates the interface of the SCEditView class. The view manager controls the primary view of text showing the wrapping document text and handling clicks in that text. It also handles such view functions as scrolling. The view manager interfaces with the knowledge base manager | ||||||
