Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

The development of a microcomputer-based perioperative patient monitoring system Cox, Neil B. 1980

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Notice for Google Chrome users:
If you are having trouble viewing or searching the PDF with Google Chrome, please download it here instead.

Item Metadata

Download

Media
831-UBC_1981_A7 C69.pdf [ 14.05MB ]
Metadata
JSON: 831-1.0095523.json
JSON-LD: 831-1.0095523-ld.json
RDF/XML (Pretty): 831-1.0095523-rdf.xml
RDF/JSON: 831-1.0095523-rdf.json
Turtle: 831-1.0095523-turtle.txt
N-Triples: 831-1.0095523-rdf-ntriples.txt
Original Record: 831-1.0095523-source.json
Full Text
831-1.0095523-fulltext.txt
Citation
831-1.0095523.ris

Full Text

THE DEVELOPMENT OF A MICROCOMPUTER - BASED PERIOPERATIVE PATIENT MONITORING SYSTEM by N e i l B. Cox B.Sc.E.E., University of Alberta, 1978 A THESIS SUBMITTED IN PARTIAL FULFILMENT OF THE REQUIREMENT FOR THE DEGREE OF MASTER OF APPLIED SCIENCE - i n THE FACULTY OF GRADUATE STUDIES (Department o f E l e c t r i c a l Engineering) We accept t h i s thesis as conforming to the required standard THE UNIVERSITY OF BRITISH COLUMBIA December, 1980 (c) N e i l B. Cox, 1.980 In presenting th i s thes is in pa r t i a l fu l f i lment of the requirements for an advanced degree at the Univers i ty of B r i t i s h Columbia, I agree that the L ibrary sha l l make it f ree ly ava i lab le for reference and study. I further agree that permission for extensive copying of th is thesis for scho lar ly purposes may be granted by the Head of my Department or by his representat ives. It is understood that copying or pub l i ca t ion of this thes i s for f inanc ia l gain sha l l not be allowed without my written permission. Department of The Univers i ty of B r i t i s h Columbia 2075 Wesbrook P l a c e V a n c o u v e r , Canada V6T.1W5 D a t e i^k^^/frfi -6 ABSTRACT A computer-based perioperative patient monitoring system, c a l l e d the Mobile Operation Monitoring f o r Anesthetists or MOMA, i s discussed. The primary objective of t h i s work was to produce a f l e x i b l e , mobile prototyping system which could be used to develop a c l i n i c a l l y useful t o o l to a i d the anesthetist i n the task of patient maintenance during anesthesia. P o t e n t i a l a p p l i c a t i o n areas are discussed along with the l i m i t a t i o n s and necessary design considerations. The system developed for t h i s thesis uses a PDP-11V03-L micro-computer system with an A/D converter and dual double-density floppy disk drive to acquire, process, and store four channels of EEG along with up to four channels of non-EEG data. The data i s displayed on a Tektronix 4025 video graphics terminal i n a number of user-selectable display formats. A currently popular EEG display format (Density modulation of the compressed Spectral Array or (DSA)) i s modified to s i m p l i f y the determination of long-term EEG trends. This display format i s presented along with non-EEG data i n order to f a c i l i t a t e comparisons between parameters. The user can r e c a l l any EEG display which appeared e a r l i e r i n the operation without i n t e r f e r i n g with data a c q u i s i t i o n , processing, and storage. The keyboard i s configured i n an easy-to-use format with the keys c l e a r l y l a b e l l e d and grouped according to t h e i r function. Each command i s generated by typing a sing l e key. A f a c i l i t y f o r the entry of comments through the keyboard was implemented so that the time of occurrence of ce r t a i n s i g n i f i c a n t events during surgery, such as pharmacological intervention, can be tagged. These tags are then displayed along with the automatically acquired data. An emphasis was placed„on maximizing MOMA's f l e x i b i l i t y and an attempt was made to an t i c i p a t e and i i simplify the modifications which may be desirable in the future. Programs are written in Fortran, are f u l l y documented, and are run under the RT-11 operating system. " The potential usefulness of the system and the non-technical docu-mentation was assessed by five anesthetists practicing at Vancouver General Hospital (VGH). It was their opinion that MOMA i s a potentially useful addition to the operating room and each assessor expressed an interest in being involved in future c l i n i c a l applications. The adequacy and overall quality of the programs and related technical documentation was assessed by an engineer employed in the EEG department at VGH and experienced in both Fortran and RT-11. It was his opinion that the programs and related documentation are adequate and w i l l be useful for the development of a c l i n i c a l l y useful patient monitoring system. i i i TABLE OF CONTENTS Page ABSTRACT i i TABLE OF CONTENTS i v LIST OF ILLUSTRATIONS v i i i LIST OF TABLES i x ACKNOWLEDGEMENT x 1. INTRODUCTION 1 1.1 The task of the a n e s t h e t i s t 1 1.2 C o m p l i c a t i n g f a c t o r s i n a n e s t h e s i a 1 1.3 Scope of t h e . t h e s i s 3 11. COMPUTERS IN THE OPERATING ROOM 5 2.1 I n t r a o p e r a t i v e mon i to r i ng at present 5 2.2 The p o t e n t i a l of computers i n the ope ra t ing room 7 2 . 2 . 1 Data a c q u i s i t i o n and d i s p l a y 7 2 .2 .2 S i g n a l p roces s ing 8 2 . 2 . 3 Informat ion s torage 10 2.3 EEG i n the ope ra t i ng room 13 2.4 I n t r a o p e r a t i v e m o n i t o r i n g i n the fu ture 14 2.5 Design c o n s i d e r a t i o n s 15 111. PREVIOUS PATIENT MONITORING SYSTEMS 20 3.1 EEG on ly systems 2 0 3 . 1 . 1 . D i s c u s s i o n 21 3.2 Mul t ipa ramete r Mon i to r s 22 3 . 2 . 1 D i s c u s s i o n 24 I V . IMPLEMENTATION 27 i v Page 4.1 The hardware 27 4.2 The software 29 4.2.1 The software approach 29 4.2.2 Software components,;, 30 4.2.2.1 DEC supplied components 30 4.2.2.2 V i s u a l e d i t i n g package 30 4.2.2.3 Graphics routines 31 4.2.2.4 MOMA routines 31 4.2.2.5 Testing routines 33 4.2.2.6 Startup routines 34 4.2.2.7 Command f i l e s 34 4.3 Monitoring parameters 34 4.4 EEG processing 36 4.4.1 Discussion of techniques f o r EEG processing 36 4.4.2 Analog preprocessing 39 4.4.3 D i g i t a l preprocessing 40 4.4.4 EEG power s p e c t r a l estimation technique 40 4.4.5 Segment s i z e 41 4.4.6 Record s i z e 41 4.4.7 Frequency domain smoothing 42 4.4.8 Sampling rate 42 4.4.9 Summary of EEG processing 42 4.4.10 S p e c i f i c s of the s p e c t r a l estimation technique.. 43 4.5 EEG display 45 4.5.1 Discussion of techniques for EEG presentation... 45 . 4.5.2 DSA implementation 46 4.5.2.1 The e f f e c t of the human v i s u a l system.. 49 v Page 4 . 5 . 3 S p e c i a l fea tures 49 4 .6 The d i s p l a y o f non-EEG parameters 51 4.7 Timed tags 51 4 .8 The t e r m i n a l s c r e e n ' s c o n f i g u r a t i o n 52 4.9 Implemented d i s p l a y s 54 4.10 User i n t e r a c t i o n 54 4 .11 The command s t r u c t u r e 61 4.12 The keyboard c o n f i g u r a t i o n 63 V. SYSTEM PERFORMANCE 68 5.1 System assessment 68 5 .3 .1 R a t i o n a l e 68 5 .3 .2 Procedure 69 5 .3 .3 Resu l t s 71 5.2 Software assessment 73 5 .4 .1 Procedure • 73 5 .4 .2 Resu l t s 74 5.3 T e s t i n g f o r e l e c t r i c a l s a f e ty 76 V I . CONCLUSIONS AND FUTURE DIRECTIONS 78 6.1 Conc lus ions •;• 78 6.2 Comparison w i t h p rev ious systems 82 6.3 D i r e c t i o n s f o r fu ture work 84 6 . 3 . 1 Hardware m o d i f i c a t i o n s 84 6 .3 .2 Recommendations fo r immediate a c t i o n 86 6 .3 .3 D i r e c t i o n s f o r fu ture development 86 6 .3 .4 S p e c i f i c m o d i f i c a t i o n s 92 6.4 Device maintenance 93 v i Page APPENDIX 1 THE DISK CONFIGURATION 95 A l . l Master disk formatting 95 A1.2 Slave disk formatting 95 Al.2.1 Data storage requirements 96 Al.2.2 Timed logging storage requirements 96 Al.3 Proposed use of free blocks 97 APPENDIX 2 PROGRAM DOCUMENTATION 99 A2.1 General text e d i t i n g 99 A2.2 V i s u a l e d i t i n g 102 A2.3 Documentation directory 113 A2.4 Command f i l e s documentation 114 A2.5 Startup routines documentation . 116 A2.6 Foreground routines documentation 119 A2.7 Background routines documentation.- 127 A2.8 Graphics routines documentation 142 A2.9 Routine interconnection diagrams 149 APPENDIX 3 MOMA SUMMARY AND USERS GUIDE 163 A3.1 MOMA summary 163 A3.2 MOMA users guide 165 A3.2.1 Introduction to MOMA 165 A3.2.2 Operation of MOMA 192 APPENDIX 4 ASSESSMENT QUESTIONNAIRES 213 A4.1 System assessment questionnaire 213 A4.2 Software assessment questionnaire 217 APPENDIX 5 DOT MATRIX PATTERNS FOR CHARACTER FONT 16 219 REFERENCES 222 v i i LIST OF ILLUSTRATIONS Figure Page 1 Patient related monitoring parameters 2 2 The present anesthetist/patient r e l a t i o n s h i p 6 3 A t y p i c a l anesthesia record 12 4 The anesthetist/patient r e l a t i o n s h i p with the introduction of a computer to the Operating Room 15 5 The medical device development cycle 19 6 The general hardware configuration 28 7 Information flow block diagram 32 8 The EEG a c q u i s i t i o n process 35 9 Sample segments of multichannel EEG a c t i v i t y 37 10 A comparison of CSA and DSA display formats 47 11 Output of the a l t e r n a t i v e character font t e s t i n g routine 48 12 Format of the displays presenting the DSA 50 13 Format of the displays presenting time trends i n the non-EEG data 52 14 The structure of the Tektronix 4025 terminal's screen.... 53 15: MOMA display number 1 55 16 MOMA display number 2 56 17 MOMA display number 3 57 18 MOMA display number 4 58 19 MOMA display number 5 59 20 MOMA display number 6 60 21 MOMA's keyboard configuration 64 22 A guide for the MOMA displays 66 23 The hardware used for the system assessment 70 v i i i LIST OF TABLES Table Page 1 MOMA command summary 62 2 System assessment r e s u l t s 72 3 MOMA safety test r e s u l t s 76 4 The r e l a t i v e importance of monitoring parameters „ 88 5 Suggested improvements i n the handling of parameters 90 A l . l MOMA slave disk configuration 98 ix ACKNOWLEDGEMENT I would l i k e to express my appreciation to Dr. Grant B. Anderson f o r his invaluable supervision and encouragement throughout t h i s research and to Drs. Jim A. McEwen and Peter D. Lawrence f o r t h e i r many h e l p f u l suggestions and assistance. I am indebted to Drs. W.'Dodds, 'J:.' - -Nixon, Kv Turfibull, B;.'Walmsley and D. Wong of the Department of Anesthesia and Mr. B. Reeves of the Depart-ment of Electroencephalography at Vancouver General Hospital f o r t h e i r p a r t i c i p a t i o n i n the assessment of the system produced f o r t h i s t h e s i s . In addition, g r a t e f u l acknowledgement i s made to Dr. Jenkins of the Department . of Anesthesia and Dr. M. Low of the Department of Electroencephalography for t h e i r cooperation and support. I would l i k e to express my appreciation to the following people at U.B.C. for t h e i r contributions: Ms. G a i l Hrehorka of the Department of E l e c t r i c a l Engineering for her e f f i c i e n t typing of t h i s t h e s i s , Ms. C r i s t i a n a I r v i n g of the Biomedical Communications Department f o r the pre-paration of numerous diagrams, and to my fellow graduate students f o r providing an enjoyable and stimulating work environment. F i n a l l y , the f i n a n c i a l support received from the Natural Sciences and Engineering Research Council i n the form of a postgraduate scholarship i s g r a t e f u l l y acknowledged. x 1 1. INTRODUCTION 1.1 The task of the Anesthetist There are two main purposes of anesthesia: to help minimize the impact of surgery on the patient both during and a f t e r an operation, and to maintain the patient i n a state which f a c i l i t a t e s the surgeon;l.s job. The anesthetist's task i s to weigh the r e l a t i v e merits of the above objectives, which may be contrary, and to choose an optimal course of action. The anesthetist prepares f o r th i s job long before entry to the operating room. In addition to a knowledge of the e f f e c t s of the anesthetic agents used, the anesthetist must have a knowledge of the e f f e c t s and r e -quirements of the various s u r g i c a l procedures. Using t h i s knowledge, he can gather relevant c a s e - s p e c i f i c information and plan an optimal approach to anesthetizing the patient. Continuous monitoring of relevant parameters with-i n the operating room allows the anesthetist to assess the effectiveness of the anesthetic procedure and i f necessary make appropriate adjustments. 1.2 Complicating factors i n Anesthesia Modern s u r g i c a l procedures tend to complicate the anesthetist's task. The increased impact some of these procedures have on the patient leaves l i t t l e room f or er r o r . Also, by d i s t o r t i n g parameters conventionally used within the operating room, some s u r g i c a l procedures can i n t e r f e r e with the anesthetist's a b i l i t y to assess the patient's state. For example, the s i g n i -ficance of parameters related to the cardiopulmonary system i s d r a s t i c a l l y reduced during the c r i t i c a l bypass phase of cardiopulmonary bypass proce-dures. The current trend i n anesthetic p r a c t i c e i s towards the graded a d m i n i s t r a t i o n of agent (1). By us ing a number of low dose a n e s t h e t i c agents , the a n e s t h e t i s t can t a i l o r the o v e r a l l e f f e c t of anes thes ia to the p a r t i c u l a r p a t i e n t and s u r g i c a l procedure . This w i l l a l s o permit the use of a l i g h t e r l e v e l of genera l a n e s t h e s i a , r e s u l t i n g i n a reduced a n e s t h e t i c impact on the p a t i e n t . However, t h i s graded approach to anes thes i a i nc reases the requirement f o r p a t i e n t assessment. To s a f e l y ma in t a in the p a t i e n t at l i g h t a n e s t h e t i c l e v e l s r e q u i r e s accura te i n f o r m a t i o n about the p a t i e n t ' s s t a t e . A d d i t i o n a l l y , s i nce the agent i s t a i l o r e d to p a r t i c u l a r p h y s i o l o g i c system, system s p e c i f i c i n f o r m a t i o n i s necessary . A l s o , s i n c e i t i s e s s e n t i a l that the a n e s t h e t i s t be aware of the e f f e c t s the drugs have on one another , t h i s approach p laces a l a r g e r burden on the knowledge and exper ience of the a n e s t h e t i s t . Sources of p a t i e n t - r e l a t e d i n f o r m a t i o n are presented i n f i g u r e 1. System Parameter V e n t i l a t i o n - Movement R e l a x a t i o n Neuromuscular B lockade Eyes EEG S k i n B l o o d V e s s e l s Hea r t Rate and Sounds ECG Temperature Body Chemis t ry ~ Body F l u i d s Musc les B r a i n C i r c u l a t o r y System F i g u r e 1: P a t i e n t - r e l a t e d m o n i t o r i n g parameters. 3 Interpatient v a r i a b i l i t y further complicates the anesthetist's job. In addition to the usual p h y s i c a l differences between patients, apparently unrelated pathologies and premedications can cause dramatic changes i n the ef f e c t s of anesthetic agents. A p a r t i a l s o l u t i o n to these d i f f i c u l t i e s i s to gather relevant information before the operation by interviewing the patient and examining h o s p i t a l records. However, continuous patient s u r v e i l -lance i s necessary i n case the c o l l e c t e d information i s inaccurate or i n -complete. In general, the parameters used for monitoring i n the operating room are highly i n t e r r e l a t e d . Thus, a change i n a given parameter may be the r e s u l t of changes i n many systems, both mechanical and p h y s i o l o g i c a l . The net r e s u l t of t h i s i s that the anesthetist must monitor many things and con-sider these i n t e r r e l a t i o n s h i p s i n a l l the decisions he makes. 1.3 Scope of the Thesis The dramatic advancement of computer technology during the past decade has made computer-based perioperative patient monitoring a r e a l i s t i c proposition. The purpose of t h i s thesis i s : 1) to discuss the p o t e n t i a l a p p l i c a t i o n areas of small computer systems to intraoperative monitoring by anesthetists. 2) to define a set of design considerations which should contribute to the acceptance of computer-based systems i n the operating room. 3) to produce a prototyping system for the development of an i n t r a -operative monitor. 4) to use the above prototyping system i n the design of a prototype monitor. A Chapter 2 i s a discussion of the p o t e n t i a l applications of computers i n the operating room. The present day approach to anesthetic p r a c t i c e within the operating theatre i s described. Some of the features of computer systems which may s i m p l i f y the anesthetist's task are presented. Considerations for the design of a us e f u l device are then discussed. F i n a l l y , since a major component of t h i s project i s the EEG, the problems of intraoperative EEG use are b r i e f l y described. Chapter 3 i s an overview of some of the previous attempts at using computers f o r patient monitoring. A few t y p i c a l papers are c i t e d which exemplify the techniques and approaches used i n the past. Chapter A describes the development of the system, which includes the hardware and software decisions and the general design philosophy. S p e c i f i c s of the data a c q u i s i t i o n and processing techniques are also described. F i n a l l y , some of the system's external features and a d e s c r i p t i o n of the d i s -play formats are presented. Chapter 5 presents the r e s u l t s of an assessment of the device by h o s p i t a l personnel. The p o t e n t i a l usefulness of the o v e r a l l system was judged by a group of anesthetists and the software was judged by a programmer f a m i l i a r with s i m i l a r systems. Chapter 6 presents some conclusions and some suggestions for future research. A p p l i c a t i o n areas both i n s i d e and outside the operating room are discussed. 5 2. COMPUTERS IN THE OPERATING ROOM 2.1 Intraoperative Monitoring at Present Figure 2 portrays the r e l a t i o n s h i p between the anesthetist and the patient w i t h i n the operating room. The anesthetist can c o n t r o l the patient i n d i r e c t l y by adjusting the anesthesia machine or d i r e c t l y through the admini-s t r a t i o n of i n j e c t e d drugs and f l u i d s . To gauge the e f f e c t of t h i s c o n t r o l , he has at h i s d i s p o s a l a number of monitoring parameters. Interpretation of these parameters i s affected by the status of the patient, the equipment used, and the operating room environment throughout the operation. In addition, other factors such as the c h a r a c t e r i s t i c s of the s u r g i c a l procedure, p e c u l i a r i t i e s of the patient, and previously administered medications must be considered. As stated i n chapter 1, some of these other factors can and should be docu-mented p r i o r to the operation i n the form of paper records. A d d i t i o n a l paper records are manually maintained by the anesthetist during the operation i n order to record important monitoring parameters and s u r g i c a l events. A retrospective study of preventable anesthetic mishaps inv o l v i n g human error and/or equipment f a i l u r e found that 82 percent of these incidents involved human error (2). A conclusion one can draw from t h i s i s that s i g n i f i -cant safety improvements may r e s u l t from a general s i m p l i f i c a t i o n of the anesthetist's task. More s p e c i f i c a l l y , s i m p l i f y i n g the use of monitoring parameters and equipment should r e s u l t i n an improvement i n the q u a l i t y of anesthetic p r a c t i c e . As described i n Boba (3), the i n t e r p r e t a t i o n part of the anesthetist's task i s b a s i c a l l y a p r e d i c t i o n of the l i k e l y sequence of events i n the immediate future, given that e x i s t i n g conditions remain unaltered. This p r e d i c t i o n process r e l i e s as much on the trends;.in the parameters as i t does on the 6 Figure 2: The r e l a t i o n s h i p between the anesthetist and the s u r g i c a l patient within the operating room. instantaneous l e v e l of those parameters. For example, a low and dropping pulse rate w i l l be more alarming than a low and r i s i n g pulse rate. The im-portance of trending must be considered when display formats are designed. The need for continuous monitoring within the operating room i s generally undisputed. The decision about what and how much to monitor, how-ever, i s not so c l e a r . One viewpoint (eg. 4,5) i s that conventional para-meters which are normally monitored during anesthesia are adequate to control mortality and morbidity and assure an adequate q u a l i t y of care i n the vast majority of cases. In addition, since the introduction of new devices and parameters to the operating room d i v e r t s attention from conventional para-meters, such changes may increase mortality and morbidity. On the other hand, 7 i t has been argued that the increasing complexity of anesthetic p r a c t i c e de-mands the incorporation of new and sophisticated monitoring techniques and that these new techniques can speed the detection of dangerous s i t u a t i o n s (eg. 3 ,6) . This argument brings f o r t h a most important point. The simple addition of information to the operating room w i l l not n e c e s s a r i l y improve the q u a l i t y of s u r g i c a l health care. S i g n i f i c a n t improvements w i l l only be made i f the ease and speed of detection of a c r i s i s s i t u a t i o n i s improved. This improvement w i l l only be obtained i f there i s a decrease i n the com-p l e x i t y of information i n t e r p r e t a t i o n . Thus, the e f f e c t i v e presentation of information within the operating room i s a pr e r e q u i s i t e to high q u a l i t y anesthetic p r a c t i c e . Osborn. (7) discussed the d i f f i c u l t i e s i n a s s i m i l a t i n g data from re s p i r a t o r y measurements i n intensive care. In t h i s paper, he i d e n t i f i e d two basic problems i n i n t e r p r e t i n g large amounts of data. F i r s t l y , the accuracy of diagnosis decreases when a large amount of relevant data i s pre-sented. Secondly, a major problem i n handling data i s that of i d e n t i f y i n g the c l i n i c a l l y s i g n i f i c a n t parameters for a given s i t u a t i o n . These problems also apply to patient monitoring i n the operating room and emphasize the importance of e f f e c t i v e information presentation. This viewpoint has also been expressed by others (eg. 8). 2.2 The P o t e n t i a l of Computers i n the Operating Room 2.2.1 Data A c q u i s i t i o n and Display Many patient monitors currently used i n the operating theatre acquire and display a sin g l e parameter. As a r e s u l t , the anesthetist must scan a large number of displays to gather information. Also, the angle which he must scan to gather t h i s information can be large. Through the use of a 8 computer system with appropriate data a c q u i s i t i o n and display hardware, i t i s possible to acquire a number of parameters and d i s p l a y them i n a compact form. Thus, one can reduce the scanning angle required to gather information and, perhaps, lower the reaction time to s i g n i f i c a n t changes. A d d i t i o n a l l y , a multiparameter format w i l l permit the generation of displays which s i m p l i f y the task of parameter comparison. The general emphasis of the information presented to the anesthetist w i l l have a bearing on i t s ease of i n t e r p r e t a t i o n . For example, i t would not be desirable to place an important parameter on a small d i s p l a y . It was suggested e a r l i e r i n t h i s chapter that the ease of information i n t e r p r e t a t i o n d i r e c t l y a f f e c t s patient safety. Therefore, since a cathode ray tube (CRT) can display information i n many diverse formats, a multiparameter monitor with a CRT may be able to increase patient safety by permitting the design of displays with dramatic parameter emphasis. The r e l a t i v e importance of parameters i n the operating room w i l l not n e c e s s a r i l y remain the same throughout an operation. Also, as exempli-f i e d by the d i f f e r i n g opinions about the necessity of e l e c t r o n i c patient s u r v e i l l a n c e , t h i s a l l o c a t i o n of importance can vary considerably from anesthetist to anesthetist. If there are a number of display formats accessible through a s i n g l e d isplay medium, the i n d i v i d u a l anesthetisttcan choose the one which he f e e l s best s u i t s the present s i t u a t i o n . The r e s u l t i n g increase i n the e f f i c i e n c y of information use should produce an increase i n patient safety. I t i s possible to provide t h i s multiple display c a p a b i l i t y using a computer-based system with a CRT. 2.2.2 Signal Processing The s i g n a l processing c a p a b i l i t y of computers may prove u s e f u l i n reducing the parameter i n t e r p r e t a t i o n load. Some of the comparisons and 9 c o r r e l a t i o n s which are presently performed s u b j e c t i v e l y by the physician could be performed by the computer p r i o r to display (eg. 7). The r e s u l t i n g reduction i n the parameter i n t e r p r e t a t i o n load could perhaps make various c r i t i c a l s i t u a t i o n s more apparent, thus reducing reaction time and increasing patient safety. A r t e f a c t detection and r e j e c t i o n techniques are not currently well developed. New techniques using computers may overcome some of the a r t e f a c t problems i n noninvasive monitoring, eg. EEG, thus making such monitoring p r a c t i c a l for use i n a wider v a r i e t y of s i t u a t i o n s . In addition, the q u a l i t y of signals obtained using invasive techniques may also be improved using these techniques. By permitting the use of l e s s invasive monitoring methods and improving the q u a l i t y of signals within the operating room, there should be a general increase i n patient safety. Many signals obtainable within the operating room have been shown to have c l i n i c a l l y s i g n i f i c a n t c h a r a c t e r i s t i c s . The use of some of these signals has been l i m i t e d by the time required for the anesthetist to i n t e r -pret t h e i r c h a r a c t e r i s t i c s . By preprocessing these signals i t may be possible to reduce the d i f f i c u l t i e s preventing t h e i r use. For example, the use of s i g n a l processing techniques on the EEG can reduce the amount of information presented to the anesthetist and should make i t easier for the anesthetist to quickly discern c l i n i c a l l y s i g n i f i c a n t EEG c h a r a c t e r i s t i c s , thus making i t more p r a c t i c a l as an intraoperative monitoring parameter.. A computer system can d i r e c t l y decrease patient r i s k by providing warnings about p o t e n t i a l l y hazardous conditions. By a l e r t i n g the anesthetist to these conditions, the computer may reduce problem detection time, and could even i n i t i a t e appropriate compensatory action. Although some i n s t r u -mentation currently used i n the operating room incorporates warning systems, 10 a computer w i l l permit far more elaborate checking procedures by comparing several parameters and parameter trends at once. The r e s u l t i n g system could thus detect a wider v a r i e t y of conditions and provide e a r l i e r warnings. It might be thought that a l o g i c a l extension of a warning system i s automatic patient c o n t r o l . Some such systems have been developed (9-12). However, there are a number of reasons that t h i s , at best, i s extremely d i f f i c u l t . F i r s t l y , a number of parameters r o u t i n e l y used i n the operating room are not e a s i l y acquired by a computer. For example,, obtaining the e l e c t r i c a l analogue to patient p a l l o r or restlessness i s not a simple matter. Secondly, a l l the parameters to be used by a computer during the operation must be defined and setup p r i o r to the operation. For these two reasons, long and complicated setup procedures would be required to configure, a computer system for the task of patient c o n t r o l . Assuming that the computer has been configured f o r c o n t r o l l i n g the patient, the program required to in t e r p r e t the incoming data w i l l be a l g o r i t h m i c a l l y and computationally complex. I t must be able to account for any s i t u a t i o n which may occur i n the operating room, to detect any source of f a l s e s i g n a l s , and to "know" as much about the operation, the anesthetic agent, and the patient as does the anesthetist. The anesthetist, on the other hand, has the a b i l i t y to add and delete parameters during the operation as t h e i r s i g n i f i c a n c e v a r i e s , thus adapting to varying conditions i n the operating room. In addition, the anesthetist can draw upon years of experience and t r a i n i n g when i n t e r p r e t i n g data and choosing appropriate courses of a c t i o n . Therefore, computers are best applied to the task of aiding, rather than supplanting, the anesthetist. 2.2.3 Information Storage One of the problems of information presentation within the operating room i s that there i s f a r more relevant information a v a i l a b l e than can be 11 u s e f u l l y displayed at one time. In the past the only s o l u t i o n to t h i s problem has been to work with a fixed subset of th i s information. A computer-based monitor with a magnetic information storage medium may p a r t i a l l y circumvent t h i s l i m i t a t i o n . Using such a system, relevant information can be "remembered" for future r e c a l l . With an appropriate design, the anesthetist could access various subsets of the stored information through a CRT at any time during the operation. Storing and accessing information i n the manner described above may s i g n i f i c a n t l y enhance the anesthetist's a b i l i t y to monitor trends and maintain records. At present, the only r o u t i n e l y applied means of recording and d i s p l a y i n g trend information i s through the use of hand maintained paper records. The l e g i b i l i t y and the format of these records can vary from author to author. Also, the maintenance of these records takes attention away from the patient and the completeness of the records i s l i m i t e d by the amount of time the anesthetist can a l l o c a t e without compromising the patient's safety. By automatically sampling and st o r i n g measured parameters the anesthetist can be r e l i e v e d of some of h i s record maintenance duties while s t i l l having access to trend information. The r e s u l t i n g record w i l l be more complete and of consistent l e g i b i l i t y and format. An example of a manually maintained intraoperative patient record can be found i n fig u r e 3. The p o t e n t i a l benefits of automated record keeping extend beyond the operating room. The consistent l e g i b i l i t y and format w i l l make anesthe-t i c records more us e f u l for t r a i n i n g purposes. For the same reasons, i t w i l l be simpler to discover p o t e n t i a l procedural improvements through the analysis of h o s p i t a l records. F i n a l l y , the objective and consistent nature of these records w i l l make the task of event reconstruction f a r simpler i n cases of s u r g i c a l mishap. FORM M-70 •0700 2&M ft* !•!(•' ^ — h A L L E R G rt^jBURGEON (HI r4*-? u i . . V A N C O U V E R G E N E R A L HOSPITAL A N A E S T H E S I A R E C O R D AGE SEX PREOPERATIVE SUMMARY YRS. MOS. Sf JTlfsA L 1 1 2 ! ( J ) S | E RESP. CJWT H B I l f l K frO cvs X I E S fci.l ^- I - ^ U Q ^ ^ V j f o ' M E D I C A T I O N S > ^ fr^T-a*** i ^ V ^ W ^ ^ P A T H O L O G Y ~ • ' ^ V T T - . . ' / V< SURGICAL SERVICE O ^ r ; . , - ^ ^ P R E M E D I C A T I O N Mtiro AmgO <3 ^ ct-to °^ 1>-U_ Oft. . N O N E • N A S A L • E N D O B R O N C H • N A S A L R C I R C U I T ft**** ^ CA-4WAfA l*T> > S T O M A • x • I. i * — — y - | IV. SITE A N D T Y P E /9J- A POST-OP CONDITION ' g . V i - a 3< ^ r i * i • S O L U T I O N S VOL. . G I V E N BLOOD-NUM8ER ^ V O L . O R D E R S IrzrV /^ i / / / • T O T A L S S I G N A T U R E A N A E S T H E T I S T S C O P Y ( C O D I N G D A T E O V E R ) Figure 3: A t y p i c a l anesthetic record. This form i s only part of the record maintained by the anesthetist during open heart surgery. 13 At present, the only way to supplement the anesthetist's memory of important p r e s u r g i c a l information i s through the use of paper records. However, the number of these records which can p r a c t i c a l l y be included i n the operating room i s l i m i t e d by operating room c l u t t e r considerations. A computer-based preoperative information f a c i l i t y would give the anesthetist access to large amounts of information without increasing operating room c l u t t e r . Indexing and paging schemes w i l l allow that anesthetist to access various subsets of t h i s information quickly and e a s i l y . Although such a computer-based system w i l l not be more convenient than using one or two well structured paper records, i t w i l l permit access to a large data base whenever more d e t a i l e d information i s desired. The t o p i c of computer-based record keeping has been dealt with i n the l i t e r a t u r e and some record keeping systems have been developed (12-20). 2.3 EEG i n the Operating Room The prospect of using the EEG for the determination of anesthetic l e v e l was f i r s t proposed i n 1937 (21). Since that time, consistent corre-l a t i o n s between depth of anesthesia and EEG patterns have been shown to ex i s t (22-24). A d d i t i o n a l l y , c e r t a i n physiologic abnormalities which can occur i n the operating room (eg. hypoxia) c o n s i s t e n t l y e l i c i t c l i n i c a l l y u s e f u l changes i n the EEG (25-27). Since the target organ of many of the drugs used i n the operating room i s the b r a i n , one would think that a d i r e c t measure of the gross e l e c t r i c a l a c t i v i t y of the b r a i n such as the EEG would be a useful monitoring parameter* The fact that the EEG i s obtained non-i n v a s i v e l y makes i t c l i n i c a l l y appealing. However, i t has not seen routine use i n any but a few s p e c i a l i z e d operations. McEwen (23) suggested that the f a i l u r e of the EEG to measure up to i t s promise i s l a r g e l y due to problems contributing to the lack of 14 v a l i d i t y and r e l i a b i l i t y of rel a t e d studies reported i n l i t e r a t u r e . In addition, from^the anesthetist's standpoint, the trends i n d i c a t i v e of gradual changes i n the patient's state are not quickly and e a s i l y observable using standard EEG recordings. Thus, to make the EEG a useful monitoring parameter, what i s needed i s a standardized.,.set of s i g n i f i c a n t features and some means of making those features r e a d i l y apparent. Recent advances i n computer technology and si g n a l processing have renewed i n t e r e s t i n intraoperative EEG use. McEwen's thesis went a long way towards de f i n i n g a useful set of s i g n i f i c a n t EEG features. A d d i t i o n a l l y , by computing and outputting the EEG power spectra at s p e c i f i c time i n t e r v a l s as suggested by Bickford (58) , the d i f f i c u l t i e s i n observing s i g n i f i c a n t trends may be p a r t i a l l y overcome. A discussion of the way the EEG was used i n the monitor developed for t h i s thesis can be found i n chapter 4. 2.4 Intraoperative Monitoring i n the Future Figure 4 portrays the revised.Irelationship between the patient and the anesthetist which can be expected when computers are introduced to the operating room. The general flow of events and i n t e r p r e t a t i o n considerations are the same as described at the s t a r t of t h i s chapter. However, through the addition of computers, the anesthetist can access more information with-out a concommitant increase i n the d i f f i c u l t y of data i n t e r p r e t a t i o n . Detailed preoperative information about a v a r i e t y of factors can be stored and accessed only when needed. Parameters presently not used can be acquired and displayed along with some of the currently used parameters i n a format designed to si m p l i f y i n t e r p r e t a t i o n . The necessary s u r v e i l l a n c e of c r i t i c a l equipment such as the anesthesia machine can be i n part taken up by computers, thus fr e e i n g the doctor f o r other tasks. F i n a l l y , some of the record keeping tasks 15 of the anesthetist can be taken over by computers and, i n the process, the anesthetist can be provided with, a more complete record of the operation. Figure 4: The r e l a t i o n s h i p between the anesthetist and the s u r g i c a l patient when a computer i s introduced to the operating room. 2.5 Design Considerations Many of the signals obtainable within the operating room may be contaminated with noise from a number of sources, r e s u l t i n g i n what are referred to as a r t e f a c t s , Thus, i n the design of s u r g i c a l patient monitors, an attempt has to be made to i d e n t i f y and, i f p o s s i b l e , compensate for a r t e -f a c t sources. Once these sources have been compensated f o r , the signals acquired by the system w i l l be more us e f u l and the effectiveness of a warning system based on those signals w i l l not be as e a s i l y compromised by 16 f a l s e alarms. Examples of artef act ...sources are power l i n e s , e l e c t r o s u r g i c a l devices, d e f i b r i l a t o r s , patient movement, and interference from p h y s i o l o g i c a l systems other than the one being monitored. As the monitoring power of a device increases so does the d e t r i -mental e f f e c t of a breakdown of that device. I t i s c l e a r , then, that i f computers are to play an important r o l e i n the operating room, they must be extremely r e l i a b l e . To achieve t h i s r e l i a b i l i t y , one can incorporate battery backup systems and duplicate c e r t a i n c r i t i c a l hardware components. However, these measures increase the s i z e and cost of the monitor. In order to minimize the e f f e c t of a breakdown, there should be some means of r e s t a r t i n g the system during the operation once the reasons for that breakdown has been r e c t i f i e d . There are a number of documented incidents where f a u l t s and design defects i n monitoring equipment have d i r e c t l y contributed to i n j u r y to the patient (28,29). In order to minimize the number of these i n c i d e n t s , safety and performance standards for electromedical equipment have been set (30) and techniques for the design of safe equipment have been developed (31,32). Every e f f o r t must be made to l i m i t the possible danger to both the patient and the user due to device f a i l u r e or misuse. Within the operating room, the prime concern of the anesthetist should be patient maintenance. Consequently, the operation of a monitoring device should require l i t t l e or none of the anesthetist's time. Also, the anesthetist cannot be expected to be e i t h e r a computer programmer or an expert t y p i s t . For these reasons, a computer-based monitor must e s s e n t i a l l y run i t s e l f , User i n t e r a c t i o n should be optional and machine-initiated wherever pos s i b l e . Requests for i n t e r a c t i o n should not require immediate attention. F i n a l l y , i n t e r a c t i o n should be simple, e a s i l y understood and e a s i l y remembered. I t i s clear that the l i k e l i h o o d of general acceptance 17 of any monitoring device w i l l also decrease as setup time increases. As a r e s u l t , the setup time must be minimized. For the following reasons, i t i s not desirable to have components of a monitoring system outside the operating room. F i r s t l y , i t would then be necessary to "wire" every operating room which may use the system, thus reducing the system's p o r t a b i l i t y . Secondly, the malfunction of any external device(s) may be d i f f i c u l t to detect and quickly r e c t i f y . T h i r d l y , system startup and operation procedures are l i k e l y to be complicated, r e q u i r i n g t r a v e l i n and out of the operating room and/or more than one person. F i n a l l y , the l i k e l i h o o d of accidental interference with the proper functioning of the system by external sources i s greater. For these reasons, the components of an intraoperative monitoring system should a l l be i n the operating theatre. A number of a d d i t i o n a l p r a c t i c a l considerations must be taken into account i f a computer-based monitor i s to be inserted into the operating room. F i r s t l y , i n order not to i r r i t a t e members of the s u r g i c a l team and i n t e r f e r e with communication, i t must be reasonably quiet. Secondly, i t must be small enough to f i t into the operating theatre without impeding the movement of people. F i n a l l y , i n order to allow reorganization of the operating theatre to s u i t the needs of s p e c i f i c procedure, i t should be moveable. In addition to monitoring parameters related to the patient, the anesthetist must insure that proper functioning of various patient mainte-nance devices such as the anesthesia machine. Through the redesign of these devices (33-36), a concommitant easing of the anesthetist's task may be expected i n the same way as has been described i n connection with the computer-based monitoring of p h y s i o l o g i c a l parameters. Although developments i n computer-based anesthesia machines, intraoperative patient monitors, and s u r g i c a l support systems have proceeded separately, there i s no reason that 18 the information output from these d i f f e r e n t systems could not be displayed on the same display medium (eg. a CRT). The optimum organization of a l l the various types of relevant information w i l l only be determined through c l i n i c a l experience. As with any medical device, the p o t e n t i a l benefits of a computer-based monitoring system must be weighed against expense. Although the p r i c e of computer systems with s u f f i c i e n t computational power has been and should continue to be on the decline, the monitor must s i g n i f i c a n t l y increase the ease and accuracy of anesthetic p r a c t i c e to be j u s t i f i e d . The cost e f f e c t -iveness of computer-based systems can only be assessed through extensive c l i n i c a l evaluation of prototype systems. U n t i l the r e s u l t s of such evalua-tions are a v a i l a b l e , t h i s issue w i l l remain i n doubt. In the preceding discussion, p o t e n t i a l a p p l i c a t i o n areas of computer-based perioperative monitoring systems were given. In order to develop such a system, i t can be expected that a program of design and re-design with interspersed c l i n i c a l assessment w i l l be required (see f i g u r e 5). In t h i s way, i t i s possible for the s k i l l s and opinions of experts from d i f f e r e n t f i e l d s to be more f u l l y r e f l e c t e d i n the design. It should be c l e a r , a l s o , that from the beginning an evolutionary structure should be sought so as to allow for easy modification and extension of the system as i t s purposes and function are better understood. The p o t e n t i a l applications of computer-based data a c q u i s i t i o n and monitoring systems extend far beyond the operating room. The a b i l i t y to sample, process, store, and display e l e c t r i c a l signals i s useful i n a wide v a r i e t y of other areas, i n c l u d i n g many c l i n i c a l departments and intensive care u n i t s . By r e d i s p l a y i n g previously acquired data and/or mimicking 19 Engineering Design Clinical Device Assessment Figure 5: The medical device development cycle. procedures, such systems can be used as t r a i n i n g t o o l s . Computers i n general have been found to be u s e f u l for the storage of large volumes of information. This feature, along with proper data entry tools can be used to a s s i s t i n the generation of l e t t e r s , t e c h n i c a l papers, and h o s p i t a l docu-ments. These p o t e n t i a l uses must be considered when the o v e r a l l cost e f f e c t -iveness of any computer-based system i n the h o s p i t a l i s assessed. 20 3. PREVIOUS PERIOPERATIVE PATIENT MONITORING SYSTEMS 3.1 EEG Only Systems I t was stated i n chapter 2 that a major reason the EEG has seen l i m i t e d use i n the operating room i s the d i f f i c u l t y i n quickly obtaining use-f u l information from conventional EEG recordings. Consequently, i f the EEG i s to be e f f e c t i v e l y used by the anesthetist within the operating room, some means of presenting the c l i n i c a l l y s i g n i f i c a n t EEG c h a r a c t e r i s t i c s i n a quickly and e a s i l y interpreted format i s necessary. A number of devices have been designed for t h i s purpose. A device c a l l e d the cerebral function monitor (CFM) (37) has seen use i n operating rooms. This device band-pass f i l t e r e d (2-5 hz), amplified, r e c t i f i e d and l o g a r i t h m i c a l l y compressed incoming EEG signals from two scalp electrodes. The impedance of the electrodes was also monitored, thus allowing a r t e f a c t s due to diathermy or f a u l t y electrodes to be detected. The CFM has been found useful for the detection of abnormal neurological conditions during s u r g i c a l operations (38-40). Volgyesi (41) presented the hypothesis that the depth of anesthesia can be monitored by observing the r e l a t i v e amplitude of d e l t a waves and the s h i f t i n frequency of the dominant rhythm of the EEG. Using t h i s hypothesis, a device was designed which determined the r a t i o between the mean amplitude of the "augmented" d e l t a frequencies and the mean amplitude of the e n t i r e EEG s i g n a l , c a l l e d the augmented d e l t a quotient (ADQ). Fleming and Smith (42) described another EEG monitoring system. This system computed the frequency spectrum of the EEG s i g n a l from 0 to 16 Hz and p e r i o d i c a l l y outputtedlit using a DSA format (see section 4.5.1). This format provided the user with both amplitude and frequency information while 21 at the same time considerably reducing the amount of paper required to present the EEG throughout the operation. 3.1.1 Discussion A l l of the above systems suffered i n that they serve only to add information to the operating room. L i t t l e was done to improve the o v e r a l l presentation of information within the operating room or to make r e l a t i o n s h i p s with other parameters r e a d i l y apparent. In general, EEG signals are described using t h e i r time and/or frequency c h a r a c t e r i s t i c s . However, the d i s p l a y formats of the CFM and the ADQ monitors do not independently present e i t h e r of these c h a r a c t e r i s t i c s . The i n a b i l i t y to analyse these displays using commonly encountered feature descriptors makes i t more d i f f i c u l t to use past experience to detect and r e -j e c t a r t e f a c t s . Consequently, while these devices do l i t t l e to make parameter i n t e r r e l a t i o n s h i p s r e a d i l y apparent, the nature of t h e i r displays increases the need for d e r i v i n g these r e l a t i o n s h i p s . Also, each of these systems acquires and processes only one EEG channel. Thus i f information from a number of EEG channels i s wanted, a number of devices must be used. The extra time required to monitor and operate these devices combined with d i f f i c u l t i e s i n d i r e c t l y comparing t h e i r outputs make t h i s arrangement i n f e a s i b l e . I t was suggested by Frost et a l (43) that one of the major l i m i t i n g factors preventing the development of EEG automation i s the configuration of commonly a v a i l a b l e computing devices, i . e . , the c e n t r a l i z a t i o n of the control of data a c q u i s i t i o n , processing, and display duties i n a computer-based monitoring system l i m i t s that system's effectiveness. A multiprocessor approach to EEG a c q u i s i t i o n and i n t e r p r e t a t i o n was then described. For the same reasons as Frost presented for automatic EEG i n t e r p r e t a t i o n , t h i s approach 22 may also prove useful i n the design of perioperative patient monitors. Using such an approach, systems s i m i l a r to those described at the s t a r t of t h i s chapter may prove to be useful as preprocessing modules for a multifunction monitoring system. 3.2 Multiparameter Monitors In 1972, J.S. Brodkey et a l (44) described a computer-based patient monitoring system for neurosurgical patients. This system was capable of sampling, s t o r i n g , and d i s p l a y i n g EEG, evoked p o t e n t i a l s , ICP, and blood pressure. The data d i s p l a y medium was a laboratory o s c i l l o s c o p e . A World Health Organization (WHO} t r a v e l l i n g fellowship report i n 1978 overviewed work i n computer-assisted patient monitoring at a number of centers across North America (45). Four of these centers were involved with the a p p l i c a t i o n of computers i n the operating room. The following f i v e para-graphs describe work at these centers. A system developed i n Cleveland can simultaneously monitor heart-rate, temperature, s y s t o l i c and d i a s t o l i c blood pressure, i n s p i r e d oxygen concentration, and blood oxygen saturation from 4 patients (45 pp. 6-9). The computer was located outside the operating room and data was displayed on a video monitor within the operating room i n the form of trend graphs. Informa-tio n about various s u r g i c a l events could be entered v i a a small, s p e c i a l l y designed keyboard. It was planned to expand t h i s system to include the a c q u i s i t i o n and processing of four channels of EEG. A system for the continuous monitoring of b r a i n a c t i v i t y during anesthesia and surgery was developed i n San Diego (45 pp. 30-33). This system monitored EEG, a r t e r i a l blood pressure, heart rate, and user entered anesthetic events. This information was displayed on a video terminal which 23 was updated every eight seconds. The EEG was displayed using either the compressed s p e c t r a l array (see section 4.5.1), or the t o t a l integrated micro-voltage value (0-16 Hz) and median power frequency (6-16 Hz). The user can access data acquired 30 minutes, one hour, or f i v e hours previously through the video terminal. Although the computer was located outside the operating room, there were plans to implement a system with s i m i l a r features on a micro-computer which could be located within the operating room. Researchers i n La J o l l a produced a prototype system f or research (45 pp. 34-36). This microprocessor-based system monitored a r t e r i a l blood pressure and one EEG channel. EEG was displayed using the DSA (see section 4.5.1) on a thermal p r i n t e r . The e n t i r e system could be located i n the operating room and there were plans to expand the system to incorporate more ph y s i o l o g i c a l parameters. An EEG-based system to aid the anesthetist i n patient state assess-ment was developed i n Vancouver (45 pp. 40-42, 46). This system was capable of d i s p l a y i n g 4 channels of EEG i n ei t h e r the CSA or DSA format along with r e s p i r a t o r y and haemodynamic parameters. Preoperative and perioperative i n f o r -mation could be entered v i a the video terminal's keyboard. This information could be displayed ..along with the automatically acquired data on the video terminal within the operating room. The computer, however, was located outside the operating room. This project was the impetus behind the work described i n t h i s t h e s i s . A system using the EEG for patient monitoring during open heart surgery was developed i n the Netherlands (45 pp. 48-49, 47). Two channels of EEG were acquired and processed. Non-EEG parameters were typed into the computer, the computer was outside the operating room, and up to two patients could be monitored at one time. This system used zero crossing histograms 24 for EEG processing and display and updated an X-Y recorder every 60 seconds. J At the 1980 AAMI meeting, Paulsen (20) described a monitoring system for slowly varying s i g n a l s . A major design c r i t e r i o n f o r t h i s project was to reduce the amount of the anesthetist's time required to perform routine chores such as record keeping. Using the system developed, the anesthetist could enter information to the system v i a a hand-held 16 key keypad. In addition, up to 16 analogue signals could be automatically sampled and stored every 30 seconds. This information was output to an XY p l o t t e r on top of the anesthesia machine. The format of t h i s record was the same as the presently maintained records so i t could be continued i n the event of computer f a i l u r e . The computer was located outside the operating room and the system was connected to 6 operating rooms and 2 recovery room beds. 3.2.1 Discussion A l l but one of the systems described above (La J o l l a ) used computer systems that were too large to be p r a c t i c a l l y located within the operating room. I t was mentioned i n chapter 2 that t h i s configuration leads to com-p l i c a t e d startup precedures, higher p r o b a b i l i t y of interference from outside sources, lack of m o b i l i t y , and necessitates the use of more personnel than a s e l f contained system. Due to s i z e l i m i t a t i o n s and d e f i c i e n c i e s i n a v a i l -able hardware, the computational power of the computer used i n the La J o l l a system was l i m i t e d . Consequently, the number and s o p h i s t i c a t i o n of the features which could p r a c t i c a l l y be implemented on t h i s system were also l i m i t e d . Three of the above systems (Cleveland, Netherlands, and Paulsen) used the computational power of a large external computer system to simulta-neously monitor a number of patients. While t h i s feature should reduce the 25 cost per patient of using the system, i t also magnifies the negative e f f e c t of computer breakdown. Thus, a multipatient monitor both increases the need fo r r e l i a b i l i t y and, due to the external locations of the computer, compli-cates the achievement of that r e l i a b i l i t y . A number of the systems used a cathode ray tube (CRT) for informa-t i o n d i s p l a y . An erasable display medium such as t h i s permits a wide v a r i e t y of display formats and provides the p o t e n t i a l to access a large amount of information.without increasing operating room c l u t t e r . However, depending on the systems design, accessing information which has passed from the screen requires user i n t e r a c t i o n and can be d i f f i c u l t . In addition, i n the event of a computer f a i l u r e , access to information stored i n the computer i s l o s t . With a paper record output medium, a l l the information i s always displayed. In addition, paper records w i l l not become in a c c e s s i b l e when the monitor malfunctions. However, paper records increase the c l u t t e r of the operating room and do not have the format f l e x i b i l i t y of CRT's. Given the above tra d e o f f s , i t i s l i k e l y that the "optimum" perioperative patient monitor w i l l incorporate both erasable and nonerasable display media. In an attempt to r e l i e v e the anesthetist of some of h i s record keeping duties, Paulsen devised a 16 key keyboard f o r the entry of timed comments during the operation. A s p e c i a l purpose keyboard was also used i n the Cleveland system. Another a l t e r n a t i v e i s to provide for the entry of these comments through the terminal's keyboard, as i n VGH's EEGAL system. While Paulsen's system bypassed the need for typing s k i l l s to enter comments, i t also l i m i t e d the anesthetist to a f i n i t e number of comments thus leading to l e s s complete or l e s s d e t a i l e d s u r g i c a l records. If automated s u r g i c a l records are to be accepted within the operating room, some means of entering 26 any comment without the need for advanced typing s k i l l s w i l l be necessary. Perhaps a combination of written and computer maintained records with some means of l i n k i n g them together would be appropriate. In order to present time trends of the EEG, the compressed s p e c t r a l array (CSA) (San Diego, Vancouver), the density modulated compressed s p e c t r a l array (DSA) (La J o l l a , Vancouver), and zero crossing histograms (Netherlands) have been used. These formats for presentation have been found useful for the detection of r e l a t i v e l y r a pid changes i n the EEC's c h a r a c t e r i s t i c s which are i n d i c a t i v e of c e r t a i n p h y s i o l o g i c a l abnormalities, such as inadequate cerebral perfusion a f t e r occlusion of the c a r o t i d artery during c a r o t i d endarterectomies. In these a p p l i c a t i o n s , however, EEG changes rel a t e d to depth of anesthesia are treated more as a source of confusing signals rather than a t o o l for patient state assessment. I t i s c l e a r , therefore, that improvements must be made i n the presentation of long term EEG trends before the EEG w i l l be used f o r routine patient monitoring. A discussion of the r e l a t i v e merits of the above displays can be found i n section 4.4.1 and section 4.5.1. 27 4. IMPLEMENTATION The general design philosophy, for MOMA has been aimed towards maximizing the o v e r a l l f l e x i b i l i t y of the system so as to allow l a t e r adjust-ment of many of i t s design parameters. Although t h i s approach compromises the i n i t i a l e f f i c i e n c y , s i z e , and cost effectiveness of the system, these considerations can be more appropriately handled when the "optimum" design parameters have been more p r e c i s e l y determined. 4.1 The Hardware Figure 6 shows the general hardware configuration of MOMA. In keeping with the design philosophy, the hardware purchased for t h i s project has been of a general purpose nature. In the future, hardware modification and additions t a i l o r e d to s p e c i f i c tasks may produce s i g n i f i c a n t performance improvements. The main component of MOMA i s a D i g i t a l Equipment Corporation (DEC) PDP-11V03-L microcomputer system. This system includes: 1) an LSI-11 processor (KD11-HA). 2) a double density floppy d i s c system with t o t a l storage capacity of 1,025,024 bytes (RX02). 3) a 12 b i t , 16 channel analogue to d i g i t a l converter (ADV11-A) . 4) a programmable real-time clock (KWV11-A). 5) four independent s e r i a l l i n e i n t e r f a c e s compatible with EIA RS-422, EIA RS-423, and EIA RS-232C, and with selectable baud rates between 150 and 38400 b i t s per second i n c l u s i v e (DLV11-J). 6) 64 K bytes of random access memory (MSV11-DD). 7) software support and documentation for the above hardware. 8) a f u l l y documented operating system (RT-11V03-B). 9) diagnostic programs for system maintenance. 28 This system provides software compatibility with other DEC systems at VGH and came with much of the hardware and software required for monitor develop-ment and device maintenance. Figure 6: The General Hardware Configuration For display and user i n t e r a c t i o n , a Tektronix 4025 graphics t e r -minal (TX4025) was purchased. This raster-scanned microprocessor-based terminal came with 32 K bytes of graphics memory and 8 K bytes of text memory. The i n s t r u c t i o n set of the TX4025 i s compatible with the Tektronix 4027 color graphics terminal. Thus, the software developed for t h i s version of MOMA w i l l not require major revisions i f a color c a p a b i l i t y i s desired i n the future. The s c r o l l i n g c a p a b i l i t i e s , the r e l a t i v e l y high l e v e l graphics 29 c a p a b i l i t i e s , and the upward compatibility with a color graphics terminal make the TX4025 well suited to t h i s a p p l i c a t i o n . A D i g i t a l Pathways rechargeable battery-supported computer clock (TCU-50D) was purchased. This device avoids the necessity of manually i n i t i a l -i z i n g the date and time at system startup. 4.2 The Software For t h i s and the remaining sections of t h i s t h e s i s , the following d e f i n i t i o n s w i l l be used: 1) MOMA CYCLE = a si n g l e data a c q u i s i t i o n , processing and storage loop. 2) MOMA CYCLE PERIOD = the time consumed by a singl e MOMA CYCLE. 3) SIGNAL = the analog data s i g n a l to be sampled and processed. 4) RECORD = the sampled portion of an EEG si g n a l to be used for processing within a given MOMA CYCLE. 5) SEGMENT = a subset of a RECORD. 4.2.1 The Software Approach The general design philosophy of maximizing f l e x i b i l i t y was d i s -cussed at the s t a r t of th i s chapter. Towards t h i s end, the following approaches were adopted: 1) A high l e v e l and frequently used language (FORTRAN) was selected for the majority of the programming tasks. Although t h i s s a c r i f i c e s execution speed and program s i z e , i t should r e s u l t i n a more read-able and understandable software system. 2) Subprograms were used extensively so as to div i d e the software into l o g i c a l modules and to improve r e a d a b i l i t y . 3) Each module was heavily documented and contains a caption which b r i e f l y describes i t s int e n t . 30 4) The intent and features of each software package were documented. 5) Program flow diagrams were drawn to gr a p h i c a l l y portray the flow of program co n t r o l . 4.2.2 Software Components Unless otherwise s p e c i f i e d , program documentation for each of the following components can be found i n appendix 2. 4.2.2.1 DEC Supplied Components A l l of the programs written make use of the RT-11V03-B operating system. The foreground/background monitor i s required f or the main MOMA programs but the s i n g l e job monitor i s s u f f i c i e n t f o r the r e s t . A number of the sampling, processing, and I/O subroutines, which were supplied with the system, were used. The following three manuals, supplied by DEC, contain documentation for these subroutines; the Advanced Programmers Guide, the FORTRAN IV Extensions Users Guide, and the Laboratory Subroutines Manual. 4.2.2.2 V i s u a l E d i t i n g Package A v i s u a l e d i t i n g package was written to i n t e r f a c e the v i s u a l e d i t i n g c a p a b i l i t i e s of the TX4025 with a text editor supplied by DEC (TECO). TECO was written by members of the DEC Users Society (DECUS) and i s not supported by DEC. The v i s u a l e d i t i n g package was written using TECO i n s t r u c t i o n s and has proven invaluable as a program development and documentation t o o l . Comments were used sparingly i n these routines because the i n c l u s i o n of comments un-ne c e s s a r i l y .slows them down. 31 4.2.2.3 Graphics Routines A general purpose graphics package was written to take advantage of the TX4025's graphics c a p a b i l i t i e s . This package i s comprised of a group of FORTRAN subroutines for vector generation, f i g u r e generation, and data p l o t t i n g . These routines were put into an object l i b r a r y (GPHLIB) so as to simp l i f y the program l i n k i n g procedure. 4.2.2.4 MOMA Routines Figure 7 shows the r e l a t i o n s h i p between the MOMA hardware and s o f t -ware components. The foreground/background operating system supplied with the computer provides a two p r i o r i t y l e v e l mode of operation. Routines involved with data sampling, data processing, and data storage were assigned the higher p r i o r i t y (foreground) and routines involved with data d i s p l a y and user i n t e r a c t i o n were assigned lower p r i o r i t y (background). Using t h i s scheme, data a c q u i s i t i o n and processing routines are transparent to the user and cannot be in t e r f e r e d with unless the program i s terminated. The absolute minimum cycle time i s simply the time required for data a c q u i s i t i o n , data processing, and data storage, which was found experimentally to be approximately 12 seconds. This, however, leaves no time for the display and i n t e r a c t i o n routines. In addition, the amount of disk storage required per unit time i s i n v e r s e l y proportional to the MOMA cycle period. Thus, for long continuous operation of the system and e f f i c i e n t d i splay and i n t e r a c t i o n , a large cycle period should be chosen. On the other hand, the longer the computer takes to update the displ a y , the longer i t takes for a c r i s i s s i t u a -t i o n to be brought to the attention of the anesthetist. This i s extremely c r i t i c a l i n s i t u a t i o n s such as cerebral ischemia r e s u l t i n g from inadequate cerebral perfusion, where i r r e v e r s i b l e neurological damage can occur i n a 32 Figure 7: Information Flow Block Diagram matter of minutes. This c l e a r l y c a l l s for a short MOMA cycle period. The MOMA cycle period was chosen to be 30 seconds, thus leaving approximately 18 seconds per cycle for display processing and user i n t e r a c t i o n . Operations of up to 7 hours and 40 minutes may be recorded upon a sing l e disk under these circumstances. More importantly, updating of the d i s p l a y i s frequent enough to prevent a s i g n i f i c a n t delay i n the recognition of a c r i s i s s i t u a -t i o n . In order to si m p l i f y the future modification of the MOMA routines a large number of global parameters were used. A network of common blocks passed these parameters to various modules of the program. By appropriately s e t t i n g these global parameters, i t i s possible to generate a wide v a r i e t y of display formats and configurations. 33 The display and i n t e r a c t i o n routines (background routines) can run i n the absence of a foreground job. This enables the user to use a l l the display and i n t e r a c t i o n features of MOMA when viewing data acquired from previous operations. The RT-11 FORTRAN debug (conditional compilation) statement was used extensively i n the foreground routines. These routines can be recompiled using the /ONDEBUG option and linked to run i n the background. The r e s u l t i n g program allows the user to trace the program flow, p l o t the acquired data, pl o t the power s p e c t r a l estimate, and store the data. Although t h i s f a c i l i t y was designed for program t e s t i n g purposes, i t may also prove useful for the i n t e r a c t i v e a c q u i s i t i o n of data. I t s i n a b i l i t y to access previously stored data and i t s i n t e r a c t i v e nature, however, make i t impractical for use by the anesthetist within the operating room. When the standard data a c q u i s i t i o n , processing and storage routines are run along with the display and user i n t e r a c t i o n routines, the r e s u l t i n g program exceeds the a v a i l a b l e memory capacity of the system (32K words). Consequently, i t was necessary to overlay parts of the routines from the disk. However, since each disk access takes, on the average, one quarter of a second, t h i s scheme s i g n i f i c a n t l y slowed down the program. 4.2.2.5 Testing Routines The PDP-11V03-L came with diagnostic programs. These programs can be used to v e r i f y the proper functioning of the various hardware components of the system. Test programs which c a l l various subsets of the graphics package and the MOMA package were written. This allows program bugs to be traced and program a l t e r a t i o n s to be t r i e d . Through the use of RT-11 FORTRAN1s 34 debug feature mentioned previously, i t i s possible to in s e r t statements which further aid i n the task of program debugging. A number of the graphics and MOMA routines contain these statements. Foreground and background simulation routines were written for the t e s t i n g of the MOMA routines. The foreground simulator sends predefined test patterns to the background job i n the same manner as does the main f o r e -ground job and i s useful for the t e s t i n g of the display and user i n t e r a c t i o n (background) routines. The background simulator receives and types out the message sent the foreground job and i s useful for the t e s t i n g of the data a c q u i s i t i o n and processing (foreground) routines. F i n a l l y , a routine was written to aid i n the c a l i b r a t i o n of the A/D converter. 4.2.2.6 Startup Routines A number of startup programs were written. These programs are c a l l e d along with various text f i l e s by startup command f i l e s . Using these command f i l e s , the system d i r e c t s i t own startup, checks the i n t e g r i t y of various system components, and sets the modes of the terminal and the operating system. 4.2.2.7 Command F i l e s In addition to the startup command f i l e s mentioned i n section 4.2.2.6, a number of support command f i l e s were generated. These were used to simp l i f y the compiling and l i n k i n g of packages containing many modules. 4.3 Monitoring Parameters The A/D converter has 8 independent channels ( q u a s i d i f f e r e n t i a l mode) av a i l a b l e for the a c q u i s i t i o n of analog data. I t was decided that the 35 same four EEG channels that were used In the EEGAL project (F3-C3, C3-01, F4-C4, and C4-02 as defined by the i n t e r n a t i o n a l 10-20 system f o r electrode placement (48)) should be used i n MOMA. These four channels represent the four quadrants of the head. MOMA's EEG a c q u i s i t i o n process i s shown i n f i g u r e 8. E E G A C Q U I S I T I O N 1 £ Signal Processing Figure 8: The EEG a c q u i s i t i o n Process 36 The e x i s t i n g software can be set to sample each, of the remaining four unallocated A/D channels once every MOMA cycle. Consequently, only slowly varying s i g n a l s , such as mean blood pressure, pulse rate,•_or tempera-ture, can be meaningfully sampled. I t i s p o s s i b l e , however, to i n s e r t program modules which sample these channels at a fa s t e r rate. The only processing of data acquired through the unallocated chan-nels i s that of m u l t i p l i c a t i v e and addit i v e s c a l i n g . However, as with the sampling rate, i t i s not d i f f i c u l t to i n s e r t program modules which perform s i g n a l processing appropriate for a p a r t i c u l a r parameter. Some of the monitoring devices presently used i n the operating room provide outputs appropriate for sampling by a computer. Thus, for i n i t i a l c l i n i c a l t r i a l s > l i k e l y candidates for sampling w i l l be those parameters r o u t i n e l y acquired and displayed using these devices. For example, pulserate, temperature, l e f t a t r i a l blood pressure (LAP), c e n t r a l venous pressure (CVP), and mean a r t e r i a l pressure (MAP), are r o u t i n e l y monitored during open heart surgery at VGH by devices with computer compatible outputs. Although the ECG i s also monitored by such a device i t would be necessary to sample i t more than once every MOMA cycle to obtain meaningful data, thus some software modification would be required. As dictated by the r e s u l t s of c l i n i c a l t r i a l s and the ease of data a c q u i s i t i o n , other parameters w i l l l i k e l y be added to th i s l i s t . In addition, each s u r g i c a l procedure has d i f f e r e n t monitoring requirements and, consequently, d i f f e r e n t parameters w i l l be sampled. 4.4 EEG Processing 4.4.1 Discussion of Techniques for EEG Processing Figure 9 shows samples of multichannel recordings of baseline EEG a c t i v i t y before and during anesthesia. This f i g u r e c l e a r l y shows that T7_ F3-C3 C3-01 F4-C4 C4-02 F</-C4 C4-02 10 sec I H 1.0 sec (a) (b) F3-C3 FJ-C3 ~ • .. F4-C4 F4-C4 C4-02 (c) I 1 AO sec (d) /.0 sec F 3 - C3 F4-C4 F J - C J F4-C4 C4-02 C4-02 1.0 sec 10 sec (e) (f) Figure 9: Sample Segments of Multichannel EEG A c t i v i t y . Samples of EEG a c t i v i t y before and during anesthesia for three subjects having s i m i l a r baseline EEG c h a r a c t e r i s t i c s are shown i n (a)-(b), ( c ) - ( d ) , and ( e ) - ( f ) . Segments (b), (d) and (f) were recorded during halo-thane anesthesia, narcotic anesthesia and enflurane anesthesia, respectively, ( a f t e r McEwen (23)) 38 processing and display techniques must be developed to minimize the e f f e c t of i n t e r p a t i e n t v a r i a b i l i t y and to reduce the amount of information presented. The Augmented Delta Quotient (ADQ) used by Volhyesi (41) and the technique used i n the Cerebral Function Monitor (37) both reduce each channel of the EEG to a slowly varying s i g n a l which changes according to c e r t a i n EEG c h a r a c t e r i s t i c s . The r e s u l t i s a considerable reduction i n the amount of data generated when compared to conventional EEG recordings. A problem with these techniques, however, i s that a given change i n the ADQ or the CFM can correspond to a number of p h y s i o l o g i c a l changes. For example, changes corresponding to anesthetic depth can mimic changes corresponding to cerebral ischemia. In addition, changes i n one c h a r a c t e r i s t i c of the EEG can balance out changes i n another c h a r a c t e r i s t i c . Thus changes which may be s i g n i f i c a n t w i l l not be r e f l e c t e d . F i n a l l y , EEG signals have generally been described i n terms of t h e i r frequency and/or time c h a r a c t e r i s t i c s . Since the above techniques do not independently present either of these c h a r a c t e r i s t i c s , the i n t e r p r e t e r i s not able to analyze the data i n terms of commonly encountered feature descriptors. Two major techniques have been used for e l i c i t i n g frequency informa-t i o n from the EEG; period analysis and s p e c t r a l a nalysis. Period analysis i s based on counting the number of times the EEG crosses the i s o e l e c t r i c (0 voltage)')line. However, i t i s necessary to c o l l e c t a large number of data samples to obtain r e l i a b l e frequency estimates using period analysis. Con-sequently, long time i n t e r v a l s must be used. These long i n t e r v a l s w i l l delay the response to abrupt changes i n the EEG. Also, EEGs with d i f f e r i n g c h a r a c t e r i s t i c s can produce the same zero crossing frequency. Spectral a n a l y s i s , on the other hand, r e l i a b l y provides frequency information by analysing short time i n t e r v a l s . Since each frequency band i s independently 39 presented, changes i n one^part of the spectrum w i l l not obscure changes i n another. For t h i s project, s p e c t r a l analysis was used. A discussion of the display formats used to present the time trends i n the frequency information obtained from s p e c t r a l analysis can be found i n section 4.5.1. Work has been done i n automatic patient state assessment using pattern recognition techniques on the EEG (eg. 23,49). If a monitor could be designed incorporating these techniques, the anesthetist might be re l i e v e d of the task of EEG i n t e r p r e t a t i o n . However, the algorithms for performing these computations with a high degree of success are computationally demanding and are d i f f i c u l t to perform i n real-time using e x i s t i n g computer hardware. If and when such a system i s developed for real-time use, i t s acceptance w i l l r e l y on the ease of recognition and r e c t i f i c a t i o n of any sources of erroneous estimates and on the systemls ease of use. 4.4.2 Analog Preprocessing In order to reduce the e f f e c t of low frequency movement a r t e f a c t s , higher frequency EMG ar t e f a c t and power l i n e pickup (60 Hz), and to prevent a l i a s i n g during power s p e c t r a l estimation, the EEG signals should be high-pass and low-pass f i l t e r e d . In the EEGAL system, the EEG was high-pass f i l t e r e d at .54 Hz ( f i r s t - o r d e r high-pass b u i l t into the Beckmann Accutrace EEG machines) and low-pass f i l t e r e d at 30 Hz (third-order butterworth low-pass Krohn-Hite 3342-R). Recordings from the EEGAL project were used i n the demonstration of MOMA (see chapter 5). Since a l i a s i n g occurs at 32 Hz i n MOMA (64 Hz sampling frequency), the low-pass f i l t e r of future versions w i l l l i k e l y r o l l o f f at a lower frequency, i e . about 25 Hz. In addition to being f i l t e r e d , the EEG must be amplified for comp a t i b i l i t y with the A/D converter. The EEG i s c h a r a c t e r i s t i c a l l y about 50. microvolts i n amplitude and 40 the A/D operates between plus and minus 5.12 v o l t s , thus an am p l i f i c a t i o n of about 10^ i s required. 4.4.3 D i g i t a l Preprocessing Two d i g i t a l preprocessing techniques were used i n order to optimize the output of the power s p e c t r a l estimator, which i s based on the Fast Fourier Transform (FFT). F i r s t l y , i f a DC bias i s present i n the data segment to be processed, the FFT w i l l produce a large DC element and small higher frequency elements. In order to prevent t h i s , the mean of each data segment was re-moved p r i o r to processing. The means are a v a i l a b l e to routines entered l a t e r i n the same MOMA cycle but are not stored on disk. Secondly, i n order to l i m i t s p e c t r a l leakage, a cosine taper was applied to the f i r s t and l a s t ten percent of each data segment. Both of these operations are performed immediately on receipt of a data segment ( i e . while the next segment i s being acquired), so as to spread the computation re l a t e d to si g n a l processing more evenly within the MOMA cycle. This should r e s u l t i n smoother display pro-cessing and user i n t e r a c t i o n . 4.4.4 EEG Power Spectral Estimation Technique Since i t s rediscovery i n 1965 (50) , the fast f o u r i e r transform (FFT) has become a fa s t and economical means for obtaining power s p e c t r a l estimates (PSEs) of d i g i t a l l y sampled si g n a l s . Techniques using the FFT i m p l i c i t l y assume that the underlying analog s i g n a l i s a stationary random process. There are a number of considerations for choosing a PSE technique for t h i s a p p l i c a t i o n . F i r s t l y , i n order to operate i n real-time and to allow for display processing and user i n t e r a c t i o n , the technique must be reasonably f a s t . Secondly, since the s p e c t r a l c h a r a c t e r i s t i c s of the spontaneous EEG are generally described i n terms of broad frequency bands, the PSE does not 41 need to have high r e s o l u t i o n . T h i r d l y , since the computer has a l i m i t e d amount of random access memory (RAM), i t i s important to minimize the amount of memory required f or s p e c t r a l a n a l y s i s . F i n a l l y , the amount of data that must be stored every MOMA cycle w i l l a f f e c t the maximum operation length which may be recorded and the time required to r e c a l l each record from the disk. Using a record segmentation technique presented by Welch i n 1967 (51) i t i s po s s i b l e to obtain a decrease i n the variance of the s p e c t r a l estimate by s a c r i f i c i n g s p e c t r a l r e s o l u t i o n . For example, i f K equals the number of segments, there w i l l be a PSE variance reduction of 1/K f o r Gaussian processes. A study comparing t h i s and 4 other s p e c t r a l estimation techniques (52) concluded that although some of the other techniques produce better r e s u l t s , the Welch method i s a reasonable choice for time l i m i t e d a p p l i c a t i o n s . Dumermuth (53) suggested that while t h i s technique has some leakage problems, i t may be useful f or EEG processing i n systems with l i m i t e d memory capacity. Although other PSE techniques exceed the performance of the Welch scheme (eg. 54-57), they generally take more computation time and consume more memory. 4.4.5 Segment Size An appropriate choice of segment length during power s p e c t r a l estima-t i o n w i l l r e s u l t i n convenient frequency increments i n the derived power spectra. With t h i s i n mind, a segment length of one second was chosen. This produces a power spectrum with one Hz increments. 4.4.6 Record Size The variance of the PSE produced by the Welch method decreases as the number of segments increases. However, as determined by McEwen (23), the 42 v a l i d i t y of the assumption of s t a t i o n a r i t y of the EEG sig n a l decreases as record length increases. A d d i t i o n a l l y , with the addition of every new segment, the required processing time and the minimum MOMA cycle increases. With these considerations i n mind, a record s i z e of eight seconds was chosen and was divided into eight one-second segments for processing. 4.4.7 Frequency Domain Smoothing In order to improve the s t a t i s t i c a l c h a r a c t e r i s t i c s of the PSE, a three point moving average window was used. If P(k) = the unsmoothed PSE k=0,l,...,N-1 and S(k) = the smoothed PSE k=0,1,...,N-1 then S(0) = .5P(0)+.5P(1) (4.1) S(N-l)=.5P(N-l)+.5P(N-2) (4.2) S(j)=.25P(j-l)+.5P(j)+.25P(j+l) j=l,2,...,N-2 (4.3) 4.4.8 Sampling Rate Studies r e l a t i n g the EEG sp e c t r a l c h a r a c t e r i s t i c s with patient state have suggested that the frequencies of i n t e r e s t are below 30 Hz (22). Since the signals must be sampled above the Nyquist rate, i e . twice the maximum frequency desired, the minimum sampling frequency i s 60 Hz. Also, for good computational performance of the FFT, the number of samples per data segment should be a power of two. Using a segment s i z e of one second, three sampling rates which s a t i s f y the above two constraints are 64 Hz, 128 Hz, and 256 Hz. In order to minimize memory requirements and processing time, the lowest of these sampling rates was used (64 Hz). 4.4.9 Summary of EEG Processing For a given 30 second MOMA cycle, each EEG channel i s processed i n the following manner: 43 1) Each s i g n a l i s a m p l i f i e d , h igh-pass f i l t e r e d at .54 Hz, and l o w -pass f i l t e r e d at 30 Hz. 2) An e igh t second r eco rd i s acqu i red by the computer through the A/D conver t e r which samples at 64 Hz. 3) Each record i s p a r t i t i o n e d i n t o e igh t one-second nonover lapping segments. 4) The mean i s removed from each segment. 5) The f i r s t and l a s t 10 percent of each segment i s tapered u s ing a cos ine t ape r . 6) A power s p e c t r a l es t imate i s computed f o r each EEG channel u s i n g a da ta segmentation technique suggested by Welch (51). 7) Each es t imate i s smoothed u s i n g a th ree p o i n t moving average window. 8) The smoothed es t imate i s s to red on d i s k and sent to the d i s p l a y p r o c e s s i n g r o u t i n e s a long w i t h v a r i o u s other program parameters . 4.4.10 S p e c i f i c s of the S p e c t r a l E s t i m a t i o n Technique L e t : / -X ( j ) = the EEG data record to be processed . j=0»1>•••>N-1 N = the l e n g t h of each r e c o r d . L = the l eng th of each segment. K = the number of segments. D = the d i s t a n c e between the f i r s t sample of adjacent segments. X ± ( j ) = X ( j + ( i - l ) D ) = tha t i ' t h segment. j = 0 , l , . . . , L - 1 W(j) = the time domain window. j = 0 , l , . . . , L - 1 A^(n) = the f o u r i e r t ransform of X ^ ( j ) * W ( j ) . n=0 , l , . . . , L/2 I, ( f ) = the modi f i ed periodogram of k n X , ( j ) * W ( j ) f = 0 , l / L , . . . , l / 2 K n 44 P(f ) = the unsmoothed power s p e c t r a l estimate f n=0,l/L,...,1/2 SCf^) = the smoothed power s p e c t r a l estimate f n=0,l/L,...,1/2 Assume that X(j) i s a stationary second order stochastic process and that E(X)=0. In order to decrease the computational load and to s i m p l i f y data b u f f e r i n g , nonoverlapping data segments were chosen. In addition, the en t i r e record must be covered by the data segments to insure that a l l acquired data i s used. Thus, D = L and N = (K-1)*D+L = K*L. (4.4) For t h i s p roject, N=5.2, L=64, K=8, and D=64. The processing technique procedes as follows. A f t e r applying the data window W(j) to each data segment, the f o u r i e r transform of each data segment A^(n) i s computed. V n ) - ± Y VJ>W<J> e~ 2 k ± J n (4.5) where i=( - l ) 2 and n=0.1.,,,.L/2. The modified periodograms l ^ C 1 ) a r e then derived from the f o u r i e r trans-forms . w - ? (4.6) 1 L _ 1 2 where f =—, n=0,1,...,L/2, and U=— Z w(j) . n L j=0 The unsmoothed power s p e c t r a l estimate F ( r n ) I s the average of the modified periodograms. Thus, 1 K P'Cf ) = £ Z I (f ) (4.7) n K , , K n k=l F i n a l l y , p ( f n ) I s smoothed using the three point average window described i n section 4.4.7 to produce the smoothed s p e c t r a l estimate S(f ). 45 A more d e t a i l e d d e s c r i p t i o n of the above processing technique can be found elsewhere (51). 4.5 EEG Display 4.5.1 Discussion of Techniques f o r EEG Presentation In any attempt to portray the time trends of the frequency spectrum of EEG s i g n a l s , three dimensions must be portrayed; frequency, time and magnitude. Since the display mediums presently used have only two s p a t i a l dimensions, that data must eit h e r be projected onto two dimensions or a non-s p a t i a l dimension such as color or i n t e n s i t y must be used. Representation by p r o j e c t i o n i s the technique devised by Bickford (58) and has been used i n a number of c l i n i c a l areas (eg. 59,60). I t has been c a l l e d the Compressed Spectral Array (CSA). This technique simply maps both the time and magnitude onto the Y axis, i e . the standard amplitudes vs frequency pl o t i s generated for each sample period but the o r i g i n f o r each successive p l o t i s moved up the Y a x i s . In order to give the displayed EEG the appearance of being a three dimensional contoured surface, a hidden l i n e algorithm i s used to prevent new p l o t s from crossing below previous p l o t s . Although the CSA i s an a e s t h e t i c a l l y pleasing display i t has a number of drawbacks which l i m i t i t s effectiveness f or intraoperative monitoring F i r s t l y , the presence of a large component i n a given s p e c t r a l plot may, because of the hidden l i n e algorithm, cover usable data i n succeeding s p e c t r a l p l o t s . Secondly, since time and amplitude share an a x i s , i t may be d i f f i c u l t to determine the time at which a given frequency c h a r a c t e r i s t i c was acquired. A technique described by Fleming (61) creates a t h i r d dimension by using dot density to represent magnitude. This has been c a l l e d the Dot 46 density representation of the compressed Spectral Array (DSA). By using three orthogonal dimensions (X,Y, and i n t e n s i t y ) the problems described f o r the CSA are avoided. A comparison of the CSA and the DSA can be found i n figure 10. Both the CSA and the DSA were implemented i n the EEGAL project (46). The opinion of researchers involved with EEGAL was that the DSA showed more p o t e n t i a l as a display format. For these reasons, the DSA was used i n t h i s project. The same conclusion was reached i n a recently published paper techniques for intraoperative monitoring (62), inc l u d i n g the DSA, CSA, CFM, and ADQ. The CFM and ADQ techniques are discussed i n section 4.4.1. 4.5.2 DSA Implementation The terminal's character format f l e x i b i l i t y makes i t w e l l suited for a DSA d i s p l a y . I t i s possible to define a l t e r n a t i v e character fonts, which are tables of 8 * 14 point dot matrix patterns. Each character i s displayed when a given eight b i t code i s received from the computer. Any l i n e i n the workspace region of the terminal can display characters from either the standard alphabet or a l t e r n a t i v e character fonts or both. In order to produce a DSA displa y , even numbers of dots from 0 to 112 were scattered randomly within the 8 * 14 matrices to produce 57 gray l e v e l s . These gray l e v e l s are associated with the ASCII characters with decimal codes of 33 to 89 i n c l u s i v e . The magnitude of each element of the power s p e c t r a l estimate i s l i n e a r l y encoded to one of these gray l e v e l s . Power s p e c t r a l elements which exceed the upper to lower bounds of th i s r e l a t i o n are encoded to the maximum i n t e n s i t y or minimum i n t e n s i t y characters r e s p e c t i v e l y . For the purpose of generating axes f or the DSA, three a d d i t i o n a l characters were defined. The dot matrix patterns used to form t h i s a l t e r n a t i v e character font can be found i n Appendix 5 and the output of a character font t e s t i n g routine (FNTTST) can be found i n f i g u r e 11. 47 C S A D S A m i n T 1 r — ! 4 8 12 16 - r 0 4 8 12 16 F R E Q U E N C Y in Hz 8 Figure 10: A Comparison of the CSA and DSA display formats (after L e v i (62)). Recordings are from a patient during gradually deepening Halothane-N^O anesthesia FNTTST; FONT 16 TEST • i >* + .-..-8123456789: |< « >?*ftBCDEFGHI JKLMNOPQPSTUVWXYZC •••]'•_'abed STOP -- END OF FNTTST Figu re 11: The output of the a l t e r n a t i v e charac te r font t e s t i n g r o u t i n e FNTTST. The f ac t that the graphics mode of the t e r m i n a l need not be used i n the DSA prov ides some a d d i t i o n a l bonuses. F i r s t l y , the amount of the t e r m i n a l ' memory r equ i r ed to d i s p l a y a g iven number of spec t r a i s s u b s t a n t i a l l y lower than would be r e q u i r e d f o r a CSA d i s p l a y , thus more i n fo rma t ion can be d i s -played at one t ime. Secondly , s i n c e no f i x e d graphics r e g i o n need be s p e c i -f i e d , the s c r o l l i n g c a p a b i l i t i e s of the t e r m i n a l may be more e f f e c t i v e l y used. F i n a l l y , the d i s p l a y s can be updated by s imply o v e r w r i t i n g data r a the r than redrawing a vec to r as would be necessary i n the g raph ics mode. Th i s r e s u l t s i n more e f f i c i e n t and f a s t e r d i s p l a y p r o c e s s i n g . 49 4.5.2.1 The E f f e c t of the Human V i s u a l System As described by Overington (63), the response of the human v i s u a l system's receptors i s roughly proportional to the log of t h e i r illuminance. For t h i s project, the i n t e n s i t y of the gray l e v e l s varies l i n e a r l y and the power spectra are l i n e a r l y encoded to these gray l e v e l s . Consequently, the human v i s u a l system e f f e c t i v e l y takes the log of the displayed power spectra. Although variables such as background luminance and structure, accommodation, border enhancement, etc. are not accounted f o r , the fact remains that the perceived i n t e n s i t y difference between two adjacent low i n t e n s i t y gray l e v e l s i s greater than the perceived i n t e n s i t y d i f f e r e n c e between two s i m i l a r l y separated l e v e l s of a higher i n t e n s i t y . 4.5.3 Special Features A summary of the EEG presentation format described below can be found i n figure 12. The DSA displays implemented i n MOMA are divided into two sections; a s c r o l l e d section and an unscrolled section. When presenting real-time data, the s c r o l l e d section i s automatically updated when new data i s recieved. While i n a s c r o l l e d state (described below), however, the automatic update i s i n h i b i t e d . At the user's request, the s c r o l l e d section can be moved back and f o r t h i n time by a s p e c i f i e d number of records, i e . i f the s c r o l l e d section i s presenting the L'th to the L-M'th EEG records, i t can be moved forward i n time so that i t presents the L+N'th to the L-M+N'th EEG records o r . i t can be moved back i n time so that i t presents the L-N'th to the L-M-N'th EEG records. Any attempt to s c r o l l to before the s t a r t of the operation or into the future i s ignored. Even though display update i s i n h i b i t e d while i n a s c r o l l e d state, data continues to be acquired and stored. Thus, when the display i s returned to real-time, no data i s l o s t . Using the s c r o l l i n g feature, i t i s possible to access any EEG record stored e a r l i e r i n the operation. 50 - D i g i t a l Display of non-EEG Data DSA format for EEG Timed tags Time Labels every S c r o l l e d Section second row Time DSA format Labels for EEG Timed tags every Unscrolled Section row l 1 ! 1 I I 0 5 10 15 20 25 30 Frequency Labels Figure 12: Format of the displays presenting the DSA. The unscrolled section of the DSA displays i s loaded by t r a n s f e r r i n g an EEG record from the top of the s c r o l l e d section to the top of the un-s c r o l l e d section. Records transferred, or saved, i n t h i s manner are not affected by future update, s c r o l l i n g , or display change processes. This feature allows the anesthetist to perform comparisons between EEG records separated by long periods i n time and should help i n i d e n t i f y i n g long term trends i n the EEG. 51 4.6 The Display of Non-EEG Parameters To permit comparisons between non-EEG and EEG data, non-EEG data i s displayed d i g i t a l l y i n a l l the EEG displays. The d i g i t a l d i splay of non-EEG data always corresponds to the most recent EEG record on the screen. During the observation of various s u r g i c a l procedures, the author noted that the large d i g i t a l displays of ce r t a i n parameters, such as mean blood pressure and pulserate, are used by both the anesthetist and the surgeon-, sometimes at a distance from the monitor. Since these displays are viewed at a distance, the small d i g i t a l d i s p l a y of non-EEG data on MOMA w i l l not take the place of the larger d i s p l a y s . However, since MOMA's d i g i t a l displays are always associated with the most recent record on the screen, they are use f u l when the EEG i s s c r o l l e d . A d i s p l a y format was generated which presents the time trends i n the non-EEG data. In th i s format, up to four channels of non-EEG data can be plotted vs time on the terminal's screen. This i s equivalent to the paper record r o u t i n e l y maintained during a l l operations at VGH. Thus, i n addition to making the time trends and i n t e r r e l a t i o n s h i p s of non-EEG parameters more r e a d i l y apparent, t h i s f a c i l i t y may r e l i e v e the anesthetist of some of h i s record keeping duties. A summary of the non-EEG time-trending display format can be found i n fig u r e 13. 4.7 Timed Tags Many events and conditions i n the operating room must be considered when the data acquired and stored by MOMA i s interpreted. In order to associate these events with the automatically acquired data, a timed tagging f a c i l i t y was implemented. Using t h i s f a c i l i t y , i t i s possible to enter up to 255 typed comments to the computer. These comments, or timed tags, are 52 T i t l e Y axis Scaling and l i n e type D e f i n i t i o n s P l o t of non-EEG Data vs time I 1- time s c a l i n g Label Figure 13: Format of the displays presenting time-trends of the non-EEG data. associated with the next acquired record, stored on disk, and displayed be-side the DSA i n the EEG displays. The tags are truncated to 32 characters p r i o r to storage on disk. 4-8 The Terminal Screen's Configuration As shown i n fig u r e 14, the terminal's screen has been s p l i t into two regions, the workspace s c r o l l and the monitor s c r o l l . Characters typed into the workspace s c r o l l from the keyboard are not sent to the computer but characters typed into the monitor are. The information contained i n one s c r o l l i s independent of the information contained i n the other. 53 The MOMA programs use the workspace s c r o l l for the presentation of preformated d i s p l a y s . During the startup procedure, t h i s s c r o l l i s loaded by the computer with c h e c k l i s t s and startup i n s t r u c t i o n s . During operation, the computer sends the displays to t h i s s c r o l l . For the displays presently implemented, the workspace s c r o l l occupies the top t h i r t y / l i n e s of the terminal's screen. MOMA Display (30 l i n e s ) MOMA/User Interaction (4 l i n e s ) Figure 14: The structure of the Tektronix 4025 terminal's screen. The MOMA programs use the monitor s c r o l l for user i n t e r a c t i o n . The computer sends a l l messages and requests for s e r v i c i n g to t h i s s c r o l l . These requests are accompanied with a b e l l so as to at t r a c t the user's attention. In addition, a l l e n tries from the keyboard are echoed to t h i s s c r o l l . For the displays presently implemented, the monitor s c r o l l occupies the bottom four l i n e s of the terminal's screen. 54 4.9 Implemented Displays As shown i n figures 15 to 18 i n c l u s i v e , four displays were implemented which combine the DSA with timed tags and non-EEG data. The non-EEG data i s presented d i g i t a l l y at the top of the screen and i s always associated with the most recent DSA record on displ a y . The timed tags, i f present, are typed on the r i g h t hand side of the DSA records. Two of these displays (Dl and D3) contain a seven l i n e s c r o l l e d section and a three l i n e unscrolled section for each EEG channel. The other two displays (D2 and D4) contain a 15 l i n e s c r o l l e d section and a f i v e l i n e unscrolled section f or each EEG channel. When these displays are updated, the new EEG records and timed tags are i n -serted into the top of the s c r o l l e d section and the d i g i t a l non-EEG portion of the display i s overwritten. As shown i n figures 19 and 20, two displays were implemented which p l o t the non-EEG data vs time by making use of the graphics routines. One of these displays (D5) pl o t s the l a s t 79 samples of each non-EEG s i g n a l and the other (D6) plot s each non-EEG s i g n a l from the s t a r t of the operation to present. I t i s expected that the system w i l l not be presenting these d i s -plays for long periods of time. For t h i s reason, i t was not deemed necessary to automatically update these d i s p l a y s . There i s , however, no technical reason l i m i t i n g the implementation of a di s p l a y update c a p a b i l i t y . 4.10 User Interaction An e f f o r t has been made to minimize the time required to use and to learn how to use the system. Towards t h i s end, the amount of required i n t e r a c t i o n with MOMA was minimized. When i n t e r a c t i o n i s necessary, a message i s typed into the monitor s c r o l l which describes the problem and the appropriate response(s). A b e l l i s rung when the message i s sent so as to EEG POWER SPECTRR; X= HZ, Y = HRS:MIN Figure 15: MOMA Display Number 1 (Dl) - 10 l i n e s of DSA for four EEG channels - the s c r o l l e d section = the top seven l i n e s - the unscrolled section = the bottom three l i n e s - Timed tags truncated to 8 characters - D i g i t a l d i s p l a y of data from up to four non-EEG channels ui Figure 16: MOMA Display Number 2 (D2) - 20 l i n e s of DSA for two EEG channels - the s c r o l l e d section = the top 15 l i n e s - the unscrolled section = the bottom 5 l i n e s - Timed tags truncated to 8 characters - D i g i t a l d i s p l a y of data from up to four non-EEG channels E E G P O W E R S P E C T R H ; X * H Z , nonEES • 1 * nonEEG • 3 • nonEEG # 2 nonEEG # 4 •\ mt mm 19:41 %l;-,y.l^ , ;»&r:., . ' 18:59 - • • - • • • • • • • 18:59 ^ 19: 0 .'- V-vt?' 10 15 Figure 17: MOMA Display Number 3 (D3) - 10 l i n e s of DSA for two EEG channels - the s c r o l l e d s ection = the top 7 l i n e s - the unscrolled section = the bottom 3 l i n e s - Timed tags truncated to 32 characters - D i g i t a l d i s p l a y of data from up to four non-EEG channels u. EEG POWER SPECTRA; X* HZ, Y= HPS: MIN non£E<3 # 1 • nonEEG • 3 1 nonEEG # 2 • nonEEG # 4 » 19: 35 13:59 13:59 19: 0 IS? 10 15 20 25 30 Figure 18: MOMA Display Number 4 (D4) - 20 l i n e s of DSA for one EEG channel - the s c r o l l e d s e ction = the top 15 l i n e s - the unscrolled section = the bottom 5 l i n e s - Timed tags truncated to 32 characters - D i g i t a l d i splay of data from up to four non-EEG channels Figure 19: MOMA Display Number 5 (D5) - Plot vs time of data from up to four non-EEG data channels - Presentation of the l a s t 79 samples TIME PLOTS OP NON-EEG DPTB 3 • 800 b » 200 nonEEG # 1 = 3 * 700 b • 100 nonEEG # 2 • 3 « 600 b • 0 nonEEG * 3 » - — — 3 • 500 b » -100 nonEEG • 4 = \ \ I \ k \ u\ b\ in b i _ x 16:59 TIME (hr:mn) Figure 20: MOMA Display Number 6 (D6) - Plot vs time of data from up to four non-EEG data channels - Presentation of data from the s t a r t of the operation to present 61 a t t r a c t the user's a t t e n t i o n . The length of the required response i s also minimized, often e n t a i l i n g the typing of a si n g l e key. In addition to minimizing the amount of required i n t e r a c t i o n , im-portance has been placed on s i m p l i c i t y of use of MOMA's opt i o n a l features. F i r s t l y , commands are entered by typing a sing l e l a b e l l e d key. Secondly, the command keys are grouped according to t h e i r function so as to si m p l i f y the task of l o c a t i n g them. T h i r d l y , the user i s informed i f he attempts to use an i l l e g a l command or the unshifted version of a s h i f t e d key i n s t r u c t i o n . F i n a l l y , documentation about the features and operation of MOMA was written and w i l l accompany the system within the operating room (see appendix 3). In an attempt to increase the f a u l t tolerance of MOMA, several features were implemented. F i r s t l y , to generate some of the commands, two keys must be depressed simultaneously, thus reducing the l i k e l i h o o d of a c c i -dental entry of those i n s t r u c t i o n s . Secondly, requests f o r c e r t a i n i r r e v e r s -i b l e i n s t r u c t i o n s , such as termination or timed tags, are serviced only i f the user responds to a query with a "Y". T h i r d l y , i f for any reason the terminal f a i l s to respond properly during operation, i t i s possible to r e i n i t i a l i z e i t without stopping the program. F i n a l l y , i f the program stops during the operation, i t i s possible to r e s t a r t i t using the standard startup procedure. A l l data acquired p r i o r to termination remains i n t a c t and i s accessible a f t e r r e s t a r t . 4.11 The Command Structure MOMA commands can be entered using two methods, by typing a command s t r i n g or by using the preprogrammed command keys. As shown i n table 1, the command st r i n g s always s t a r t with the character "{" and are terminated with "RETURN". Any s t r i n g s t a r t i n g with the character "{" i s interpreted as a 62 Table 1: Moma Command Summary KEY COMMAND KEY STRING FUNCTION SCROLLING: "FOR" {S. Set s c r o l l i n g d i r e c t i o n to forward "BACK" {so Set s c r o l l i n g d i r e c t i o n to backward KEYPAD 1-9 {SI to {S9 S c r o l l d i splay N. records "PRESENT" {SP Return display to present time TIMED TAGGING ALPHANUMERIC Timed tag entry "RETURN" End of timed tag "RUBOUT" Delete l a s t character typed CNTL/U Delete p a r t i a l l y entered timed tag "GET LINE" Reactivate l a s t timed tag typed "ON QUERY" {Q Reactivate query generation on timed tag entry "OFF QUERY" {N Deactivate query generation on timed tag entry DISPLAY CHANGE: "Dl" to "D4" {1 to {4 Change to EEG display "D5" to "D6" {5 to {6 Change to non-EEG display SPECIAL FUNCTIONS: "INIT" {I R e i n i t i a l i z e terminal "STOP" {F Stop MOMA programs "SAVE" {T Transfer EEG record from s c r o l l e d to unscrolled section {E Generates the message "use SHIFTED VERSION of that key". Programmed into the unshifted version of the s h i f t e d s p e c i a l function keys (D1-D6 , INIT,STOP,SAVE). 63 command. If an i l l e g a l command i s entered, the user i s informed and no action i s taken. 4.12 The Keyboard Configuration As shown on figu r e 21, a l l s p e c i a l function keys are l a b e l l e d . In the keypad and timed tagging sections, these l a b e l s are written on top of the keys. In the display and s p e c i a l function section, keyboard overlays which are placed onto the keyboard are provided. I f the overlay l a b e l i s above the key, the s h i f t key must be held down while that key i s pressed. I f the overlay l a b e l i s below the key, the s h i f t key i s not held down. The terminal i s i n i t i a l i z e d when the system i s started. During t h i s procedure, the i n t e r n a l modes of the terminal are set, the s p e c i a l function keys are programmed, and the character font used f o r the DSA displays i s i n i t i a l i z e d . If these settings are altered during the operation the terminal can be r e i n i t i a l i z e d using the "INIT" i n s t r u c t i o n . Displays are NOT erased during t h i s procedure. The s c r o l l i n g featuresuses the keypad portion of the keyboard. Through t h i s pad the user can change the d i r e c t i o n of s c r o l l i n g by typing the "FOR" or the "BACK" key. The s c r o l l e d section of the DSA displays can be s c r o l l e d backward of forward one to nine records using the keypad numeric keys. The d i g i t a l non-EEG display and the timed tags are also a l t e r e d and automatic update i s disabled during t h i s process. When the "PRESENT" key i s typed, the display i s returned to real-time, automatic display update i s r e -enabled, and the s c r o l l i n g d i r e c t i o n i s set to "BACK". Any attempt to s c r o l l into the future or to before the s t a r t of the operation and the redundant typing or "PRESENT" i s ignored. 64 w \ \ w \ \ . \ \ w w { D1 D2 D3 D4 | / / TeJctrtmcr \ \ / \ w / DISPLAY CHANGE AND SPECIAL FUNCTION AV-I UNUSED | LAST [ LINE CTRL rn RUB OUT RETU5N 7 8 9 4 5 6 1 2 3 BACK FOR TIMED TAGGING SCROLLING Figure 21: MOMA's keyboard configuration. 65 The keys which generate the dis p l a y change i n s t r u c t i o n s are labeled " D l " and "D6" on the keyboard overlays. In order to provide a quick reference for the displays associated with these keys, a b r i e f display summary was attached to the front of the terminal (see fi g u r e 22). See figures 15 to 20 fo r photographs of the dis p l a y s . As described i n section 4.5.3 the "SAVE" key i s used to copy a DSA record and timed tag from the top of the s c r o l l e d section of the DSA display tb the top of the unscrolled section of the DSA d i s p l a y . The saved record i s not disturbed by subsequent display change or manipulation. Automatic loading and manipulation of the unscrolled section of the DSA dis p l a y i s possib l e . For t h i s prototype, however, the only way to a l t e r the contents of the unscrolled section i s through the use of the "SAVE" key. The MOMA programs are terminated using the "STOP" key. When t h i s request i s sent, the user i s asked to confirm that the request i s v a l i d before termination i s c a r r i e d out. The wr i t i n g of a period onto the terminal's screen indicates that the termination process i s complete. At t h i s point, RT-11's KMON program i s running and standard RT-11 i n s t r u c t i o n s can be entered. Timed tags are entered through the alphanumeric portion of the key-board by typing an appropriate comment followed by "RETURN". The only r e -s t r i c t i o n s on the form of these comments i s that they cannot s t a r t with the character "{" (MOMA command character) and cannot contain the character "'" (terminal's command character). Entered timed tags are truncated to 32 characters on entry. A f t e r a timed tag i s entered, the program rewrites i t onto the monitor s c r o l l and asks.: the user to accept or r e j e c t i t . I f de-s i r e d , the user can suppress t h i s query by pressing the key l a b e l l e d "OFF QUERY". Timed tags are then stored immediately on the typing of "RETURN". Query r e a c t i v a t i o n was performed by pressing the "ON QUERY" key. Three tag MOMA Displays 3 D l D2 D3 D4 D5 D6 LL L2 T79 start EEG E E G Time Plot Time Plot A guide for the MOMA dis p l a y s . This guide was fastened to the front of the terminal beside the screen. 67 manipulation i n s t r u c t i o n s were implemented. F i r s t l y , the "RUBOUT" key deletes the l a s t character typed, thus permitting the correction of typing e r r o r s . Secondly, the entry of CTRL/U deletes the currently a c t i v e ( p a r t i a l l y completed) timed tag. F i n a l l y , the "LAST LINE" key reactivates the l a s t timed tag entered. The TAB, ERASE, BACKSPACE, and LINEFEED keys were not used i n MOMA. In order to prevent v i s u a l confusion, these keys were f i t t e d with blank key-caps. The accidental typing of these keys has no e f f e c t on MOMA. 68 5. SYSTEM PERFORMANCE 5.1 System Assessment 5.1.1 Rationale For the purpose of assessing the p o t e n t i a l usefulness of MOMA i n the operating room, a demonstration of the system's features was arranged for anesthetists p r a c t i c i n g at VGH. There were a number of reasons for choosing t h i s form of assessment. F i r s t l y , i f MOMA i s to be e f f e c t i v e l y used, the anesthetists should be f a m i l i a r with i t s c h a r a c t e r i s t i c s and the use of i t s features p r i o r to entry to the operating room. I t was f e l t that the most e f f i c i e n t means for the anesthetist to gain t h i s f a m i l i a r i t y was through a system demonstration. Secondly, using t h i s format, the anesthetists w i l l be able to concentrate s o l e l y on assessing the device. T h i r d l y , since the ob-j e c t i v e of the work done for t h i s thesis was to produce a device from which an intraoperative monitor could be developed, i t was thought that the p o t e n t i a l usefulness of the features, rather than the c l i n i c a l effectiveness of the prototype should be assessed. One a l t e r n a t i v e to an assessment by demonstration would be to assess the system within the operating room. Much of the information required for an o v e r a l l assessment of MOMA's present c l i n i c a l usefulness can only be ob-tained through i t s use i n the operating room. However, the time required to perform a proper assessment inv o l v i n g a number of anesthetists each using the device during a number of s u r g i c a l procedures i s beyond the scope of t h i s work. I f an abbreviated intraoperative assessment were used (involving one anesthetist and a few operations), the r e s u l t s might be biased by factors such as i n i t i a l u n f a m i l i a r i t y with the system or inappropriate packaging features,,in the prototype. These l i m i t a t i o n s , combined with a desire to obtain the opinions of a number of anesthetists suggested that c l i n i c a l 69 assessment by demonstration rather than t r i a l s would be more appropriate for t h i s work. 5.1.2 Procedure Nine days p r i o r to the demonstration, ten anesthetists at the Vancouver General H o s p i t a l were given a summary of the system's features, a user's guide describing those features i n greater d e t a i l and providing i n s t r u c t i o n s f o r operation of the system, and a copy of a structured questionnaire. (See appendix 3 for the summary and the users guide and appendix 4 for the questionnaire^.) An introductory l e t t e r informed them that the purpose of t h i s demonstration was threefold; to f a m i l i a r i z e them with the features of the currently a v a i l a b l e system, to assess the p o t e n t i a l use-fulness of these features, and to gather ideas about the future d i r e c t i o n of th i s project. Five of these anesthetists p a r t i c i p a t e d i n the assessment. During the demonstration, the author demonstrated and described the system's c h a r a c t e r i s t i c s . Four channel EEG recordings from the previous EEGAL project were played back using a Hewlett Packard 3960 instrumentation recorder and were acquired, stored, and displayed by MOMA. An Anatek DC power supply was used to simulate non-EEG data. The format of the demonstration was i n t e n t i o n a l l y informal, the anesthetists were urged to ask questions and were given the opportunity to use the system. F i n a l l y , each anesthetist was asked to complete the structured questionnaire and to return i t to the Bio-medical Engineering Department at the Vancouver General Hospital v i a the h o s p i t a l mail system. A photograph of the hardware used for t h i s demonstra-t i o n can be found i n figure 23. The structured questionnaire used i n the demonstration was divided into four sections. The f i r s t section was for biographical data, the second Figure 23: The Hardware used for the system assessment. 71 section contained questions intended to e l i c i t ideas for the future d i r e c -t i o n of the project and i s discussed i n chapter 6, the t h i r d section contained questions for the assessment of MOMA, and the fourth section provided space for general comments. In order to prevent e x i s t i n g technical d i f f i c u l t i e s from b i a s i n g the anesthetists' r a t i n g of the r e l a t i v e importance of various parameters, they were asked to disregard d i f f i c u l t i e s i n obtaining signals appropriate for computer a c q u i s i t i o n . In addition, they were asked to i n -dicate when an answer applied only to a s p e c i f i c procedure or procedures. 5.3.3 Results The r e s u l t s of the assessment of MOMA's features (question 3.1) are tabulated i n table 2. Considering the d i s s i m i l a r i t y of MOMA with currently used monitors the r e s u l t s of t h i s assessment were favorable. The multiple display and the time p l o t features obtained the highest r a t i n g (4.6/5 and 4.4/5 respectively) and s i m p l i c i t y of operation received the lowest r a t i n g (3.0/5). The low r a t i n g of s i m p l i c i t y of operation was la r g e l y due to the response of two of the anesthetists (A and C). However, these same anes-t h e t i s t s suggested that a f t e r a period of f a m i l i a r i z a t i o n , the information and trends obtained from MOMA should more than compensate for the time required to operate i t . The o v e r a l l assessment for MOMA was 4.2/5. There was some h e s i t a t i o n on the part of the anesthetists i n an-swering questions 3.3 to 3.5. They f e l t that more precise answers could only be given to these questions a f t e r a comprehensive device assessment. With t h i s p r o v i s i o n , a l l anesthetists f e l t that the combination of the s c r o l l i n g feature and the two section display would be s u f f i c i e n t for performing the comparisons necessary for using the EEG as a monitoring parameter i n the opera-t i n g room. Also, with one exception, no ambiguities or unexplained char-a c t e r i s t i c s were found i n the documentation by the anesthetists. This ambigu-i t y was c l a r i f i e d during the demonstration. The suggestions for possible 72 Table 2: System Assessment r e s u l t s QUESTION: Give your i n i t i a l impression of the p o t e n t i a l usefulness of the following features of MOMA: RESULT: 0 = do not know 1 = poor 5 = excellent CATEGORY ANESTHETIST AVERAGE A B C D E M u l t i p l e d i s p l a y 5 5 5 4 4 4.6 S c r o l l i n g of EEG displays 3 5 3 4 4 3.8 Two section EEG displays 3 5 3 4 3 3.8 Time plots 5 5 5 4 3 4.4 Timed tagging 3 5 3 4 3 3.8 S i m p l i c i t y of operation 2 0 2 4 4 3.0 Keyboard configuration 4 0 4 4 4 4.0 Documentation 4 3 4 4 4 3.8 Overal l assessment 4 5 4 4 4 4.2 modification (question 3.5) are l i s t e d l a t e r i n this section. Question 3.6 asked the anesthetists i f they f e l t that MOMA would take a disproportionate amount of t h e i r time away from more e s s e n t i a l tasks. One r a t e r suggested that i t would not, two raters suggested that a f t e r be-coming f a m i l i a r with the features and c a p a b i l i t i e s of the system, the extra information and trends obtained would more than j u s t i f y the time required to operate i t , one rater suggested that under normal conditions i t would not but that i n a c r i s i s s i t u a t i o n i t might, and the l a s t ratt*r suggested that the system would be most appropriate for operations where two people are , involved i n patient maintenance. However, i t was also the opinion of a l l the raters that MOMA showed the p o t e n t i a l of being a use f u l addition to the 73 operating room as a multiparameter monitor. A general comment expressed by a l l the r a t i n g anesthetists was that assessment of the c l i n i c a l effectiveness of MOMA could only be determined through i t s use i n the operating room. Each anesthetist expressed an i n t e r e s t i n p a r t i c i p a t i n g i n such c l i n i c a l t r i a l s . In addition, the following general comments were given: 1) The computational c a p a b i l i t i e s of the computer could be used for the determination of various derived parameters. 2) The i n c l u s i o n of non-EEG parameters and the multiple display feature should s i g n i f i c a n t l y enhance the usefulness of MOMA, both i n s i d e and outside the operating room. 3) One EEG channel i s s u f f i c i e n t f o r monitoring during open heart surgery and two channels are s u f f i c i e n t during c a r o t i d endarter-ectomies. 4) Frequencies from 16 to 32 Hz are not needed. 5) The extraction and enhancement of c l i n i c a l l y s i g n i f i c a n t information from the EEG power spectra might make the EEG easier to use i n the operating room. 6) A des c r i p t i o n of c l i n i c a l l y s i g n i f i c a n t changes i n the EEG would be h e l p f u l f o r i n i t i a l t r a i n i n g purposes. 7) Timed tags might be put on the non-EEG displays. 8) The EEG might be deemphasized i n displays incorporating both EEG and non-EEG parameters. 5.2 Software Assessment 5.2.1 Procedure An engineer employed at V.G.H. and experienced i n both FORTRAN and RT-11 was asked to assess MOMA's software. As an introduction to the features and 74 the intent of MOMA he was given the MOMA user's guide and the MOMA summary (see appendix 3). He was then given a s i m i l a r system demonstration to the one given to the anesthetists. F i n a l l y , he was asked to overview the pro-grams and rela t e d documentation and to complete a structured questionnaire (see appendix 4). Due to the s i z e of the programs and the l i m i t e d amount of time that he could be expected to donate, only the general f l e x i b i l i t y and q u a l i t y of the programs and documentation were assessed. 5.2.2 Results The assessor f e l t that h i s assessment could most appropriately be made i n a written manner and that he was unprepared to answer the questions i n section two of the MOMA software general assessment form (appendix 4). He did however, answer yes to a l l the questions i n section one and expressed the opinion that the software would be us e f u l f or the development of an e f f e c t i v e patient monitoring system. The assessor's impression of u s e a b i l i t y of the o v e r a l l system was favorable. He f e l t that i t would be easy to use and that i t s features were to a large extent s e l f explanatory. He found the users guide "readable, c l e a r and concise" and f e l t that i t was written i n a form that should be understandable by a non-technical person. Four suggestions for possible expansions and modifications of the system were made. 1) The user should not need to press "SHIFT" to change a display. 2) The c a p a b i l i t y of removing a timed tag and/or saved record from the display should be implemented. 3) A record keeping system should be implemented which allows the user to enter long comments before, during, and a f t e r the operation. 4) A real-time display of raw EEG should be av a i l a b l e since an EEG machine w i l l l i k e l y not be present i n future systems. 75 He i n d i c a t e d that on ly the fou r th sugges t ion would r e q u i r e major software r e v i s i o n s . The software and r e l a t e d documentation was assessed as be ing of h i g h q u a l i t y . The so f tware ' s m o d u l a r i t y and s t r u c t u r e , the f a c t tha t i t i s w r i t t e n e n t i r e l y i n a h i g h l e v e l language, and the l a r g e number of comments w i t h i n the programs were a l l mentioned as be ing s t rong p o i n t s . The e x i s t i n g documentation was a l s o found to be u s e f u l , e s p e c i a l l y the c ross re ference t ab l e s and the r o u t i n e i n t e r c o n n e c t i o n diagrams. I t was suggested, however, that h i g h e r l e v e l documentation a l s o be p r o v i d e d . More s p e c i f i c a l l y , the f o l l o w i n g suggest ions were made. 1) A d e s c r i p t i o n and/or t ab l e i n d i c a t i n g which r o u t i n e s a f f e c t g iven common b l o c k parameters should be p r o v i d e d . 2) A more complete d i s c u s s i o n of the use of v a r i o u s program f l a g s should be p r o v i d e d . 3) A more complete d e s c r i p t i o n of the l i n k i n g between the foreground j o b , the background j o b , the use r , the ope ra t i ng system, and the hardware should be p r o v i d e d . 4) A c ross re fe rence l i s t o f the SYSLIB procedures c a l l e d by v a r i o u s r o u t i n e s should be p r o v i d e d . 5) A d i s c u s s i o n of i n t e r t a s k communication and r o u t i n e c a l l i n g con-ven t ions should be p r o v i d e d . 6) Diagrams of the data s t r u c t u r e s should be p r o v i d e d . H i s c l o s i n g remarks were "My c r i t i c i s m s of the documentation are not major and should not be a l lowed to overshadow the o v e r a l l q u a l i t y of the system. In summary, MOMA appears to be a good b a s i s fo r an e l abora te p a t i e n t mon i to r -i n g and i n f o r m a t i o n r e t r i e v a l system o f r e a l use to p h y s i c i a n s i n the ope ra t i ng theatre . ' . ' . 76 5.3 Testing for E l e c t r i c a l Safety Both the..terminal and the computer have been c e r t i f i e d f o r e l e c -t r i c a l safety by the Canadian Standards Association (CSA) as data processing equipment (CSA standard C22.2 No. 154-1975). In order to insure compliance with the CSA requirements for electromedical equipment (CSA standard C22.2 No. 125-1979), the grounding and r i s k current l e v e l s of MOMA were tested. The r e s u l t s of these tests can be found i n table 3. Also, i n addition to ex i s t i n g markings, MOMA must be p l a i n l y marked i n a permanent manner with the following information. 1) Danger-Explosion Hazard. Do not use i n the presence of flammable anesthetics.. 2) Conforms to r i s k class 1 requirements 3) Caution: Total system chassis r i s k current should not exceed 500 uA. Table 3: Moma Safety Test Results CATEGORY RISK CLASS 1 CSA REQUIREMENT MEASURED VALUE GROUNDING RESISTANCE (gnd pin to chassis) .1 ohm .07 computer pin .12 computer pin .06 terminal p i n to computer to terminal to terminal chassis chassis chassis RISK CURRENT (grounded and off) (, on; (ungrounded and off) on; ( " rev pol and off) ( " " " " on) 10 microamp I I I I 500 I I I I I I I I I I ti 0 microamp 0 16 400 22 390 11 TOTAL CURRENT CONSUMPTION 6.6 amps 77 In i t s present form, MOMA has no patient applied parts, thus i t i s c l a s s i f i e d as a r i s k class 1 device. Since the grounding resistance from the computer power cord's ground pin to the terminal's chassis s l i g h t l y exceeded the s p e c i f i e d l i m i t a t i o n , i t was recommended that an e l e c t r i c a l connection be made between the terminal's chassis to the computer's chassis when the system i s repackaged. This discrepancy was not considered to be a serious one so no immediate action was required. In addition, i t was recognized that the backpanel connections should be better organized and that protection from s p i l l a g e should be included. F i n a l l y , when EEG ampli f i e r s are included on the MOMA package, the e n t i r e package w i l l be r e c l a s s i f i e d as a r i s k class 2 device (noninvasive patient applied p a r t ) . Since MOMA does not meet the r i s k current requirements f o r t h i s new class (100 microamperes) an i s o l a t i o n trans-former w i l l have to be included at that time. The current required by the computer/terminal combination i s spec i -f i e d at about 10 amperes. This current was measured and found to be 6.6 amperes. Since the c i r c u i t breakers i n VGH operating rooms are rated at at least 15 amperes, the device by i t s e l f poses no e l e c t r i c a l overload problems. However, care w i l l have to be taken to insure that t h i s device i s not con-nected i n p a r a l l e l with other high current devices. 78 6. CONCLUSIONS AND FUTURE DIRECTIONS 6.1 Conclusions The current state of patient monitoring i n the operating room was discussed and i t was suggested that an improvement i n the q u a l i t y of anesthetic p r a c t i c e would r e s u l t from the s i m p l i f i c a t i o n of the use of monitoring para-meters and equipment. I t was also suggested that these improvements w i l l not nec e s s a r i l y be achieved by the simple addition of information to the operating room, rather, i t i s the o v e r a l l presentation of information which must be im-proved. In a discussion of the p o t e n t i a l of computer control of the patient, i t was concluded that present day computers lack appropriate data a c q u i s i t i o n a b i l i t i e s and are unable to properly adapt to unexpected s i t u a t i o n s . Thus, computers can be best applied to aiding, rather than supplanting, the an^tj e s t h e t i s t . This thesis investigates the a p p l i c a t i o n of the data a c q u i s i t i o n , processing, storage, and display c a p a b i l i t i e s of e x i s t i n g computer hardware to s u r g i c a l patient monitoring. As a r e s u l t of this work, the following a p p l i c a t i o n areas of computer systems have been i d e n t i f i e d : 1) The data a c q u i s i t i o n and display c a p a b i l i t i e s of an appropriately designed computer-based monitoring system may be used i n perioperative patient monitoring to: a) Display a number of parameters on a s i n g l e display medium. b) Emphasize parameters i n a way that eases data i n t e r p r e t a t i o n . c) Provide a number of predefined displays accessible through a si n g l e display medium so that the display which best s u i t s a given user and/or a given s i t u a t i o n can be chosen. 79 The s i g n a l processing c a p a b i l i t i e s of an appropriately designed computer-based monitoring system may be used i n perioperative patient monitoring to: a) Relieve the anesthetist of some of the comparison and c o r r e l a t i o n tasks required f o r data i n t e r p r e t a t i o n . b) Provide a r t e f a c t detection and r e j e c t i o n schemes. c) Preprocess c e r t a i n parameters so as to make them more p r a c t i c a l f o r the real-time assessment of a s u r g i c a l patient's state. d) Provide a warning system which would warn the anesthetist about possible dangerous s i t u a t i o n s . The information storage c a p a b i l i t y of an appropriately designed computer-based monitoring system may be used i n perioperative patient monitoring to: a) Acquire information without d i s p l a y i n g i t , thus allowing the anesthetist to change the subset of relevant information used for patient state assessment at any time during the operation by simply changing the display. b) Permit the design of displays i n which trends i n parameters are re a d i l y apparent. c) Relieve the anesthetist of some of his record keeping duties and, i n the process, produce a de t a i l e d and objective record of the operation. d) Create h o s p i t a l records of consistent l e g i b i l i t y , completeness, and format. e) Permit the anesthetist rapid access to large volumes of relevant preoperative information without the addi t i o n of extra books and paper records. 80 The following design considerations should contribute to the acceptance of computer-based monitors i n the operating room: 1) An e f f o r t must be made to i d e n t i f y and compensate for possible sources of a r t e f a c t s . 2) Considering the possible danger r e s u l t i n g from the anesthetist being temporarily unable to assess the patient's state, the device must be extremely r e l i a b l e . 3) For obvious reasons, the monitor should pose l i t t l e threat to e i t h e r the patient's or the user's safety i n the event of a system breakdown or improper use. 4) Use of the system should not require computer expertise and/or typing s k i l l s . 5) System setup and operating procedures should require a minimum amount of time and t e c h n i c a l expertise. 6) I f p o s s i b l e , a l l components of the system l i k e l y to be used during the operation should reside i n the operating room, i e . , no external e l e c t r i c a l connections. 7) The system should be reasonably compact, noise free, and moveable. 8) Compatibility with presently used devices and l i k e l y future develop-ments i n other devices must be considered. 9) F l e x i b l e prototype systems should be b u i l t and c l i n i c a l l y assessed so as to incorporate the opinions of experts i n many f i e l d s i n the f i n a l design. To keep up with technological advances, t h i s design and assessment cycle should continue i n d e f i n i t e l y . With the above p o t e n t i a l s and design considerations i n mind, a s u r g i c a l patient monitor prototyping system was developed. General purpose hardware was purchased and programs were developed f o r v i s u a l e d i t i n g , com-puter graphics, data a c q u i s i t i o n , data storage, user i n t e r a c t i o n , and 81 prototype t e s t i n g and c a l i b r a t i o n . The o v e r a l l design d i r e c t i o n was towards maximized f l e x i b i l i t y and programs were heavily documented. An i n i t i a l prototype monitor was developed f o r c l i n i c a l assessment. Although t h i s prototype concentrated on the introduction of the EEG into the operating room, the system has the c a p a b i l i t y of simultaneously acquiring, processing and di s p l a y i n g non-EEG parameters. A l l of the a p p l i c a t i o n areas mentioned above except for record keeping and access to preoperative i n f o r -mation were included on this system and space f o r the e x p l o i t a t i o n of these remaining two applications was l e f t . The general f l e x i b i l i t y and q u a l i t y of the programs and rela t e d documentation was assessed by a software engineer employed at VGH and experienced i n FORTRAN and RT-11. I t was h i s impression that the software written for t h i s thesis was of high q u a l i t y and f l e x i b i l i t y . The i n i t i a l prototype system was assessed by a panel of f i v e anesthetists p r a c t i c i n g at VGH. Each anesthetist was asked to complete a structured questionnaire a f t e r reading a user's guide and a f t e r having the features of the system demonstrated by the author. The r e s u l t s of t h i s assessment were quite favorable and each anesthetist expressed an in t e r e s t i n being involved i n future c l i n i c a l a p p l i c a t i o n of the device. In conclusion, no d e f i n i t i v e statement can be made about the success or f a i l u r e of computer systems as patient monitors thus f a r . However, the system developed w i l l be u s e f u l for the exploration of th i s p o t e n t i a l . Through a process of continued prototype development with i n t e r -spersed c l i n i c a l assessment, i t i s ant i c i p a t e d that an e f f e c t i v e computer-based patient monitoring system w i l l be developed. 82 6.2 Comparison with Previous Systems In chapter 3, some problems of previously a v a i l a b l e systems^were presented. By taking advantage of progress i n computer technology, i t was possible to implement features on th i s system which previously were not f e a s i b l e . In systems where the computer was located outside the operating room, (eg. 20) the d i r e c t i o n for development has been to increase the number of patients simultaneously monitored. For reasons described i n chapter 2, i t may be d i f f i c u l t to achieve the l e v e l of r e l i a b i l i t y , f a u l t tolerance, and ;;usability required for an intraoperative patient monitor using t h i s approach. In addition, the r e s u l t i n g system w i l l not be mobile. The d i r e c -t i o n f o r development chosen for the MOMA project was to produce a s i n g l e -patient mobile monitoring system which can be located e n t i r e l y within the operating room. The computer used for MOMA has considerably more computational power and data storage c a p a b i l i t y than previous systems which resided within the operating room. Consequently, the number and s o p h i s t i c a t i o n of the features implemented on MOMA i s l a r g e r . For example, the La J o l l a multiparameter patient monitor (45 pp. 34-36) monitored one EEG channel and outputted the data from that channel onto a thermal p r i n t e r i n a f i x e d format. MOMA, on the other hand, monitors 4 EEG channels and display the data from these channels i n a v a r i e t y of formats. In previously a v a i l a b l e systems, the format for information presentation must be selected p r i o r to entry to the operating room and can- ' not be changed while i n the operating room. MOMA, on the other hand, allows the user to change between a number of predefined displays. I t has been suggested e a r l i e r i n t h i s thesis that t h i s feature w i l l give the user the 83 luxury of s e l e c t i n g a display which he fe e l s i s most appropriate for a given s i t u a t i o n and of suppressing the display of information not important at a given time. The use of the EEG as a monitoring parameter has, i n the past, been l i m i t e d by d i f f i c u l t i e s i n performing the long term trending necessary for patient state assessment. Two features of MOMA should help a l l e v i a t e t h i s problem. F i r s t l y , i t i s possible to r e c a l l any previously displayed EEG display. This feature, c a l l e d s c r o l l i n g , allows the user to scan through a l l EEG information acquired e a r l i e r i n the operation. While the a b i l i t y to access previously acquired EEG records has appeared i n e a r l i e r systems, the user has generally been l i m i t e d to fi x e d time jumps. Secondly, the d i s -play for each EEG channel i s s p l i t i nto two sections, a s c r o l l e d section and an unscrolled section. The information i n one section i s independent of the information i n the other section. By "saving" given EEG records i n the un-s c r o l l e d section and moving the s c r o l l e d section to a d i f f e r e n t point i n time, i t i s possible to perform d i r e c t comparisons between EEG records separated by long time periods. No other system could be found which used a two section display for EEG presentation. Timed tagging f a c i l i t i e s s i m i l a r to the one implemented on MOMA have been incorporated on previous patient monitors (eg. 46). However, the computers used for these other systems were located outside the operating room. Due to hardware r e s t r i c t i o n s and/or by choice, an emphasis has been placed on the reduction of program s i z e i n previous systems. Consequently, programming has been done i n assembler language and small a p p l i c a t i o n - s p e c i f i c program-control executives have been used. However, t h i s approach complicates the task of programming and generally produces a less f l e x i b l e , l e s s readable, 84 and l e s s portable program. For MOMA, i t was decided that program f l e x i b i l i t y and r e a d a b i l i t y should not he compromised for the sake of program s i z e , so a r e l a t i v e l y high l e v e l programming language (FORTRAN) and a frequently used r e l a t i v e l y sophisticated operating system (RT-11) were used. 6.3 D i r e c t i o n for Future Work 6.3.1 Hardware Modifications A number of use f u l hardware additions and a l t e r a t i o n s have been i d e n t i f i e d . The following paragraphs describe these p o t e n t i a l improvements. I t was found that the amount of random access memory presently i n the computer (64 kilobytes) placed unnecessary r e s t r i c t i o n s on the MOMA programs. Using an overlay scheme, i t was possible to leave parts of the program on disk but t h i s noticeably slowed down the system and resulted i n the generation of noise from the disk. An LSI-11/23 system upgrade k i t has been purchased to overcome t h i s problem. This k i t w i l l double the amount of memory and w i l l increase the processing speed of the system. It i s the opinion of h o s p i t a l personnel and the author that some form of hard copy output i s required i f a monitor such as MOMA i s to see routine use i n the operating room. By p e r i o d i c a l l y outputting various parameters during the operation the anesthetist would have a backup source of data i n the event of a system f a i l u r e . In order to minimize the amount of paper generated by the system wi t h i n the operating room and to minimize the time required to in t e r p r e t the hard copy record, t h i s record should only produce a b r i e f summary of c e r t a i n parameters and should probably not serve as a record of the operation. Thermal, e l e c t r o s t a t i c , and ink j e t p r i n t e r are most appropriate for t h i s purpose because they operate q u i e t l y . The task of generating a d e t a i l e d summary of the operation i s most appropriately 85 handled outside of the operating room. Using t h i s approach, the p r i n t e r would not need to be housed on MOMA's mobile cart and could, i n f a c t , be shared by a number of computers. Size and noise considerations are not as c r i t i c a l and, since the p r i n t e r would serve a number of computers, a more expensive and powerful unit could be j u s t i f i e d . In the e x i s t i n g system, a separate EEG machine must be used to acquire, amplify, and f i l t e r the EEG si g n a l s . In order to maximize mobil i t y , minimize s i z e , s i m p l i f y setup procedures, and minimize the l i k e l i h o o d of fa u l t y connection and/or accidental disconnection, appropriate EEG a c q u i s i -t i o n hardware should be incorporated into the MOMA package. Towards t h i s end, Grass model P511-J EEG a m p l i f i e r s / f i l t e r s have been purchased to replace the EEG machine. I t has been the experience of h o s p i t a l personnel that these units are safe and r e l i a b l e . A color d isplay medium would be use f u l for the development of ae s t h e t i c a l l y pleasing displays with quickly and e a s i l y i d e n t i f i e d features. A Tektronix 4027 color graphics terminal would provide a color d isplay c a p a b i l i t y and i s compatible with e x i s t i n g programs. Through the process of continued device assessment and redesign, various other s p e c i a l purpose devices may be added to MOMA. For example, devices such as p l a s t i c card readers, w r i t i n g pads, or s p e c i a l function keyboards may be incorporated i n the system to simp l i f y the entry of data. F i l t e r s , preprocessing u n i t s , and data a c q u i s i t i o n hardware may be added to allow the system to reject a r t e f a c t , to r e l i e v e the c e n t r a l computer of some of i t s processing tasks, and to gather more data. 86 6.3.2 Recommendations for Immediate Action A f t e r the processor upgrade k i t and the EEG amplifiers described i n section 6.3.1 are acquired, the enti r e system should be repackaged. When t h i s i s done, things l i k e s p i l l a g e protection, large wheels, workspace and drawers, holders for miscellaneous equipment (eg. floppy disks or documenta-t i o n ) , standardized connection panels with noninterchangeable connectors, expandability for future modifications, improved aesthetic appeal, access-a b i l i t y and u s a b i l i t y of control switches, reduced s i z e , increased m o b i l i t y , and greater d u r a b i l i t y should be considered. In addition, an I s o l a t i o n Trans-former should be included so as to comply with the r i s k current regulations for a class 2 device. When the repackaging i s completed, a series of c l i n i c a l t r i a l s should be performed so as to determine o v e r a l l c l i n i c a l usefulness and to obtain more de t a i l e d ideas from the anesthetists about u s e f u l changes and additions. A t e c h n i c a l observer f a m i l i a r with the features, use, and setup of MOMA should be included i n these t r i a l s . This observer w i l l serve to record the features and displays most frequently used, to record the comments and d i f f i c u l t i e s which the anesthetists encounter, and w i l l be able to aid i n the so l u t i o n of any problems which i n t e r f e r e with the anesthetist's a b i l i t y to treat the patient. Also, with a minor software a l t e r a t i o n , the computer can record the frequency and time of entry of any of MOMA's commands. 6.3.3 Directions for Future Development The design of safer, more e f f e c t i v e , and/or more e a s i l y applied s i g n a l transducers should ease the task of system setup and increase the effectiveness of computer-based monitors. These transducers may make i t possible to acquire a number of signals from a sing l e transducer (eg. 64) and quantize signals previously i n a c c e s s i b l e to the computer (eg. 65). There 87 has been i n t e r e s t expressed at Vancouver General Hospital i n the development of an e a s i l y applied EEG electrode headset. Since the a p p l i c a t i o n of EEG electrodes i s often i n the c r i t i c a l path of pr e s u r g i c a l events, a development such as th i s should reduce the delay time between operations and/or reduce the number of support personnel required i n and around the operating rooms. In addition to becoming a more e f f e c t i v e patient monitoring system with the addition of better transducers, MOMA may be found u s e f u l for assessing trans-ducers under development. As a r e s u l t of meetings with h o s p i t a l personnel, four application, areas were i d e n t i f i e d . Two of these areas (open heart surgery and ca r o t i d endarterectomies) involve the use of the system by anesthetists within the operating room. The other two areas (monitoring during advanced brain r e s u s c i t a t i o n and monitoring of head i n j u r y patients) involve the use of the system by diagnostic neurophysiologists, neurosurgeons, and/or nurses outside of the operating room. Research projects using MOMA could be b u i l t around any of these a p p l i c a t i o n areas. There are, i n f a c t , plans to s t a r t a two year research project to i d e n t i f y the c l i n i c a l l y valuable v a r i a bles that might lead to improvement of the q u a l i t y of cardiac surgery. The second part of the questionnaire used for the MOMA system assessment contained questions intended to e l i c i t ideas for the future d i r e c -t i o n of the MOMA project. The purpose of question 2.1 was to determine the parameters considered to be important for patient monitoring. As indicated i n table 4, parameters r e l a t e d to the cardiovascular system were considered to be most important, followedvby the re s p i r a t o r y system and the renal system. Since heart rate and rhythm are monitored using the ECG, they were combined int o one category. The EEG was considered to be more important during c a r o t i d endarterectomies than during open heart surgery. Since EEG i s not r o u t i n e l y 88 Table 4: The Relative Importance of Monitoring Parameters (as determined i n question 2.1 of the assessment questionnaire) QUESTION: L i s t , i n order of importance, s i x parameters which you f e e l are e s s e n t i a l for patient monitoring during open heart surgery and c a r o t i d endarterectomies (two l i s t s ) . RESULT: A RATINGS FOR OPEN HEART SURGERY ( l i s t e d i n order of rated importance) PARAMETER ANESTHETIST A B C D E Blood Pressures 2,4,6 2,4,5 2,4,6, 1,4,5 1,4 ECG 1 1 1 2 Heart rate and Rhythm 2 V e n t i l a t i o n 3 3 Urine Output 5 5 3 5 Laboratory Analysis Data 7,8 3 7,8 3 EEG 8 6 8 8 Temperature 7 8 RESULT: B RATINGS FOR CAROTID ENDARTERECTOMIES ( l i s t e d i n order of rated importance) PARAMETER ANESTHETIST A B C D r E Blood Pressures 2,6 3 2,6 1,5 i F ECG ~| 1 2 1 2 — [Heart rate and Rhythm] 2,5 V e n t i l a t i o n 3 3 Urine Output 4 4 4 Laboratory Analysis Data 4 EEG 5 1 5 3 3 Temperature 4 89 monitored during open heart surgery at VGH, the frequency with which i t was l i s t e d i n t h i s question may be p a r t i a l l y due to i t s presence on MOMA. The anesthetists were asked to l i s t parameters for which they f e l t trend informa-t i o n was not adequately presented. They were also asked to make a l i s t of parameters that would be more us e f u l i f recorded more frequently. A summary of these l i s t s can be found i n table 5. The r e p l i e s to the above questions indicated that the unallocated A/D channels i n MOMA should be allo c a t e d p r i m a r i l y to the a c q u i s i t i o n of data re l a t e d to the cardiovascular system. In a d d i t i o n to various blood pressures, i t was suggested that the detection and presentation of ischemic trends i n the ECG warrants i n v e s t i g a t i o n . Provided that an appropriate transducer could be designed, the a c q u i s i t i o n of the urine output rate was also suggested as being p o t e n t i a l l y u s e f u l . Considerable i n t e r e s t was expressed i n the use of MOMA's computational capa-b i l i t i e s f o r the determination of various derived parameters, such as those used for haemodynamic tracking. The computer i n t h i s case would automatically acquire the parameters which can be sampled and prompt the user for others which are required. Although s i m i l a r systems for the i n t e r a c t i v e computation of derived parameters have been developed (eg. 66,67), the superior computa-t i o n a l and graphical c a p a b i l i t i e s of MOMA should permit the implementation of a more powerful f a c i l i t y . As the intended uses' of MOMA become more p r e c i s e l y defined, appropriate sampling and processing schemes can be inserted (eg. 68). Warning systems and a r t e f a c t detection and r e j e c t i o n systems have not yet been implemented with MOMA. As described i n chapter 2, the i n c l u s i o n of these systems on a computer-based monitor may improve the q u a l i t y of health care by speeding the detection of, and perhaps even p r e d i c t i n g the occurrence of dangerous s i t u a t i o n s . 90 Table 5: Suggested Improvements i n the Handling of Parameters (A) QUESTION: L i s t any parameters with which you f e e l that trend information i s not adequately presented using e x i s t i n g instrumentation. RESULTS: Cardiovascular parameters RAP LAP PCWP ECG Derived parameters Vascular resistance Cardiac output Cardiac index Haemodynamic tracking Laboratory derived parameters Pa02 PaC02 PH EEG IMPROVEMENTS BY MORE REQUENT SAMPLING (B) QUESTION: RESULTS: L i s t any parameters which you f e e l would be more useful e i t h e r during or a f t e r an operation i f they were recorded more frequently. Cardiovascular parameters Derived parameters Renal parameters Laboratory derived parameters MAP PCWP Cardiac output Cardiac index Haemodynamic tracking Rate pressure product (HR*SAP) T r i p l e index (HR*SAP*PCWP) Urine output rate Sv02 EEG 91 The timed tagging f a c i l i t y allows the user to enter comments during the operation v i a the keyboard. However, since typing these comments w i l l unnecessarily take attention away from the patient, this feature w i l l probably meet with l i m i t e d acceptance i n i t s present form. In addition, paper records must s t i l l be maintained i n order to insure the existence of a record of the operation i n the event of a system f a i l u r e . Thus, timed tagging constitutes a du p l i c a t i o n of record keeping duties. To use a computer as a v i a b l e intraoperative record keeping, device, some quick means of manually entering data to the computer other than typing i s required. Although t h i s may be achieved through the use of sp e c i a l function keyboards,(eg. 20) such a scheme l i m i t s the user to a f i x e d number of predefined comments. A possible a l t e r n a t i v e i s the entry of comments through a wr i t i n g tablet which i s i n t e r -faced with the computer. The record of the operation would then be a combina-t i o n of the record on the t a b l e t and the record on the computer. No duplic a -t i o n of e f f o r t by the anesthetist would be required. As described i n chapter 2, access to relevant preoperative informa-t i o n stored i n the computer may serve as a use f u l supplement to the anesthe-t i s t ' s memory. The graphics terminal used for MOMA (Tektronix 4025) i s p a r t i c u l a r l y w e l l suited to t h i s a p p l i c a t i o n . Its s p l i t screen feature and form f i l l o u t mode could be used to produce a standardized and simple format for data entry. These same features along with the character enhancement feature allows f o r the development of highly readable display formats. Imple-menting a preoperative information c a p a b i l i t y on MOMA i s l a r g e l y a software task. A support program w i l l have to be written to permit convenient data entry and record modification. Program modules w i l l have to be added to the background task of MOMA to read and display various subsets of t h i s informa-t i o n . The advantages of computer-based preoperative records have been 92 discussed elsewhere(19). The a p p l i c a t i o n s of MOMA i n the h o s p i t a l extend f a r beyond these areas of immediate i n t e r e s t . The patient monitoring c a p a b i l i t i e s of MOMA could be used i n many areas, from diagnostic neurophysiology (eg. 69,70) to the d e l i v e r y room (eg. 71). In addi t i o n , the a b i l i t y to sample, process, store, and grap h i c a l l y display a v a r i e t y of information can be used i n areas such as teaching (eg. 72) and text processing. The number and d i v e r s i t y of these applications are l i m i t e d only by the imagination of the user. 6.3.4 S p e c i f i c Modifications L i s t e d below are a number of changes i n MOMA's displays which might enhance t h e i r usefulness: 1) The s c r o l l e d section of the EEG displays might be separated from the unscrolled section by a d i v i d i n g l i n e to improve upon the c l a r i t y of presentation. 2) The u n s c r o l l i n g section of the EEG displays might be automatically loaded with s e l e c t EEG records. 3) The a b i l i t y to change the s i z e of the s c r o l l e d and unscrolled sections may be desired. 4) The a b i l i t y to s c r o l l the unscrolled section and/or freeze the s c r o l l e d section may be desired. 5) Displays might be produced which p l o t the non-EEG data beside the EEG data i n the space presently occupied by the timed tags. 6) Control over the time increment between the records i n the s c r o l l e d section of EEG displays may be desired. 7) Control over which EEG channels are displayed may be desired by the system user. 93 8) A display may be produced which incorporates both type 1 (EEG) and type 2 (time p l o t t i n g ) formats. 9) Control over the number of channels pl o t t e d i n the time plots may 'be desired. 10) Control over which channels are p l o t t e d i n the time p l o t s may be desired. 11) The a b i l i t y to i n t e r a c t i v e l y a l t e r the display l a b e l s f o r the non-EEG data might be desirable. 12) An i n d i c a t i o n of when the display i s i n a s c r o l l e d state might be desira b l e . 13) A logarithmic time scale on the non-EEG plo t s might be u s e f u l . The d e s i r a b i l i t y of these a l t e r a t i o n s w i l l be determined through consultation with c l i n i c i a n s and device assessment. I t i s s i g n i f i c a n t to note that suggestions 3, 4, 6, 7, 9, and 10 can be implemented by a l t e r i n g a sin g l e program parameter. Given the present hardware configuration and data, a number of ad d i t i o n a l features may be b e n e f i c i a l l y added. A "pause" key, which tem-p o r a r i l y suspends a l l samples and processing, may be desired. Keys to jump backward or forward a large number of records (greater than 9) or to jump to s p e c i f i c points i n the operation may be desired. Keys which r e p e t i t i v e l y increment or decrement a display may be desired. As before, i n c l u s i o n of these changes w i l l depend on the r e s u l t s of c l i n i c a l assessment. The above suggestions f a r from exhaust the changes that might be made. 6.4 Device Maintenance The need f or safety and r e l i a b i l i t y of equipment used i n h o s p i t a l s has been mentioned a number of times already. I f these needs are to be s a t i s f i e d , ..any complicated device should p e r i o d i c a l l y undergo a routine 94 inspection. The r i s k current and grounding current of electromedical equip-ment at VGH i s routinely tested and device control records are maintained. In addition to these procedures, the following procedures should be periodr-i c a l l y performed on MOMA. 1) The A/D converter should be c a l i b r a t e d and tested (see ADCAL). 2) A l l wires and connectors should be checked to ensure proper condition and connection. 3) System diagnostics should be run so as to check various components of the computer. 4) The diskettes should be checked for bad blocks using the RT-11 DIR command and v i s u a l l y inspected f o r signs of unusual wear. 5) The a i r f i l t e r s of the disk drive should be cleaned. 6 ) Backup copies of a l l important information stored on disk should frequently be made. I t i s preferable that these copies be stored i n a d i f f e r e n t l o c a t i o n than the o r i g i n a l s . 95 APPENDIX 1: THE DISK CONFIGURATION The disk system used i n MOMA (RX02) accepts two 512512-byte floppy disks. As the system i s presently configured, i t w i l l bootstrap off of the l e f t hand disk drive (drive 0) immediately upon powerup or upon, r e s t a r t . The program used within the operating room uses both disk d r i v e s . The disk inserted i n drive 0 w i l l be c a l l e d the master disk and the disk drive 1 w i l l be c a l l e d the slave disk. Al.1 Master Disk Formatting The master disk i s used to supply the programs to the computer. Since i t i s the disk which i s used for bootstrapping, i t must contain a copy of the operating system (RT-11V03-B Foreground-Background), the boot-strap procedure, and any system u t i l i t y programs which may be used while the system i s running. In addition to the above programs, i t w i l l also contain separately executable versions of the MOMA programs. A t y p i c a l d i r e c t o r y l i s t i n g f o r a MOMA master disk can be found at the end of t h i s appendix. A1.2 Slave Disk Formatting The slave disk i s used for the storage of data acquired during the operation. The f i l e s on the disk must be i n i t i a l i z e d p r i o r to entry by; the program DY1INI. No other f i l e s but the ones i n i t i a l i z e d by DY1INI need to be, or should be, on t h i s disk. For the storage format used, data i s separated into a number of predefined f i l e s . There i s a separate f i l e for each EEG channel's power spectra and a f i f t h f i l e for the non-EEG data and the MOMA cycle time. The 96 The time required to store and/or read EEG data could be reduced by placing a l l the EEG data i n a sing l e f i l e . However, th i s a l t e r n a t i v e format was rejected because i t complicates the task of adding or subtracting EEG channels, thus l i m i t i n g system f l e x i b i l i t y . Al.2.1 Data Storage Requirements For the purpose of maintaining a record of the operation and permitting the r e c a l l of t h i s record during the operation, data i s stored on every MOMA cycle on a 512512-byte floppy disk. The computed power spectra of four channels of EEG are stored along with raw data from the four remain-ing channels of the A/D converter and the time of the cycle. A d d i t i o n a l l y , a status f i l e i s updated on each cycle so that c r i t i c a l program parameters are not l o s t i n the event of a power down. Since the storage of 4 channels of raw EEG data sampled at 64 Hz would use up the disk's storage capacity i n less than 17 minutes (512 bytes per second), such storage i s c l e a r l y not f e a s i b l e . Instead, each EEG channel i s all o c a t e d 230 blocks (117,760 bytes) of disk storage. Since 128 bytes per channel are stored each cycle (32 four-byte r e a l numbers), there i s a maximum of 920 cycles. Using a cycle period of 30 seconds, each disk has enough storage capacity for 460 minutes, or 7 hours and 40 minutes. An a l l o c a t i o n of 29 blocks for the storage of non-EEG data and cycle times i s s u f f i c i e n t to match the above time r e s t r i c t i o n . To summarize, the EEG data consumes 920 blocks (4 * 230), the non-EEG data and cycle times consume 29 blocks, and the c r i t i c a l program parameters consume one block. Since each disk has a maximum capacity of 974 blocks, there remain 24 blocks a v a i l a b l e for other uses. Al.2.2 Timed Tagging Storage Requirements The timed tagging f a c i l i t y consists of two f i l e s . The f i r s t f i l e 97 contains a l i s t of the cycle numbers associated with the stored tags and i s one block long. The second f i l e contains the timed tags truncated to 32 characters and i s 16 blocks long. Thus there remain seven unallocated data disk blocks. This arrangement allows f o r the entry of up to 255 timed tags. A1.3 Proposed Use of Free Blocks The free blocks on the master disk may be used for more support and program development programs, an expanded help f a c i l i t y , or anything else that may be useful i n s i d e or outside the operating room. I t i s possible to use these blocks f o r data storage. If t h i s were done, however, the record of the operation would no longer be on one disk. The remaining unused seven blocks on the data disk may be used for the storage of preoperative information relevant to the operation, e.g. patient h i s t o r y , unusual pathologies, premedications, etc.. A display i n -corporating such information would serve to reduce the number of paper records i n the operating room and enable the Anesthetist to access more information about the patient without increasing the number of paper records. This f a c i l i t y has not as yet been implemented. Table A l . l : Moma Slave Disk Configuration 98 FILE # BLOCKS PURPOSE STATUS.DAT 1 Saves c r i t i c a l program parameters every MOMA cycle i n case of power f a i l u r e . SLOCHN.DAT 29 Saves 4 channels of slowly sampled data and the time of a c q u i s i t i o n every MOMA cycle. P0WER1.DAT P0WER2.DAT P0WER3.DAT P0WER4.DAT 230 230 230 230 Each power f i l e saves the computed power s p e c t r a l estimate (32 two-word r e a l numbers corresponding to frequencies from 0 to 31 Hz) from one channel every MOMA cycle. TAGSNC DAT 1 Contains a l i s t of cycle numbers which are asso^-.i.c .. elated with timed tags previously entered. TAGDAT.DAT 18 Contains- the 32 character timed tags. RECORD.DAT 7 Proposed f i l e f o r a preoperative patient summary. Note 1: 256 16-bit words per block Note 2: 974 blocks per disk using the double-density (RX02) format. NoteJ3.: Standard IBM compatible single-sided s o f t - s e c t o r a l d i s k e t t e s . 99 APPENDIX 2: PROGRAM DOCUMENTATION A2.1 General Text E d i t i n g (TECHLP), - . This document gives a general overview of the tools used f or e d i t i n g i n t h i s system. The ed i t o r used i s TECO, supplied i n the system d i s t r i -bution software f or RT-11V03-B. This e d i t o r can also be obtained from the DECUS program l i b r a r y . TECO documentation can be found i n RT-11 SOFTWARE PRODUCTS MANUAL #2. DISTRIBUTED FILES Also d i s t r i b u t e d with TECO are a number of *.TEC f i l e s . These f i l e s are TECO macro routines again w r i t t e n by DECUS members. View README.TXT f o r general information about TECO re l a t e d f i l e s and documentation f or the follow-ing modules, README.TXT,TEADME.TXT, TECO.OBJ, TIO.MAC, LOCAL.TEC, SORT.TEC, INSERT.TEC, EDIT.TEC, VT52.TEC, VEG.TEC. Note that f o r a PDP-11 - TEKTRONIX 4025 combination, INSERT.TEC and VT52.TEC w i l l not function due to cursor c o n t r o l problems. For INSERT.TEC to work, the "W command must be adapted to t h i s terminal. For VT52.TEC to work, TECO's cursor c o n t r o l characters used i n the -1"W command must be adapted to t h i s terminal. I t i s suggested that you use the VIS*.TEC e d i t i n g package f o r v i s u a l e d i t i n g . This package takes advantage of both the b u i l t i n v i s u a l e d i t i n g c a p a b i l i t y of the 4025 and the general e d i t i n g c a p a b i l i t y of TECO. See the next section f o r a" more complete d e s c r i p t i o n . LOCALLY WRITTEN MACROS An attempt to write a f u l l v i s u a l e d i t o r f o r the Tektronix 4025 using TECO i n s t r u c t i o n s was made (TXVIS). The r e s u l t i n g routine was found to be too slow and prone to e r r o r . However, some of the routines, e s p e c i a l l y the subroutines, may be u s e f u l . See the f i l e TXVIS.TXT for a l i s t i n g . 100 A second attempt at a TECO-based pseudovisual e d i t o r was made. (TX4025.*). Instead of" f u l l visual editing, this macro performed specific single key instructions and typed out the result. Although TX4025.* works at a usable rate, i t i s prone to user error. This package i s comprised of three programs: 3) TX4025.KEY Key programming Both TYVIS.-* and TX4025.* are l o o s e l y r e l a t e d to INSERT.TEC. As was mentioned e a r l i e r , the VIS*.TEC programs make up a v i s u a l e d i t i n g package which i n t e r f a c e s the v i s u a l e d i t i n g c a p a b i l i t i e s of the 4025 terminal with TECO. VISXXX.DOC gives a d e t a i l e d d e s c r i p t i o n of these programs and t h e i r use. In the authors opinion, t h i s package i s the most u s e f u l of the packages mentioned i n t h i s section. COMMAND CHARACTERS The terminal's command character f o r the majority of the programs i n t h i s system i s backquote (96). In many of the e d i t i n g macros, the command character must be backquote f o r them to work. Consequently, unless there i s a s p e c i f i c reason, the command character should be backquote while working with t h i s system. EDITING FILE SUMMARY 1) TX4025.TEC Running version 2) TX4025.TXT Documented version F i l e Function TECHLP.DOC t h i s f i l e README.TXT •documentation of the following f i l e s TECO.SAV -runable copy of RT-11 TECO 101 F i l e F u n c t i o n TECO.OBJ TIO.MAC LOCAL.TEC - c e n t r a l module of TECO f o r version 28 -source of RT-11 I/O i n t e r f a c e f o r TECO -macro to renumber l o c a l symbol blocks i n MACRO programs -macro f o r general purpose memory resident s o r t i n g -macro f o r v i s u a l e d i t i n g with VT-11 terminals -VT-11 s t a r t up macro -macro f o r v i s u a l e d i t i n g with VT-52 terminals -VT-52 s t a r t up macro -documentation f o r the following f i l e s -running v e r s i o n of a pseudovisual e d i t o r f o r the Tektronix 4025 graphics terminal -Key reprogramming i n s t r u c t i o n s used by TX4025 -commented version of TX4025 -documentation f o r the fo l l o w i n g f i l e s -package a c q u i s i t i o n macro on TECO entry -performs functions u s e f u l when e x i t i n g TECO -running v e r s i o n of an i n t e r f a c e between TECO and the Tektronix 4025 graphics terminal -communications command character changing macro -prompt character changing macro -code f o r an abandoned v i s u a l e d itor f o r the 4025 -Key programming part of the system s t a r t up routine *Note: For v i s u a l e d i t i n g i t i s suggested that the VIS*.TEC package be used. SORT.TEC INSERT.TEC EDIT.TEC VT52.TEC VEG.TEC TX4025.DOC TX4025.TEC TX4025.KEY TX4025.TXT VISXX.DOC . VISSTA.TEC VISFIN.TEC VISMAC.TEC VISCND.TEC VISPRO.TEC TECVIS.TXT KEYPGM.TXT 102 A2.2 V i s u a l E d i t i n g TEKTRONIX 4025-TECO EDITING INTERFACE DOCUMENTATION DESCRIPTION These TECO macros are designed to i n t e r f a c e the e d i t i n g c a p a b i l i t i e s of the 4025 graphics terminal to TECO. The necessary package a c q u i s i t i o n and execution i n s t r u c t i o n s are summarized l a t e r i n t h i s document. VISMAC VISMAC.TEC i s the main e d i t i n g i n t e r f a c e macro. I t s purpose i s to read a s p e c i f i e d p o r t i o n of TECO's text b u f f e r to the workspace region of the terminal and then to wait for edited text to be sent back. E d i t i n g i s performed independent of the computer using the terminal's text e d i t i n g c a p a b i l i t i e s . The macro i s entered using the i n s t r u c t i o n nMq$$ where n i s some number and q i s the name of the Q r e g i s t e r which contains VISMAC (usually r e g i s t e r M). When t h i s i n s t r u c t i o n i s entered, n l i n e s each side of the current b u f f e r pointer are typed i n t o the workspace. These l i n e s are also saved i n Q r e g i s t e r 1 and deleted from the TECO's text b u f f e r . A d d i t i o n a l l y , the b u f f e r i s searched f o r the existance of the communications command and prompt characters and the macro w i l l not be entered i f they are found. The function of these characters i s explained more f u l l y l a t e r i n t h i s document. F i n a l l y , the "ERASE", communications command character, and prompt character keys are programmed to n u l l and the "PT", "RUBOUT", "SEND", and "SHIFT/ INSERT MODE" keys are programmed to perform t h e i r intended functions. Although the user can s p e c i f y the argument n to be any integer number, VISMAC w i l l bound i t between 0 and 20. 103 The "SEND" key w i l l cause the contents of the workspace to be sent to the computer. VISMAC w i l l echo the characters as they are received and i n s e r t them i n TECO's text b u f f e r . The w r i t i n g of "~E" i n t o the work-space i n d i c a t e s that the i n s e r t i o n process has been completed. The "PT" key w i l l cause the old window to be read from Q r e g i s t e r 1 back i n t o the text b u f f e r . Thus i t i s always possible to restore the b u f f e r to i t s o r i g i n a l status. This key a c t u a l l y sends the "CTRL/C" character. In the process of terminating VISMAC with e i t h e r of the above two i n s t r u c t i o n s , a l l of VISMAC's s p e c i a l function keys except PT are set to t h e i r d e f a u l t values. The system w i l l be returned to the standard TECO e d i t i n g mode and the user w i l l be prompted with a i n the terminal's monitor s c r o l l when i n s t r u c t i o n s can be entered. At t h i s point, the text b u f f e r pointer w i l l be located at the end of the edited window. The character s t r i n g "10L15MM$$" i s programmed i n t o the "PT" key, on VISMAC e x i t . Consequently, the next time t h i s key i s typed, the text b u f f e r pointer w i l l be moved 10 l i n e s down and VISMAC w i l l be re-entered. Thus the "PT" key can be used to both enter and e x i t VISMAC and w i l l be u s e f u l f o r "paging" through long text f i l e s . The "SHIFT/INSERT MODE" key can be used while e d i t i n g to replace the contents of the workspace with the contents of Q r e g i s t e r 1. Thus i t i s p ossible to return the workspace to i t s status on VISMAC entry. This key a c t u a l l y sends the "CTRL/R" character. A number of things must be avoided i f the e d i t o r i s to f u n c t i o n properly. F i r s t l y , during VISMAC entry and e x i t , characters must NOT be typed. Secondly, while i n the v i s u a l e d i t o r , the user should only type i n t o the terminal's workspace region, i . e . , the only allowable i n t e r a c t i o n with 104 the computer i s the three s p e c i a l function keys described above. T h i r d l y , the communications command character and the prompt character must not be inserted i n t o the workspace. Fourthly, due to the f i n i t e memory capacity of the terminal, no more than about 40 l i n e s of text should be sent from (or read into) the workspace s c r o l l at one time. The following types of text w i l l be automatically a l t e r e d by using the "SEND" key to terminate VISMAC. Control characters w i l l be converted to t h e i r caret-character equivalents. Tab characters w i l l be converted to a s e r i e s of spaces. Form feeds w i l l be converted to t h e i r c a r r i a g e - r e t u r n / l i n e - f e e d equivalents. Long l i n e s w i l l be shortened to 80 character seg-ments. F i n a l l y , blank l i n e s at the end of a window w i l l not be sent back to computer. VISCND AND COMMAND CHARACTERS Since the computer automatically echoes characters as they are sent and the terminal must be receptive to commands at the same time, the presenc of command, characters i n the text may produce undesireable r e s u l t s . As a s o l u t i o n to t h i s p o t e n t i a l problem, the normal, or i n t e r a c t i o n , command character i s temporarily changed by VISMAC p r i o r to any computer-terminal communication. The command character i s changed back when the communication i s complete. The new command character has been labeled the communication command character (C.C.C.). I t has been stated previously that VISMAC cannot be entered i f the C.C.C. i s present i n the text b u f f e r . However, through the use of the VISCND macro, i t i s pos s i b l e to change the C.C.C. to any ASCII character. This macro i s c a l l e d using the i n s t r u c t i o n nMq where n i s the ASCII decimal. Equivalent (ADE) of the new C.C.C. and q i s the Q r e g i s t e r containing VISCND (usually r e g i s t e r C). I f the new C.C.C. i s ; present i n the text b u f f e r , 105 the same as the i n t e r a c t i o n command character (backquote), the same as the prompt character, or i s a c o n t r o l character, a warning i s sent to the user and no act i o n i s taken. I f the above r e s t r i c t i o n s are s a t i s f i e d , the C.C.C. i s changed by d i r e c t l y a l t e r i n g the q r e g i s t e r containing VISMAC. The terminals command character w i l l be backquote before, during, and a f t e r c a l l i n g a window to the workspace. This character has been labeled the i n t e r a c t i o n command character i n t h i s text. The i n t e r a c t i o n command character must be backquote (shift/backslash) f o r VISMAC to fun c t i o n properly. VISPRO AND BUFFERED MODE In order to avoid TECO l i n e b u f f e r overflow, VISMAC puts the terminal i n the buffered mode p r i o r to computer-terminal communication. Consequently, as with the C.C.C, the presence of the prompt character i n a text window sent to VISMAC may cause problems. Using the VISPRO macro, i t i s possible to change the prompt character (P.C.) to any ASCII character. This macro i s c a l l e d using the i n s t r u c t i o n nMq where n i s the ADE f o r the new PC and q i s the Q r e g i s t e r containing VISPRO (usually r e g i s t e r P). The new PC cannot be; present i n the tes t b u f f e r , the same as the i n t e r a c t i o n command character (backquote), the same as the C.C.C, or a c o n t r o l character. The P.C. i s changed by d i r e c t l y a l t e r i n g the q r e g i s t e r containing VISMAC. VISSTA The VISSTA macro sets up TECO f o r the use of the VIS* e d i t i n g package. The following character s t r i n g w i l l enter TECO from RT-11 KMON and execute VISSTA. R TECO @ER%VISSTA.TEC%YHXSHKMS$$ 106 KEYPGM.TXT programs the F4 key with t h i s s t r i n g . When executed, VISSTA sets TECO f o r scope and lower case, loads QF with VISFIN, loads QK with KEYPGM.TXT, loads QM with VISMAC, loads QC with VISCND, loads QP with VISPRO, and programs the "PT" with "10L15MM$$". VISFIN The VISFIN macro performs functions that are u s e f u l when e x i t i n g from TECO. Assuming the VISFIN has been loaded into QF, the fo l l o w i n g character s t r i n g w i l l execute VISFIN and e x i t from TECO. MF"C$$ KEYPGM.TXT programs the S4 key (SHIFT/F4) with t h i s s t r i n g . When executed, the pad terminator w i l l be deprogrammed. C.C.C. AND P.C. IDENTIFICATION While i n TECO's normal e d i t i n g mode, the ADE of the current C.C.C. can be found i n Q r e g i s t e r C(num) using the i n s t r u c t i o n QC$$. On entry to VISMAC, a message i s typed i n t o the terminal's monitor s c r o l l which i d e n t i f i e s both the C.C.C. and the P.C.. Note that a 30 l i n e workspace s c r o l l w i l l leave the user with plenty of e d i t i n g area and w i l l a l s o leave room f o r the d i s p l a y of t h i s message. COMMAND LOCKOUT When the terminal i s put int o command lockout, a command character w i l l be in t e r p r e t e d as a standard character. VISCND and VISPRO w i l l f u n ction properly i n t h i s mode. However, i t i s not possible to enter or e x i t VISMAC while i n t h i s mode. Procedures f o r recovering from attempted entry or e x i t of VISMAC while i n command lockout w i l l be presented l a t e r i n t h i s text. 107 ERROR RECOVERY PROCEDURES STANDARD VISMAC CRASH RECOVERY TOOLS TECO WHILE STILL IN VISMAC ~C ~E<RETURN> "C"C Attempts to s i m u l a t e the PT t e r m i n a t i o n of VISMAC, Terminates VISMAC cha rac t e r i n s e r t i o n ( e . g . a t end of send) . Hard macro (or TECO) e x i t . (use w i t h c a u t i o n ) AFTER GETTING OUT OF VISMAC ~G~G$$ Gl$$ :GK$$ De le t e s l a s t TECO i n s t r u c t i o n c h a r a c t e r s t r i n g . I n s e r t s the contents o f Q r e g i s t e r 1 i n t o TECO t e x t b u f f e r . Types contents of Q r e g i s t e r K to t e r m i n a l . (Q r e g i s t e r K can be loaded w i t h system s t a r t up) (Key programming f i l e KEYPGM.TXT on TECO en t ry ) TERMINAL (do not a f f e c t TECO) SHIFT/STATUS-COMMAND LOCKOUT I d e n t i f i e s command c h a r a c t e r . 'SYS<RETURN> 'BUF N<RETURN> *M0N H K<RETURN> !COM 1<RETURN> SHIFT/LEARN-NUMERIC LOCK MASTER RESET (on s i d e o f t e r m i n a l ) Types t e r m i n a l s t a t u s message. Removes t e r m i n a l from b u f f e r e d mode. • D i r e c t s keyboard (K) and computer (H) to m o n i t o r . Changes command c h a r a c t e r from ! t o ' . L o c a l l y reprograms k e y s . Resets a l l t e r m i n a l modes, C l e a r s a l l t e r m i n a l memory, C l e a r s a l l key programmings. SOLUTIONS TO SPECIFIC VISMAC PROBLEMS PROBLEM SYMPTOM SOLUTION ATTEMPTED VISMAC ENTRY WHILE IN COMMAND LOCKOUT OR WHILE COMMAND CHARACTER IS NOT BACKQUOTE ATTEMPTED VISMAC SEND WHILE IN COMMAND LOCKOUT OR WHILE COMMAND CHARACTER IS NOT BACKQUOTE TYPING ON VISMAC ENTRY TYPING ON VISMAC SEND SENT TEXT WINDOW TOO LARGE Text window and terminal programming commands a l l typed into the monitor s c r o l l prompt characters and typed characters w r i t t e n below text window i n workspace prompt characters and typed characters w r i t t e n below text window i n workspace characters typed before TECO prompt character "*" characters are not echoes normally send key was typed 1) type "*E<RETURN>" 2) type "-G"G$$ 3) type "Gl$$" 4) r e c t i f y problem 5) check text b u f f e r f o r erroneous i n s e r t i o n s 1) check the command character 2) move cursor to monitor 3) type ,"SE<RETURN>" 4) type "~G~G$$" 5) type "Gl$$" 6) check text b u f f e r f o r erroneous i n s e r t i o n s 1) check the command character 2) move cursor to monitor 3) type ,I/VE<RETURN>" 4) type "-G'G$$" 5) type "Gl$$" 6) check text b u f f e r f o r erroneous i n s e r t i o n s 1) type ""G~G$$" 2) check text b u f f e r f o r erroneous i n s e r t i o n s 1) wait u n t i l a large number of garbage characters are typed i n t o the workspace 2) press the MASTER RESET button 3) type ""E<RETURN>" 4) type ""G~G$$" 5) type ":GK$$" (assuming KEYPGM.TXT has been loaded i n t o Q r e g i s t e r K) 6) check text to see what was l o s t Note: the old window i s s t i l l • i . i n Q r e g i s t e r 1. VISXXX EDITING PROGRAMS VISSTA.TEC = package a c q u i s i t i o n routine found i n Q r e g i s t e r S c a l l with MS 109 VISFIN.TEC = TECO e x i t routine found i n r e g i s t e r F a f t e r VISSTA execution c a l l with MF KEYPGM.TXT = standard system s t a r t up key programming f i l e found i n Q r e g i s t e r K a f t e r VISSTA execution type out with :GK VISMAC.TEC = Main i n t e r f a c e program found i n Q r e g i s t e r M a f t e r VISSTA execution c a l l with nMM n = number of l i n e s each side of the b u f f e r pointer VISCND.TEC = Changes VISMAC's communication command character found i n Q r e g i s t e r C a f t e r VISSTA execution c a l l with nMC n = ASCII decimal equivalent of new C.C.C. VISPRO.TEC = Changes VISMAC1s prompt character found i n Q r e g i s t e r P a f t e r VISSTA execution c a l l with nMP n = ASCII decimal equivalent of new P.C. VISMAC SPECIAL FUNCTION KEYS SH/INSERT (S13) Replaces workspace's contents with the old window. SEND (F8) Replaces the old window with the workspace's contents and e x i t s VISMAC. PT Puts the old window back i n the text b u f f e r and e x i t s VISMAC. ERASE Disabled on VISMAC entry (re-enabled e x i t ) . RUBOUT Programmed for intended function. C.C.C. Key Disabled on VISMAC entry (re-enabled on e x i t ) . 110 P.C. Key Disabled on VISMAC entry (re-enabled on e x i t ) *Note: a l l other user i n t e r a c t i o n should be independent of the computer PT On macro e x i t the PT key i s programmed to generate 10L15MM$$. Consequently, t h i s key can be used to both enter the macro and e x i t the macro. This i s u s e f u l f o r scanning through a long text b u f f e r . TECO ENTRY AND EXIT ENTRY (programmed i n t o F4 by KEYPGM.TXT) R TECO @ER%VISSTA.TEC%YHXSHKMS$$ EXIT (programmed i n t o S4 by KEYPGM.TXT) MF~C$$ INITIAL PARAMETER SETTINGS I n t e r a c t i o n command character = backquote (96) cannot be changed Communication command character = v e r t i c a l bar (124) A l t e r a b l e with VISCND to any noncontrol character Prompt = backslash (92) A l t e r a b l e with VISPRO to any noncontrol character *Note 1): the above three must always be d i f f e r e n t *Note 2): t h i s s t r i n g i s u s u a l l y stored i n a Q r e g i s t e r f o r easy package a c q u i s i t i o n , i . e . ; Q r e g i s t e r S *Note 3): ASCII equiv. of C.C.C. found i n QC (num) *Note 4): ASCII equiv. of prompt found i n QP (num) I l l Q REGISTER USAGE VISSTA stored i n QS(text) by the F4 key QF(text) = storage f o r VISFIN QK(text) = storage f o r KEYPGM.TXT QM(text) = storage f o r VISMAC QC(text) = storage f o r VISCND QP(text) = storage f o r VISPRO QC(num) = storage f o r the C.C.C. QP(num) = storage f o r the P.C. VISFIN stored i n QF(text) by VISSTA VISMAC stored i n QM(text) by VISSTA Ql(text) = old window storage QL(text) = temporary bu f f e r save QL(num) = temporary bu f f e r pointer save QV(num) = number of l i n e s each side of pointer i n window QW(num) = top of window l o c a t i o n QX(num) = bottom of window l o c a t i o n VISCND stored i n QC(text) by VISSTA QC(num) = ADE of current communication command character QD(num) = input b u f f e r f o r new C.C.C. QL(num) = text b u f f e r pointer storage QL(text) = text b u f f e r storage VISPRO stored i n QP(text) by VISSTA QL(text) = text b u f f e r storage QL(num) = text b u f f e r pointer storage QP(num) = ADE of current prompt QQ(num) = input b u f f e r f o r new prompt 112 *Note 1 ) : t e x t r e g i s t e r s C. M , and P must remain i n t a c t w h i l e i n TECO *Note 2 ) : Ql(num) i s u s e f u l i n the event o f VISMAC c ra sh *Note 3 ) : p r e v i o u s contents are des t royed on Q r e g i s t e r use 113 A2.3 Documentation Directory ODOCTYP F i l e s copied: DKIDOCHLP.TXT to TTJ MOMA PROGRAM DOCUMENTATION DESCRIPTION The f o l l o w i n g is a de s c r i p t i o n of the f i l e s written For documenting the MOMA programs. RT-11 FILE PURPOSE COM*.TXT SRT*.TXT FOR*•TXT BAK*.TXT GPH*.TXT describes MOMA command F i l e s describes MOMA startup F i l e s describes MOMA Foreground (data a c q u i s i t i o n ) describes MOMA bacKground (display) programs describes CPHLIB graphics pacKase programs •EXP.TXT *RTN.TXT *CMN.TXT *CAL.TXT *TST.TXT describes describes describes describes the the the the given pacKase describes the general approach For the given package routines oF a given package common blocks of a given package c a l l i n g and ca l l e d routines within a (not including SYSLIB c a l l s ) , t e s t i n g routines f o r a given package eg? FORCMN describes the common blocks of the MOMA foreground routines TECHLP.DOC describes *.TEC programs and documentation UISXXX.DOC describes MIS*.TEC v i s u a l e d i t i n g i n terface Routine connection diagrams were drawn from the information in *CAL.TXT (FORCAL, BAKCAL, GPHCAL). These diagrams were then used to portray the flow of program control in the MOMA Foreground and background programs. See FLOW.TXT For a de s c r i p t i o n oF these diagrams. 114 A2.4 Command F i l e s Documentation F i l e s copied: DK.-COMRTN.TXT to TT." COMMAND FILE DESCRIPTIONS COMPILING COMMAND FILES - a l l f i l e s are executed usins the i n s t r u c t i o n "@fi1ename<RETURN>". - a l l f i l e s are named *.COM unless otherwize s p e c i f i e d . - a l l f i l e s produce object modules on DYi: from source modules on the default disk. CPLGPH = Compiles a l l the sraphics routines in the GPHLIB.OBJ l i b r a r y . CPLMMB = Compiles a l l the routines used in DISPLA (the MOMA display and user i n t e r a c t i o n prosram). CPLMMD = Compiles a l l routines associated with the highly i n t e r a c t i v e bacKaround version of AQUIRE. CPLMMF = Compiles a l l routines associated with the foresround version of AQUIRE (the MDMA a c q u i s i t i o n * processing* and storase program). CPLMMG = Compiles a l l graphics routines used in the MOMA display and user i n t e r a c t i o n prosram DISPLA. The GPHLIB l i b r a r y could not be used in the lin K i n a process because the graphics routines appear in overlay regions. LINKING COMMAND FILES '- A l l f i l e s named LNKMP* are executed usins "@filename<RETURN>" . - A l l other f i l e s are executed usins "LINKOf i1ename<RETURN>". - f o r a li n k map typeout, use "LINK/MAP:TT:@Filemane<RETURN>". - f o r a li n k map f i l e > replace TT!•with the f i l e s p e c i f i c a t i o n . - A l l f i l e s are named *.COM unless otherwize s p e c i f i e d . - A l l f i l e s produce executable module(s) on DYi: from object module(s) on the default disk. ADCAL = Links the A/D c a l l i b r a t i o n routine. Produces DYIHADCAL.SAM. AQUIRE = Links the foresround version of AQUIRE (the MOMA a c q u i s i t i o n ! processins and storase prosram). Produces DYI!AQUIRE.REL. AQUSAM = Links the his h l y i n t e r a c t i v e background version of AQUIRE. Produces DYI .'AQUIRE.SAM. BAKSIM = Links the background simulation routine. Produces DYIIBAKSIM.SAM. DISPLA = Links DISPLA (the MOMA display and user i n t e r a c t i o n prosram). Produces DYIIDISPLA.SAM. DSKCHK = Links the slave disk checking routine. Produces DYI!DSKCHK.SAM. D Y 1 I N I = Links the slave disk i n i t i a l i z a t i o n routine. Produces D Y i r D Y l I N I . S A U . FORSIM = Links the foreground simulation routine. Produces DY1TFQRSIM.REL. LINKBQ = Alternate overlay scheme f o r DISPLA. Produces DISPLA.SAV. L N K B G 2 = Alternate overlay scheme f o r DISPLA. Produces DISPLA.SAV. LNKMPB = Separately l i n k s each routine r e l a t e d to DISPLA and types out the li n k maps on the terminal. A number of nonexecutable .SAV modules are produced on DYK. LNKMPD = Separately l i n k s each routine r e l a t e d to the hi s h l y i n t e r a c t i v e background version of AQUIRE and types out the l i n k maps on the terminal. A number of nonexecutable .SAV modules are produced on D Y 1 I . LNKMPF = Separately links each routine r e l a t e to the foreground version of AGUIRE and types out the link maps on the terminal, A number of nonexecutable .SAM modules are produced on D Y 1 I . LNKMPG = Separately l i n k s each routine in GPHLIB.OBJ. A number of nonexecutable .SAU modules are produced on D Y 1 I . OPTION = Links the MOMA startup routine OPTION. Produces OPTION.SAV. PAUSE = Links the MOMA startup routine PAUSE. Produces PAUSE.SAU. STARTUP COMMAND FILES - A l l f i l e s are executed using "@filename<RETURN>". - A l l f i l e s are named *.CCM unless otherwise s p e c i f i e d . - See "MOMA STARTUP ROUTINES DESCRIPTIONS" in SRTRTN.TXT f o r a des c r i p t i o n of f i l e s r elated to STRTRT and MOMSET. - Depending on the intended use of a given disk, STRTRT or MOMSET may be renamed to STARTF. If not. STARTF w i l l c a l l e ither STRTRT or MOMSET. STARTF = Standard system startup f i l e . STRTRT = Startup routine with no queries. Puts the system in a configuration which has been found useful f o r general RT-11 use and then goes d i r e c t l y to KMON. MOMSET = Startup routine with queries. Asks the user to check c e r t a i n things in order to insure proper startup and allows the user to choose between 6 startup routes. Five of these routes lead to the execution of MOMA rela t e d routines and the s i x t h goes d i r e c t l y to KMON. MOMSHT = Startup routine with no queries. Runs AQUIRE/DISPLA. See "MOMA STARTUP ROUTINES DESCRIPTIONS" in SRTRTN.TXT f o r a desc r i p t i o n of the following command f i l e s ? CHOOSE.COM , MGMABB.COM, M0MABG.COM, M 0 M A B T . C O M  M0MAFB.COM, M0MAFT.COM, M0MSET.COM, M 0 M S H T . C O M  NOM0MA.COM, STARTF.COM, STRTRT.COM. 1X0 A2.5 S ta r tup Rout ines Documentation F i l e s c o p i e d : DKISRTEXP.TXT t o TT: MOMA STARTUP GENERAL DESCRIPTION The command f i l e w hich i s a u t o m a t i c a l l y r u n whenever the system i s b o o t e d i s STARTF.COM. In i t s p r e s e n t f o r m , t h i s r o u t i n e s i m p l y c a l l s a n o t h e r command f i l e t o p e r f o r m the system i n i t i a l i z a t i o n p r o c e d u r e . U s i n s a two l e v e l a p p r o a c h such as t h i s , i t i s p o s s i b l e t o choose between a number of syst e m s t a r t u p p r o c e d u r e s w i t h minor a l t e r a t i o n s t o STARTF. STRTRT.COM i s t he s t a n d a r d RT-11 s t a r t u p f i l e . I t s e t s U P t h e system i n a c o n f i s u r a t i o n w h i c h has been found to be u s e f u l f o r g e n e r a l RT-11 useaae and soe s d i r e c t l y t o KMON. More s p e c i f i c a l l y , a number of RT-11 mode f l a g s a r e s e t , the t e r m i n a l ' s modes a r e i n i t i a l i z e d (TRMSET), the t e r m i n a l ' s keys a r e programmed (KEYPGM) and the date and tim e a r e r e a d from the TCU-50 ba,ttery o p e r a t e d c l o c k . no q u e r i e s o r messages a r e s e n t t o the t e r m i n a l d u r i n g t h i s p r o c e s s . The g e n e r a l MOMA s t a r t u p r o u t i n e i s M0MSET.COM. T h i s r o u t i n e s e t s a number of RT-11 mode f l a g s , t y p e s a message t o the t e r m i n a l <CMNDCK), and w a i t s f o r the u s e r t o r e s p o n d . The purpose of t h i s message i s t o ask t he u s e r t o i n s u r e t h a t t he command-lockout and the n u m e r i c - l o c k keys are o f f and the r e q u i r e d r e s p o n c e f r o m the u s e r i s "RETURN". A f t e r t he u s e r has r e s p o n d e d , modes of the t e r m i n a l a r e s e t (TRMSET) and the time and date a r e r e a d f r o m the - b a t t e r y o p e r a t e d c l o c k (SETDAT). F i n a l l y , a program w h i c h a l l o w s the u s e r t o choose between a number of MOMA s t a r t u p modes i s e n t e r e d (OPTION). The OPTION program a s k s the u s e r i f h e ( s h e ) wants t o view the a v a i l a b l e s t a r t u p o p t i o n s . I f he ( s h e ) does, the CH00SE.COM command f i l e i s e n t e r e d . I f n o t , i t i s assumed t h a t MOMA i s to be run i n the normal o p e r a t i n g room mode (AGUIRE/DISPLA) and M0MAFB.COM i s e n t e r e d . The CHOOSE package i s composed of a t e x t f i l e and a program. The t e x t f i l e (CHOOSE.TXT) d e s c r i b e s a number of s t a r t u p o p t i o n s a v a i l a b l e and t h e program (CHOOSE.MOM) a c c e p t s the u s e r s c h o i c e . There a r e p r e s e n t l y s i x s t a r t u p o p t i o n s a v a i l a b l e t h r o u g h CHOOSE. 1) AQUIRE a l o n e i n the background (M0MABB.COM). 2) FQRSIM i n f o r e g r o u n d , DISPLA i n background (M0MABT.COM). 3) DISPLA a l o n e i n the background (M0MABG.COM). 4) AQUIRE i n f o r e g r o u n d , BAKSIM i n background (M0MAFT.COM). 5) go d i r e c t l y t o RT-11's KMON. S) AQUIRE i n f o r e g r o u n d , DISPLA i n background (M0MAFB.COM). A l l the above s t a r t u p o p t i o n s f o l l o w a s t a n d a r d f o r m a t . A message (GREET) a s k i n g the u s e r t o i n s u r e t h a t a p p r o p r i a t e c o n n e c t i o n s have been made and t h a t t he d a t a ( s l a v e ) d i s k has been in ' s e r t e d i s t y p e d onto the t e r m i n a l . The p r o c e d u r e w a i t s a t t h i s p o i n t u n t i l the u s e r t y p e s "RETURN". Once the u s e r has r e s p o n d e d , the s l a v e d i s k i s checked (DSKCHK). I f i t i s empty, the i n i t i a l i z a t i o n program (DY1INI) i s e n t e r e d . I f n o t , no a c t i o n w i l l be t a k e n . At t h i s p o i n t , the r e q u e s t e d MOMA programs a r e r u n . A f t e r the MOMA programs-are t e r m i n a t e d , the t e r m i n a l ' s modes a r e r e s e t (TRMSET), the keyb o a r d i s programmed t o a c o n f i g u r a t i o n which has been f o u n d u s e f u l . f o r g e n e r a l RT-11 u s e , and the command f i l e i s e x i t e d . There a r e two d e v i a t i o n s f r o m t h i s f o r m a t . F i r s t l y , f o r o b v i o u s r e a s o n s , GREET i s not ty p e d out when N0MOMA.COM i s r u n . S e c o n d l y , i n r o u t i n e s i n v o l v i n g the use of the f o r e g r o u n d (MOMAFT, MOMAFB)* the u s e r i s asked t o ty p e a Key t o s t o p and u n l o a d the f o r e g r o u n d Job (FGOUT). ';*~ - s t ?.s n e c e s s a r y because no way c o u l d be found to t e r m i n a t e and u n l o a d the f o r e g r o u n d Job from a background command f i l e . 117 DK:SRTRTN.TXT t o TT: MOMA STARTUP ROUTINES DESCRIPTIONS COMMAND F I L E S ( f i l e names = *.COM u n l e s s s p e c i f i e d o t h e r w i s e ) CHOOSE = Types out CHOOSE.TXT and then r u n s CHOOSE.MOM. MOMABB = Runs AQUIRE.SAM. Note t h a t t h i s v e r s i o n of AQUIRE s h o u l d have been c o m p i l e d w i t h the /DEBUG o p t i o n and r e q u i r e s a c o n s i d e r a b l e amount of u s e r i n t e r a c t i o n . C a l l e d from MOMSET. MOMABG = Runs DISPLA w i t h o u t a f o r e s r o u n d J o b . U s e f u l f o r r e v i e w i n g o l d d a t a C a l l e d f r o m MOMSET. MOMABT = Runs DISPLA i n the bacKsround and FORSIM i n the f o r e s r o u n d . U s e f u l f o r t e s t i n s DISPLA. C a l l e d f r o m MOMSET. MOMAFB = Runs DISPLA i n the bacKsround and AQUIRE i n the f o r e s r o u n d . T h i s i s t he c o n f i g u r a t i o n used i n the o p e r a t i n g room. C a l l e d f r o m MOMSET MOMAFT = Runs BAKSIM i n the bacKsround and AQUIRE i n the f o r e s r o u n d . U s e f u l f o r t e s t i n s AQUIRE i n the f o r e s r o u n d . C a l l e d from MOMSET. MOMSET = G e n e r a l MOMA s t a r t u p f i l e . A l l o w s t h e u s e r t o choose between the MOMA** or the NOMOMA s t a r t u p c o n f i g u r a t i o n s . MOMSHT = S h o r t MOMA s t a r t u p f i l e . Runs AQUIRE/DISPLA w i t h no q u e r i e s . NOMOMA = Programs the t e r m i n a l and s o e s d i r e c t l y t o RT-11 KMON. C a l l e d from MOMSET. STARTF = System s t a r t u p f i l e . A u t o m a t i c a l l y c a l l e d when the system i s booted Depending -on the i n t e n d e d use of the d i s K i n q u e s t i o n * MOMSET o r STRTRT may be renamed to STARTF. O t h e r w i z e * a l l t h r e e f i l e s w i l l be on the d i s k and STARTF w i l l c a l l one of the o t h e r s . STRTRT = G e n e r a l s t a r t u p f i l e . Sends no q u e r i e s and soes t o RT-11 KMON. TEXT F I L E S ( f i l e names = *.TXT u n l e s s s p e c i f i e d o t h e r w i z e ) CHOOSE = C r e a t e s i t s own 30 l i n e workspace and f i l l s i t w i t h i n f o r m a t i o n about t h e s t a r t u p c h o i c e s a v a i l a b l e when CHOOSE.MOM i s r u n . CMNDCK = C r e a t e s i t s own 30 l i n e workspace and reminds the u s e r to check t h a t t h e command l o c k o u t and numeric l o c k Keys a r e a r e o f f . A p r o c e d u r e f o r r e s e t i n s t h e command c h a r a c t e r i s a l s o t y p e d o u t . FGOUT = Asks the u s e r t o type t he pad t e r m i n a t o r and programs i t t o un l o a d t he f o r e s r o u n d Job. When t y p e d * PT w i l l deprosram i t s e l f . GREET = C r e a t e s i t s own 30 l i n e w orkspace* i n t r o d u c e s t he u s e r t o MOMA* and a s k s i f the ba c k p a n e l c o n n e c t i o n s have been made and the s l a v e d i s k i n s e r t e d . KEYPGM = G e n e r a l purpose t e r m i n a l key prosrammins f i l e . Prosrams the keys i n a c o n f i g u r a t i o n which has been found u s e f u l f o r g e n e r a l use of RT-11. TRMSET = I n i t i a l i z e s the t e r m i n a l ' s modes i n a f o r m a t which has been f o u n d u s e f u l f o r g e n e r a l use of RT-11. 118 PROGRAMS ( F i l e names = *.MOM u n l e s s o t h e r w i z e s p e c i f i e d ) ( s o u r s e l a n s u a s e - f o r t r a n u n l e s s o t h e r w i z e s p e c i f i e d ) CHOOSE = Asks the u s e r t o choose between the s t a r t u p c o n f i g u r a t i o n s d e s c r i b e d i n CHOOSE.TXT and then c a l l s the a p p r o p r i a t e command f i l e . DSKCHK = Checks i f the d i s k i n DYI! i s b l a n k . I f i t i s b l a n k , i t c h a i n s t o DY1INI.MOM. I f n o t . i t s i m p l y r e t u r n s . DY1INI = MOMA s l a v e d i s k i n i t i a l i z a t i o n . I n i t i a l i z e s the d i s k i n DYIJ w i t h a l l t he d a t a f i l e s used i n MOMA. OPTION = Asks the u s e r i f he(sh e ) wants t o view the CHOOSE.* o p t i o n s . I f he ( s h e ) does, the CHOOSE.COM command f i l e i s r u n . I f not» the M0MAFB.COM command f i l e i s r u n * thus s o i n s d i r e c t l y t o the c o n f i g u r a t i o n used i n the o p e r a t i n g room. PAUSE = S i m p l y a s k s the u s e r to t y p e "RETURN" and w a i t s i n t i l h e ( s h e ) does. SETDAT.MAC = A MACRO-11 r o u t i n e s u p p l i e d w i t h the D i g i t a l Pathways TCU-50 computer c l o c k t o r e a d the time and date from the TCU-50 t o th e RT-11 time and date words. A2 .6 Foreground Routines Documentatiori F i l e s c o p i e d ! DK.-FOREXP.TXT t o TTI MOMA FOREGROUND GENERAL DESCRIPTION note? r e f e r t o the "MOMA FOREGROUND ROUTINE INTERCONNECTIONS" diagrams w h i l e r e a d i n a the f o l l o w i n g d e s c r i p t i o n s . COMPILED WITHOUT THE /DEBUG OPTION A l l f o r e g r o u n d a c t i v i t y i s i n i t i a t e d f rom AGUIRE. On s t a r t u p * AQUIRE c a l l s FILACT to i n i t i a l i z e the d i s k I/O c h a n n e l s and then w a i t s u n t i l the background t e l l s i t t o p r o c e e d . When t h i s s t a r t message i s r e c e i v e d * AQUIRE e n t e r s the s a m p l i n g * p r o c e s s i n g * and s t o r a g e l o o p * c a l l e d a "MOMA CYCLE". Note t h a t the s t a r t message s e t s t he v a l u e of LOPCNT. At t he s t a r t of a MOMA c y c l e * t he time i s saved i n TIME and v a r i o u s p o i n t e r s and c o u n t e r s a r e i n i t i a l i z e d . The SLOSMP r o u t i n e i s then c a l l e d t o sample NUMSLO non-EEG c h a n n e l s to the a r r a y ISLDAT. T h i s a r r a y w i l l n o t be a l t e r e d u n t i l a f t e r t h e d a t a i s s t o r e d on d i s k and sent to the background Job. When AGUIRE has comp l e t e d s a m p l i n g the non-EEG d a t a * i t proceeds to s e t U P the programmable r e a l - t i m e c l o c k ( K W v l l - A ) and the A/D c o n v e r t e r (ADV11-A) w i t h the SETR and the RTS r o u t i n e s . The S a m p l i n g f r e q u e n c y i s se t to 64 Hz and RTS i s s e t to s p l i t the s a m p l i n g b u f f e r (INPUT) i n t o 2 s u b b u f f e r s f o r each of 4 EEG d a t a c h a n n e l s . Each s u b b u f f e r c o n t a i n s 64 e l e m e n t s . Once t h e s e s e t t i n g s have been made* AQUIRE r e l i n q u i s h e s c o n t r o l t o the background Job u n t i l RTS i n d i c a t e s t h a t a s u b b u f f e r has been f i l l e d . When a s u b b u f f e r i s f i l l e d * RTS causes the r o u t i n e RTSCOM to be e n t e r e d . T h i s r o u t i n e t a k e s the d a t a i n INPUT and p l a c e s i t i n the d a t a b u f f e r ICHBUF. The 64 d a t a samples p er ch a n n e l which a r e c o p i e d From I N B U F t o ICHBUF w i l l f r o m now on be c a l l e d d a t a segments. RTSCOM c a l c u l a t e s the a v e r a g e s of the d a t a segments and saves them i n CHNAV. I t then c a l l s PREPAR to remove t h e s e a v e r a g e s from the segments and to window the segments (PREPAR c a l l s WINDOW t o pe r f o r m the w i n d o w i n g ) . The above p r o c e s s i s r e p e a t e d u n t i l 8 segments have been a c q u i r e d . At t h a t p o i n t the c l o c k and the A/D c o n v e r t e r a r e t u r n e d o f f and the p r o c e s s i n g phase of the MOMA c y c l e i s e n t e r e d . Note t h a t s i n c e RTSCOM's p r e p r o c e s s i n g i s done i n p a r a l l e l w i t h the s a m p l i n g * i t must be co m p l e t e d b e f o r e the n e x t s u b b u f f e r i s f i l l e d . Once the 8 segments of EEG d a t a have been a c q u i r e d and p r e p r o c e s s e d * PWRSPC i s c a l l e d by AQUIRE to compute a power s p e c t r a l e s t i m a t e of the d a t a . The t e c h n i q u e used i s a method of a v e r a g i n g the p e r i odograms from a number of s h o r t d a t a segments and was d e s c r i b e d by P. D. WELCH i n 1S67 (IEEE T r a n s . A u d i o and E l e c t r o a c o u s t . * A U - 1 5 * P P . 70-73* June 19S7). As implemented h e r e * the per i o d o g r a m s of 8 n o n o v e r l a p p i n g p r e p r o c e s s e d ( i n PREPAR) segments of 64 samples a r e computed f o r each d a t a c h a n n e l u s i n g FFT and POWRSP. The a v e r a g e of t h e s e p e r i o d o g r a m s i s then computed and s t o r e d i n the a r r a y POWER. F i n a l l y * i n o r d e r t o improve the s t a t i s t i c a l p r o p e r t i e s of the power s p e c t r a l e s t i m a t e s * a t h r e e p o i n t moving a v e r a g e s m o o t h i n g window i s used (SMOOTH). The d a t a a c q u i s i t i o n and p r o c e s s i n g i s now c o m p l e t e . . POWER c o n t a i n s t h e power s p e c t r a l e s t i m a t e of the 4 EEG c h a n n e l s * ISLDAT c o n t a i n s the d a t a from the non-EEG c h a n n e l s * and TIME c o n t a i n s the time a t wh i c h t h i s d a t a i s sampled. T h i s d a t a i s now s t o r e d on d i s k a l o n g w i t h t he c y c l e c o u n t e r (LOPCNT) by FSTORE and sen t t o t h e background Job f r o m AQUIRE. F i n a l l y * the AQUIRE r e l i n q u i s h e s c o n t r o l to the b ackground Job u n t i l i t i s time to run t h r o u g h a n o t h e r MOMA c y c l e . The AQUIRE p a r a m e t e r IDELAY s e t s t h e c y c l e r e p e t i t i o n r a t e , ( i n c l o c k t i c k s p e r c y c l e == GO * seconds per c y c l e ) . 12 0 COMPILED WITH THE /DEBUG OPTION A l l t h e a c q u i s i t i o n , p r o c e s s i n g , and s t o r a g e d e s c r i b e d above i s t h e same when t h e programs a r e c o m p i l e d w i t h the /DEBUG o p t i o n i n e f f e c t However, t h i s v e r s i o n i s d e s i g n e d to r u n i n the background and i s h i g h l y i n t e r a c t i v e . D u r i n g each MOMA c y c l e , t h e u s e r w i l l be as k e d i f he ( s h e ) wants v a r i o u s t h i n g s typed out on the t e r m i n a l . These t h i n g s i n c l u d e a p l o t o f t h e sampled EEG d a t a (DATPLT) and a p l o t o f t h e power s p e c t r a l e s t i m a t e (AQUTST). F i n a l l y , a t the end of each c y c l e , the u s e r i s g i v e n the o p e r t u n i t y to t e r m i n a t e the program. A c h a r a c t e r w i l l be ty p e d t o the t e r m i n a l when the program p a s s e s c e r t a i n p o i n t s i n t h e a c q u i s i t i o n and p r o c e s s i n g p a r t s of the r o u t i n e . The time a t whi c h t h e s e p o i n t s a r e passed i s a l s o saved w i t h i n the program. U s i n g t h i s f e a t u r e , the u s e r can t r a c e the f l o w of program c o n t r o l and get an i d e a about t h e amount time b e i n g s p e n t i n the v a r i o u s modules of t he sys t e m . DK:FORRTN.TXT to TT: MOMA FOREGROUND ROUTINES DISCRIPTIONS NOTE? FFT, IADC, POWRSP, RTS, and SETR a r e fo u n d i n the o b j e c t l i b r a r y LABLIB.OBJ. NOTE', When t h e r o u t i n e s AQUIRE, PREPAR, PWRSPC, and RTSCOM a r e c o m p i l e d u s i n g the /DEBUG o p t i o n , the r e s u l t i n g proaram w i l l be i n a h i g h l y i n t e r a c t i v e f o r m a t s u i t a b l e o n l y f o r r u n n i n g as a s t a n d - a l o n e background Job. When t h i s c o m p i l i n g o p t i o n i s not i n c l u d e d , t he r e s u l t i n g program i s s u i t a b l e o n l y as a f o r e g r o u n d Job and r e q u i r e s t h a t a d i s p l a y and u s e r i n t e r a c t i o n Job be r u n i n the b a c k g r o u n d , ( s u c h as DISPLA o r BAKSIM). AQUIRE Main f o r e g r o u n d r o u t i n e . C o o r d i n a t e s the t i m i n g and c a l l s a p p r o p r i a t e r o u t i n e s f o r d a t a a c q u i s i t i o n , p r o c e s s i n g , and s t o r a g e . AQUTST P r o c e s s e d d a t a p l o t t e r . P l o t s t he power s p e c t r a l e s t i m a t e s and o u t p u t s v a r i o u s o t h e r program r e s u l t s under u s e r c o n t r o l . T h i s r o u t i n e i s i n c l u d e d o n l y when AQUIRE i s c o m p i l e d u s i n s t he /DEBUG opt i on. DATPLT Raw d a t a p l o t t e r . P l o t s t he raw d a t a o b t a i n e d from the EEG c h a n n e l s under u s e r c o n t r o l . T h i s r o u t i n e i s i n c l u d e d o n l y when AQUIRE i s c o m p i l e d u s i n g the /DEBUG o p t i o n . FFT F a s t F o u r i e r T r a n s f o r m . R o u t i n e s u p p l i e d by DEC i n the f o r t r a n e x t e n s i o n s l i b r a r y to p e r f o r m f a s t f o u r i e r t r a n s f o r m s . FILACT Data f i l e a c t i v a t i o n . LOOKUP and ISAVES a l l d a t a f i l e s used i n MOMA. FSTORE Data s t o r a g e . S t o r e s d a t a on MOMA's d a t a d i s. r u e r y MOMA c y c l e . IADC A/D s a m p l i n g . R o u t i n e s u p p l i e d by DEC i n the f o r t r a n e x t e n s i o n s l i b r a r y t o t a k e a s i n g l e sample f r o m a s p e c i f i e d number of A/D c h a n n e l s . POWRSP P e r i o d o g r a m c o m p u t a t i o n . R o u t i n e s u p p l i e d by DEC i n the f o r t r a n e x t e n s i o n s l i b r a r y t o compute a p e r i o d o g r a m from the o u t p u t of FFT. PREPAR P r e p r o c e s s i n g f o r power s p e c t r a l e s t i m a t i o n . S u b t r a c t s a g i v e n number ( u s u a l l y the mean of the a r r a y ) f r o m a g i v e n a r r a y and then uses WINDOW t o t a p e r the ends of the a r r a y . PWRSPC Power s p e c t r a l e s t i m a t o r . Uses a method of time averaging over short modified periodograms to estimate the power spectrum of a given sampled data s i g n a l . RTS Real-time A/D sampling. Routine s u p p l i e d by DEC i n the F o r t r a n extensions l i b r a r y to r e p e t i t i v e l y sample a given number of A/D channels. RTSCOM EEG pre p r o c e s s i n g . Entered every time a subbuffer i n RTS i s f i l l e d to c a l l r o u t i n e s which w i l l preprocess the incoming EEG data. I t reads the data i n the sampling b u f f e r i n t o the data b u f f e r * computes and saves the subbuffer average f o r each channel* and then uses PREPAR to preprocess the data f o r power s p e c t r a l e s t i m a t i o n . SETR Programmable clooK s e t t e r . Routine s u p p l i e d by DEC i n the f o r t r a n extensions l i b r a r y to set the KWV11-A programmable r e a l - t i m e clocK. SLOSMP Non-EEG sampling. Samples a given set of channels once every MOMA c y c l e . SMOOTH Three point averager. Routine to smooth the power s p e c t r a l estimate from PWRSPC with a three point average moving window. WINDOW Time domain windowing. Routine to taper a s i v e n percent of the s t a r t and end of an arra y using a cosine taper. DKIFORCMN.TXT to TTI MDMA FOREGROUND COMMON BLOCK TABLE COMPILED USING THE /DEBUG OPTION • / U / G / N / / // M / COMMON / G / A / A / E / S // I / BLOCK / A / B / H / R / E // D / / M / R / C / 0 / M // E / / 0 / A / 0 / T / I // N / ROUTINE / C / G / I / S / T / / 0 / AGUIRE 1 V /\ 1 1 1 X 1 X 1 1 1 fiQUTST 1 X 1 I I 1 X 1 1 1 DATPLT 1 X 1 1 I I 1 1 X 1 FILACT 1 1 1 X 1 1 1 1 1 FSTORE 1 1 X 1 X 1 X 1 1 1 1 PREPAR 1 1 1 1 1 X 1 1 1 PWRSPC 1 1 X I 1 1 X 1 1 1 RTSCOM 1 X 1 1 1 1 X 1 1 1 SLOSMP 1 1 1 I I 1 1 1 SMOOTH 1 1 1 1 1 1 1 1 WINDOW 1 1 1 I I 1 1 1 COMPILED WITHOUT THE /DEBUG OPTION / U / G / N / / // M / COMMON / Q/ A / A / E / S //'!/• BLOCK / A / B / H / R / E / / D / / M / R / C / 0 / M / / E / / 0 / A / 0 / T / I / / N / ROUTINE / C / G / I / S / T / / 0 / + + + + + ++ + AGUIRE I X I I I X I I I I FILACT I I I X I I II I FSTORE I I X I X I X I II I PREPAR I I I I I II | PWRSPC I I X I I I I I I RTSCOM I X I I I I II I SLOSMP I I I I I I I I SMOOTH I I I I I II I WINDOW I I I I I I I I NOTE: ONEDIM i s a graphics common blocK 122 COMAGU raw d a t a b u f f e r s and p o i n t e r s INTEGER ICHBUF<512,4),INBUF<4,128) REAL CHNAU<9,4> COMMON/COMAQU/ CHNAU,ICHBUF,INBUF,IBEF,IBFOFS,IBLKCT CHNAU = T h i s a r r a y i s l o a d e d w i t h the a v e r a s e s of 64 sample segments of EEG d a t a from each of f o u r c h a n n e l s by RTSCOM. These v a l u e s a r e then used by PREPAR to p r e p r o c e s s ICHBUF f o r power s p e c t r a l e s t i m a t i o n . The n i n e t h element of CHNAU w i l l a c c e p t the aver a g e of the a v e r a g e s , i e ? the av e r a g e of 512 samp l e s . ' ICHBUF = Data b u f f e r . A c c e p t s 512 samples from each of f o u r EEG c h a n n e l s . T h i s b u f f e r i s s p l i t i n t o 8 64-sample segments. RTSCOM c o p i e s the c o n t e n t s of a g i v e n segment of INBUF to ICHBUF and a t the same time l o a d s CHNAU w i t h the a v e r a g e s of the segments. PREPAR then removes t h e s e a v e r a g e s from each segment and windows the segments w i t h WINDOW. F i n a l l y , PWRSPC uses a d a t a s e g m e n t a t i o n p r o c e s s i n g t e c h n i q u e t o compute a power s p e c t r a l e s t i m a t e of the d a t a i n t h i s a r r a y . INBUF = C y c l i c s a m p l i n g b u f f e r . Used by the r o u t i n e RTS to b u f f e r the d a t a as i t i s a c q u i r e d . A f t e r 1 segment ( 64 samples) has been a c q u i r e d , RTS s i g n a l s t h a t RTSCOM s h o u l d be e n t e r e d so as t o p r e p r o c e s s t h a t segment. RTS then p r o c e e d s t o f i l l U P the second segment of INPUT. S i n c e RTS l o o p s back t o the f i r s t segment when the second segment i s f i l l e d , RTSCOM must have completed i t s p r o c e s s i n g b e f o r e t h a t t i m e . IBEF = The f r e e s u b b u f f e r i n d i c a t o r of the RTS r o u t i n e . Incremented i n RTSCOM To s i g n a l t o RTS t h a t i t s p r o c e s s i n g i s c o m p l e t e . IBFOFS = INBUF s u b b u f f e r o f f s e t p o i n t e r . Used by RTSCOM to s w i t c h between the two s u b b u f f e r s i n INPUT each time i t i s e n t e r e d . R e s e t i n AQUIRE a t the s t a r t of a new s e t of S segments. IBLKCT = Segment c o u n t e r . Used i n RTSCOM to keep t r a c k of the number of segments which have been a c q u i r e d and d i s t r i b u t e d to ICHBUF. Reset i n AQUIRE a t the s t a r t oF a new s e t oF 8 segments. GARBAG 256 word a r e a used .as a d i s k I/O buFFer. Passed to o t h e r r o u t i n e s to be used F o r temporary d a t a s t o r a g e so as t o c o n s e r v e memory. INTEGER IWRTBF<256) COMMON/GARBAG/ IWRTBF IWRTBF = 25G word a r e a used as a d i s k I/O b u f f e r and f o r tem p o r a r y d a t a s t o r a g e i n r o u t i n e s which do not i n t e r a c t w i t h the d i s k . 123 IOCHAN c o n t a i n s c h a n n e l i n f o r m a t i o n about the d i s k d a t a f i l e s . iei p e r m i t s the use IREOPN f o r a l l d i s k I/O. INTEGER ICHSAV(5,9) COMMON/IOCHAN/ ICHSAU ICHSAV = Used by FILACT t o ISAUES the s t a t u s of a l l the f i l e s on the "MOMA s l a v e d i s k " . T h i s w i l l then be used i n a l l the d i s k I/O r o u t i n e s (FSTORE) t o IREOPN a l l the f i l e s , t h u s - a v o i d i n g the use of the USR r o u t i n e . STORE p r o c e s s e d d a t a b u f f e r . REAL POWER(32,4) INTEGER ISLDAT(4)»MSGBUF(263) EQUIVALENCE (MSGBUF(1),POWER(1,1)),(MSGBUF(257),ISLDAT(1)), * (MSGBUF(261),TIME),(MSGBUF(2B3),LOPCNT) COMMON/STORE/ MSGBUF MSGBUF = b u f f e r c o n t a i n i n g the d a t a to be both s e n t t o the background Job and s t o r e d on d i s k . The o r g a n i z a t i o n i s as f o l l o w s J MSGBUF(1-256) == POWER(1-32,1-4) — > P0WER1-4.DAT MSGBUF(257-2B0) == ISLDAT(1-4) > SLOCHN.DAT MSGBUF(261-262) == TIME > SLOCHN.DAT MSGBUF(263) " == LOPCNT > STATUS.DAT TIMES R o u t i n e t i m i n g f l a g s ( i n c l u d e d when c o m p i l e d w i t h debug o p t i o n ) REAL TIMTAG(14) COMMON/TIMES/ TIMTAG TIMTAG = Used t o r e c o r d the t i m e o f a r r i v a l a t 14 p r e d e f i n e d p o i n t s i n the d a t a s a m p l i n g and p r o c e s s i n g r o u t i n e s . The time i s s t o r e d i n R T - l l ' s i n t e r n a l time f o r m a t . 124 DK:FORCAL.TXT t o TT! I MOMA FOREGROUND CALLED ROUTINES ( n o t i n c l u d i n g SYSLIB r o u t i n e s ) ROUTINE I CALLED ROUTINE(S) ; h c o m p i l e d w i t h o u t /DEBUG o p t i o n I AQUIRE I FILACT,FSTORE,PWRSPC,RTS,RTSCOM,SETR,SLOSMP FFT * l FILACT I FSTORE I IADC * l POWRSP * l — PREPAR I WINDOW PWRSPC I FFT,POWRSP,SMOOTH RTS * l RTSCOM I PREPAR SETR * l SLOSMP I IADC SMOOTH I WINDOW I 1 c o m p i l e d w i t h /DEBUG o p t i o n • I AQUIRE I AQUTST,DATPLT,FILACT,FSTORE,PWRSPC,RTS,RTSCOM,SETR,SLOSMP AQUTST I AREA,AUTOSC,PLOT1D,RLINE,STRING,TITLE,XAXIS,YAXIS DATPLT I AREA,RLINE,STRING,TITLE,UECGEN,XAXIS,YAXIS FFT * l FILACT I FSTORE I IADC * l POWRSP * l PREPAR I WINDOW PWRSPC I FFT,POWRSP,SMOOTH R T S * l RTSCOM I PREPAR SETR * l • SLOSMP I IADC SMOOTH I WINDOW I I g r a p h i c s r o u t i n e s From GPHLIB ( c a l l e d From debug v e r s i o n o n l y ) I AREA I AUTOSC I PARSET LINTYP I LINS1D I LINTYP,VECGEN PARSET I PLINE I RLINE PLOT1D I LINS1D PNTOUT I RLINE I LINTYP,UECGEN STRING I TITLE I PLINE,STRING VECGEN I PNTOUT XAXIS I PLINE,RLINE,STRING YAXIS I PLINE,RLINE,STRING note? * = LABLIB r o u t i n e s u p p l i e d i n DEC F o r t r a n e x t e n s i o n s package 125 MOMA FOREGROUND CALLING ROUTINES ROUTINE I CALLING ROUTINE(S) 1 c o m p i l e d w i t h o u t /DEBUG o p t i o n i AGUIRE i FFT * 1 PWRSPC FILACT 1 AQUIRE FSTORE 1 AQUIRE IADC #1 SLOSMP POWRSP * 1 PWRSPC PREPAR 1 RTSCOM PWRSPC 1 AQUIRE RTS * l AQUIRE RTSCOM 1 AQUIRE SETR * l AQUIRE SLOSMP 1 AQUIRE SMOOTH 1 PWRSPC WINDOW 1 PREPAR I • c o m p i l e d w i t h /DEBUG o p t i o n AQUIRE 1 1 AQUTST 1 AQUIRE JUATPLT 1 AQUIRE FFT * 1 FWRSPC FILACT 1 AQUIRE FSTORE 1 AQUIRE IADC * l SLOSMP POWRSP * 1 PWRSPC PREPAR 1 RTSCOM PWRSPC 1 AQUIRE RTS * 1 AQUIRE RTSCOM 1 AQUIRE SETR * l AQUIRE SLOSMP 1 AQUIRE SMOOTH 1 PWRSPC WINDOW 1 PREPAR | g r a p h i c s r o u t i n e s from GPHLIB ( c a l l e d from debua v e r s i o n o n l y AREA 1 AQUTST,DATPLT AUTOSC 1 AQUTST LINTYP 1 LINS1D,RLINE LINS1D 1 PLOT1D PARSET 1 AUTOSC PLINE 1 TITLE,XAXIS,YAXIS PLOT1D 1 AQUTST PNTQUT 1 MECGEN RLINE 1 AQUTST,DATPLT,PLINE,XAXIS,YAXIS STRING 1 AQUTST,DATPLT,TITLE,XAXIS,YAXIS TITLE 1 AQUTST,DATPLT VECGEN 1 DATPLT,LINS1D,RLINE XAXIS 1 AQUTST,DATPLT YAXIS 1 AQUTST,DATPLT n o t e ! * = LABLIB r o u t i n e s u p p l i e d i n DEC f o r t r a n e x t e n s i o n s pacKaae 12 6 DK:FORTST.TXT t o r r : MQMA FOREGROUND TESTING ROUTINES note? a l l t h e s e r o u t i n e s s h o u l d be r u n i n the bacKsround ADCAL = Samples A/D c h a n n e l s 0 t o 7 every second and t y p e s out the r e s u l t s , ( q u a s i d i f f e r e n t i a l mode). T e r m i n a t e d by t y p i n s "RETURN". ADTST = Samples A/D c h a n n e l s 0 t o 7 e v e r y c l o c K t i c k ( a p p r o x ) f o r 32 t i c k s and t y p e s out the r e s u l t . ( t u a s i d i f f e r e n t i a l mode). AGUTMP = Uses the DATPLT and AQU7 '' r o u t i n e s . " DATPLT i s s i v e n modulated c o s i n e p a t t e r n s and AQUTST i s a i v e n c o s i n e p a t t e r n s . BAKSII1 = R o u t i n e to r u n i n the bacKsround w h i l e AGUIRE i s run i n the f o r e s r o u n d . S i m p l y t a k e s AQUlRE's d a t a update messase and t y p e s i t onto the t e r m i n a l . CLKT1 CLKT2 CLKTST Uses SETR f o r a h i s h f r e q u e n c y KWU11-A c l o c k t e s t . S e t s the c l o c k t o r e p e a t e d i n t e r v a l n o n i n t e r u p t mode and p u l s e s the c l o c k o v e r f l o w l i n e low a t 500 KHz (500 ns p u l s e s ) . P u l s e s c o n t i n u e u n t i l "RETURN" i s t y p e d . U s e f u l f o r l o o k i n s a t the c l o c k o v e r f l o w l i n e w i t h an o s c i l l o s c o p e . I f ICMF i s a l t e r e d , an e r r o r messase i s s e n e r a t e d and ICMF i s ty p e d o u t . Uses SETR F o r a low f r e q u e n c y KWV11-A c l o c k t e s t . S e t s the c l o c k to r e p e a t e d i n t e r v a l c l o c k o v e r f l o w l i n e low a t c o n t i n u e u n t i l "RETURN" i s e r r o r messase i s s e n e r a t e d i n t e r u p t mode and p u l s e s the 100 Hz (500 ns p u l s e s ) . P u l s e s t y p e d . I f ICMF i s a l t e r e d , an and ICMF i s typed o u t . Uses SETR w i t h a c o m p l e t i o n r o u t i n e f o r a low f r e q u e n c y KWV11-A c l o c k t e s t . S e t s the c l o c k t o r e p e a t e d i n t e r v a l i n t e r u p t mode and p u l s e s the c l o c k o v e r f l o w low a t S4 Hz. A c o m p l e t i o n r o u t i n e i s e n t e r e d e v e r y 64 sam p l e s . W i t h i n t h i s r o u t i n e , a c o u n t e r i s i n c r e m e n t e d . T h i s c o u n t e r i s then t y p e d out a l o n s w i t h ICMF. I f ICMF i s a l t e r e d , an e r r o r messase i s s e n e r a t e d and ICMF i s ty p e d o u t . FFTCHK = PRETST Runs a c o s i n e t h r o u s h FFT and POWRSP. to FFT, a f t e r FFT, and a f t e r POWRSP. Types out d a t a b e f o r e e n t r y T e s t s t he RTSCOM r o u t i n e w i t h 4 t e s t p a t t e r n s , and WINDOW w i l l i n d i r e c t l y e n t e r e d . Note t h a t PREPAR PWRTST = T e s t s the PWRSPC r o u t i n e w i t h a doubl e c o s i n e t e s t p a t t e r n . Note t h a t FFT, POWRSP, and SMOOTH w i l l be i n d i r e c t l y c a l l e d . KTCT1 = Uses the RTS-SETR c o m b i n a t i o n t o t a k e 200 samples from A/D c h a n n e l s 0 and 1 a t 100 Hz. RTS has a c o m p l e t i o n r o u t i n e but SETR d o e s n t . RTCTST = Uses the RTS-SETR c o m b i n a t i o n t o t a k e 200 samples from A/D c h a n n e l s 0 and 1 a t 100 Hz. B o t h RTS and SETR have c o m p l e t i o n r o u t i n e s . RTSTST = Uses the RTS-SETR c o m b i n a t i o n t o ta k e 100 samples from A/D c h a n n e l s 0 and 1 a t 100 Hz. N e i t h e r RTS o r SETR have c o m p l e t i o n r o u t i n e s . SLOTST = T e s t s t h e SLOSMP r o u t i n e . Uses SLOSMP t o sample A/D c h a n n e l s 4 t o 7 20 t i m e s a t a p p r o x i m a t e l y 2 Hz and t y p e s out the r e s u l t s . Note t h a t IADC i s i n d i r e c t l y c a l l e d . A2.7 Background Routines Documentation F i l e s c o p i e d : DK:BAKEXP.TXT to TT! MOMA BAKCGROUND GENERAL DESCRIPTION n o t e ; r e f e r t o the "MOMA BACKGROUND ROUTINE INTERCONNECTIONS" d i a g r a m ! w h i l e r e a d i n g t h i s s e c t i o n . A l l b a c k g r o u n d a c t i v i t y i s i n i t i a t e d f r o m DISPLA. On s t a r t u p . DISPLA c a l l s a number of i n i t i a l i z a t i o n r o u t i n e s (on s t a r t ! L B L I N I , FILACT, TVSET, and TAOSTO) (on r e s t a r t ; L B L I N I • FILACT. TVSET, and RESTRT) and t h e n s e t s UP t h e t e r m i n a l ' s s c r e e n f o r a type 1 d i s p l a y (EEG4DD). R e s t a r t goes one s t e p f u r t h e r and r e a d s the r e c o r d s s t o r e d on d i s K and updates t he d i s p l a y (SCROLL, EEG4UP). A f t e r s i g n a l l i n g the f o r e g r o u n d r o u t i n e to s t a r t s a m p l i n g , DISPLA s i m p l y u a i t s f o r e i t h e r an update message from the f o r e g r o u n d or a t y p e d c h a r a c t e r . When an update message i s r e c e i v e d . RCVCOM f l a g s i t and DISPLA c a l l s an a p p r o p r i a t e d i s p l a y u p d a t i n g r o u t i n e (EEG4UP, PLOTUP). When a c h a r a c t e r i s t y p e d , DISPLA c a l l s INPUT to s e r v i c e t h a t c h a r a c t e r . Note t h a t TTY i s i n a no w a i t , s p e c i a l i n p u t mode. When INPUT d e t e r m i n e s t h a t a c o m p l e t e l i n e has been e n t e r e d , t he l i n e i n t e r p r e t i n g r o u t i n e INTERP i s c a l l e d . T h i s r o u t i n e w i l l a n a l y z e the l i n e e n t e r e d and d i s p a t c h t o the a p p r o p r i a t e s e r v i c e r o u t i n e ( s ) . A l l t i m e d t a g s and a l l i n s t r u c t i o n s e x c e p t RUBOUT, DELETE LINE and LAST LINE w i l l be s e r v i c e d f r o m INTERP. The t h r e e e x c e p t i o n s m e n t i o n e d above a r e s i n g l e c h a r a c t e r immediate a c t i o n commands and a r e s e r v i c e d by INPUT when the y a r e r e c i e v e d . When INTERP r e t u r n s t o DISPLA ( v i a INPUT), i t s e t s the argument ICHAR t o produce t h r e e a c t i o n s on r e t u r n . 1) i t can r e t u r n d i r e c t l y t o the main i d l e l o o p , 2) i t can r u n t h r o u g h t he d i s p l a y u p d a t i n g r o u t i n e p r i o r t o g o i n g to the main i d l e l o o p , o r 3) i t can r u n th r o u g h b o t h t he d i s p l a r i n i t i a l i z a t i o n r o u t i n e s and the d i s p l a y u p d a t i n g r o u t i n e s p r i o r to g o i n g t o the main i d l e l o o p . Thus, the f u n c t i o n o f INTERP i s t o s e t up the d i s p l a y b u f f e r and the mode f l a g s and then t o r e q u e s t t h a t DISPLA c a l l a p p r o p r i a t e d i s p l a y m a n i p u l a t i o n r o u t i n e s . The LUPDIS f l a g s i n the MODES common b l o c K a r e t r e a t e d s p e c i a l l y bv INTERP and DISPLA. These f l a g s c o n t r o l t he update of the b u f f e r and/or the d i s p l a y . When INTERP r e t u r n s t o DISPLA ( v i a INPUT), i t s e t s the argument RESET to the v a l u e t h a t the LUPDIS f l a g s s h o u l d be at c o m p l t i o n of the r e q u e s t e d f u n c t i o n . LUPDIS i s s e t e=iual to RESET u i t h i n t h e wa i n i d l e l o o p o f DISPLA. S i n c e LUPDIS i s n o t s e t t o RESET u n t i l t h e i d l e l o o p of DISPLA i s e n t e r e d , one can s e t LUPDIS w i t h i n INTERP t o a mode a p p r o p r i a t e f o r use i n r o u t i n e s e n t e r e d b e f o r e the i d l e c y c l e . eg? when a r e c o r d i s t r a n s f e r e d f r o m t he s c r o l l e d s e c t i o n t o the u n s c r o l l e d s e c t i o n of a t/pe 1 d i s p l a y , RESET i s s e t f o r a c t i v e s e c t i o n u p d a t e , LUPDIS i s s e t f o r n o n a c t i v e s e c t i o n u p d a t e , and ICHAR i s s e t so t h a t EEG4UP i s e n t e r e d b e f o r e r e t u r n i n g to th e main i d l e l o o p . W i t h t h i s c o n f i g u r a t i o n , the u n s c r o l l e d s e c t i o n M i l l be updated when INTERP r e t u r n s to DISPLA but w i l l not be tou c h e d by s u b s e q u e n t DISPLA a c t i v i t y . Two d i s p l a y t y p e s a r e p r e s e n t l y implemented on t h i s s y s t e m . D i s p l a y t y p e 1 p r e s e n t s the EEG i n a DSA f o r m a t a l o n g w i t h a d i g i t a l d i s p l a y of the non-EEG d a t a and uses b u f f e r modes 1 and 2. D i s p l a y t y p e 2 P l o t s the non-EEG d a t a vs tim e and uses b u f f e r mode 3. The r o u t i n e s f o r each d i s p l a y t y p e have been s p l i t i n t o two c a t a g o r i e s , i n i t i a l i z a t i o n r o u t i n e s and update r o u t i n e s . The i n i t i a l i z a t i o n r o u t i n e s (EEG4DD f a r t y p e I and PLOTDD f o r t y p e 2) i n i t i a l i z e the t e r m i n a l ' s s c r e e n , p l o t a x e s , o u t p u t t i t l e s , e t c . The Update r o u t i n e s (EEG4UP f o r t y p e 1 and PLOTUP f o r t y p e 2) hand l e t h e d i s p l a y b u f f e r and o u t p u t the d a t a to the t e r m i n a l . Note t h a t s i n c e d i s p l a y t y p e 2 i s not up d a t e d on f o r e g r o u n d message r e c e i p t , the PLOTUP r o u t i n e i s s e t so t h a t i t changes the b u f f e r and updates t he d i s p l a y o n l y on d i s p l a y change. The d i s p l a y b u f f e r can be l o a d e d by t h r e e r o u t i n e s , BREAD. SLORED. and DISBUP. BREAD l o a d s i t i n mode 1 o r 2 w i t h a g i v e n number of r e c o r d s f r o m the d a t a d i s K . SLORED p e r f o r m s the same f u n c t i o n f o r mude 3 as BREAD does f o r modes 1 and 2. DISBUP l o a d s i t w i t h d a t a f r o m the f o r g r o u n d message w h i l e i n modes 1 and 2. F o r modes 1 and 2, the EEG d a t a i s encoded t o ADE's of the g r a y l e v e l s f o r the DSA (ENC016) and the ncn-EEG d a t a i s s c a l e d (ISLSCA) p r i o r to b u f f e r i n g . F o r mode 3, the non-EEG d a t a i s s c a l e d (ISLSCA) and bounded (BOUND) p r i o r t o b u f f e r i n g . Note t h a t s i n c e the type 2 d i s p l a y s (mode 3) a r e not updated on f o r e g r o u n d message r e c e i p t , i t was not n e c e s s a r y to i n c l u d e a mode 3 e q u i v a l e n t t o DISBUP. I f a type 1 d i s p l a y i s c u r r e n t l y a c t i v e and a d i s p l a y change I f r e q u e s t e d , i t i s n e c e s s a r y t o remember what has been saved l n th e u n s c r o l l f d s e c t i o n . T h i s i s p e r f o r m e d by the r o u t i n e s NACTSV and NACTIN. J u s t b e f o r t l e a v i n g a type 1 d i s p l a y , NACTSV i s c a l l e d to save the r e c o r d numbers of the r e c o r d s c o n t a i n e d i n the n o n a c t i v e s c r o l l . When a new type 1 d i s p l a y i f s u b s e q u e n t l y r e q u e s t e d , NACTIN i s c a l l e d to r e a d t h e s e r e c o r d s i n t o t he u n s c r o l l e d s e c t i o n of the new d i s p l a y . 128 DKIBAKRTN•TXT t o TT: MOMA BACKGROUND ROUTINES DESCRIPTIONS NOTE. DISPLA, the main b a c K s r o u n d r o u t i n e , can be r u n w i t h o r w i t h o u t . F o r e s r o u n d ( d a t a a c q u i s i t i o n and s t o r a s e ) Job P r e s e n t . However, i s r e s t l " " 0 ^ *" N ° T P r e s e n t ' t h e ° n l ' " " " i n a f u l s t a r t u p M O d . BFBLNK D i s p l a y b u F F e r l i n e b l a n K i n s . B l a n K . o n. l i n e oF the d i s p l a y b u F F . r . BOUND BREAD COPY D*SET Non-EEG d a t a bounder. S e t s upper and l o w e r l i m i t s on the non-EEG d a t a F o r t y p e 2 d i s p l a y s . IF the d a t a i s o u t s i d e a l i m i t i t i s s e t e t u a l to t h a t l i m i t b e f o r e b e i n s i n s e r t e d i n t o the d i s p l a y b u F F e r . D i s K d a t a r e a d . Reads a s p e c i f i e d number oF d a t a r e c o r d s From a s p e c i F i e d p o i n t i n time t o the d i s p l a y b u F F e r . D i s p l a y b u F F e r l i n e d u p l i c a t i o n . C o p i e s t h e c o n t e n t s oF one l i n t oF t h e d i s p l a y b uFFer onto a n o t h e r l i n e oF the d i s p l a y b u F F e r . D i s p l a y chanse p a r a m e t e r s e t t i n s . S e t s s l o b a l p a r a m e t e r s F o r a s p e c i F i e d d i s p l a y . DD2SET T e r m i n a l s c r e e n a t t r i b u t e s e t t e r . S e t s the a t t r i b u t e s oF a s i v e n number oF l i n e s on the t e r m i n a l ' s s c r e e n f o r a DSA d i s p l a y oF a s i v e n F o r m a t . DISBUP D i s p l a y b u F F e r u p d a t e . TaKes t he c o n t e n t oF the buFFer which r e c e i v e * the F o r e s r o u n d messases and. a f t e r F o r m a t i n s i t . i n s e r t s i t i n t o the d i s p l a y b u F F e r . DISPLA Main b a c K s r o u n d r o u t i n e . When the bacK s r o u n d i s i n a c t i v e , t h e system w a i t s i n t h i s r o u t i n e . Uhen a r e q u e s t F o r bacKsround a c t i v i t y i s r e c e i v e d f r o m e i t h e r t h e f o r e s r o u n d Job o r the u s e r , t h i s r o u t i n e d i s p a t c h e s to the a p p r o p r i a t e s e r v i c e r o u t i n e d ) . EEG4DD Type 1 d i s p l a y s e t u p . C a l l s a p p r o p r i a t e r o u t i n e s t o s e t up a s i v e n t y p e 1 d i s p l a y . EEG4UP EEGDLN ENCOIB FASTDD FASTUP FILACT FNTS* Type 1 d i s p l a y u p d a t e . C a l l s a p p r o p r i a t e r o u t i n e s to update the d i s p l a y b u f f e r a n d/or t he d i s p l a y f o r type 1 d i s p l a y s . Note that t h i s r o u t i n e i s e n t e r e d on the r e c e i p t of new d a t a f r o m the f o r e g r o u n d . DSA l i n e s e n d e r . Sends one l i n e of DSA t o the t e r m i n a l . A number of o u t p u t f o r m a t s a r e a v a i l a b l e . D e n s i t y e n c o d e r . Encodes a power s p e c t r a l e s t i m a t e to a s e r i e s o f ADEs f o r a r a y l e v e l c h a r a c t e r s Fo'. '• i c h a r a c t e r f o n t I S . C h a r a c t e r i n t e n s i t y i s d i r e c t l y p r o p o r t i o n a l to the masnatude p f the power s p e c t r a l e s t i m a t e a t a s i v e n f r e q u e n c y and t i m e . Type 1 DSA d i s p l a y s e t u p . S e t s U P the t e r m i n a l ' s s c r e e n f o r a s i v e n DSA d i s p l a y and o u t p u t s t he l a b e l s , a x e s , e t c . . Type 1 DSA u p d a t e . Updates the DSA p a r t of t y p e 1 d i s p l a y s . Data f i l e a c t i v a t i o n , i n MOMA. LOOKUP and ISAVES a l l d a t a f i l e s used F o n t IB i n i t i a l i z a t i o n . I n i t i a l i z e s t h e c h a r a c t e r f o n t ( f o n t 16) used t o s e n e r a t e the d e n s i t y m o d u l a t i o n i n DSA d i s p l a y s . INCBUF D i s p l a y b u f f e r p o i n t e r Mower. Moves t h e d i s p l a y b u f f e r ' s p o i n t e r f o r w a r d o r bacKward a s i v e n number of l i n e s . INPUT . C h a r a c t e r i n p u t h a n d l e r . I f the r e c e i v e d c h a r a c t e r i s a s i n s l e c h a r a c t e r immediate a c t i o n command (RUBOUT. CTRL/U, o r LAST L I N E ) , i t i s s e r v i c e d . I f the r e c e i v e d c h a r a c t e r i s a c a r r i a g e r e t u r n t h a t t e r m i n a t e s a t i m e d t a s o r a command, INTERP i s c a l l e d . IF the r e c e i v e d c h a r a c t e r i s a t r i v i a l c a r r i a g e r e t u r n , i t i s i g n o r e d . I f none of th e above and no more than MAKCHR c h a r a c t e r s have been e n t e r e d f o r t he o u r r e n t l i n e , the c h a r a c t e r i s i n s e r t e d i n t o MOMA'S l i n e i n p u t b u f f e r . INTERP L i n e i n t e r p r e t e r . A f t e r b e i n s o a l l e d f r o m INPUT, t h i s r o u t i n e i n t e r p r e t s t he l i n e i n MOMA's l i n e i n p u t buFFer and chooses an a p p r o p r i a t e c o u r s e oF a c t i o n . 1'JUERY Q u e s t i o n a s k e r . R o u t i n e t o send a q u e s t i o n w a i t f o r the r e s p o n c e . The f i r s t c h a r a c t e r t e n t bacK to the c a l l i n g p r o s r a m . to of the u s e r and t o t h i s r e s p o n c e i s ISLSCA Non-EEG d a t a s c a l e r . S c a l e s the non-EEG d a t a a c c o r d i n a t o a s i v e n m u l t i p l i c a t i v e and a d d i t i v e c o n s t a n t s . ISWTCH D i s p l a y b u f f e r c o n t e x t s w i t c h . Changes the d e s t i n a t i o n of a l l d i s p l a y b u f f e r o p e r a t i o n s t o the o t h e r s e c t i o n teS s w i t c h e s between t h e s c r o l l e d s e c t i o n and the u n s c r o l l e d s e c t i o n of the d i s p l a y b u f f e r . L B L I N I L a b e l i n i t i a l i z a t i o n . I n i t i a l i z e s t h e common b l o c K c o n t a i n i n g t h e l a b e l s t o be used f o r the non-EEG d a t a . MEXIT (10MKEY T e r m i n a t i o n r o u t i n e . R o u t i n e e n t e r e d t o s t o p the M O M A prosrama. T e r m i n a l Key programmer. Prosrams the t e r m i n a l ' s Keys f o r M O M A . NACTIN U n s c r o l l e d s e c t i o n r e c o r d number r e c o v e r y . Takes the r e c o r d numbers saved by NACTSV and r e a d s the a p p r o p r i a t e r e c o r d s i n t o the u n s c r o l l e d s e c t i o n of t h e d i s p l a y b u f f e r . NACTSV U n s c r o l l e d s e c t i o n r e c o r d number s a v e . Saves the numbers of t h t r e c o r d s s t o r e d i n the U n s c r o l l e d s e c t i o n of the d i s p l a y so t h a t t h e y w i l l be p r e s e r v e d d u r i n g a d i s p l a y change. P L O T D D Type 7. d i s p l a y i n i t i a l i z a t i o n . I n i t i a l i z e s t h e t e r m i n a l s c r e e n f o r t i m e P l o t s and t y p e s out the a x e s , l a b e l s , t i t l e s , e t e . PLOTUP Type 2 d i s p l a y u p d a t e . C a l l s a p p r o p r i a t e r o u t i n e s t o r e a d d a t a f r o m the d i s K and update the d i s p l a y . Note t h a t t h i s r o u t i n e i t not e n t e r e d on the r e c e i p t of new d a t a f r o m the f o r e g r o u n d . R C V C O M F o r e s r o u n d messase f l a s s e r . E n t e r e d as a c o m p l e t i o n r o u t i n e and r a i s e s a f l a s t o t e l l DISPLA t h a t t h e f o r e s r o u n d has s e n t a message. T h i s f l a s i s dropped i n DISPLA when the messase i s s e r v i c e d RESTRT LOPCNT i n i t i a l i z a t i o n f o r r e s t a r t . Reads LOPCNT from the S T A T U S f i l e and sets i t i n the b a c K s r o u n d J o b . T h i s s e t t i n g i s s e n t t o the f o r e s r o u n d t h r o u s h the s t a r t messase. SCROLL S e t s the c a l l i n g arguments f o r BREAD so t h a t the d i s p l a y b u f f e r w i l l be moved f o r w a r d or bacK by a s p e c i f i e d number of r e c o r d s . SLOOUT Type 2 d i s p l a y d a t a o u t p u t . O u t p u t s the d a t a s t o r e d i n the d i s p l a y b u f f e r t o t h e t e r m i n a l . SLORED Type 2 d a t a r e a d e r . Reads d a t a f r o m d i s K to the d i s p l a y b u f f e r f o r t y p e 2 d i s p l a y s . SLOWDD Type 1 non-EEG d i s p l a y s e t u p . O u t p u t s t h e l a b e l s f o r t h e d i g i t a l d i s p l a y of non-EEG d a t a i n t y p e 1- d i s p l a y s . SLOWUP Type 1 non-EEG u p d a t e . Updates the d i g i t a l d i s p l a y of non-EEG d a t a i n t y p e 1 d i s p l a y s . TAGSTO Timed t a g s t o r a g e on d i s K . S t o r e s a g i v e n t i m e d t a g on d i s k . TBLANK Tag b l a n K i n s . B l a n K s t h e t i m e d t a g p o r t i o n of a s i v e n l i n e of the d i s p l a y b u f f e r . TINSRT Tag i n s e r t i o n . I n s e r t s a t i m e d t a g i n t o a s p e c i f i e d l i n e c f t h a d i s p l a y b u f f e r . TGREAD Timed t a g r e a d i n g . ChecKs i f a t i m e d t a g has been a t t a c h e d t o the r e c o r d s c o n t a i n e d i n a s p e c i f e C number of l i n e s of t h e d i s p l a y b u f f e r . I t t h e n b l a n K s the t i m e d t a g p o r t i o n of t h o s e l i n e s w h i c h do n o t have a t t a c h e d t i m e d t a g s and r e a d s tags i n t o t h o s e t h a t do. TRNSFR TaKes a l i n e f r o m the top of one s e c t i o n o f the d i s p l a y b u f f e r and i n s e r t s i t t o the o t h e r s e c t i o n . C o n t r o l i s r e t u r n e d t o i s r e t u r n e d t o the f i r s t s e c t i o n when t h i s r o u t i n e i s t e r m i n a t e d . T"SET T e r m i n a l s c r e e n i n i t i a l i z a t i o n . C a l l s r o u t i n e s w h i c h w i l l s e t t he t e r m i n a l ' s modes, prosram the Keys, and i n i t i a l i z e a c h a r a c t e r f o n t f o r the DSA ( f o n t 1 6 ) . DK'.BAKCMN.TXT t o TTI MOMA BACKGROUND COMMON BLOCK TABLE / / F / Y / T / B / '/ N /•• / / G / M / / G / / COMMON / K / U / A / R / T / F / A / S / / E / A / E / A / / BLOCK / N / B / L / T / U / U / H / E / T / E / S / T / T / / T / A / S / P / P / P / B / C / D / C / N / T / A / R // 0 / L / I / S / N / N / O / O / O / A / O / N / T / S / / L / ROUTINE / B / D / D / I / I / I / I / M / N / N / P / S / U / / P / BFBLNK 1 X I X 1 1 1 1 BOUND 1 1 1 1 1 1 BREAD 1 1 X X 1 X 1 X 1 1 1 X COPY 1 1 X 1 1 f 1 D*SET 1 1 X X 1 X 1 1 X 1 X X 1 DD2SET 1 1 1 1 1 DISBUP 1 1 X 1 X r i I X X 1 DISPLA 1 X 1 X X 1 X 1 X X 1 X 1 1 X EFG4DD 1 1 X X 1 1 I X EEG4UP 1 1 X X 1 X 1 EEGDLN 1 1 1 1 ENCOIB 1 1 1 1 FASTDD 1 1 • 1 ' 1 1 FASTUP 1 1 X 1 1 FILACT 1 1 x 1 1 FNTS* 1 1 1 1 INCBUF 1 1 • 1 1 INPUT 1 1 X X 1 1 X 1 INTERP 1 1 X X X X X 1 1 X 1 X 1 I QUERY 1 1 1 1 ISLSCA 1 1 1 1 ISWTCH 1 1 X 1 X 1 1 LBLINI 1 1 X 1 1 1 MEXIT 1 1 1 1 1 1 MOMKEY 1 1 1 1 I'- 1 NACTIN 1 1 X X 1 1 j NACTSM 1 1 X X 1 1 j PLOTDD 1 I I X X 1 1 X 1 PLOTUP 1 1 X 1 1 1 RCVCOM 1 1 . ' 1 1 X 1 RESTRT 1 1 1 X X 1 1 1 SCROLL 1 1 X 1 1 1 X 1 SLOOUT 1 1 X X 1 1 X 1 1 X 1 SLORED 1 1 X X X X 1 1 X 1 SLOWDD 1 1 1 X 1 1 I SLOWUP 1 1 X X 1 ' 1 , 1 TAGSTO 1 1 1 X X 1 1 TBLANK 1 X 1 X X 1 1 1 TINSRT 1 1 X X 1 1 1 TGREAD 1 1 X 1 X X X 1 1 1 TRNSFR 1 1 X 1 1 1 TVSET 1 1 1 1 ! NOTE: PLOT i s a common b l o c k from t h e ' g r a p h i c s package 131 MOMA BACKGROUND COMMON BLOCK DESCRIPTION BLANK d e f i n e s a 32 c h a r a c t e r r e s i g n c o n t a i n i n g spaces LOGICAL*l LSPACE<32) COMMON/BLANK/ LSPACE LSPACE = l o s i c a l * l a r r a y i n i t i a l i z e d to 32 space c h a r a c t e r s i n DISPLA on system s t a r t u p . DISBUF d i s p l a y b u f f e r and p o i n t e r s f o r d i s p l a y type 1 ( D l to D4 or b u f f e r modes 1 and 2) LOGICAL*l LPW4BF<32,10,4),LPW2BF(32,20,2),LTGBUF(9,20) EQUIVALENCE (LPW4BF(1,1,1),LPB2BF(1,1,1)) INTEGER L0PBUF(20),ITMBUF(2,20),ISLBUF(4,20) COMMON/DISBUF/ IDSBFP,IBFTOP,IBFBOT,IBFMOD, i f IBFMOD = i ; the r e s t of DISBUF = LOPBUF,ITMBUF,ISLBUF,LPW4BF,LTGBUF i f IBFMOD = 2, the r e s t oF DISBUF = LOPBUF,ITMBUF,ISLBUF,LPW2BF,LTGBUF 870 words IDSBFP = D i s p l a y buFPer p o i n t e r . G i v e s the buFFer o F F s e t oF the r e c o r d which r e s i d e s a t the top oF the c u r r e n t l y a c t i v e s e c t i o n oF the d i s p l a y b uFFer. IBFTOP = T O P of c u r r e n t l y a c t i v e s e c t i o n p o i n t e r . G i v e s the h i s h e s t buFFer o F F s e t a l l o c a t e d t o the c u r r e n t l y a c t i v e s e c t i o n oF the d i s p l a y buFFer. IBFBOT = Bottom oF c u r r e n t l y a c t i v e s e c t i o n p o i n t e r . G i v e s the l o w e s t buFFer o F F s e t a l l o c a t e d t o the c u r r e n t l y a c t i v e s e c t i o n oF the d i s p l a y b uFFer. note? On s t a r t u p o r d i s p l a y c hanse, the i n i t i a l s e t t i n g of IBFTOP and IBFBOT d e F i n e the " s c r o l l e d s e c t i o n " oF the d i s p l a y buFFer. r ° ; the s c r o l l e d s e c t i o n i n c o r p o r a t e s a l l buFFer l o c a t i o n s between IBFBOT and IBFTOP i n c l u s i v e and the u n s c r o l l e d s e c t i o n w i l l occupy the r e m a i n i n g buFFer l o c a t i o n s . Note t h a t s i n c e the rows a l l o c a t e d to t h e s e s e c t i o n s must be c o n t i g u o u s , e i t h e r IBFBOT must be s e t t o 1 and/or IBFTOP must be s e t t o the l a r g e s t o F F s e t p o s s i b l e (10 F o r mode 1 and 20 Fo r mode 2 ) . The ISWTCH r o u t i n e may produce u n d e s i r e a b l e r e s u l t s i P t h i s c o n d i t i o n i s not s a t i sF i ed. IBFMOD = B u f f e r mode i n d i c a t o r . I n d i c a t e s the way i n which t he 870 words oF buFFer a r e used. = 1 , 4 s e c t i o n s of 10 DSA r e c o r d s , each w i t h 32 e l e m e n t s . = 2" 2 s e c t i o n s of 20 DSA r e c o r d s , each w i t h 32 e l e m e n t s . = 3, see below LOPBUF = MOMA c y c l e numbers o f the b u f f e r e d r e c o r d s . ITMBUF = Time l a b e l s f o r the b u f f e r e d r e c o r d s . ITMBUFd,*) = the hour of the sample ITMBUF(2,«) = the minute of the sample 132 ISLBUF = B u f f e r f o r the non-EEG d a t a . ISLBUF(N,*> = d a t a sample from the Nth non-EEG c h a n n e l 1<=N<=4 LPW*BF = B u f f e r f o r the DBA. Each element c o n t a i n s an ASCII c h a r a c t e r w h i c h w i l l be r e p r e s e n t e d on the t e r m i n a l ' s s c r e e n as a g r a y l e v e l a c c o r d i n g t o the d e f i n i t i o n s i n c h a r a c t e r f o n t 16. LPW4BF(32,*,4) = 32 elements of DSA fro m 4 c h a n n e l s . - maximum of 10 r e c o r d s LPW2BF(32,*,2) = 32 elements of DSA from 2 c h a n n e l s . - maximum of 20 r e c o r d s - note t h a t i n s t e a d of DSA d a t a , i t i s p o s s i b l e t o b u f f e r o t h e r t h i n g s , such as timed t a g s , (see d i s p l a y s D3 and D4) LTGBUF = An 8 c h a r a c t e r b u f f e r f o r the s t o r a g e of ti m e d t a g s . A n i n e t h element was i n c l u d e d becaure a n u l l c h a r a c t e r i s i n s e r t e d as a c h a r a c t e r s t r i n g t e r m i n a t o r by the system's c h a r a c t e r s t r i n g h a n d l i n g r o u t i n e s . f o r d i s p l a y t y p e 2 (D5 t o D6 o r b u f f e r mode 3) REAL SLOBUF(4,79),TMBUF(79) INTEGER L0PBUF(79) COMMON/DISBUF/ IDSBFP,IBFTOP,IBFBOT,IBFMOD, i f IBFMOD = 3; the r e s t of DISBUF = LOPBUF,TMBUF,SLOBUF 869 words IDSBFP = Not used IBFTOP = Not used IBFBOT = Not used IBFMOD = B u f f e r mode i n d i c a t o r . I n d i c a t e s the way i n which t he 870 words of b u f f e r a r e used. = 1! See above See above B u f f e r i n g f o r U P t o 79 samples from 4 non-EEG c h a n n e l s . Note t h a t the g r a p h i c s r o u t i n e s use r e a l numbers so r e a l numbers a r e b u f f e r e d . 3; LOPBUF TMBUF SLOBUF MOMA c y c l e numbers which c o r r e s p o n d t o the buFFered samples. BuFFer F o r the s t o r a g e oF t i m e s a t which the buFFered samples were a c q u i r e d . Time i s s t o r e d i n RT-11 's i n t e r n a l time Format. S t o r a g e F o r U P to 79 samples From 4 non-EEG d a t a c h a n n e l s . T h i s d a t a i s bounded by BOUND and s c a l e d by ISLSCA p r i o r t o s t o r a g e i n t h i s a r r a y . R e a l numbers a r e s t o r e d i n o r d e r to o b t a i n c o m p a t a b i 1 i t y w i t h the g r a p h i c s pacKase. 133 DSPLAY parameters r e l a t e d to the d i s p l a y c o n f i a u r a t i o n For d i s p l a y type 1 (Dl to D4 or b u f f e r mode 1 and 2)J INTEGER ITMFRQ(2)»IR0W(2),LENTHY(2)>ICH(4) COMMON/DSPLAY/ IDISPL.NUMSLO.LINE.NUMEEG.-NUMSEC,INC/ITMFRQ,IROW,LENTHY.ICH IDISPL = The number of - the c u r r e n t l y a c t i v e d i s p l a y . NUMSLO;= The number of channels of non-EEG data b u f f e r e d and d i s p l a y e d , ie? ISLBUF(1,»> to ISLBUF(NUMSLO,«) w i l l be used to b u f f e r data from the F i r s t NUMSLO non-EEG channels. The non-EEG data a s s o c i a t e d with the EEG re c o r d at the top of the s c r o l l e d s e c t i o n w i l l be d i s p l a y e d i n a d i g i t a l format. LINE = The top row i n the workspace p o r t i o n of the t e r m i n a l ' s screen which w i l l be used f o r the d i g i t a l d i s p l a y of non-EEG data. The f o l l o w i n g NUMSLO/2-1 rows w i l l be used f o r t h i s purpose. NUMEEG = The number of EEG channels buffered f o r d i s p l a y . ie? LPW#BF(32.*.1) to LPW#BF(32.»,NUMEEG) w i l l be used to b u f f e r EEG data. The EEG channels which are buffer e d i n these l o c a t i o n s are determined by ICH. NUMSEC = Usins the r o u t i n e FASTUP. ASCII data from two of the EEG channel's b u f f e r s i s typed out side by s i d e . When us i n s the 4 channel b u f f e r i n s mode (mode 1). there are two regions of the screen i n t o which output i n t h i s format w i l l be typed. These regions have been c a l l e d " d i s p l a y r e s i o n s " . I t i s p o s s i b l e to output to only one d i s p l a y r e g i o n w h i l e i n mode 1. thus usina only h a l f of the d i s p l a y b u f f e r . This i s done by s e t t i n g NUMSEC. B u f f e r mode 1, NUMSEC=i; =2; B u f f e r mode 2, NUMSEC=1? one d i s p l a y r e g i o n , only h a l f of the b u f f e r used two d i s p l a y r e s i o n s . complete b u f f e r i s used. one d i s p l a y r e a i o n , complete b u f f e r i s used. INC Note that usina FftSTUP i n i t s present form and wh i l e i n b u f f e r mode 1. b u f f e r channels 1 and 3 are typed i n t o the f i r s t d i s p l a y r e s i o n and b u f f e r channels 2 and 4 are typed i n t o the second d i s p l a y r e a i o n . This a l l o c a t i o n of b u f f e r channels can e a s i l y be changed by a l t e r i n g the EEGDLN c a l l s i n FASTUP and/or chanains the s e t t i n a of the parameter IOFST w i t h i n FASTUP. The record increment between consecutive buFFered r e c o r d s , w i t h i n the s c r o l l e d s e c t i o n . i e . i F INC =2. every second record acquired by MOMA w i l l be buffered and d i s p l a y e d , even thouah every record i s stored on d i s k . ITMFRQ = The Frequency of time l a b e l l i n g i n DSA d i s p l a y s . ITMFRG(1) = f o r the s c r o l l e d s e c t i o n ITMFRGH2) = For the u n s c r o l l e d s e c t i o n i e f i f ITMFRQ(1)=2. every second d i s p l a y l i n e i n the s c r o l l e d s e c t i o n of the DSA d i s p l a y s w i l l have a time l a b e l attached to i t . Note, however, that ITMFRG s e t t i n g s a f f e c t only the d i s p l a y of time l a b e l s , every buff e r e d r e c o r d w i l l have an accurate time l a b e l i n ITMBUF. attached to i t . IROW = The top row i n the workspace r e 3 i o n of the t e r m i n a l ' s screen to which the d i s p l a y r e s i o n s are to be w r i t t e n . D i s p l a y r e s i o n s are described under NUMSEC. IR0W(1) = the top row of d i s p l a y r e a i o n 1. IR0W(2) = the top row of d i s p l a y r e a i o n 2. 1 3 4 LENTHY = The l e n a t h , i n rowsV of the Y a x i s of the DSA d i s p l a y s i n a g i v e n d i s p l a y r e g i o n . Note t h a t t h i s s e t s the l e n g t h of the Y a x i s and not the s i z e of the d i s p l a y r e g i o n . Thusr i f the s p e c i f i e d Y the d i s p l a y r e g i o n u p d a t e . LENTHY(1) = LENTHY(2) = a x i s l e n g t h i s s m a l l e r than the s i z e of the X a x i s w i l l be o v e r w r i t t e n on d i s p l a y l e n g t h of the Y a x i s i n d i s p l a y r e g i o n 1 l e n g t h of the Y a x i s i n d i s p l a y r e g i o n 2. ICH = Data t o b u f f e r c o n n e c t i o n numbers. A s s o c i a t e s a a i v e n EEG d a t a c h a n n e l w i t h a a i v e n EEG b u f f e r c h a n n e l , i e , i f ICH(2)=3, the d a t a a c q u i r e d by the t h i r d A/D c h a n n e l used f o r EEG s a m p l i n g and the d a t a s t o r e d i n P0WER3.DAT on the d a t a d i s k w i l l be b u f f e r e d i n LPW#BF<*r*,2) f o r d i s p l a y t y p e 2 (D5 to DB or b u f f e r mode 3 ) , INTEGER ICH(4) COMMON/DSPLAY/ IDISPL ,NUMSLO,ILINE,ICOLMN,XSIZE,YSI2E,ISTREC,NREC , INC , ICH IDISPL = The number of the c u r r e n t l y a c t i v e d i s p l a y NUMSLO 3 The number of c h a n n e l s of non-EEG d a t a t o be d i s p l a y e d . Note t h a t a l l f o u r non-EEG c h a n n e l s a r e r e a d but o n l y NUMSLO of t h e s e c h a n n e l s w i l l be p l o t t e d . I L I N E = The bottom edae of the t i m e p l o t . i e ; I f ILINE=30, row 30 of the t e r m i n a l ' s workspace a r e a w i l l be the bottom row ( h i a h e s t row number) used f o r the time p l o t . ICOLMN = The l e f t edge of the time p l o t . i e , I f IC0LMN=30, column 30 of the t e r m i n a l ' s workspace a r e a w i l l be the l e f t m o s t column ( l o w e s t column number) used f o r the time p l o t . XSIZE = The d i s t a n c e , i n em's, which the time p l o t w i l l e x t e n d i n the X d i r e c t i o n . 10.B < XSIZE < 21.6 YSIZE = The d i s t a n c e , i n em's, w h i c h the time p l o t w i l l e x t e n d i n the Y d i r e c t i o n . 7+NUMSL0/2 < YSIZE < 14.7 ISTREC = The most r e c i e n t r e c o r d of non-EEG d a t a t o be b u f f e r e d and d i s p l a y e d . NREC = The number of r e c o r d s t o be b u f f e r e d and d i s p l a y e d . INC = R e c o r d i n c r e m e n t between c o n s e c u t i v e b u f f e r e d r e c o r d s . ICH = B u f f e r t o d i s p l a y c o n n e c t i o n numbers. Connects a a i v e n d i s p l a y b u f f e r c h a n n e l w i t h a g i v e n p l o t t i n g o r d e r , i e , Data from non-EEG d a t a c h a n n e l s which i s s t o r e d on d i s k i n the f i l e ISLDAT.DAT i s r e a d i n t o the d i s p l a y b u f f e r . The d a t a c h a n n e l numbers a r e the same as the b u f f e r c h a n n e l numbers. The d a t a b u f f e r e d i n the I C H ( I ) t h b u f f e r c h a n n e l i s a s s i g n e d l i n e t y p e I and i s the I t h c h a n n e l p l o t t e d . Thus, i f ICH(2)=3, the second non-EEG d a t a c h a n n e l , which i s b u f f e r e d i n the second b u f f e r c h a n n e l , i s a s s i g n e d l i n e t y p e 3 and i s the t h i r d c h a n n e l p l o t t e d . 135 INPTRT p a r a m e t e r s used i n INPUT and INTERP - used t o p r e v e n t problems i r i ~ o v e r l a y i n g INTERP <INPUT i n r o o t ) COMMON/INPTRT/ ICOMCH,ITAGGU,IDIR,IUPOFF,UPSAVE ICOMCH = The ADE f o r MOMA's command c h a r a c t e r - u s u a l l y s e t t o 123 o r "-C". ITAGQU = Query on timed t a s enab 1 e/d i sab 1 ' - U g . =0? a qu e r y i s s e n t on r e c e i p t of a timed t a s = ^ > H it II {^Qf 1 1 1 1 1 1 1 1 1 1 1 1 1 1 IDIR = S c r o l l i n g d i r e c t i o n i n d i c a t o r =1T s c r o l l i n g o p e r a t i o n s move f o r w a r d i n t i m e . =-1; " " " backward " IUPOFF = D i s p l a y update i n d i c a t o r =0? d i s p l a y s and b u f f e r s updated on f o r e g r o u n d message r e c e i p t _ j ; II II II NOT 11 11 " " 11 UPSAVE = Temporary s t o r a g e l o c a t i o n f o r UPDIS when d i s p l a y update i s t u r n e d o f f . I n s e r t e d t o p r e v e n t t h e l o s s of t h i s v a l u e when INTERP i s o v e r l a y e d . INPUTB c h a r a c t e r b u f f e r used t o b u f f e r l i n e s e n t e r e d a t the key b o a r d L0GICAL*1 LINBUF(82> COMMON/INPUTB/ ICHCNT»LINBUF ICHCNT = The number of c h a r a c t e r s p r e s e n t l y i n t h e l i n e i n p u t b u f f e r . LINBUF = The l i n e i n p u t b u f f e r . IOBUF 25S word a r e a used as a d i s k I/O b u f f e r INTEGER IREADB<256) COMMON/IOBUF/ IREADB IREADB = A 25G word a r e a to be used as a r e a d / w r i t e b u f f e r f o r d i s k I/O. IOCHAN c o n t a i n s c h a n n e l i n f o r m a t i o n about the d a t a f i l e s , i e ? p e r m i t s the use of IREOPN f o r a l l d i s k I/O. INTEGER ICHSAV<5,3> COMMON/IOCHAN/ ICHSAV ICHSAU = Used by FILACT to ISAUES the s t a t u s of a l l the f i l e s on the "MOMA s l a v e d i s k " . T h i s w i l l then be used i n a l l t he d i s k I/O r o u t i n e s t o IREOPN the f i l e s w i t h o u t the use of the USR r o u t i n e . 136 MODES P l a s s c o n t r o l l i n g t he mode of b u f f e r and d i s p l a y updates f o r d i s p l a y t y p e 1 ( D l t o D4 or b u f f e r modes 1 and 2) L0GICAL*1 LUPDIS(2.2> INTEGER IM0DEC2) COMMON/MODES/ LUPDISrIMODE,IFORM LUPDIS = Used i n EEG4UP t o c o n t r o l the update of the d a t a b u f f e r and/or the d i s p l a y . L U P D I S ( l . l ) = l J update s c r o l l e d s e c t i o n of d a t a b u f f e r LUPDIS(2.1) = 1; " " " " d i s p l a y LUPDIS(1.2) = I , " u n s c r o l l e d " " d a t a b u f f e r LUPDIS(2.2> = I , " " " " d i s p l a y IMODE = I n d i c a t e s t he way i n which d a t a i s t o be put i n t o the d i s p l a y b u f f e r . = +2 or -27 d a t a i s o v e r l a y e d onto the d i s p l a y b u f f e r . = +1 or - i ; " " i n s e r t e d " = p o s i t i v e ; d a t a i s p l a c e d a t the t o p of the d i s p l a y b u f f e r . = n e g a t i v e ; " " " " " bottom IFORM = I n d i c a t e s the o u t p u t f o r m a t of the l i n e s s e n t f r o m EEGDLN. = i ; p a r a l l e l DSA d i s p l a y s w i t h NO f o n t s e t t i n g i n s t r u c t i o n s i n the c h a r a c t e r s t r i n g s s e n t . = Z'r P a r a l l e l DSA d i s p l a y s w i t h f o n t s e t t i n g i n s t r u c t i o n s i n t he c h a r a c t e r s t r i n g s s e n t . = 3; R i g h t s i d e of s c r e e n c o n t a i n s a DSA d i s p l a y , l e f t s i d e i s used f o r Io n s ti m e d t a g s . NO f o n t s e t t i n g i n s t r u c t i o n s i n t he c h a r a c t e r s t r i n g s s e n t . = 4; R i g h t s i d e of s c r e e n c o n t a i n s a DSA d i s p l a y , l e f t s i d e i s used f o r l o n g t i m e d t a g s . Font s e t t i n g i n s t r u c t i o n s i n the c h a r a c t e r s t r i n g s s e n t . f o r d i s p l a y t y p e 2 (D5 to DS or b u f f e r mode 3) COMMON/MODES/ UPDIS UPDIS = used by PLOTUP t o p e r m i t or bl o c K e n t r y to SLQRED and SLOOUT. = 0 ; SLQRED and SLOOUT a r e NOT e n t e r e d . PLOTUP r e t u r n s t o i t s c a l l i n g r o u t i n e (DISPLA) i m m e d i a t e l y on e n t r y . = a n y t h i n g e l s e ; SLORED and SLOOUT a r e e n t e r e d from PLOTUP. 137 NACT a r e a where the r e c o r d numbers of r e c o r d s i n the u n s c r o l l e d s e c t i o n of the l a s t t y p e 1 d i s p l a y . ( s a v e d by NACTSV) INTEGER NACTNM(20) COMMON/NACT/ NACTNM NACTNM = R e c o r d numbers of the u n s c r o l l e d s e c t i o n of the p r e v i o u s t y p e 1 d i s p l a y . T h i s a r r a y i s .loaded by NACTSM a t the s t a r t of a d i s p l a y chanae and then l o a d e d by NACTIN i n t o t he u n s c r o l l e d s e c t i o n of the n e x t t y p e 1 d i s p l a y . NONEEG l a b e l s f o r the non-EEG d i s p l a y s L0GICAL*1 LABELS(32,4) INTEGER LBLLNG(4> COMMON/NONEEG/ LBLLNGrLABELS LBLLNG = The l e n a t h of the l a b e l s c o n t a i n e d i n LABELS. LABELS = L a b e l s t h a t a r e t o be used to i d e n t i f y the non-EEG • , d a t a i n both t y p e 1 and typ e 2 d i s p l a y s . These l a b e l s can be U P t o 31 c h a r a c t e r s i n l e n a t h and a r e i n i t i a l i z e d i n the r o u t i n e LBLINI on system s t a r t u p . PNTSAV d i s p l a y b u f f e r p o i n t e r save l o c a t i o n s used by ISWTCH COMMON/PNTSAM/ IPNT1,IPNT2 IPNT1 = Saves the p o s i t i o n of the s c r o l l e d s e c t i o n p o i n t e r when ISWTCH s w i t c h e s t o the u n s c r o l l e d s e c t i o n . IPNT2 = Saves the p o s i t i o n of the u n s c r o l l e d s e c t i o n p o i n t e r when ISWTCH s w i t c h e s t o the s c r o l l e d s e c t i o n . note? both t h e s e p a r a m e t e r s s h o u l d be s e t to 0 whenever the d i s p l a y i s chanaed. 138 STATE s c a l e p a r a m e t e r s and par a m e t e r s i n d i c a t i n g the g e n e r a l s t a t e of MDMA REAL SL0MLT(4>.SL0ADD(4>,SL0T0P(4).SL0B0TC4) COMMON/STATE/ MSGFLG.LOPCNT,ITINCR,PMAX,FMAX.SLOMLT.SLOADD,SLOTOP.SLOBOT MSGFLG = r a i z e d by RCVCOM t o s i g n a l t he a r r i v a l of an update messase from the f o r e g r o u n d Job (AQUIRE). T h i s f l a g i s dropped by DISPLA a f t e r t he message i s s e r v i c e d . =0. no message has been queued y e t . . =1. a message has been queued. LOPCNT = The number of MOMA c y c l e s t h a t have a l r e a d y o c c u r e d . p a r a m e t e r i s used t o i n d e x t he data.on t he d a t a d i s k . T h i s ITINCR = not used PMAX = Power magnatude c o r r e s p o n d i n g t o the maximum i n t e n s i t y c h a r a c t e r i n the DSA. FMAX = The f r e q u e n c y , i n c y c l e s p e r sec o n d , which c o r r e s p o n d s t o the end of the f r e q u e n c y a x i s i n DSA p l o t s . T h i s parameter i s o n l y used f o r the d e t e r m i n a t i o n of s c a l i n g l a b e l s . SLOMLT = The m u l t i p l i c a t i v e s c a l i n g f a c t o r s used i n ISLSCA f o r the f o u r non-EE& d a t a c h a n n e l s . ISLSCA i s c a l l e d p r i o r t o b u f f e r i n g the d a t a f o r both t y p e 1 and typ e 2 d i s p l a y s . SLOADD = The a d d i t i v e s c a l i n g f a c t o r s used i n ISLSCA f o r the f o u r non-EEG d a t a c h a n n e l s . ISLSCA i s c a l l e d p r i o r t o b u f f e r i n g the d a t a f o r both type 1 and type 2 d i s p l a y s . SLOTOP = The upper l i m i t s used i n BOUND f o r the f o u r non-EEG d a t a c h a n n e l s . BOUND i s c a l l e d p r i o r t o b u f f e r i n g t he d a t a f o r t y p e two d i s p l a y s o n l y ( t i m e p l o t s ) . SLOBOT = The low e r l i m i t s used i n BOUND f o r the f o u r non-EEG d a t a c h a n n e l s . BOUND i s c a l l e d p r i o r to b u f f e r i n g the d a t a f o r t y p e two d i s p l a y s o n l y ( t i m e p l o t s ) . USRTAG b u f f e r t o communicate time d t a g s t o v a r i o u s r o u t i n e s LOGICAL*l LTAG(32) COMMON/USRTAG/ ITGFLG.LTAG ITGFLG = F l a g s the e x i s t a n c e of an a c t i v e timed t a g i n LTAG. When DISBUP i n c o u n t e r s t h i s f l a g , i t i n s e r t s t h a t t a g i n t o the d i s p l a y b u f f e r a l o n g w i t h t he J u s t r e c e i v e d f o r e g r o u n d message. = - i ; a timed t a g i s p r e s e n t . = a n y t h i n g e l s e . NO ti m e d t a g p r e s e n t . LTAG = C o n t a i n s t i m e d t a g s of U P t o 31 c h a r a c t e r s . DK:BAKCAL.TXT t o TT: ROUTINE MOMA BACKGROUND CALLING ROUTINES 1 CALLING ROUTINE(S) BFBLNK 1 BREAD BOUND 1 SLORED BREAD 1 NACTIN,SCROLL COPY 1 TRNSFR D*SET 1 DISPLA,INTERP DD2SET 1 EEG4DD DISBUP 1 EEG4UP DISPLA 1 EEG4DD 1 DISPLA EEG4UP 1 DISPLA EEGDLN 1 FASTUP ENC016 1 BREAD,DISBUP FASTDD 1 EEG4DD FASTUP 1 EEG4UP FILACT 1 DISPLA FNTS* 1 TVSET INCBUF 1 BREAD,DISBUP,NACTSV,SCROLL,TBLANK,TGREAD,TRNSFR INPUT 1 DISPLA INTERP 1 INPUT IQUERY 1 DISPLA,INTERP ISLSCA 1 BREAD,DISBUP,SLORED ISWTCH 1 EEG4UP,NACTIN,NACTSV,TRNSFR LBLINI 1 DISPLA MEXIT 1 INTERP MOMKEY 1 TVSET NACTIN 1 INTERP NACTSV 1 INTERP PLOTDD 1 DISPLA PLOTUP 1 DISPLA RCVCOM 1 DISPLA RESTRT 1 DISPLA SCROLL 1 DISPLA,INTERP SLOOUT 1 PLOTUP SLORED 1 PLOTUP SLOWDD 1 EEG4DD SLOWUP 1 EEG4UP TAGSTO 1 DISPLA,INTERP TBLANK 1 DISBUP,TGREAD TINSRT 1 DISBUP,TGREAD TGREAD 1 BREAD TRNSFR 1 INTERP TVSET 1 DISPLA,INTERP GRAPHICS ROUTINES AREA 1 PLOTDD LINS1D 1 PLOT1D LINTYP 1 LINS1D,RLINE PLINE 1 XAXIS,YAXIS PLOT1D 1 SLOOUT PNTOUT 1 VECGEN RLINE 1 PLINE,PLOTDD,SLOOUT,XAXIS,YAXIS STRING 1 PLOTDD,SLOOUT,XAXIS,YAXIS VECGEN 1 RLINE,LINS1D XAXIS 1 PLOTDD YAXIS 1 PLOTDD 140 ROUTINE I MOMA BACKGROUND CALLED ROUTINES (n o t i n c l u d i n g SYSLIB r o u t i n e s ) CALLED ROUTINE(S) BFBLNK BOUND BREAD COPY D*SET DD2SET DISBUP DISPLA EEG4DD EEG4UP EEGDLN ENC01B FASTDD FASTUP FILACT FNTS* INCBUF INPUT INTERP IQUERY ISLSCA ISWTCH LBLINI MEXIT MOMKEY NACTIN NACTSV PLOTDD PLOTUP RCVCOM RESTRT SCROLL SLOOUT SLORED SLOWDD SLOWUP TAGSTO TBLANK TINSRT TGREAD TRNSFR TVSET BFBLNK rENC016,INCBUF,ISLSCA,TGREAD ENC01G,INCBUF,ISLSCA,TBLANK,TINSRT D1SET,EEG4DD,EEG4UP,FILACT,INPUT,IQUERY,LBLINI PLOTDD,PLOTUP,RCVCOM,RESTRT,SCROLL,TAGSTO,TVSET DD2SET,FASTDD,SLOWDD DISBUP,FASTUP,ISWTCH,SLOWUP EEGDLN INTERP D*SET,IQUERY,MEXIT,NACTIN,NACTSV,SCROLL,TAGSTO,TRNSFR,TVSET BREAD,ISWTCH INCBUF,ISWTCH AREA,RLINE,STRING,XAXIS,YAXIS SLOOUT,SLORED BREAD,INCBUF PLOTID,RLINE,STRING BOUND,ISLSCA INCBUF INCBUF,TBLANK,TINSRT COPY,INCBUF,ISWTCH FNTS*,MOMKEY GRAPHICS ROUTINES AREA 1 LINS1D 1 LINTYP,VECGEN LINTYP 1 PLINE 1 RLINE PLOT1D 1 LINS1D PNTOUT 1 RLINE 1 LINTYP,VECGEN STRING 1 VECGEN 1 PNTOUT XAXIS 1 PLINE,RLINE,STRING YAXIS 1 PLINE,RLINE,STRING 141 DK: BAKTST.TXT t o TT: MOMA 8ACKGR0UND TESTING ROUTINES BLNKT = T e s t s the BFBLNK r o u t i n e . Loads the t e x t b u f f e r w i t h s a r b a a e , t y p e s i t ' o u t r c a l l s BFBLNK 20 t i m e s t o b l a n k the b u f f e r , and t y p e s i t out a a a i n . ENCTST = T e s t s the ENC01G r o u t i n e . Loads the power a r r a y w i t h numbers f r o m -6 to 66 and c a l l s ENC016 w i t h PMAX s e t to SO. W i l l r e s u l t i n the f u l l r a n a e of a r a y l e v e l s b e i n a t y p e d out and w i l l s a t u r a t e a t O and 60. IGUTST = T e s t s the IQUERY r o u t i n e . Sends q u e r i e s both w i t h and w i t h o u t an appended "(Y o r N ) " . R e s p o n d i n a w i t h "S<RETURN>" s t o p the proaram. FNTTST = T e s t s a l l c h a r a c t e r s i n c h a r a c t e r f o n t 16. Types the ASCII c h a r a c t e r s f r o m 32 t o 100 on one l i n e and t y p e s t h e f o n t l 6 e q u i v a l e n t s below. Uses FNTS* to i n i t i a l i z e the c h a r a c t e r f o n t . FORSIM = R o u t i n e t o r u n i n the f o r e s r o u n d w h i l e DISPLA i s r u n n i n g i n the b a c K s r o u n d . Sends 4 t e s t s p a t t e r n s i n a messaae of the same f o r m a t as AGUIRE. I f c o m p i l e d u s i n s the /DEBUG o p t i o n , i t a l s o s t o r e s t h e s e p a t t e r n s on the s l a v e d i s K . PLTDDT = Checks out the d a t a p l o t t i n a r o u t i n e . C a l l s FILACT. L B L I N I . PLOTDD. and PLOTUP and i n d i r e c t l y c a l l s SLOOUT, SLORED. BOUND, and ISLSCA to p l o t the non-EEG d a t a s t o r e d on the d a t a d i s k . F i l e s c o p i e d : 142 A2.8 Graphics Routines Documentation DK:GPHEXP.TXT t o TT: GPHLIB GENERAL DESCRIPTION n o t e ; the "GRAPHICS ROUTINE INTERCONNECTION" d i a s r a m s h o u l d be viewed w h i l e r e a d i n g t he F o l l o w i n g t e x t . GPHLIB.OBJ c o n t a i n s a number oF F o r t r a n g r a p h i c s r o u t i n e s d e s i g n e d F o r the T e K t r o n i x 4025 g r a p h i c s t e r m i n a l . These r o u t i n e s maKe use oF the GRA, L I N , STR. and MEV commands and p r o v i d e the u s e r w i t h a d a t a p l o t t i n g and F i g u r e g e n e r a t i o n c a p a b i l i t y . I t i s assumed t h a t the t e r m i n a l ' s command c h a r a c t e r i s backquote " 4 " and t h a t the command l o c k o u t Key i s oFF. T i m e d e l a y s have been put i n t o the r o u t i n e s so t h a t e v e r y F u n c t i o n can be used w i t h t h e t e r m i n a l a t 9600 baud and no F i l l c h a r a c t e r s between l i n e s . However, when a number of t h e s e f u n c t i o n s a r e c a l l e d i n r a p i d s u c c e s s i o n , i t may be n e c e s s a r y t o i n s e r t e x t r a time d e l a y s i n t o the c a l l i n g program. S u b r o u t i n e s have been w r i t t e n t o o u t p u t f o u r of the t e r m i n a l ' s g r a p h i c s commands; AREA sends the GRA command, LINTYP sends the LIN command, STRING sends the STR command, and UECGEN sends the VEC command. BORDER s i m p l y o u t l i n e s t h e g r a p h i c s a r e a w i t h a l i n e of g i v e n l i n e t y p e but does not maKe use of VECGEN. A l l o t h e r r o u t i n e s i n the package d i r e c t l y or i n d i r e c t l y c a l l t h e s e r o u t i n e s when the L I N , STR, and VEC commands ar e needed. Note t h a t AREA must be the f i r s t r o u t i n e c a l l e d s i n c e i t i n i t i a l i z e s v a r i o u s common b l o c k p a r a m e t e r s and s c a l e f a c t o r s . On t he n e x t l e v e l , a number of s i m p l e l i n e g e n e r a t i o n r o u t i n e s Here w r i t t e n . RLINE g e n e r a t e s a l i n e w i t h g i v e n r e c t a n g u l a r c o o r d i n a t e s , PLINE g e n e r a t e s a l i n e w i t h g i v e n p o l a r c o o r d i n a t e s , LINES c o n n e c t s the p o i n t s c o n t a i n e d i n a g i v e n a r r a y , and LINS1D i s a s i n g l e d i m e n s i o n v e r s i o n of LINES. By s i n g l e d i m e n s i o n I mean t h a t the r o u t i n e i s g i v e n an a r r a y c o n t a i n i n g a l l t he p o i n t s of one d i m e n s i o n , an a d d i t i v e f a c t o r A, and a m u l t i p l i c a t i v e f a c t o r B. The u n s p e c i f i e d d i m e n s i o n i s then o b t a i n e d by assuming i t conforms to the e q u a t i o n R ( I ) = B*I+A. The above r o u t i n e s use UECGEN and LINTYP. Making use of the l i n e g e n e r a t i o n r o u t i n e s a r e two c l a s s e s of " h i g h e r l e v e l " r o u t i n e s ? f i g u r e g e n e r a t i o n r o u t i n e s and P l o t t i n g r o u t i n e s . The f o l l o w i n g two p a r a g r a p h s d e s c r i b e t h e s e two c a t a g o r i e s . One main f i g u r e g e n e r a t i o n r o u t i n e was w r i t t e n (FIGURE). T h i s r o u t i n e draws a NUM s i d e d f i g u r e i n s c r i b e d a t a g i v e n a n g l e w i t h i n an undrawn c i r c l e of g i v e n r a d i u s . T h i s r o u t i n e i s then used to g e n e r a t e a r c s which s u b t e n d a g i v e n a n g l e (CURVE) and NUM s i d e s p o l y g o n s (POLY). WARP ex t e n d s the c a p a b i l i t y of t h e s e r o u t i n e s . When c a l l e d , WARP a l t e r s t h e s c a l i n g f a c t o r s which c o n v e r t the c a l l i n g arguments of VECGEN to p i x e l s . C h a n g i n g t h e s e f a c t o r s has the e f f e c t of s t r e t c h i n g o r c o m p r e s s i n g t h e X and/or the Y d i m e n s i o n . Thus, f o r example, a c i r c l e w i l l be c o n v e r t e d t o an o v a l and a s s u a r e w i l l be c o n v e r t e d t o a r e c t a n g l e . A number of r o u t i n e s f o r the s e n e r a t i o n of d a t a p l o t s have been w r i t t e n . XAXIS and YAXIS draw the axes f o r t he p l o t s i n a f o r m a t which p r o v i d e s f o r t he l a b e l l i n g and s c a l i n g . TITLE P l a c e s an u n d e r l i n e d c h a r a c t e r s t r i n g a t the t o p of the Y a x i s and c e n t e r e d a l o n g the X a x i s . PLOT and PL0T1D can then be used t o o u t p u t d a t a t o t h i s g raph a c c o r d i n g t o the a x i s s c a l i n g f a c t o r s . PLOT o u t p u t s X,Y c o o r d i n a t e s s p e c i f i e d i n an a r r a y and PL0T1D i s s i v e n an a r r a y c o n t a i n i n g e i t h e r the X d a t a o r the Y d a t a and p l o t s by l i n e a r l y i n c r e m e n t i n g t he o t h e r d i m e n s i o n (see the d e s c r i p t i o n of LINS1D). S c a l i n g of the axes can be done i n two ways. F i r s t l y , a b s o l u t e s c a l e f a c t o r s can be s p e c i f i e d as arguments f o r the a x i s g e n e r a t i o n r o u t i n e s . S e c o n d l y , AUTOSC can be used t o s e t the a x i s s c a l i n g f a c t o r s t c v a l u e s which accomodate the d a t a i n a g i v e n a r r a y . F o r t h i s r o u t i n e t o f u n c t i o n p r o p e r l y , i t must be c a l l e d b e f o r e e i t h e r XAXIS or YAXIS because i t a l t e r s t he way i n whi c h the arguments t o t h e s e r o u t i n e s a r e h a n d l e d . The o n l y o t h e r l i m i t a t i o n on the c a l l i n g o r d e r of p l o t t i n g r o u t i n e s i s t h a t XAXIS and YAXIS must be c a l l e d b e f o r e T I TLE, PLOT and/or PL0T1D a r e c a l l e d . DK:GPHRTN.TXT to TT: GPHLIB ROUTINES DESCRIPTIONS A l l the F o l l o w i n g r o u t i n e s are Found i n the object l i b r a r y GPHLIB.OBJ. AREA Graphics r e a i o n s e t t i n g . Routine to s p e c i f y an area on the te r m i n a l ' s screen i n t o which a l l subsequent g r a p h i c a l f i g u r e s are to be sent. This r o u t i n e must be one of the f i r s t graphics r o u t i n e s c a l l e d i n order to set meaningful r e s u l t s . AUTOSC A u t o s c a l i n s . Sets s c a l i n g values f o r XAXIS and YAXIS accordi n g to the maximum and minimum of a s i v e n a r r a y . BORDER Graphics r e s i o n border. Draws a l i n e of s i v e n l i n e t y p e around the o u t s i d e of the graphics r e s i o n s p e c i f i e d by AREA. CURVE Curve drawing. Draws a curve of a given r a d i u s and anale centered at a s i v e n point on the screen. There i s a l s o an option to connect the ends of the curve to the ce n t r e , thus proucins a pie shaped f i s u r e FIGURE General f i s u r e drawing. Draws a NUM sided f i s u r e i n s c r i b e d i n an undrawn c i r c l e of s i v e n r a d i u s and o r i s i n . The f i r s t s i d e i s at a s i v e n anale from the h o r i z o n t a l and each side describes a given a n s l e . LINES M u l t i p l e l i n e s e n e r a t i o n . Connects the points s p e c i f i e d i n a s i v e n a r r a y with a l i n e of s i v e n l i n e t y p e . LINS1D M u l t i p l e s i n s l e coordinate l i n e g e n e r a t i o n . Given an arr a y c o n t a i n i n g data f o r one c o o r d i n a t e , t h i s r o u t i n e p l o t s a l i n e which increments the other coordinate by a s p e c i f i e d value. LINTYP L i n e t y p e s e t t i n s . Sends a l i n e t y p e chansina i n s t r u c t i o n to the computer i f necessary. PARSET P l o t parameter s e t t i n a . Used by AUTOSC to set the s c a l i n g parameters f o r subsequent p l o t s . PLINE P o l a r c o o r i d i n a t e l i n e , c o o r d i n a t e s . Generates a l i n e s i v e n a set of po l a r PLOT Data p l o t t i n g . P l o t s the X,Y coordinates i n an arra y a c c o r d i n s to the ' s c a l i n a parameter s e t t i n s s set by XAXIS, YAXIS, and/or AUTOSC. PLOT1D S i n g l e dimension data p l o t t i n g . P l o t s s i n s l e dimensional data vs a s i v e n increment. PNTOUT Coordinate output, to the t e r m i n a l . Used by VECGEN to output a s i v e n X,Y coordinate POLY Polyson s e n e r a t i o n . Generates a NUM sided polygon. RLINE Re c t a n s u l a r coordinate l i n e . Generates a l i n e s i v e n a set of re c t a n g u l a r c o o r d i n a t e s . STRING TITLE Character s t r i n 3 output. Outputs a ch a r a c t e r s t r i n 3 to a s i v e n l o c a t i o n i n the graphics area. Graph t i t l e . Produces an unde r l i n e d t i t l e centred along the X a x i s and one l i n e above the Y a x i s . VECGEN Vector g e n e r a t i o n . Generates vectors connecting the p o i n t s s p e c i f i e d i n a s i v e n a r r a y . WARP Dimension warpins. Streaches or compresses the X and the Y dimension by aiven f a c t o r s f o r a l l subsequent f i g u r e s . Usina t h i s f e a t u r e , f o r example, draw ovals i n s t e a d of c i r c l e s or r e c t a n g l e s i n s t e a d of squares. XAXIS X a x i s generation, g r a p h i c s area. Generates an X a x i s at a given p o s i t i o n i n the YAXIS Y a x i s s e n e r a t i o n . Generates a Y a x i s at a aiven p o s i t i o n i n the ara p h i c s area. 144 DK:GPHCMN.TXT t o TT: GRAPHICS COMMON BLOCK TABLE / / P / M / / COMMON / / Y / I•'•/:' / BLOCK / A / T / D / E / N / E / / R / I / N / ROUTINE / A / L / 0 / P AREA + 1 X + 1 — —. — 4. — — -f. • _ X 1 1 AUTOSC 1 I 1 1 X BORDER 1 X 1 1 1 CURVE 1 1 1 1 FIGURE 1 1 1 1 LINES 1 1 1 1 LINS1D 1 1 I X 1 LINTYP 1 1 X I 1 PARSET 1 1 I I PLINE 1 1 1 1 PLOT 1 1 1 I X PLOTID 1 1 1 1 X PNTOUT 1 1 1 1 POLY 1 1 1 1 RLINE 1 1 I I STRING 1 X 1 1 1 TITLE 1 X 1 1 I X VECGEN 1 X 1 1 X 1 WARP 1 X 1 1 1 XAXIS 1 X 1 1 1 X YAXIS 1 X 1 1 I X AREA s c a l e f a c t o r s and g r a p h i c s r e s i o n d i m e n s i o n i n f o r m a t i o n COMMON/AREA/ SCALX,SCALY,IDIMX,IDIMY see note 1 SCALX = X d i m e n s i o n s c a l e f a c t o r . The X c o o r d i n a t e of a l l arguments s e n t to VECGEN w i l l be m u l t i p l i e d by SCALX p r i o r t o o u t p u t . On s t a r t u p , SCALX = 29.5 p i x e l s / c m so the arguments f o r a l l r o u t i n e s w i l l be i n cms. However, u s i n s the WARP r o u t i n e , i t i s p o s s i b l e n 'hanae t h i s f a c t o r . When t h i s happens, the X d i m e n s i o n i s e f f e c t i v e l y s t r e t c h e d or compressed, thus d i s t o r t i n g a l l f i g u r e s drawn, (eg? c i r c l e become o v a l s and s q u a r e s become r e c t a n g l e s ) SCALY = Y d i m e n s i o n s c a l e f a c t o r . Does the same t h i n g f o r the Y d i m e n s i o n as SCALX does f o r the X d i m e n s i o n . I t i s a l s o i n i t i a l i z e d t o 29.5 p i x e l s / c m and can be changed by WARP. IDIMX = The d i m e n s i o n , i n p i x e l s , of the X d i m e n s i o n of the c u r r e n t l a c t i v e g r a p h i c s r e s i o n . Used i n a number of the r o u t i n e s t o i n s u r e t h a t the s p e c i f i e d arguments a r e w i t h i n the bounds of the g r a p h i c s r e s i o n . IDIMY = The d i m e n s i o n , i n p i x e l s , of the Y d i m e n s i o n of the c u r r e n t l a c t i v e s r a p h i c s r e s i o n . Used i n the same manner as IDIMX. 145 LINTYP saves the t e r m i n a l ' s c u r r e n t l y a c t i v e l i n e t y p e COMMON/LINTYP/ LINDLD see n o t e 1 LINOLD = The c u r r e n t l y a c t i v e l i n e t y p e of the t e r m i n a l . Note t h a t the "S" l i n e t y p e has been c a l l e d l i n e t y p e 0 and the "P" l i n e t y p e has been c a l l e d l i n e t y p e 9. ONEDIM s i v e s UECGEN i n f o r m a t i o n about s i n a l e d i m e n s i o n l i n e o u t p u t COMMON/ONEDIM/ IASS0C,RINC1D,STRT1D see n o t e s 2,4 When i n the s i n a l e d i m e n s i o n mode. VECGEN assumes t h a t the o t h e r d i m e n s i o n conforms w i t h the f o l l o w i n g e q u a t i o n , l e t N = the number of p o i n t s to be ou t p u t from VECGEN i n ' t h e one d i m e n s i o n mode. R ( I ) = the p o i n t s to be used i n p l a c e of the u n s p e c i f i e d d i m e n s i o n . then R ( I ) = STRT1D + RINC1D*I I = 0,1,2,...,N-1 note? the R ( I ) terms a r e s c a l e d by s e a l * the same manner as a r e the p a r a m e t e r s s e n t as arguments to UECGEN. IASSOC > 0, VECGEN has been passed Y d i m e n s i o n v a l u e s so i t assumes t h a t the X d i m e n s i o n f o l l o w s the above l i n e a r e q u a t i o n . < OJ VECGEN has been passed X d i m e n s i o n v a l u e s so i t assumes t h a t the Y d i m e n s i o n f o l l o w s the above l i n e a r e q u a t i o n . RINC1D = Increment between the point's of the u n s p e c i f i e d d i m e n s i o n . STRT1D = The s t a r t i n a p o i n t of the u n s p e c i f i e d d i m e n s i o n . 146 PLOT I n f o r m a t i o n used by the p l o t t i n g r o u t i n e s . COMMON/PLOT/ IFLAG,XONXMN,YONYMN,XLENG,YLENG,XMIN,XMAX,YMIN,YMAX, • YONXMN » XONYMN see n o t e s 3,4 IFLAG = s e t i n AUTOSC t o i n d i c a t e t h a t i t has p r e s e t v a l u e s i n the PLOT common b l o c K . = - i ; AUTOSC has s e t XMIN and XMAX (used i n X A X I S ) . = -2 ' AUTOSC has s e t YMIN and YMAX (used i n Y A X I S ) . =-3J AUTOSC h a s s e t a l l of the above. XONXMN = The X c o o r d i n a t e of the base of the X a x i s i n cms fr o m the lo w e r l e f t c o r n e r of the c u r r e n t l y a c t i v e g r a p h i c s a r e a . YONYMN = The Y c o o r d i n a t e of the base of the Y a x i s i n cms fr o m the lo w e r l e f t c o r n e r of the c u r r e n t l y a c t i v e g r a p h i c s a r e a . XLENG = The l e n g t h , i n cmsr of the X a x i s . YLENG = The l e n a t h , i n cms, of the Y a x i s . XMIN = The X v a l u e which c o r r e s p o n d s t o the bottom of the X a x i s . XMAX = The X v a l u e which c o r r e s p o n d s t o the t o p of the X a x i s . YMIN = The Y v a l u e which c o r r e o p o n d s to the bottom of the Y a x i s . YMAX = The Y v a l u e which c o r r e s p o n d s t o the top of the Y a x i s . YONXMN = The Y c o o r d i n a t e of the base of the X a x i s i n cms from the lo w e r l e f t c o r n e r of the c u r r e n t l y a c t i v e g r a p h i c s a r e a . XONYMN = The X c o o r d i n a t e of the base of the Y a x i s i n cms from the low e r s e f t c o r n e r of the c u r r e n t l y a c t i v e g r a p h i c s a r e a . NOTES ON THE GRAPHICS COMMON BLOCKS 1) The AREA r o u t i n e must be c a l l e d b e f o r e any of the o t h e r g r a p h i c s r o u t i n e s a r e c a l l e d . T h i s i s because AREA i n i t i a l i z e s t h e AREA common bl o c K and the LINTYP common b l o c K . The o n l y e x c e p t i o n t o t h i s r u l e i s the AUTOSC-PARSET c o m b i n a t i o n . ?) The p a r a m e t e r s of the ONEDIM common b l o c K must be s e t p r i o r to u s i n g VECGEN i n a one d i m e n s i o n a l mode (ITYPE=1). T h i s s e t t i n g i s done i n the LINS1D r o u t i n e . 3) The XAXIS and YAXIS r o u t i n e s must be c a l l e d p r i o r t o c a l l i n g PLOT, PLOT1D, and/or TITLE. T h i s i s because the XAXIS and YAXIS r o u t i n e s s e t p a r a m e t e r s i n the PLOT common b l o c K . 4) When a p a r a m e t e r s d i m e n s i o n s a r e s i v e n as cms, i t i s assumed t h a t SCALX and SCALY have been s e t t o 29.5 ( p i x e l s / c m ) . T h i s i s the v a l u e s e t i n the AREA r o u t i n e . I f the. WARP r o u t i n e has been s u b s e q u e n t l y used t o a l t e r t h e s e s e t t i n g s , t he d i m e n s i o n w i l l no l o n g e r be i n cms. DK:GPHCAL.TXT t o TT: GPHLIB INTERNAL CALLED ROUTINES ( n o t i n c l u d i n g SYSLIB r o u t i n e s ) ROUTINE CALLED ROUTINE(S) AREA AUTOSC BORDER CURVE FIGURE LINES LINS1D LINTYP PARSET PLINE PLOT PLOT1D PNTOUT POLY RLINE STRING TITLE VECGEN WARP XAXIS YAXIS I PARSET I LINTYP I FIGURE,PLINE I LINES,RLINE I LINTYP,VECGEN I LINTYP,VECGEN I RLINE I LINES I LINS1D I FIGURE I LINTYP,VECGEN I PLINE,STRING I PNTOUT I PLINE,RLINE,STRING I PLINE,RLINE,STRING GPHLIB INTERNAL CALLING ROUTINES ROUTINE I CALLING ROUTINE(S) AREA I AUTOSC I BORDER I CURVE I FIGURE I CURVE,POLY LINES I FIGURE,PLOT LINS1D I PLOT1D LINTYP I BORDER,LINES,LINS1D,RLINE PARSET I AUTOSC PLINE I CURVE,TITLE,XAXIS,YAXIS PLOT I PLOT1D I PNTOUT I VECGEN POLY I RLINE I FIGURE,PLINE,XAXIS,YAXIS STRING I TITLE,XAXIS,YAXIS TITLE I VECGEN I LINES,LINS1D,RLINE WARP I XAXIS I YAXIS I 148 DK.-GPHTST.TXT to TT: GPHLIB TESTING ROUTINES ARRLIT = T e s t s the RLINE r o u t i n e . D i r e c t l y c a l l s AREA and RLINE. ATST = T e s t s t h e e f f e c t of p a s s i n g arguments to AREA t h a t a r e too l a r g e D i r e c t l y c a l l s AREA and BORDER. ATOTST = Uses the d a t a p l o t t i n g r o u t i n e s to a e r e r a t e a p l o t of a h y p e r b o l i c s p i r a l (R*THETA=CONSTANT). D i r e c t l y c a l l s AREA, AUTOSC, PLOT, STRING, TITLE, XAXIS, and YAXIS. BRDTST = T e s t s t h e BORDER r o u t i n e . D i r e c t l y c a l l s AREA and BORDER. FIGTST = T e s t s the f i g u r e g e n e r a t i o n f u n c t i o n s . D i r e c t l y c a l l s AREA, BORDER, CURVE, POLY, STRING, and WARP. GPHTST = T e s t s the "low l e v e l " g r a p h i c s r o u t i n e s . D i r e c t l y c a l l s AREA, BORDER, LINES, PLINE, RLINE, and STRING. LNTYPT = T e s t s the LINTYP r o u t i n e . D i r e c t l y c a l l s LINTYP. OVERT = T e s t s the b u f f e r o v e r f l o w l i m i t on l o n g VEC commands. D i r e c t l y c a l l s AREA, AUTOSC, PLOT1D, TITLE, XAXIS, and YAXIS. PLT1DT = T e s t s the i d i m e n s i o n a l p l o t t i n g r o u t i n e s . D i r e c t l y c a l l s AREA, AUTOSC, PLOT1D, TITLE, XAXIS, and YAXIS. STRTST = T e s t s the STRING command. D i r e c t l y c a l l s AREA and STRING. TITTST = T e s t s t h e TITLE r o u t i n e . D i r e c t l y c a l l s AREA, TITLE, XAXIS, and YAXIS. UECTST = T e s t s the VECGEN r o u t i n e . D i r e c t l y c a l l s AREA, VECGEN. XAXTST = T e s t s t h e XAXIS r o u t i n e . D i r e c t l y c a l l s AREA, XAXIS. YAXTST = T e s t s the YAXIS r o u t i n e . D i r e c t l y c a l l s AREA, YAXIS. 149 A2.9 Routine Interconnection Diagrams F i l e s c o p i e d ! DK:FLOW.TXT t o TT: MOMA ROUTINE INTERCONNECTION DIAGRAMS; DESCRIPTION The i n t e n t of r o u t i n e i n t e r c o n n e c t i o n diagrams i s t o g r a p h i c a l l y p r e s e n t t he f l o w of prosram c o n t r o l . To produce t h e s e d i a g r a m s , the f o l l o w i n g c o n v e n t i o n s were a d o p t e d ' 1 ) each b l o c k r e p r e s e n t s a g i v e n program or subprogram. 2) the l i n e s c o n n e c t i n g the b l o c k s r e p r e s e n t p a t h s which the f l o w of program c o n t r o l can f o l l o w . These a r e c a l l e d f l o w p a t h s . 3) Arrow on each f l o w p a t h p o i n t s f r o m the c a l l i n g r o u t i n e t o the c a l l e d r o u t i n e . In o r d e r t o p r o v i d e i n f o r m a t i o n about s p e c i f i c t a s k s i n the system h i g h l i g h t e d i n t e r c o n n e c t i o n diagrams were pr o d u c e d . THe f o l l o w i n g c o n v e n t i o n s were addopted f o r t h e s e d i a g r a m s ; 1 ) The f l o w p a t h s used d u r i n g a s p e c i f i e d t a s k a r e h i g h l i g h t e d i n r e d When p h o t o c o p i e d , the r e d l i n e s w i l l come out as t h i c k b l a c k l i n e s 2) The numbers p r i n t e d b e s i d e the h i g h l i g h t e d paths near the c a l l i n g r o u t i n e denote the o r d e r i n whi c h the c a l l e d r o u t i n e s a r e c a l l e d , i e ; i f "2" i s p r i n t e d b e s i d e a h i g h l i g h t e d f l o w p a t h , the r o u t i n e w h i c h t h a t p a t h p o i n t s t o i s the second r o u t i n e c a l l e d by the c a l l i n g r o u t i n e . Note t h a t f o r MOMA background diagrams a l l t a s k s a r e s t a r t e d f r o m DISPLA and t h a t f o r MOMA•foreground diagrams a l l t a s k s a r e s t a r t e d from AQUIRE. 150 TITLE XAXIS and YAXIS STRING © = 3 CURVE PLINE RLINE LINTYP GRAPHICS ROUTINE INTERCONNECTIONS (not i n c l u d i n g SYSLIB functions) POLY FIGURE VECGEN PNTOUT PLOT LINES AUTOSC PARSET 151 MOMA FOREGROUND ROUTINE INTERCONNECTIONS (not including SYSLIB Routines) FILACT 7K r i FSTORE AQUIRE 2 ^ SETR PWRSPC FFT 17 SMOOTH POWRSP MAIN DEBUG DATA ACQUISITION CYCLE (WITH/DEBUG COMPILE OPTION) DATPLT AQUTST GPHLIB Routines INCLUDED ON DEBUG COMPILE ONLY WINDOW LABLIB Routines 151a MOMA FOREGROUND ROUTINE INTERCONNECTIONS (not including SYSLIB Routines) PREPAR WINDOW LABLIB Routines MAIN DATA ACQUISITION CYCLE (WITHOUT/DEBUG COMPILE OPTION) DATPLT AQUTST GPHLIB Routines INCLUDED ON DEBUG COMPILE ONLY 152 MOMA FOREGROUND ROUTINE INTERCONNECTIONS (not including SYSLIB Routines) STARTUP RTS RTSCOM PREPAR WINDOW FILACT V AQUIRE SETR Ak. FFT Al POWRSP LABLIB Routines FSTORE PWRSPC Ak SMOOTH DATPLT AQUTST Ak. GPHLIB Routines INCLUDED ON DEBUG COMPILE ONLY t. 153 MOMA BACKGROUND ROUTINE INTERCONNECTIONS'-(not i n c l u d i n g SYSLIB functions) Start RESTRT SLOWDD FASTDD DD2SET EEG4DD FILACT LBLINI 2 3 RCVCOM PLOTDD \ i TVSET MOMKEY DISPLA ^-J p>; TAGSTO FNTS(l-A) IQUERY TRNSFR COPY 0 = 0 = INCBUF ISWTCH C a l l s GPHLIB subroutines EEG4UP INPUT D*SET PLOTUP SCROLL INTERP 2 F MEXIT NACTSV ~7JL NACTIN BREAD BFBLNK TGREAD SLOOUT BOUND SLORED ISLSCA ENCOL6 TINSRT TBLANK SLOWUP 3L FASTUP EEGDLN DISBUP 153a MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not including SYSLIB functions) Restart RESTRT SLOWDD 1 FILACT LBLINI RCVCOM FASTDD jfi EEG4DD DD2SET PLOTDD TVSET J 2F DISPLA MOMKEY FNTS(l-4) TAGSTO IQUERY EEG4UP - INPUT e D*SET 1 PLOTUP INTERP TRNSFR SCROLL 2 F MEXIT ^_ SLOOUT BOUND NACTSV N ACT IN BREAD 5 "5 COPY BFBLNK 0 © INCBUF ISWTCH 5. 1W SLORED ISLSCA * EN COL 6 TGREAD Cal ls GPHLIB s u b r o u t i n e s TINSRT TBLANK p$ SLOWUP FASTUP EEGDLN DISBUP 154 RESTRT SLOWDD ' FASTDD K1 DD2SET EEG4DD PLOTDD TVSET MOMKEY FNTS(l-4) 0 © 1 INCBUF ISWTCH Calls GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS (not i n c l u d i n g SYSLIB functions) FILACT LBLINI 7K~ RCVCOM Foreground Message Received while i n a Type 1 (EEG) Display DISPLA r> TAGSTO IQUERY INPUT INTERP TRNSFR NACTSV COPY EEG4UP SLOWUP 1 J D*SET PLOTUP SCROLL 2 F MEXIT NACTIN zM BREAD BFBLNK TGREAD 5 SLOOUT BOUND 3L 7 ^ FASTUP I EEGDLN SLORED DISBUP 21L ISLSCA ENCOL6 TINSRT TBLANK 5 154a RESTRT SLOWDD FASTDD fe1 DD2SET EEG4DD PLOTDD < T V S E T MOMKEY FNTS(l-4) 0 © INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not i n c l u d i n g SYSLIB functions) FILACT r> TAGSTO IQUERY JL TRNSFR COPY LBLINI 7FT RCVCOM Foreground message received while i n a type 2 (time plot) d i s p l a y DISPLA EEG4UP INPUT INTERP NACTSV D*SET PLOTUP SCROLL 2 F MEXIT NACTIN BREAD BFBLNK TGREAD SLOOUT BOUND 7 ^ SLORED ISLSCA ^ ENCOL6 TINSRT TBLANK SLOWUP FASTUP EEGDLN DISBUP 155 RESTRT SLOWDD FASTDD R DD2SET EEG4DD PLOTDD TVSET MOMKEY FNTS(l-4) 0 : © 3 INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS Display Change to Type. 1 (EEG) ( n o t i n c l u d i n g SYSLIB functions) from Type 2 (Time Plot) FILACT LBLINI RCVCOM / \ , [{ 1 to { 4] [ " D l " to "D4"] DISPLA TAGSTO IQUERY EEG4UP e1 INPUT D*SET PLOTUP INTERP SCROLL 2F TRNSFR MEXIT NACTSV JSLOOUT BOUND NACTIN BREAD COPY BFBLNK SLOWUP SLORED ISLSCA ENCOL6 TGREAD TINSRT L \ N K 5 FASTUP EEGDLN J 4 L DISBUP (5 155a RESTRT SLOWDD W-4 FASTDD DD2SET EEG4DD TVSET JL MOMKEY FNTS(l-4) Calls GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS Display Change to Type 1 (EEG) (not i n c l u d i n g SYSLIB functions) from Type 1 (EEG) FILACT — c = LBLINI 1K~ RCVCOM [{ 1 to { 4] ["Dl" to "D4"] DISPLA TAGSTO IQUERY EEG4UP INPUT D*SET PLOTUP SCROLL 2F INTERP JL TRNSFR 30 J MEXIT SLOOUT BOUND NACTSV NACTIN BREAD COPY BFBLNK 5. SLORED ISLSCA * ENCOL6 TGREAD TINSRT TBLANK SLOWUP 5 FASTUP EEGDLN DISBUP 5 156 RESTRT SLOWDD k—i FASTDD DD2SET EEG4DD PLOTDD TVSET MOMKEY FNTS(l-4) 0 © 1 INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS (not i n c l u d i n g SYSLIB functions) FILACT LBLINI RCVCOM Display Change to Type 2 (Time Plot) [{ 5 to { 6] ["D5" to "D6"] DISPLA TAGSTO IQUERY 1 EEG4UP INPUT D*SET PLOTUP SCROLL "7IT INTERP TRNSFR MEXIT NACTSV 0 © NACTIN COPY BREAD BFBLNK TGREAD 5 SLOOUT BOUND SLORED ISLSCA ENCOL6 ^ TINSRT ^ TBLANK 6 SLOWUP FASTUP EEGDLN DISBUP © 156a SLOOUT MOMA BACKGROUND GPHLIB CALLS (not including SYSLIB functions) STRING PLOTID RLINE LINSID LINTYP VECGEN PNTOUT 5L* XAXIS and YAXIS RLINE PLINE LINTYP VECGEN 2/ AREA STRING PNTOUT 157 MOMA BACKGROUND ROUTINE INTERCONNECTIONS' S c r o l l Type 1 (EEG) Display Back N records. N = 1 - 9 (not i n c l u d i n g SYSLIB functions) RESTRT SLOWDD FASTDD DD2SET EEG4DD FILACT LBLINI PLOTDD TVSET MOMKEY RCVCOM [{ SI - { S9] [Keypad "1" to "9"] DISPLA r 3 FNTS(l-4) TAGSTO IQUERY EEG4UP INPUT 3 : D*SET PLOTUP SCROLL 2F INTERP J TRNSFR MEXIT SLOOUT BOUND 7 K NACTSV NACTIN BREAD COPY BFBLNK 0 © INCBUF ISWTCH C a l l s GPHLIB subroutines SLORED 3L ISLSCA ENCOL6 TGREAD TINSRT TBLANK SLOWUP FASTUP I EEGDLN DISBUP 5 157a RESTRT SLOWDD FASTDD DD2SET EEG4DD PLOTDD TVSET MOMKEY FNTS(l-4) MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not i n c l u d i n g SYSLIB functions) FILACT TAGSTO IQUERY TRNSFR COPY LBLINI 7r~ RCVCOM DISPLA INPUT D*SET INTERP 4 MEXIT J NACTSV 0 © NACTIN S c r o l l type 1 (EEG) Display Forward N records. N = 1 - 9 or return to present [{ SI - { S9 or { SP] [Keypad "1" to "9" or "PRESENT"] EEG4UP PLOTUP SCROLL it? SLOOUT BOUND SLOWUP 3 L FASTUP I EEGDLN BREAD 5 BFBLNK SLORED DISBUP ISLSCA ENCOL6 he 0: © INCBUF ISWTCH C a l l s GPHLIB subroutines TGREAD TINSRT TBLANK 158 RESTRT K SLOWDD EEG4DD FASTDD $ DD2SET PLOTDD TVSET MOMKEY FNTS(l-4) INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not i n c l u d i n g SYSLIB functions) FILACT LBLINI 7K~ DISPLA TAGSTO IQUERY INPUT INTERP JL TRNSFR NACTSV COPY RCVCOM 7F Unneeded return to present i n s t r u c t i o n [{ SP] ["PRESENT"] EEG4UP D*SET PLOTUP SCROLL 2F" d MEXIT 0 © NACTIN BREAD BFBLNK ML TGREAD SLOOUT BOUND 7K" SLORED ISLSCA ENCOL6 TINSRT ^ TBLANK k" SLOWUP FAStUP EEGDLN DISBUP © 158a RESTRT SLOWDD k—j FASTDD DD2SET EEG4DD TVSET MOMKEY FNTS(l-4) 0 © INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not i n c l u d i n g SYSLIB functions) FILACT LBLINI /TT" RCVCOM 7F S c r o l l D i r e c t i o n Change [{ S. or { SO] ["FOR" or "BACK"] DISPLA TAGSTO IQUERY I EEG4UP INPUT k-D*SET PLOTUP INTERP JL TRNSFR I E SCROLL 2 F MEXIT NACTSV NACTIN © 6 COPY BREAD BFBLNK TGREAD 5 5 1 _ SLOOUT BOUND SLORED ISLSCA $4 ENCOL6 TINSRT TBLANK SLOWUP FASTUP EEGDLN DISBUP © 159 SLOWDD FASTDD DD2SET MOMKEY 0 © 1 MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not i n c l u d i n g SYSLIB functions) RESTRT EEG4DD FILACT LBLINI RCVCOM PLOTDD TVSET Terminal R e i n i t i a l i z a t i o n [{ I] ["INIT"] DISPLA FNTS(l-4) r3 TAGSTO IQUERY INPUT INTERP TRNSFR NACTSV © © COPY INCBUF ISWTCH C a l l s GPHLIB subroutines zM EEG4UP D*SET PLOTUP SCROLL ^ MEXIT NACTIN BREAD BFBLNK TGREAD 5 SLOOUT BOUND 7 K SLORED ISLSCA •a TINSRT ^ TBLANK ENCOL6 k k " SLOWUP FASTUP EEGDLN DISBUP 5 159a -RESTRT SLOWDD FASTDD DD2SET EEG4DD k" PLOTDD TVSET MOMKEY FNTS(l-4) © © INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS (not i n c l u d i n g SYSLIB functions) FILACT LBLINI RCVCOM Termination [{ F] ["STOP"] DISPLA r 3 TAGSTO IQUERY I -a EEG4UP INPUT D*SET PLOTUP SCROLL INTERP JL TRNSFR IF MEXIT NACTSV © © NACTIN •a COPY BREAD BFBLNK TGREAD (5 6 SL_ SLOOUT BOUND SLORED $H ISLSCA ^ ENCOL6 TINSRT TBLANK SLOWUP FASTUP EEGDLN DISBUP © 160 MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not inc l u d i n g SYSLIB functions) RESTRT k SLOWDD FASTDD KJ EEG4DD DD2SET FILACT E Z LBLINI 7K" k PLOTDD I i TVSET MOMKEY DISPLA H* TAGSTO FNTS(l-4) IQUERY GE INPUT INTERP IT TRNSFR NACTSV COPY 0 © INCBUF ISWTCH C a l l s GPHLIB subroutines RCVCOM Unshifted v e r s i o n of a s h i f t e d key i n s t r u c t i o n was typed [{ E] EEG4UP D*SET PLOTUP SCROLL 2 F 4 MEXIT NACTIN BREAD BFBLNK TGREAD SLOOUT BOUND SLORED \1/ ISLSCA ENCOL6 k -zM TINSRT k -^ TBLANK k-SLOWUP FASTUP EEGDLN DISBUP 160a RESTRT SLOWDD FASTDD DD2SET EEGADD J TVSET MOMKEY FNTS(l-4) 0 © INCBUF ISWTCH C a l l s GPHLIB s u b r o u t i n e s MOMA P r r ° ^ P M 1 T T N K INTERCONNECTIONS' Transfer Record from s c r o l l e d ( S o T I H c l u d l n g SYSLIB l u n a t i o n s ) " ™ r . ^ t °f ^ 1 FILACT LBLINI 7K~ RCVCOM 71  (EEG) Display [{ T] ["SAVE"] DISPLA TAGSTO IQUERY TRNSFR 6 y COPY INPUT PLOTUP D*SET INTERP SCROLL 2 F MEXIT NACTSV NACTIN BREAD AL BFBLNK TGREAD EEG4UP SLOOUT BOUND 7 K SLORED ISLSCA \4-Z^i EN COL 6 TINSRT TBLANK 6 SLOWUP he FASTUP I EEGDLN DISBUP 161 RESTRT SLOWDD FASTDD (4 DD2SET EEG4DD PLOTDD TVSET MOMKEY FNTS(l-4) 0 © INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS (not i n c l u d i n g SYSLIB functions) Timed Tag Entry FILACT C Z LBLINI 7IT" RCVCOM DISPLA l > TAGSTO IQUERY I EEG4UP INPUT ii PLOTUP D*SET INTERP JL SCROLL 2 F MEXIT TRNSFR NACTSV N ACT IN BREAD COPY BFBLNK TGREAD 5 3 SLOOUT BOUND SLORED -a ISLSCA ENCOL6 TINSRT TBLANK SLOWUP FASTUP EEGDLN DISBUP 161a MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not i n c l u d i n g SYSLIB functions) Character Input SLOWDD FASTDD k1 EEG4DD DD2SET RESTRT FILACT LBLINI RCVCOM A . PLOTDD TVSET MOMKEY FNTS(l-A) 0 = 0 = INCBUF ISWTCH C a l l s GPHLIB s u b r o u t i n e s DISPLA TAGSTO IQUERY I -a EEG4UP INPUT D*SET PLOTUP SCROLL INTERP TRNSFR 7J" 4 MEXIT NACTSV 0 © NACTIN COPY BREAD BFBLNK TGREAD 5 SLOOUT BOUND SLORED ISLSCA ^ ENCOL6 TINSRT •3 TBLANK SLOWUP FASTUP EEGDLN DISBUP 162 RESTRT SLOWDD r i FASTDD RJ EEG4DD DD2SET fe-te" I I TVSET r e -MOMKEY FNTS(l-4) 0 = 0 = 1= INCBUF ISWTCH C a l l s GPHLIB subroutines MOMA BACKGROUND ROUTINE INTERCONNECTIONS (not i n c l u d i n g SYSLIB functions) FILACT LBLINI 7K~ RCVCOM Z Z 2 F — Delete Character, Delete Timed Tag, or [DEL,CTRL/U,ESC] ["RUBOUT","CTRL"/"U", "GET LINE"] DISPLA EEG4UP TAGSTO IQUERY I INPUT \i/_c it D*SET PLOTUP JL SCROLL INTERP JL TRNSFR IZF MEXIT NACTSV NACTIN COPY BREAD BFBLNK TGREAD • ^ SLOOUT BOUND 3d SLORED ISLSCA ENCOL6 k -^ TINSRT ^ TBLANK K-SLOWUP FASTUP EEGDLN DISBUP 162a RESTRT SLOWDD FASTDD DD2SET EEG4DD TVSET MOMKEY FNTS(l-4) 0 = 0 = INCBUF ISWTCH C a l l s GPHLIB s u b r o u t i n e s MOMA BACKGROUND ROUTINE INTERCONNECTIONS' (not including SYSLIB functions) FILACT LBLINI 7K~ RCVCOM IF Deactivate (Activate) Query on Timed Tag Entry [{ N ({ Q)] ["OFF QUERY" ("ON QUERY")] DISPLA TAGSTO IQUERY EEG4UP INPUT D*SET PLOTUP SCROLL INTERP JL TRNSFR IF MEXIT NACTSV 0 © NACTIN •a COPY BREAD BFBLNK TGREAD 6 SLOOUT BOUND 7T\ SLORED $\ ISLSCA TINSRT ENCOL6 K TBLANK k-SLOWUP FASTUP EEGDLN DISBUP APPENDIX 3 MOMA SUMMARY AND USERS GUIDE A3.1 MOMA Summary TYPE SUMMOM.TXT MOMA SUMMARY 1/2 Sept 11/80 MOMA, or M o b i l e O p e r a t i o n M o n i t o r F o r A n e s t h e t i s t s , i s a computer-based p e r i o p e r a t i v e p a t i e n t m o n i t o r i n g s y stem. T h i s system can a c q u i r e , p r o c e s s , s t o r e , and d i s p l a y f o u r c h a n n e l s of EEG d a t a a l o n a w i t h UP t o f o u r c h a n n e l s oF s l o w l y v a r s - i i i a non-EEG d a t a . A number oF F e a t u r e s have been i n c o r p o r a t e d i n t o MOMA which s h o u l d make i t a u s e F u l a d d i t i o n to the o p e r a t i n g room. F i r s t l y , a l l c r i t i c a l components of the system r e s i d e w i t h i n t he o p e r a t i n g room, thus s i m p l i f y i n g s t a r t u p p r o c e d u r e s and m i n i m i z i n g the l i k l i h o o d of e x t e r n a l i n t e r f e r e n c e . S e c o n d l y , a number of d i s p l a y f o r m a t s a r e a c c e s s i b l e t h r o u a h a v i d e o s c r e e n so the u s e r can choose the d i s p l a y which b e s t s u i t s him/her a t a a i v e n p o i n t i n t i m e . The emphasis of t h e s e d i s p l a y s has been to make the t r e n d s i n m o n i t o r i n a p a r a m e t e r s r e a d i l y a p p a r e n t . T h i r d l y , t h e s e d i s p l a y s each i n c o r p o r a t e a number of the m o n i t o r i n g p arameters a c q u i r e d by MOMA so the t a s k of parameter c o m p a r i s o n s h o u l d be s i m p l i f i e d . F o u r t h l y , r e l e v a n t comments can be e n t e r e d to the computer a t any p o i n t d u r i n a the o p e r a t i o n . These commerits a r e then p e r m a n e n t l y s t o r e d and ar e i n c o r p o r a t e d i n t o some of the d i s p l a y s . F i f t h l y , i t i s p o s s i b l e to move the time o r i e n t a t i o n of an EEG d i s p l a y back and f o r t h i n t i m e . T h i s a b i l i t y t o r e c a l l a d i s p l a y which appeared e a r l i e r i n the o p e r a t i o n s h o u l d prove u s e f u l when a t t e m p t i n a to d e t e r m i n e Ions term t r e n d s i n a p a t i e n t s s t a t e . F i n a l l y , an e f f o r t has been made to make t h e s e f e a t u r e s easy to use. Most commands ar e a e n e r a t e d by t y p i n a one or two c l e a r l y l a b e l e d p r e d e f i n e d keys and do c u m e n t a t i o n d e s c r i b i n g a l l phases of o p e r a t i o n of the system has been p r o v i d e d . A c o n c l u s i o n of a computer-based p a t i e n t m o n i t o r i n g p r o j e c t p e r f o r m e d here a t UGH (EEGAL) was t h a t p r e s e n t i n g the EEG u s i n g a Dot D e n s i t y r e p r e s e n t a t i o n of t h e compressed s p e c t r a l a r r a y (DSA) showed promis e as a p a t i e n t m o n i t o r i n g t o o l . C o n s e q u e n t l y , the EEG i s p r e s e n t e d i n t h i s f o r m i n MOMA. MOMA a l s o p r o v i d e s an a d d i t i o n a l f e a t u r e . The DSA d i s p l a y f o r each EEG c h a n n e l has been s p l i t i n t o two inde p e n d e n t s e c t i o n s . The f i r s t s e c t i o n , c a l l e d the s c r o l l e d s e c t i o n , w i l l be a u t o m a t i c a l l y u pdated t h r o u g h o u t t he o p e r a t i o n . The o t h e r s e c t i o n , c a l l e d the u n s c r o l l e d s e c t i o n , w i l l not be a l t e r e d by the computer. At any p o i n t d u r i n g t he o p e r a t i o n , the -iser can t r a n s f e r a r e c o r d from the top of the s c r o l l e d s e c t i o n to the top of the u n s c r o l l e d s e c t i o n . Thus, when the s c r o l l e d s e c t i o n has been moved to a d i f f e r e n t p o i n t i n t i m e , a d i r e c t c o m p a r i s o n between t h e r e c o r d ( s ) saved i n the u n s c r o l l e d s e c t i o n and the c o n t e n t s of the s c r o l l e d s e c t i o n can be made. The DSA and the two s e c t i o n f e a t u r e a r e e x p l a i n e d more f u l l y i n the document "INTRODUCTION TO MOMA". The f o c u s of the work done on MOMA to t h i s date has been to produce a framework on top of which a p a t i e n t m o n i t o r i n g system c o u l d be d e v e l o p e d . The f e a t u r e s d e s c r i b e d above can be, and p r o b a b l y s h o u l d be, a l t e r e d so as to o p t i m i z e MOMA's u s e f u l n e s s and u s e a b i l i t y . The framework w i l l a l s o p e r m i t the a d d i t i o n of new f e a t u r e s . I t i s hoped t h a t t h r o u g h a c o n t i n u i n g p r o c e s s of d e v i c e assessment and r e d e s i g n , an "optimum" p a t i e n t m o n i t o r i n g system w i l l be pr o d u c e d . The p e o p l e p r e s e n t l y i n v o l v e d w i t h the d e s i g n of the system have r e c o g n i z e d a number of p o t e n t i a l improvements to MOMA. F i r s t l y , a computer w i t h more memory and more p r o c e s s i n g power c o u l d speed UP a l l phases oF o p e r a t i o n oF the system and would make the system q u i e t e r . S e c o n d l y , w i t h the i n c o r p o r a t i o n of da t a a c q u i s i t i o n hardware, i t w i l l be p o s s i b l e t o e l l i m i n a t e the need f o r an EEG machine. A p p r o p r i a t e hardware has been o r d e r e d f o r both the above improvements. 164 2/2 T h i r d l y , w i t h the a d d i t i o n of a p r i n t e r , d a t a can be p e r i o d i c a l l y o u t p u t t h r o u g h o u t the o p e r a t i o n . In a d d i t i o n t o p r o v i d i n g a hard copy backup i n case of computer f a i l u r e , t he p r i n t e r p r o v i d e s f o r the p o t e n t i a l i n c o r p o r a t i o n of a r e c o r d k e e p i n g f a c i l i t y on MOMA. A number of p r i n t e r s a r e p r e s e n t l y b e i n g c o n s i d e r e d f o r p u r c h a s e . With the i n c o r p o r a t i o n of t h e s e improvements, i t i s l i k e l y t h a t t he system w i l l be r e p a c k a g e d . In the p r o c e s s o f r e p a c k a g i n g the s y s t e m , t h i n g s l i k e l a r g e w h e e l s , workspaces and d r a w e r s , s t a n d a r d i z e d c o n n e c t o r p a n e l s w i t h n o n i n t e r c h a n a e a b l e c o n n e c t o r s , e t c , w i l l b e i n c l u d e d . As a r e s u l t of meetings w i t h h o s p i t a l p e r s o n n e l , f o u r a p p l i c a t i o n a r e a s f o r t h i s s ystem were i d e n t i f i e d . Two of t h e s e a r e a s , (open h e a r t s u r g e r y and c a r o t i d e n d a r t e r e c t o m i e s ) i n v o l v e the use of the system by a n e s t h e t i s t s w i t h i n the o p e r a t i n g room. The o t h e r two a r e a s (advanced b r a i n r e s c u s s i t a t i o n and the m o n i t o r i n g of head i n j u r y p a t i e n t s ) i n v o l v e the use of t h e d e v i c e by EEG s p e c i a l i s t s o u t s i d e of the o p e r a t i n g room. In c o n c l u s i o n , the system d e s c r i b e d above i s the s k e l e t o n of a computer-based p a t i e n t m o n i t o r . Through the i n v o l v e m e n t of many p e o p l e w i t h many a r e a s of e x p e r t i s e , i t i s hoped t h a t the bare bones w i l l be be f i l l e d i n i n a way t h a t w i l l produce a c l i n i c a l l y u s e f u l p a t i e n t m o n i t o r i n g s y s t e m . 165 A3.2 MOMA Users Guide A3.2.1 Introduction to MOMA INTRODUCTION TO MOMA 166 ABSTRACT MOMA, or Mobile Operation Monitor f o r Anesthetists i s a computer-based perioperative patient monitoring system. Four channels of EEG data are acquired and processed along with up to four channels of non-EEG data by a D i g i t a l Equipment Corporation LSI-11 based microcomputer system. This data can then be displayed on a Tektronix 4025 graphics terminal using a number of predefined display formats. The processed EEG data and the non-EEG data are also stored on a magnetic data storage medium (floppy d i s k ) . i TABLE OF CONTENTS 167 SUBJECT PAGE  INTRODUCTION TO MOMA SYSTEM FEATURES Genera l C h a r a c t e r i s t i c s 1 Timed Tags 2 EEG Represen ta t ion 4 S c r o l l i n g 5 NON-EEG Represen ta t ion 5 Feature Summary 6 USER INTERACTION Command S t r u c t u r e 7 Keyboard C o n f i g u r a t i o n 9 Timed Tags 12 Unused Keys 13 TERMINAL SCREEN'S CONFIGURATION. . . . 14 DISPLAY FORMATS D i s p l a y Type 1 (EEG) 16 D i s p l a y Type 2 (Time P l o t ) 20 OPERATION OF MOMA MOMA START-UP PROCEDURE - 1 MOMA TERMINATION PROCEDURE 2 DEFAULT START-UP MODES . 3 OPERATING CONSIDERATIONS 3 MOMA KEYBOARD DETAILS S c r o l l i n g 5 Timed Tags 5 D i s p l a y Change 7 S p e c i a l Func t ions 8 i i 168 SUBJECT PAGE MOMA DISPLAY DETAILS 10 CHECKLIST IN CASE OF MOMA START FAILURE 16 CHECKLIST IN CASE OF MOMA INTRAOPERATIVE MALFUNCTION 17 STANDARD MODE-SETTING PROCEDURES 18 i i i LIST OF FIGURES 169 FIGURE PAGE  INTRODUCTION TO MOMA MOMA: General Configuration 3 MOMA Keyboard Organization . <" . . 10 Terminal Screen's Configuration •- 15 Display Type 1 . 18 Display Type 2 21 OPERATION OF MOMA Terminal Control Switches 3 Computer Control Switches 4 Display 1 10 Display 2 11 Display 3 12 Display 4 13 Display 5 14 Display 6 15 i v 170 LIST OF TABLES TABLE PAGE  INTRODUCTION TO MOMA MOMA COMMAND SUMMARY '8 OPERATION OF MOMA CONDITIONS WHICH PREVENT START-UP 19 CONDITIONS WHICH PREVENT PROPER OPERATION 20 v SYSTEM FEATURES 1 171 GENERAL CHARACTERISTICS MOMA acquires and stores a number of p h y s i o l o g i c a l parameters. These parameters are then displayed simultaneously on a singl e display medium (graphics terminal). Using a multiparameter display format such as t h i s , i t should be possible to organize information i n a way that w i l l make parameter i n t e r r e l a t i o n s h i p s r e a d i l y apparent. MOMA has a number of formats for d i s p l a y i n g the information i t acquires. By using simple keyed commands, the user can access any one of these displays at any point i n time. This feature gives the user the luxury of choosing a dis p l a y which he (she) f e e l s best s u i t s a p a r t i c u l a r s i t u a t i o n . In addition, t h i s feature provides a convenient means for d i r e c t l y comparing the e f f i c a c y of d i f f e r e n t display formats without n e c e s s i t a t i n g the use of extra hardware. A l l c r i t i c a l components of MOMA reside i n the operating room. This w i l l minimize the l i k e l i h o o d of interference with the system.from outside sources, s i m p l i f y setup procedures, and allow i t to be used i n a wide v a r i e t y of operating room layouts. At present, i t i s necessary that an EEG machine accompany MOMA i n the operating room. However, hardware has been purchased so that i t w i l l be possible to place the e n t i r e system on a si n g l e mobile cart. An e f f o r t has been made to minimize the time required to use the system. Towards t h i s end, the amount of required i n t e r a c t i o n with MOMA has been minimized. When i n t e r a c t i o n i s necessary, messages which describe appropriate courses of act i o n are written on the terminal's screen. A b e l l i s rung when these messages are sent so as to a t t r a c t the user's attention. 2 172 The length of the required response i s minimized, often only e n t a i l i n g a singl e key stroke. In addition to minimizing required i n t e r a c t i o n , importance has been placed on the s i m p l i c i t y of use of MOMA's optional features. Thus, i t i s not necessary to type long command st r i n g s on the keyboard to e f f e c t i v e l y u t i l i z e the system. In f a c t , most of the commands can be sent by typing one or two predefined keys. Fault tolerance i s an important design consideration f o r patient monitoring systems. The following features have been incorporated into MOMA with t h i s i n mind. F i r s t l y , to generate some of the commands, two keys must be pressed simultaneously. This should minimize the l i k e l i h o o d of accidental typing of those commands. Secondly, requests f o r c e r t a i n c r i t i c a l functions such as program termination must be followed with an a f f i r m a t i v e response to a query before they are performed. Thus the user has the opportunity to change h i s mind and/or to recover from an accidental request. T h i r d l y , i f for any reason the terminal does not respond properly during the operation, i t i s possible to r e i n i t i a l i z e i t without stopping the program. Fourthly, i f the program stops during the operation, i t i s possible to r e s t a r t i t using the standard start-up procedure. Data acquired p r i o r to termination w i l l not be l o s t . F i n a l l y , t h i s document should serve to describe the systems features and proper use and w i l l accompany the system within the operating room. TIMED TAGS Since many c l i n c i a l l y s i g n i f i c a n t events cannot e a s i l y be automatically acquired by a computer, a f a c i l i t y f o r entering relevant comments during the operation has been incorporated. These comments have been c a l l e d "timed tags" and are entered through the terminal's keyboard. On entry, they w i l l be associated with the next acquired data record, stored on floppy disk, and 3 173 MOMA; GENERAL CONFIGURATION F i g u r e 1: MOMA Genera l C o n f i g u r a t i o n incorporated on some of the displays. 4 174 EEG REPRESENTATION The usefulness of EEG as a rou t i n e l y used monitoring parameter i n the operating room has been l i m i t e d by d i f f i c u l t i e s i n obtaining, at a glance, c l i n i c a l l y u s e ful information. A density modulated compressed s p e c t r a l array (DSA) has been used i n MOMA to present the EEG i n what i s hoped to be a more useable fashion. This format has been used i n other systems, including a previous patient monitoring project here at VGH (EEGAL). D e t a i l s about t h i s format w i l l be described i n more d e t a i l l a t e r i n t h i s document (display type 1). A feature of MOMA which should further increase the u s e a b i l i t y of EEG for intraoperative patient monitoring i s i t s two part DSA displ a y . The DSA display for each EEG channel i s separated into two sections. The i n f o r -mation contained i n one section i s not affected by a c t i v i t y i n the other. This feature can be used to perform d i r e c t comparisons of EEG records separated by long periods of time. For example, one section could be loaded with the baseline EEG and the other could be automatically updated throughout the operation. Using t h i s scheme, i t i s possible to d i r e c t l y compare the EEG acquired during the operation with the baseline EEG. D e t a i l s about t h i s feature w i l l be described l a t e r i n t h i s document.(display type 1). Any set of 4 EEG channels can be used i n MOMA. The choice of appropriate channels w i l l be made according to the type of information desired. In a previous patient monitoring project here at VGH, (EEGAL) the following channels were used: F3-C3, C3-01, F4-C4, and C4-02. These channels correspond to the four quadrants of the head. To maintain compata-b i l i t y with t h i s p r oject, these channels should be used for i n i t i a l t r a i l s of MOMA. 5 175 SCROLLING It i s not possible to continuously display a l l the EEG information acquired by MOMA during the operation i n a useable format. However, using MOMA's s c r o l l i n g feature, the user can access a l l previously acquired information. With t h i s feature, the time o r i e n t a t i o n of and EEG display can be moved back and f o r t h i n time, thus i t i s possible to r e c a l l any EEG display which appeared e a r l i e r i n the operation. D e t a i l s about s c r o l l i n g can be found l a t e r i n t h i s document (user i n t e r a c t i o n , keyboard configuration). NON-EEG REPRESENTATION Non-EEG data i s displayed along with EEG data. However, the format of these displays (a d i g i t a l display) does not e f f e c t i v e l y present the trends of the non-EEG data. For t h i s purpose, a display type which i s de-voted t o t a l l y to the presentation of these trends has been implemented. This type of display simply p l o t s data magnitude vs time i n a s i m i l a r manner as i s done manually on the anesthetic records. D e t a i l s about t h i s format can be found l a t e r i n th i s document (display type 2). As with the EEG channels, any set of up to four slowly varying non-EEG data signals can be acquired. However, since the inputs to MOMA's analogue to d i g i t a l converter are not i s o l a t e d from the computer, the sampled data signals must be i s o l a t e d from the patient. Some;.:of the monitoring devices r o u t i n e l y used i n the operating room, such as the E for M VR6, have appropriately i s o l a t e d analogue s i g n a l s . As the requirements and c a p a b i l i t i e s of MOMA are more p r e c i s e l y defined, i t i s l i k e l y that s p e c i a l purpose hardware for the a c q u i s i t i o n of non-EEG data w i l l be incorporated. 6 176 FEATURE SUMMARY - ent i r e system within the operating room - multiparameter displays - quick access to a number of display formats - s i m p l i c i t y of use - f a u l t tolerance - timed tagging for the entrance and display of relevant comments - two part DSA display of EEG data f o r long and short term trending - s c r o l l i n g of EEG displays - displays for the trending of non-EEG data USER INTERACTION 7 177 Input to MOMA from the user i s accepted through the terminal's key-board. This input can take 3 forms, commands, timed tags, and responses to queries from„the computer. As stated previously, the format for responses i s described i n a message written on the terminal's screen. The following text described the use of the keyboard for the entry of commands and timed tags. The timing of data a c q u i s i t i o n , processing and storage i s c r i t i c a l to the proper functioning of MOMA. These tasks have consequently been given a higher p r i o r i t y than user i n t e r a c t i o n , i . e . , i f a data processing task and a user i n t e r a c t i o n task are simultaneously requested, the data processing task w i l l be serviced f i r s t . From the user's point of view, t h i s w i l l mean that there may be a time delay between the entry of a command and the se r v i c i n g of that command by the computer. The delay should not be more than a few seconds and the entered request w i l l not be al t e r e d . COMMAND STRUCTURE In order to minimize typing requirements, MOMA's command str i n g s are two to three characters long. These st r i n g s always begin with the character "{" and are terminated with a carriage return "RETURN". Note that any s t r i n g whose f i r s t character i s "{" w i l l be interpreted as a command, thus timed tags cannot s t a r t with that character. Table 1 summarizes the command stri n g s and t h e i r related functions. As w i l l be described i n the next section, a number of keys on the keyboard have been programmed to generate the command s t r i n g s . I t should be noted, however, that i f the key programming appears to be f a u l t y , i t i s s t i l l p ossible to generate theocommands by typing the command s t r i n g s . For example, 8 178 TABLE 1: MOMA COMMAND SUMMARY KEY • - V -COMMAND STRING FUNCTION SCROLLING: "FOR" "BACK" KEYPAD 1-9 "PRESENT" {s. {SO {SI to {S9 {SP Set s c r o l l i n g d i r e c t i o n to forward Set s c r o l l i n g d i r e c t i o n to backward S c r o l l d i splay N records Return display to present time TIMED TAGGING: ALPHANUMERIC "RETURN" "RUBOUT" CNTL/U "GET LINE" "ON QUERY" "OFF QUERY" {Q {N Timed tag entry End of timed tag Delete l a s t character typed Delete p a r t i a l l y entered timed tag Reactivate l a s t timed tag typed Reactivate query on timed tag entry Deactivate query on timed tag entry DISPLAY CHANGE: "Dl " to "D4" "D5" to "D6" {1 to {4 {5 to {6 Change to EEG display Change to non-EEG display SPECIAL FUNCTIONS: "INIT" "STOP" "SAVE" {I {F {T ' {E R e i n i t i a l i z e terminal Stop MOMA programs Transfer EEG record from s c r o l l e d to unscrolled section. Generates the message "use SHIFTED VERSION of that key" Programmed into the unshifted version of the s h i f t e d s p e c i a l function keys (D1-D6, INIT,STOP, SAVE). 9 179 the terminal can be r e i n i t i a l i z e d by typing "{I<RETURN>" i f the programming of the "SAVE" key appears to be f a u l t y . KEYBOARD CONFIGURATION The terminals programmable key feature has been used to free the user from the task of typing command s t r i n g s . Using the configuration shown i n Figure 2, any command can be generated by the typing of a single key. A d d i t i o n a l l y , the keys have been grouped according to t h e i r function on various sections of the keyboard to s i m p l i f y the task of l o c a t i n g them. A l l the s p e c i a l purpose keys except CTRL/U have been l a b e l l e d . In the keypad and timed tagging sections, these labels are written on top of the key. In the display and s p e c i a l function section, these l a b e l s are placed on a keyboard overlay which can be placed on the keyboard p r i o r to the operation (see Figure 2). If the overlay l a b e l i s above the key, the s h i f t key must be held down while that key i s pressed. I f the l a b e l i s below the key, the s h i f t key i s not held down. The terminal i s i n i t i a l i z e d when the system i s started. During t h i s procedure, the i n t e r n a l modes of the terminal are set, the keys are programmed, and a character font for the DSA display i s i n i t i a l i z e d . I f at any point during the operation, these settings appear to have been a l t e r e d , i t i s possible to r e i n i t i a l i z e the terminal without di s t u r b i n g the other MOMA functions using the "INIT" key. Displays w i l l NOT be erased during t h i s procedure. Note that i f the key programming i s f a u l t y , the command s t r i n g ("{I<RETURN>") may have to be entered. The s c r o l l i n g feature uses the keypad portion of the keyboard. Through t h i s pad, the user can change the d i r e c t i o n of s c r o l l i n g by typing the "FOR" or the "BACK" keys. The actual s c r o l l i n g i s performed by the' keypad numeric keys from 1 to 9. These keys w i l l s c r o l l the EEG display 10 180 1 RUB OUT LAST j LINE 1 u RETURN 7 8 9 4 5 6 1 2 3 BACK. FOR TIMED TAGGING Figure 2: MOMA Keyboard Organization SCROLLING 11 181 1 to 9 records forward or backward i n time, depending on the d i r e c t i o n l a s t chosen. While s c r o l l e d , the display i s not automatically updated. When the "PRESENT" key i s typed, the display w i l l be returned to present time, automatic display update w i l l be enabled, and the s c r o l l i n g d i r e c t i o n w i l l be set to "BACK". Any attempt to s c r o l l into the future or before the s t a r t of the operation w i l l simply be ignored. There are s i x displays presently implemented on MOMA. The keys which access these displays are labeled D l to D6 on the keyboard overlays. Note that the "SHIFT" key must be held down while typing these keys. A des c r i p t i o n of the c h a r a c t e r i s t i c s of these displays i s presented l a t e r i n th i s document (display type 1 and display type 2). As has been mentioned previously, the EEG display from each channel i s separated into two independent sections. The key labeled "SAVE" on the keyboard overlays allows the user to take a record from the top of one section ( s c r o l l e d section) and i n s e r t i t to the top of the other section (unscrolled s e c t i o n ) . At present, the unscrolled section w i l l not be d i s -turbed by a c t i v i t y i n the s c r o l l e d s ection and cannot be loaded without using the "SAVE" function. Thus, by saving records i n the unscrolled section and moving the s c r o l l e d section to another point i n time, records separated by long time i n t e r v a l s can be d i r e c t l y compared. F i n a l l y , saved records are NOT l o s t on display change, i . e . , a record saved while i n one EEG display w i l l appear i n a l l other EEG displays and w i l l not be l o s t i f a non-EEG display i s temporarily referenced. Note that the "SHIFT" key must be held down while the "SAVE" key i s pressed. D e t a i l s about the s c r o l l e d and unscrolled section can be found l a t e r i n th i s document.(type 1 d i s p l a y s ) . MOMA i s stopped using the key labeled "STOP" on the keyboard overlays. The user i s asked to confirm that the stop request i s v a l i d before the 12 182 programs are t e rmina ted , so i t i s p o s s i b l e to recover from an a c c i d e n t a l r eques t . The w r i t i n g of a p e r i o d on the t e r m i n a l ' s screen i n d i c a t e s the comple t ion of t h i s f u n c t i o n . A t t h i s p o i n t the keyboard moni tor i s running and s tandard RT-11 i n s t r u c t i o n s can be en te red . I f you are u n f a m i l i a r w i t h the RT-11 o p e r a t i n g system and/or you are f i n i s h e d w i t h MOMA, you can now remove the d i s k s from the RX02 d r i v e s , i n s e r t them i n t h e i r c o v e r s , and t u r n o f f the computer 's power s w i t c h . Note tha t the "SHIFT" key must be h e l d down w h i l e the "STOP" key i s p re s sed . The keys a l l o c a t e d to a number of the above i n s t r u c t i o n s are i m p l e -mented on a s h i f t e d b a s i s (D1-D6,SAVE,INIT,STOP) . Th i s was done to minimize the l i k e l i h o o d of a c c i d e n t a l t y p i n g of those i n s t r u c t i o n s . I f the unsh i f t ed v e r s i o n of any of these keys i s typed , a b e l l i s rung and a message which reminds the user to use the "SHIFT" key i s typed onto the t e r m i n a l . TIMED TAGS Timed tags are entered through the alphanumeric p o r t i o n of the keyboard by t y p i n g an app rop r i a t e comment fo l lowed w i t h "RETURN". The on ly r e s t r i c t i o n on the form of these comments i s tha t they cannot s t a r t w i t h the cha rac te r " { " and they cannot c o n t a i n the charac te r The entered timed tag w i l l be t runca ted to 32 cha rac te r s before s to rage . A f t e r the timed tag i s en te red , the program w i l l r e w r i t e the l i n e i t r e c e i v e d and ask the user to accept of r e j e c t i t . I f d e s i r e d , the user can suppress t h i s query by t y p i n g the key l a b e l e d "OFF QUERY" on the keyboard o v e r l a y s . Timed tags w i l l now be s to red immediate ly on the t y p i n g of "RETURN". Query r e a c t i v a t i o n i s performed u s i n g the "ON QUERY" key . Three i n s t r u c t i o n s have been implemented to a i d i n the m a n i p u l a t i o n of timed t ags . F i r s t l y , the "RUBOUT" key w i l l d e l e t e the l a s t cha rac te r 13 183 typed, thus permitting the c o r r e c t i o n of typing e r r o r s . Secondly, entering CTRL/U (holding down the "CTRL" key while typing the "U" key) w i l l delete the currently a c t i v e ( p a r t i a l l y completed) timed tag:.. F i n a l l y , the "LAST LINE" key w i l l r e a c t i v a t e the l a s t timed tag entered. UNUSED KEYS A number of the keys on the terminal's keyboard are not used i n MOMA. In the alphanumeric and s p e c i a l function sections of the keyboard, these keys w i l l have blank key caps and the typing of them w i l l have no e f f e c t on MOMA. The "BREAK" key (lower r i g h t corner of the alphanumeric section) should not be typed while the computer i s running. Although typing i t once w i l l have no e f f e c t , typing i t twice i n rapid succession may stop the computer. Should t h i s ever happen, one can r e s t a r t the computer using the standard start-up procedure. The l i g h t e d keys on the upper r i g h t corner of the keyboard are generally not used i n MOMA. In f a c t , the NUMERIC LOCK and the COMMAND LOCKOUT keys must never be l i g h t e d i f MOMA i s to function properly. I f eithe r one of these keys i s turned on, depress i t once to turn i t o f f . The "TTY LOCK" key may be found to be use f u l for some s i t u a t i o n s . When t h i s key i s l i g h t e d , a l l characters sent to the computer from the terminal are c a p i t a l i z e d . This w i l l not impair the computer's i n t e r p r e t a t i o n of commands. The "INSERT MODE" key w i l l have not/effect on MOMA. 14 184 TERMINAL SCREEN'S CONFIGURATION (see Figure 3) The display medium for MOMA i s a Tektronix 4025 ra s t e r scanned graphics terminal. As shown i n Figure 3, the terminal's screen has been s p l i t up into 2 regions; the workspace s c r o l l and the monitor s c r o l l . The information contained i n onenscroll i s independent of the information i n the other s c r o l l . MOMA uses the workspace s c r o l l for the display of relevant information. During start-up, t h i s region w i l l be loaded with c h e c k l i s t s and start-up i n -st r u c t i o n s . During the operation, the acquired data w i l l be displayed i n t h i s region. For the displays presently implemented, t h i s region w i l l use the top 30 l i n e s of the terminal's screen. MOMA uses the monitor s c r o l l for i n t e r a c t i o n with the user. When the computer sends a request for s e r v i c i n g , the message i s typed into t h i s region. These requests are accompanied by a b e l l to a t t r a c t the user's attention. When the user enters an i n s t r u c t i o n or a timed tag, that entry i s echoed i n th i s region. For the displays presently impelemented, t h i s region w i l l use the bottom 4 l i n e s of the terminal's screen. DISPLAY FORMATS At present there i s s i x d i f f e r e n t displays implemented on MOMA. Four displays are devoted to the presentation of EEG data (type 1) and the remain-ing two are devoted to the presentation of non-EEG data (type 2). The programs i n t h i s system are written i n a way that should make the a l t e r a t i o n of e x i s t i n g displays and/or the addition of new displays a simple matter. Through a continued process of dis p l a y assessment and design i t i s hoped that an "optimum" format for information presentation w i l l be produced. 15 185 MOMA D i s p l a y (30 l i n e s ) MOMA/User I n t e r a c t i o n (4 l i n e s ) F i g u r e 3: Termina l Sc reen ' s C o n f i g u r a t i o n DISPLAY TYPE 1 (display D l to D4) (s.ee Figure 4) 16 186 EEG For type 1 displays, data from each channel of EEG can be displayed using a density modulated compressed s p e c t r a l array (DSA) format. In t h i s format, the i n t e n s i t y of a given character represents the magnitude of the EEG power spectrum at a given frequency and time ( i . e . , a high i n t e n s i t y character means that the EEG contained a large amount of that frequency at that time). The h o r i z o n t a l axis of the EEG displays represents the frequency of the EEG s i g n a l . As the s c a l i n g numbers in d i c a t e , frequencies from 0 to 31 Hz (cycles per second) are represented. The v e r t i c a l axis of the EEG displays represents the time at which the EEG data on that row was acquired. A new row i s added to the top of the dis p l a y every 30 seconds throughout the operation. For convenience, the Hour and Minute of data a c q u i s i t i o n are printed beside the v e r t i c a l axis. The display has been s p l i t i nto two sections, a s c r o l l e d and an un-s c r o l l e d section. The following two paragraphs describe the c h a r a c t e r i s t i c s of these sections. The s c r o l l e d section can be a c t i v e l y changed by both the program and the user. When the display i s presenting current information, t h i s section i s automatically updated as each new data record i s acquired (every 30 seconds). Using the s c r o l l i n g feature, the user can back up and r e c a l l a display which was presented e a r l i e r i n the operation. The display w i l l not be automatically updated u n t i l i t i s returned to present time. In t h i s s e c t i o n , the time of data a c q u i s i t i o n i s printed beside the v e r t i c a l axis on every second row. This section takes up the top rows of the display. 17 187 The unscrolled section can only be altered at the d i r e c t i o n of the user. Using the record transfer function (the "SAVE" key) the user can take data from the top of the s c r o l l e d s ection and i n s e r t i t to the top of the unscrolled section. This data w i l l not be disturbed by future display up-date and s c r o l l i n g a c t i v i t y . This a b i l i t y to save a record should prove use-f u l i n performing d i r e c t comparisons between data records separated by long time i n t e r n a l s . In t h i s section, the time of data a c q u i s i t i o n i s printed beside the v e r t i c a l axis on every row. This section takes up the bottom rows of the d i s p l a y . NON-EEG The acquired non-EEG data w i l l be displayed d i g i t a l l y at the top of type 1 d i s p l a y s . These numbers w i l l always be associated with the EEG record at the top of the s c r o l l e d section. They w i l l be automatically up-dated when the s c r o l l e d section i s updated and w i l l change when the user uses the display s c r o l l i n g feature. TIMED TAGS At any point during the operation the user can enter comments into MOMA v i a the terminal's keyboard. These comments w i l l then be associated with the next acquired data record and stored on disk. In type 1 d i s p l a y s , these tags are printed to the r i g h t of the EEG s c r o l l s . 18 188 - D i g i t a l D i s p l a y o f non-EEG D a t a DSA f o r m a t f o r EEG Timed tags Time L a b e l s every S c r o l l e d S e c t i o n second row Time DSA f o r m a t L a b e l s f o r EEG Timed tags e v e r y U n s c r o l l e d S e c t i o n row 1 1 ! 1 I t 0 5 10 15 20 25 30 F r e q u e n c y L a b e l s F i g u r e 4: D i s p l a y Type 1 19 189 TYPE 1 DISPLAY SUMMARY DISPLAY UPDATE FREQUENCY.... every 30 seconds - not updated i f the user has s c r o l l e d back i n time EEG DISPLAY FORMAT DSA (power spectrum of EEG vs frequency and time) DISPLAYED FREQUENCIES 0 to 31 Hz i n 1 Hz increments SCROLLED SECTION -uses the s c r o l l i n g feature to permit access to a l l EEG data - automatically updated on the a c q u i s i t i o n of new data - takes up the top rows of the display - time l a b e l s on every second row UNSCROLLED SECTION - accepts data transferred by the user from the s c r o l l e d section - not automatically updated - not affected by a c t i v i t y i n the s c r o l l e d section - takes up the bottom rows of the display - time l a b e l s on every row NON-EEG DISPLAY FORMAT....numeric typed at the top of the screen -always associated with the top record of the s c r o l l e d section TIMED TAGS typed out beside the EEG di s p l a y s c r o l l s 20 190 DISPLAY TYPE 2 (display D5 to D6) (see Figure 5) EEG...none NON-EEG The purpose of type 2 displays i s to present the long term trends of up to four non-EEG parameters. Towards th i s end, the non-EEG data channels are p l o t t e d vs time on the terminal i n a s i m i l a r manner as i s done by hand on standard anesthetic records. The h o r i z o n t a l axis represents time. For s c a l i n g purposes, the times of a c q u i s i t i o n of the most recent and the l e a s t recent records are typed at appropriate points below this axis. The v e r t i c a l axis represents magnitude of the data. Appropriate s c a l i n g factors and linetype d e f i n i t i o n s are printed above t h i s axis. I t i s expected that the r e s t i n g state of MOMA w i l l be a type 1 display. For t h i s reason, i t was not considered necessary to automatically update type 3 displays when new data i s acquired. Consequently, these displays w i l l only present data up to the time that they are entered. TIMED TAGS...none TYPE 2 DISPLAY SUMMARY PLOTS NON EEG DATA vs TIME - time i s plotted on the h o r i z o n t a l axis - data magnitude i s plotted on the v e r t i c a l axis - up to 4 channels displayed simultaneously TYPE .TWO DISPLAYS ARE NOT UPDATED ON THE RECEIPT OF NEW DATA 21 191 T i t l e Y a x i s S c a l i n g and l i n e type D e f i n i t i o n s P l o t of non-EEG Data vs t ime time s c a l i n g L a b e l F igu re 5: D i s p l a y Type 2 192 A .3.2.2 Operat ion of MOMA OPERATION OF MOMA 1 1 MOMA START-UP PROCEDURE 1) Insure tha t the "POWER" sw i t ch on the r i g h t s ide of the T e k t r o n i x 4025 t e r m i n a l i s ON. Note that b r i gh tnes s and con t r a s t c o n t r o l s are l o c a t e d near t h i s power s w i t c h (F igure 1 ) . 2) LOCATE the " r e s t a r t " , " h a l t " , and "aux o n / o f f " swi tches on the f ron t pane l of the computer (see F i g u r e 2 ) . 3) Set the HALT s w i t c h to the UP (enable) p o s i t i o n . 4) Set the AUX ON OFF swi t ch to the UP (on) p o s i t i o n . 5) REMOVE the "MOMA MASTER DISK" from i t s envelope and h o l d i t w i t h the l a b e l s i d e up, l a b e l end towards you . 6) OPEN the LEFT-HAND d i s k DRIVE door by squeezing the b l a c k r e l e a s e mechanism i n the center of the door and g e n t l y l i f t i n g , - . 7) Gen t ly INSERT the master DISK as f a r as i t w i l l go. DO NOT FORCE 8) CLOSE THE DOOR by p u l l i n g i t downwards u n t i l i t c l i c k s . 9) INSERT the "MOMA SLAVE DISK" i n r i gh t -hand d r i v e u s ing the same procedure as was used fo r the master d i s k . 10) L i f t and r e l e a s e the RESTART swi t ch on the f ron t pane l of the computer. 11) WAIT. The computer w i l l now send a l l f u r the r d i r e c t i o n s for s t a r t -up. A b e l l w i l l be sounded when s e r v i c i n g i s r e q u i r e d . 2 194 MOMA TERMINATION PROCEDURE 1) ENTER the STOP INSTRUCTION by: a) holding down the "SHIFT" key and typing the "STOP" key. a) f a i l i n g a), enter "{F<RETURN>". 2) WAIT u n t i l a period i s typed onto the terminal's screen. Perform any procedures requested by the computer during t h i s time. 3) OPEN the doors to BOTH DISK DRIVES by squeezing the black release mechanism i n the center of the doors and gently l i f t i n g . 4) Gently REMOVE BOTH DISKS and i n s e r t them i n t h e i r p rotective covers. 5) Set the "AUX ON OFF" to the DOWN (off) p o s i t i o n . This switch i s located on the computer control switch panel (see Figure 2). 6) DISCONNECT the data l i n e s and the computer's power cord. 7) REMOVE the system from the operating theatre i f necessary. DEFAULT START-UP MODES 3 195 - Display number 1 (Dl or 4 EEG, short timed tags). -empty unscrolled section, -automatically updated s c r o l l e d section. - Query generation on timed tag entry. OPERATING CONSIDERATIONS 1) The l i g h t s on the "NUMERIC LOCK" key and the "COMMAND LOCKOUT" key (upper right corner of keyboard) should never be on. I f they are, depress them once to turn them o f f . 2) Do not place objects on top of the terminal as th i s may impede proper cooling through the v e n t i l a t i o n holes. 3) Do not depress the "BREAK" key (lower rig h t corner of keyboard). 4) When handling diskettes: - do not bend - do not touch the exposed surface - keep dry - write on labels with soft tipped pens only - i n s e r t i n protective envelope a f t e r use Terminal Front of Figure 1: Terminal Control Switches LEO INDICATORS I digital POP 11/03-L \ V (czzz> mmm) digital rxOE r n urn Figure 2: Computer Control Switches MOMA KEYBOARD DETAILS SCROLLING: (type 1 displays only) rrrri rrm r r m ruxi DIRECTION CHANGE ("FOR" and "BACK") ( {S. and {SO ) PURPOSE: To set the d i r e c t i o n of s c r o l l i n g for type 1 displays to forward "FOR" ( s c r o l l towards future) or backward "BACK" ( s c r o l l towards past) . 1,1,1,1,1, TO7T TIME JUMP (keypad 1 to 9) ( (SI to {S9 ) PURPOSE: To move the s c r o l l e d section of type 1 displays 1 to 9 records forward or backward i n time, de-pending on the l a s t d i r e c t i o n change. LT I I I i i II I I I I I T I I RETURN TO PRESENT ("PRESENT") ( (SP ) PURPOSE: To return the s c r o l l e d section of the type 1 displays to present time. I t w i l l read and display the most recently acquired data, r e s t a r t automatic display updates, and set the s c r o l l i n g d i r e c t i o n to backward. Note that t h i s key i s the only key which w i l l r e s t a r t automatic d i s p l a y update. LT Lxn 1 1 1 1 1 II II 1 II II 1 1 1 1 1 1 I I i 1 1 1 1 1 1 1 1 II 1 1 1 1 1 1 1 I 1 1 1 1 1 TIMED TAGS: TAG ENTRY (ALPHANUMERIC keys) • T D rrrr PURPOSE: To enter relevant comments at any point during the operation. These comments are terminated with "RETURN" [ CHARACTER DELETION ("RUBOUT") PURPOSE: To rub out the cha rac te r immediately preceeding the t e r m i n a l ' s c u r s o r . I f no charac te r i s the re , t h i s i n s t r u c t i o n i s i gno red . LX LX 1 1 1 1 1 1 I I 1 , 1 1 I I • VI'I 111 11 11 I I i r i -U, I'.'i'i'iVi I' J mr i I I I 1 1 1 1 . -LINE DELETION (CNTL/U) PURPOSE: To de l e t e a p a r t i a l l y entered timed t ag . Note tha t the CTRL key must be he ld down w h i l e the " U " key i s typed. • S H E . LX LINE REACTIVATION ("LAST LINE") LX PURPOSE: To r e a c t i v a t e the l a s t cha rac te r s t r i n g en te red . I f a p a r t i a l l y completed timed tag i s c u r r e n t l y a c t i v e no change w i l l r e s u l t . QX XX X X I QUERY ACTIVATION ("ON QUERY") ( (Q ) PURPOSE: A c t i v a t e s the query on timed tag e n t r y . i . e . , the user w i l l be asked to v e r i f y the v a l i d i t y of entered timed tags before they are s t o r e d . This i s the s t a r t - u p mode. n m Lxrn rrm n m 1111 i 1 i 1 1 1 1 I I 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 i 1 1 1 1 1 1 I I 1 1 1 [ 7 QUERY DEACTIVATION ("OFF QUERY") ( (N ) PURPOSE: Deactivates the query on timed tag entry, i . e . , timed tags w i l l be stored immediately on entry. • LT 1 1 1 1 1 1 1 1 1! 1 ! I I 1 1 I I l l i 1 I I I I 1 1 1 1 I I 1 1 I I I I I I 1 1 1 1 1 I I 1 1 ! CAPITALIZATION ("TTY LOCK") PURPOSE: Ca p i t a l i z e s a l l alphabetic characters when l i g h t e d . W i l l not impede MOMA commands. m m m m mrr I I I I , M i l n mCn n i l ! I I DISPLAY CHANGE: TYPE 1 DISPLAYS (Dl to D4) ( {1 to {4 ) PURPOSE: To change the display format to an EEG display which uses the two part DSA format. The s t a r t -up display i s D l . Note that the "SHIFT" key be held down while the "D*" key i s pressed. TL xx TTTTTT Dl D2 D3 D4 four 10 short two 10 long two 20 short one 20 long l i n e EEGs, timed tags l i n e EEGs, timed tags l i n e EEGs, timed tags l i n e EEG, timed tags TYPE 2 DISPLAYS (D5 and D6) ( {5 to {6 ) PURPOSE: To change the display format to a display which plo t s non-EEG data vs time. Note that these displays are not automatically updated and can-not be s c r o l l e d . Note also that TL i I l l I m i 11 i ! i i i [ the "SHIFT" key must be held down while the "D*" key i s pressed. D5 = the l a s t 79 samples D6 = from s t a r t of operation to present SPECIAL FUNCTIONS: RECOPJ) TRANSFER (type 1 only) ("SAVE") ( (T ) PURPOSE: To take the record at the top of the s c r o l l e d section and i n s e r t s i t to the top of the unscrolled section of type 1 d i s p l a y s . Note that the "SHIFT" key must be held down while the "SAVE" key i s pressed. r r m m m X I 1 , 1 , 1 , 1 I I I 1 I I I I ! xr r i T! -TERMINAL REINITIALIZATION ("INIT") ( {I ) PURPOSE: To r e i n i t i a l i z e the modes and key-board settings of the graphics terminal and to i n i t i a l i z e the character font f o r DSA dis p l a y s . Note that the "SHIFT" key must be held down while the "INIT" key i s pressed. X T EE L L L J J 3 TERMINATION ("STOP") ( (F ) PURPOSE: To stop the MOMA programs. Note that the "SHIFT" key must be held down while the "STOP" key i s pressed. H3 r r m r r m r r m T T J T M l I I I I I X j I X SHIFT KEY WARNING (unshifted version of) (D1-D6,INIT,SAVE,STOP) ( (E ) TL PURPOSE: To remind the user that the "SHIFT" key must be used to send the i n s t r u c t i o n from the l a s t key typed. 10 202 DISPLAY NUMBER 1 (Dl) -Type 1 -10 l i n e s of DSA f o r four EEG channels - s c r o l l e d s e c t i o n = top seven rows -unscrolled s e c t i o n = bottom three rows -Time and frequency l a b e l l i n g -Timed tags truncated to 8 characters - D i g i t a l Display of up to four non-EEG data channels G CO W M e> 53 M H CO W > > o H M o a r* H re re O O CO > P3 O H H co (0 Ml o o co H > M r-h W O O 3 rr o a H- O CO p X> I r t [ I-11 re DISPLAY NUMBER 2 (D2) 11 203 -Type 1 -20 l i n e s of DSA for two EEG channels - s c r o l l e d s e c t i o n = top 15 l i n e s -unscrolled s e c t i o n = bottom 5 l i n e s -Timed tags truncated to 9 Characters - D i g i t a l Display of up to four non-EEG Data channels Time Labels 1 HI a 1 o cn • • H > format EEG USER ! INTER DISPL • ALCTION Timed Tags It! O O cn I . ' * > format EEG 1 • O 0 H- O CD P •a i M W H 1 r t DISPLAY NUMBER 3 (D3) 12 204 -Type 1 -10 l i n e s of DSA for two EEG channels - s c r o l l e d s e c t i o n = top 7 l i n e s - u n scrolled section = bottom 3 l i n e s -Timed tags truncated to 32 Characters - D i g i t a l Display of up to four non-EEG Data channels 13 205 DISPLAY NUMBER 4 (D4) -Type 1 -20 l i n e s of DSA f o r one EEG channel - s c r o l l e d section = top 15 l i n e s - u n scrolled section = bottom 5 l i n e s -Timed Tags truncated to 32 Characters - D i g i t a l Display of up to four non-EEG Data channels f H CU H -D * S fD (D M CO H i O 1 O CO j n > M O 1 o n 1 -1 • r t CO w a H- o H cn a H -M • •O 1 r t a o (-» w M H . M w (D W CO *<: cn > f n > H M o a H s fD H S3 09 cn 1 DISPLAY NUMBER 5 14 206 -Type 2 -P l o t vs time of up to four non-EEG Data Channels -Presentation of the l a s t 79 samples T i t l e y axis s c a l i n g and l i n e type D e f i n i t i o n s P l o t of non-EEG Data vs time time scaling-1 I 1 Label 15 207 DISPLAY NUMBER 6 -Type 2 -Plot vs time of up to four non-EEG Data channels -Presentation of data from the s t a r t of the operation to present T i t l e y axis s c a l i n g and l i n e type-D e f i n i t i o n s Plot of non-EEG Data vs time r— — r — 1 I time s c a l i n g 1 | 16 208 CHECKLIST IN CASE OF MOMA START FAILURE CHECK FOR THE SYMPTOMS LISTED IN TABLE 1 ???? IS THERE ANY APPARENT SYSTEM ACTIVITY OR NOISE ???? no: 1) i n s u r e tha t the power cord from the computer has been p r o p e r l y plugged i n t o the h o s p i t a l ' s power s u p p l y . TRY TO START MOMA AGAIN, USING THE PROCEDURES DESCRIBED IN THIS DOCUMENT AND MAKING SURE THAT NO STEPS ARE MISSED ???? IS THE TERMINAL'S POWER SWITCH LIGHTED ???? no: 1) press i t once to make sure i t i s f u l l y on . 2) check tha t the power cord i s connected from the back of the t e r m i n a l to the computer. ???? IS THE TERMINAL ACTIVE ???? no: 1) check the power s w i t c h and power cord connect ions on t e r m i n a l . 2) make sure the communications cord i s connected to the computer. 3) r o t a t e the^contrrast c o n t r o l d i a l near the t e r m i n a l ' s power s w i t c h i n a c l o c k w i s e d i r e c t i o n ( r o l l towards t e r m i n a l ' s f ron t ) (see F i g u r e 1 ) . 4) r o t a t e the b r i gh tnes s c o n t r o l d i a l near the t e r m i n a l ' s power s w i t c h i n a coun te rc lockwise d i r e c t i o n ( r o l l towards t e r m i n a l ' s back) (see F i g u r e 1 ) . 5) - perform the s tandard baud r a t e s e t t i n g procedure (see page 18) . - perform the s tandard command cha rac te r s e t t i n g procedure (see page 18) . IF THE TERMINAL IS NOT REACTING PROPERLY AND THE ABOVE PROCEDURES FAIL TO SOLVE THE PROBLEM, PUSH THE "MASTER RESET" BUTTON NEAR THE TERMINAL'S POWER SWITCH AND PERFORM THE FIFTH PROCEDURE OF QUESTION NUMBER 3. 17 209 CHECKLIST IN CASE OF INTRAOPERATIVE MALFUNCTION CHECK FOR THE SYMPTOMS LISTED IN TABLE 2 TYPE "<RETURN>" ???? DOES THE QUALITY OF THE DSA DISPLAY APPEAR TO BE DETERIORATING ???? yes : 1) enter the " INIT" i n s t r u c t i o n by ; a) h o l d i n g down the "SHIFT" key and t y p i n g the " INIT" key b) f a i l i n g a ) , type "{I<RETURN>". ???? DOES THE TERMINAL ALONE APPEAR TO BE THE PROBLEM ???? yes:, 1) enter the INIT i n s t r u c t i o n as above ATTEMPT A SYSTEM RESTART BY LIFTING THE "RESTART" SWITCH ON THE COMPUTER CONTROL SWITCH PANEL ON THE FRONT OF THE TERMINAL. NOTE THAT .THIS IS THE SAME AS SYSTEM START-UP PROCEDURE STEP 10. YOU WILL NOW USE THE START FAILURE CHECKLIST IF NECESSARY. 18 210 STANDARD MODE-SETTING PROCEDURES BAUD RATE SETTING: 1) I f the l i g h t on the "STATUS/COMMAND LOCKOUT" key i s on, type i t once to t u r n i t o f f . (upper r i g h t corner of keyboard) 2) Hold down the "SHIFT" key and type the "STATUS/COMMAND LOCKOUT" key. The system w i l l type the f o l l o w i n g message on the t e r m i n a l ' s s c reen : X X NNN X = some cha rac te r N = some number 3) Type the second X fo l lowed w i t h "BAU 9600<RETURN>". e . g . , when message i s U " 335 enter ""BAU 9600<RETURN>". COMMAND CHARACTER SETTING: 1) Perform steps 1 and 2 from above 2) - I f the second X i s do n o t h i n g . - I f the second X i s NOT " v " , type the second X fo l lowed the "COM V<RETURN>". e . g . , when message i s U ! 335 enter "!C0M "<RETURN> NOTE: = BACKQUOTE or SHIFT/BACKSLASH ( t h i r d row up, t h i r d key i n from r i g h t s i d e of alphanumeric keys) TABLE 1: CONDITIONS WHICH PREVENT START-UP 19 2 CONDITION SYMPTOM SOLUTION HALT SWITCH DOWN NO MASTER DISK INSERTED IN RIGHT-HAND DRIVE UNBOOTABLE DISK INSERTED IN RIGHT-HAND DRIVE ( e . g . , s l a v e d i s k ) BOOTABLE BUT INCORRECT DISK INSERTED IN RIGHT-HAND DRIVE NO SLAVE DISK OR UNCLOSED DISK DOOR ILLEGAL SLAVE DISK a f t e r l i f t i n g "RESTART" the f o l l o w i n g message i s immediately w r i t t e n on t e r m i n a l ' s s c reen . 173000 a f t e r l i f t i n g "RESTART" and w a i t i n g about 7 seconds the f o l l o w i n g message i s w r i t t e n on the t e r m i n a l ' s s c reen . 173712 a f t e r l i f t i n g "RESTART" and w a i t i n g about 4 seconds the f o l l o w i n g message i s w r i t t e n on the t e r m i n a l ' s s c reen . ?BOOT-F-NO boot on volume system types a pe r iod " . " a f t e r a few seconds, messages u n r e l a t e d to MOMA are typed onto the t e r m i n a l ' s s c r een . SEVEN CLANKING SOUNDS f o l l o w e d w i t h the w r i t i n g of the f o l l o w i n g message on the t e r m i n a l ' s s c r een . ?M0N-F-Dir i o e r r 004360 A f t e r comple t ion of most of the s t a r t - u p procedure the f o l l o w i n g message i s w r i t t e n onto the t e r m i n a l ! s s c r een . - r a i s e h a l t sw i t ch i n s e r t master d i s k i n l e f t - h a n d d r i v e r e p l a c e d i s k i n l e f t - h a n d d r i v e w i t h MOMA MASTER DISK r e p l a c e d i s k i n l e f t - h a n d d r i v e w i t h MOMA MASTER DISK i n s e r t MOMA SLAVE DISK in] r i gh t -hand d r i v e c l o s e door to d i s k d r i v e r e p l a c e d i s k i n r i g h t -hand d r i v e w i t h MOMA SLAVE DISK 137270 @ Continued on next page. 20 212 CONDITION SYMPTOM SOLUTION COMMAND LOCKOUT KEY LIGHT ON OR SYSTEM COMMAND CHARACTER IS ILLEGAL - cha rac te r s t r i n g s s t a r t i n g w i t h the charac te r are imbedded i n the messages w r i t t e n on the t e r m i n a l ' s screen -r.no b e l l s are heard - the screen i s not erased between messages - i f the l i g h t on the COMMAND LOCKOUT KEY i s on type i t once to t u rn i t o f f - f a i l i n g the above, perform the s tandard command charac te r s e t t i n g procedure (see page 18). INCORRECT TERMINAL BAUDRATE - a f t e r l i f t i n g "RESTART" a s t r i n g of unexpected charac te r s i s typed onto the t e r m i n a l ' s sc reen - the computer makes a c l a n k i n g sound whenever a key i s typed - perform the s tandard baud r a t e s e t t i n g procedure (see page 18) . TABLE 2: CONDITIONS WHICH PREVENT PROPER OPERATION CONDITION SYMPTOM SOLUTION NUMERIC LOCK KEY LIGHT ON - when the keys programmed to produce s c r o l l i n g are typed numbers are produced. - i f the NUMERIC LOCK key l i g h t i s on, type i t once to t u rn i t o f f . COMMAND LOCKOUT KEY LIGHT ON OR SYSTEM COMMAND CHARACTER IS ILLEGAL - many unexpected charac te r s typed i n t o the i n t e r a c t i o n s c r o l l . - or d i s p l a y s c r o l l e d o f f the screen by many unexpected charac te r s i n the d i s p l a y s c r o l l . - i f the COMMAND LOCKOUT key l i g h t i s on , type i t once to t u rn i t o f f - f a i l i n g the above, per-^. form the s tandard command charac te r s e t t i n g r o u t i n e (see page 18) . UNANSWERED SYSTEM REQUESTS - a f t e r be ing unanswered fo r over 30 seconds, there w i l l be no data a c q u i s i t i o n or d i s p l a y update . - answer the request UNDEFINED CHARACTER FONT - unexpected charac te r s typed i n t o DSA p l o t s . - r e i n i t i a l i z e the t e r m i n a l us ing the INIT i n s t r u c -t i o n UNPROGRAMMED SPECIAL FUNCTION KEYS - s p e c i a l f u n c t i o n keys not performing t h e i r - in tended f u n c t i o n - r e i n i t i a l i z e the t e r m i n a l u s ing the INIT i n s t r u c -t i o n APPENDIX 4 ASSESSMENT QUESTIONNAIRES A4.1 System Assessment Ques t ionna i re TYPE DEMMOM.FRM MOMA DEMONSTRATION QUESTIONNAIRE 1 / 4 1) BIOGRAPHICAL DATA '. DATE SYSTEM DEMONSTRATOR ANESTHETIST 2) CHOICE OF PARAMETERS q u e s t i o n s ? D i s r e g a r d d i f f i c u l t i e s i n o b t a i n i n g s i g n a l s a p p r o p r i a t e f o r a c q u i s i t i o n by a computer. I n d i c a t e when an answer a p p l i e s o n l y t o s p e c i f i c p r o c e d u r e ( s ) . 2.1) L i s t , i n o r d e r of i m p o r t a n c e , s i x pa r a m e t e r s which you f e e l a r e e s s e n t i a l f o r m o n i t o r i n g p a t i e n t s d u r i n g Open H e a r t S u r g e r y and C a r o t i d E n d a r t e r e c t o m i e s . F o r a l l a) b > 2.2) L i s t any p a r a m e t e r s w i t h which you f e e l t h a t t r e n d i n f o r m a t i o n i s not a d e q u a t e l y p r e s e n t e d u s i n g e x i s t i n g i n s t r u m e n t a t i o n . 2.3) L i s t any p a r a m e t e r s which you f e e l would be more u s e f u l d u r i n g of a f t e r an o p e r a t i o n i f they were r e c o r d e d more e i t h e r f r e q u e n t 1y 214 3) MOMA ASSESSMENT 2/4 3.1) G i v e your i n i t i a l i m p r e s s i o n of the p o t e n t i a l u s e f u l n e s s of the f o l l o w i n g f e a t u r e s of MOMA'. 0 = do not know poor e x c e l l e n t The m u l t i p l e d i s p l a y c a p a b i l i t y 0 1 2 3 4 5 The s c r o l l i n g f e a t u r e of the EEG d i s p l a y s 0 1 2 3 4 er The two s e c t i o n EEG d i s p l a y 0 1 2 3 4 5 The time p l o t s 0 1 2 3 4 5 The t i m e d t a g g i n g f e a t u r e 0 1 2 3 4 5 S i m p l i c i t y of o p e r a t i o n 0 1 2 3 4 5 Keyboard c o n f i g u r a t i o n 0 1 2 3 4 5 Do c u m e n t a t i o n 0 1 2 3 4 5 O v e r a l l a s s e s s m e n t 0 1 2 3 4 5 3.2) Can you su g g e s t any changes which would improve any of the above r a t i n g s . 3.3) W i l l the c o m b i n a t i o n of the s c r o l l i n g f e a t u r e and the two s e c t i o n d i s p l a y be s u f f i c i e n t f o r p e r f o r m i n g the co m p a r i s o n s n e c e s s a r y f o r u s i n g the EEG as a m o n i t o r i n g p a r a m e t e r i n the o p e r a t i n g room. I f n o t , what i s l a c k i n g . 215 3 / 4 3 . 4 ) S p e c i f y any a m b i g u i t i e s o r c h a r a c t e r i s t i c s u n e x p l a i n e d i n the d o c u m e n t a t i o n p r o v i d e d w i t h t h i s system. 3 . 5 ) S p e c i f y any s p e c i f i c commands or f e a t u r e s not p r e s e n t on the e x i s t i n g m o n i t o r which would improve i t s g e n e r a l u s e f u l n e s s . 3.S) Do you f e e l t h a t the use of MOMA w i l l t a k e a d i s p r o p o r t i o n a t e amount of your time away from ; more e s s e n t i a l t a s k s . 216 4) GENERAL COMMENTS 4 / 4 217 A4.2: Software Assessment Questionnaire TYPE SOFTQU.FRM MOMA SOFTWARE GENERAL ASSESSMENT FORM 1/2 1) BIOGRAPHICAL DATA ASSESSOR DATE 1.1) Are you f a m i l i a r w i t h the f b l l o w i n s t h i n g s ! no yes FORTRAN IV RT-11 The o b j e c t i v e of MOMA 1.2) Have you r e a d the f o l l o w i n g documents: MOMA SUMMARY MOMA USERS GUIDE 2) GIVE YOUR ASSESSMENT OF THE OVERALL QUALITY OF THE FOLLOWING MODULES'. < t h i s a ssessment i n c l u d e s o v e r a l l program f l e x i b i l i t y , u s e f u l n e s s ) (and c o m p l e t e n e s s of the d o c u m e n t a t i o n r and a p p r o p r i a t e n e s s ) ( o f t he programs f o r t h e i r i n t e n d e d t a s k s ) DOCHLP.TXT 0 = do not Know poor e x c e l l e n t COMRTN.TXT modules d e s c r i b e d i n COMRTN.TXT 0 0 2 2 3 3 4 4 5 5 SRT*.TXT modules d e s c r i b e d i n SRT*.TXT 0 0 2 2 3 3 4 4 5 5 FOR*.TXT modules d e s c r i b e d i n FOR*.TXT 0 0 2 2 3 3 4 4 5 5 BAK*.TXT modules d e s c r i b e d i n BAK*.TXT 0 0 2 2 3 3 4 4 5 5 GPH*.TXT modules d e s c r i b e d i n GPH*.TXT, 0 0 2 2 3 3 4 4 5 5 FLOW.TXT modules d e s c r i b e d i n FLOW.TXT 0 0 2 2 3 3 4 4 5 5 VISXXX.DOC modules d e s c r i b e d i n VISXXX.DOC 0 0 2 2 3 3 4 4 5 5 3) Do you f e e l t h a t the s o f t w a r e d e s c r i b e d above w i l l be u s e f u l f o r the development of an e f f e c t i v e computer-based p a t i e n t m o n i t o r i n g s y s t e m . 218 2/2 4) GENERAL COMMENTS 219 220 221 222 REFERENCES [ 1] E.I. Eger I I , "Monitoring the Depth of Anesthesia", Monitoring i n  Anesthesia, L.J. Saidman, N.T. Smith ( e d i t o r s ) , John Wiley & Sons, New York, 1978, pp. 1-15. [ 2] J.B. Cooper, R.S. Newbower et a l . , "Preventable Anesthesia Mishaps: A Study of Human Factors", Anesthesiology, v o l . 49, 1978, pp. 399-406. [ 3] A. Boba, "Essays on Future Trends i n Anesthesia", Anesthesiology and  Resuscitation, Springer-Verlag B e r l i n , Heidelberg, New York, 1972, pp. 1-21. [ 4] S.C. Cullen, "Reliance on Cybernetics", Anesthesiology, v o l . 51, No. 1, July 1979, pp. 97-98. [ 5] S.A. Glantz, "Computers i n C l i n i c a l Medicine: A C r i t i q u e " , Computer IEEE, May 1978, pp. 68-77. [ 6 ] B. Smalhout, "The Importance of Monitoring i n Anesthesia", Acta  Anesthesiologica Belgica, v o l . 29, No. 1, 1978, pp. 45-69. [ 7] J . J . Osborn et a l . , "Managing the Data from Respiratory Measurements", Medical Instrumentation, v o l . 13, No. 6, November-December 1979, pp. 330-336. [ 8] R.A. de A s i a , C.W. Bryan-Brown, "The C l i n i c a l l y Valuable Variable", Medical Instrumentation, v o l . 13, No. 6, November-December, 1979, pp. 325-326. [ 9] N.P. Cass, D.G. Lampard, W.A. Brown, and J.R. Coles, "Computer Con-t r o l l e d Muscle Relaxation: A Comparison of 4 Muscle Relaxants i n the Sheep", Anesthesia and Intensive Care, v o l . 4, No. 1, February 1976, pp. 16-22. [10] D.G. Lampard, J.R. Coles, W.A. Brown, " E l e c t r o n i c D i g i t a l Computer Control of V e n t i l a t i o n and Anesthesia", Anesthesia and Intensive  Care, v o l . 1, No. 5, August, 1973, pp. 382-392. [11] W.W. Mapleson, "From Clover to Computer", Anaesthesia, v o l . 34, Blackwell S c i e n t i f i c P ublications, 1979, pp. 163-172. [12] D. Daub, R. Vom Hovel, G. K a l f f , R. Repges, "A Process Control Computer for C o n t r o l l i n g Anaesthesia", Recent Progress i n Anaesthe- siology and Resuscitation, A. Arias et a l . , American El s e v i o r Publishing Co. Inc., New York, 1974, pp. 662-665. [13] H. Lutz, "Anaesthesia Record System with Mark Page Reader", Recent  Progress i n Anaesthesiology and Resuscitation, A. Arias et a l . , American E l s e v i o r Publishing Co. Inc. New York, 1974, pp. 647-651. 223 [14] D.D.C. Howat, "Why keep Anaesthetic Records", Recent Progress i n AnaesthesiolOgy and Resuscitation, A. A.rias et a l . , American E l s e v i o r Publishing Co. Inc., New York, 1974, pp. 640-642. [15] M. Hilberman, "Monitoring i n the Operating Room: Current Techniques and Future Requirements", Medical Instrumentation, v o l . 11, No. 5, September-October, 1977, pp. 283-287. [16] R.M. Z o l l i n g e r , J.F. Kreul, J.L. Schneider, "Man-Made versus Computer-Generated Anesthesia Records", Journal of Surg i c a l Research, v o l . 22, 1977, pp. 419-424. [17] M.J. Shaffer, P.R. Kaiser et a l . , "Manual Record keeping and S t a t i s t i c a l Records f o r the Operating Room", Medical Instrumentation, v o l . 12, No. 3, May-June, 1978, pp. 192-197. [18] E.B. Cox and W.E. Stanley, "Schema-Driven Time-Oriented Record System on a Minicomputer", Computers and Biomedical Research, v o l . 12, 1979, pp. 503-516. [19] B.M. Tompkins, "A Computer Assisted Preanaesthesia Interview: Value of a Computer-Generated Summary of Patients H i s t o r i c a l Information i n the Preanaesthesia V i s i t " , Anesthesia and Analgesia, v o l . 59, No. 1, January 1980, pp. 3-10. [20] A.W. Paulsen et a l . , "A Computerized Operating Room Monitoring System Employing X-Y P l o t t e r Hard Copy Output at the Anaesthesia Machine", Advances i n Anesthesiology and Monitoring, R.S. Newbower, AAMI 15th Annual Meeting, San Francisco, A p r i l 13-17, 1980, p. 161. [21] F.A. Gibbs, E.L. Gibbs, W.G. Lennox, " E f f e c t on the EEG of Certain Drugs which Influence Nervous A c t i v i t y " , Arch. Intern. Mod., v o l . 60, Jul y , 1937, pp. 154-166. [22] L.J. Rogers, "EEG Frequency Band Correlates of Depth of Surgical Anesthesia", Internal Paper, Vancouver General H o s p i t a l , 1976. [23] J.A. McEwen, "Estimation of the Level of Anesthesia During Surgery by Automatic EEG Recognition", Ph.D. Thesis, UBC, 1975. [24] D.G. McDbwall, "Monitoring the Brain", Anesthesiology, v o l . 45, No. 2, August, 1976, pp. 117-134. [25] T.A. Salerno et a l . , "Cerebral Surveillance during Cardiac Surgery", The Canadian Journal of Surgery, v o l . 22, No. 4, July 1979, pp. 325-326. [26] T.M. Sundt et a l . , "Monitoring Techniques for Carotid Endarterectomy", C l i n i c a l Neurosurgery, v o l . 22, The Williams Wilkins Co., Baltimore, 1974, pp. 199-212. 224 [27] H . G . Beebe et a l . , "Comparison of C a r o t i d A r t e r y Stump Pressure and EEG M o n i t o r i n g i n C a r o t i d Endar terectomy", The American Surgeon, v o l . 99, No. 10, October 1978, pp. 655-660. [28] G. R o i l y , "2 Cases of Burns Caused by Misuse of Coagu la t ion U n i t and M o n i t o r i n g " , A c t a A n a e s t h e s i o l o g i c a B e l g i c a , v o l . 29, No. 3, 1978, pp. 313-317. [29] J . S p i e r d i j k et a l . , "Burns Caused by M o n i t o r i n g i n A n e s t h e s i a " , A c t a  A n a e s t h e s i o l o g i c a B e l g i c a , v o l . 29, No. 3, 1978, pp. 305-313. [30] Canadian Standards A s s o c i a t i o n , CSA Standard C 22.2, No. 125, 1979. [31] K . Uy t t endae l e , " M o n i t o r i n g In s t rumen ta t i on , I s o l a t e d Inpu t s , E l e c t r o -surgery F i l t e r i n g , Burns P r o t e c t i o n : What does i t mean?" A c t a  A n a e s t h e s i o l o g i c a B e l g i c a , v o l . 29, No. 3, 1978, pp. 317-330. [32] J . G . Webster , " M e d i c a l Ins t rumenta t ion A p p l i c a t i o n and D e s i g n " , Houghton M i f f l i n C o . , Bos ton , 1978. [33] J . B . Cooper, R . S . Newbower, "The Anes thes i a Machine - an Acc iden t W a i t i n g to Happen", Human Fac to r s i n H e a l t h Care , R . M . P i c k e t , T . G . Tr iggs ( e d i t o r s ) , Lex ing ton Books, D . C . Heath & C o . , 1975, pp. 345-358. [34] J . B . Cooper, R . S . Newbower, "A New Anaes thes ia D e l i v e r y System", A n e s t h e s i o l o g y , v o l . 49, 1978, pp. 310-318. [35] R. F o r e s t , Y . Lamarche, "An Anes thes i a C i r c u i t M o n i t o r " , A n e s t h e s i o l o g y , v o l . 50, No. 5, A p r i l , 1979, pp. 356-359. [36] D . H . P e t t y , E . A . E r n s t , G. B l a c k w e l l , " S p e c i a l Purpose Timer to A i d i n Closed C i r c u i t A n e s t h e s i a D e l i v e r y ? , IEEE Trans , on B i o m e d i c a l  E n g i n e e r i n g , v o l . BME-25, No. 8, August,,1979, pp. 493-495. [37] D. Maynard, P . F . P r i o r , D . F . S c o t t , "Device f o r Continuous M o n i t o r i n g of C e r e b r a l A c t i v i t y i n R e s u s c i t a t e d P a t i e n t s " , B r i t i s h M e d i c a l  J o u r n a l , v o l . 29, November 1969, pp. 545-546. [38] M . A . B ran thwa i t e , "P reven t ion of N e u r o l o g i c a l Damage Dur ing Open Hear t Surgery" , Thorax, v o l . 30, No. 3, June, 1975, pp. 258-261. [39] R . F . C u c c h i a r a , F.W. Sharbrough et a l . , "The E lec t roencepha log raph ic F i l t e r - P r o c e s s o r as an I n d i c a t o r of C e r e b r a l Ischema d u r i n g C a r o t i d Endarterectomy", A n e s t h e s i o l o g y , v o l . 51, No. 1, J u l y , 1979, pp. 77-79. [40] M . S . Schwar tz , M . P . C o l v e n , P . F . P r i o r , L . S t r u n i n , B . R . Simpson, E . M . J . Weaver, D . F . S c o t t , "The C e r e b r a l F u n c t i o n M o n i t o r " , A n a e s t h e s i a , v o l . 28, 1973, pp. 611-618. [41] G . A . V o l g y e s i , "A B r a i n F u n c t i o n Mon i to r f o r Use Dur ing A n a e s t h e s i a , P r e l i m i n a r y Repor t " , Canadian Anaes th . Soc. J o u r n a l , v o l . 25, No. 5, September, 1978, pp. 427-430. 225 [42] R.A. Fleming, N.T. Smith, "An Inexpensive Device for Analysing and Monitoring the Electroencephalogram", Anesthesiology, v o l . 50, 1979, pp. 456-469. [43] J.D. Frost J r . , D.E. Hillman, P. Kellaway, "Automatic Interpretation of EEG Analysis of Background A c t i v i t y " , Computers and Biomedical Research, v o l . 13, 1980, pp. 242-257. [44] J.S. Brodkey et a l . , "The Role of Computers i n Neurosurgery", C l i n i c a l  Neurosurgery, Williams & Wilkins Co., Baltimore, 1975, pp. 432-442. [45] R.A.F. Pronk, " P e r i and Post operative Computer Assisted Patient Monitoring", WHO Project, Ref. No. EU/NETH/HMD/099/RB/78/1, Report M-1978-1, September, 1978. [46] E.A. Gofton, "EEGAL-Mk-4 Integrating EEG Monitoring With the C l i n i c a l Anaesthetic Record", Dept. of Anaesthesia, Vancouver General H o s p i t a l , 1977. [47] R.A.F. Pronk et a l . , "The Use of EEG f o r Patient Monitoring During Open Heart Surgery", Computers i n Cardiology, IEEE Computer Society, 1975, pp. 77-82. [48] H.H. Jasper, "Report of the Committee on Methods of C l i n i c a l Examination i n EEG", Electroenceph. & C l i n i c a l Neurophysiol., v o l . 10, 1958, pp. 370-375. [49] W. Gerch et al.?. "A Kullback Leibler-Nearest Neighbor Rule C l a s s i f i -cation of EEGs: The EEG Population Screening Problem, An Anesthesia Level EEG C l a s s i f i c a t i o n A p p l i c a t i o n " , Computers and Biomedical  Research, v o l . 13, 1980, pp. 283-296. [50] J.W. Cooley, J.W. Tukey, "An Algorithm for the Machine Computation of Complex Fourier Series", Math. Comput., v o l . 19, A p r i l , 1965, pp. 297-301. [51] P.D. Welsh, "The Use of FFT f o r the Estimation of Power Spectra: A Method Based on Time Averaging over Short, Modified Periodograms", IEEE Trans. Audio & Electroacoust., v o l . AU-15, June, 1967, pp. 70-73. [52] C.K. Yuen, "A Comparison of 5 Methods for Computing the Power Spectrum of a Random Process Using Data Segmentation", Proceedings of IEEE, June, 1977, pp. 984-986. [53] G. Dumermuth, E. K e l l e r , "EEG Spectral Analysis by Means of FFT", Automation of C l i n i c a l EEG, P. Kellaway, I. Petersen ( e d i t o r s ) , Raven Press, New York, 1973, pp. 145-159. [54] D. Childers ( e d i t o r ) , "Modern Spectrum Analysis", IEEE Press, New York, 1978. 226 [55] C M . Rader , "An Improved A l g o r i t h m f o r High Speed A u t o c o r r e l a t i o n w i t h A p p l i c a t i o n s to S p e c t r a l E s t i m a t i o n " , IEEE Trans . on Audio and E l e c t r o - a c o u s t i c s , v o l . AU-18 , No. 4 , December, 1970, pp. 439-441. [56] A . P e l e d , B . L i u , " D i g i t a l S i g n a l P r o c e s s i n g Theory Design and Implementat ion" , John W i l e y & Sons, 1976, pp. 156-168. [57] D. C h i l d e r s and R. D u r l i n g , " D i g i t a l F i l t e r i n g and S i g n a l P r o c e s s i n g " , West P u b l i s h i n g C o . , 1975. [58] R . G . B i c k f o r d , T.W. B i l l i n g e r , N . I . F l e m i n g , L . S tewar t , "The Com-pressed S p e c t r a l A r r a y (CSA) , A P i c t o r a l EEG" , P roceed ings , San Diego  Biomed. Symposium, 1972, pp. 365-371. [59] A . B r l c o l o , et a l . , " C l i n i c a l A p p l i c a t i o n o f CSA i n Long Term EEG M o n i t o r i n g o f Comatose P a t i e n t s " , EEG and C l i n . Neurophys . , v o l . 45 , 1978, pp. 211-225. [60] R. Burgess et a l . , " C e r e b r a l M o n i t o r i n g by Compressed S p e c t r a l A r r a y " , New Zealand M e d i c a l J o u r n a l , v o l . 86 , No. 601, December 14, 1977, pp. 521-523. [61] R . A . F l e m i n g , N . T . Smi th , "Dens i ty Modu la t ion - A Technique . f o r the D i s p l a y of T h r e e - V a r i a b l e Data i n P a t i e n t M o n i t o r i n g " , A n e s t h e s i o l o g y , v o l . 50, No. 6, June, 1979, pp. 543-546. [62] W . J . L e v y , H . M . Shap i ro , G. Maruchak, E . Meathe, "Automated EEG P r o c e s s i n g f o r I n t r a o p e r a t i v e M o n i t o r i n g : A Comparison of Techniques" , A n e s t h e s i o l o g y , v o l . 53, September 1980, pp. 223-236. [63] I . Ove r ing ton , " V i s i o n and A c q u i s i t i o n " , Crane Russak & Co. I n c . , New Y o r k , 1976, pp. 236-240. [64] J . L . Demer et a l . , "An Esophageal M u l t i p r o b e fo r Temperature, ECG, and Heart and Lung Sounds Measurement", IEEE Trans , on Biomed. Engg . , v o l . BME-25, No. 4 , J u l y 1978, pp. 377-380. [65] J . P . K a r i s et a l . , "A Q u a n t i t a t i v e Neuromuscular Blockade M o n i t o r " , Anes thes i a and A n a l g e s i a , v o l . 59, No. 4 , A p r i l , 1980, pp. 308-310. [66] R. Purschke et a l . , "On-Line M o n i t o r i n g of Card iac Output , A r t e r i a l B lood P r e s s u r e , and Hea r t r a t e d u r i n g and a f t e r Ca rd iac Surgery Us ing a New Computer (COC)", Recent Progress i n Anes thes io logy and R e s u s c i - t a t i o n , A . A r i a s et a l ( e d i t o r s ) , 1974, pp. 631-634. [67] J . M . Coe et a l . , "Computer A s s i s t e d Hepar in M o n i t o r i n g " , American J o u r n a l of C l i n i c a l Pa tho logy , v o l . 72, No. 1, J u l y , 1979, pp. 74-76. [68] P . Lauwers et a l . , "Computer A s s i s t e d M o n i t o r i n g i n I n t e n s i v e M e d i c i n e " , A c t a A n e s t h e s i o l o g i c a B e l g i c a , v o l . 27, No. 3, 1978, pp. 287-305. 227 [69] J . Ackmann, "A Computer System for Neurosurgical Patient Monitoring", Computer Programs i n Biomedicine, v o l . 10, 1979, pp. 81-88/ [70] G. Dumermuth, R. Dinkelman, "EEG Data A c q u i s i t i o n and Preprocessing by Microcomputer S a t e l l i t e System", Computer Programs i n Biomedicine, v o l . 10, 1979, pp. 197-208. [71] M.G. Rosen et a l . , "Use of Computers i n the Labor and Delivery Suite: An Overview", American Journal of Obstetrics and Gynecology, v o l . 132, No. 6, November 15, 1978, pp. 589-594. [72] G.N.C. Kenny, C. Schmulian, "Computer Assisted Learning i n the Teaching of Anaesthesia", Anaesthesia, v o l . 34, 1979, pp. 159-162. 

Cite

Citation Scheme:

        

Citations by CSL (citeproc-js)

Usage Statistics

Share

Embed

Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                        
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            src="{[{embed.src}]}"
                            data-item="{[{embed.item}]}"
                            data-collection="{[{embed.collection}]}"
                            data-metadata="{[{embed.showMetadata}]}"
                            data-width="{[{embed.width}]}"
                            data-media="{[{embed.selectedMedia}]}"
                            async >
                            </script>
                            </div>
                        
                    
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:
https://iiif.library.ubc.ca/presentation/dsp.831.1-0095523/manifest

Comment

Related Items