Computer Programs in Biomedicine 10 (1979) 81-88 © Elsevier/North-Holland Biomedical Press

A COMPUTER SYSTEM FOR NEUROSURGICAL

PATIENT MONITORING

James J. ACKMANN Department o f Neurosurgery, Medical College o f Wisconsin, 8700 W. Wisconsin Ave., Milwaukee, W153226, USA The variables monitored in intensive care units are generally late indicators of neurologic deterioration. A system based on a LINC-8 computer was therefore developed for on-line monitoring of evoked potentials, electroencephalography (EEG), and transcranial and transthoracic impedances as well as conventional parameters. Somatosensory evoked potentials are recorded at either 30 min or 1 h intervals. One minute epochs of EEG are analyzed every 10 min using a peak-detection algorithm. Impedances and conventional parameters are also monitored at 10 min intervals. In a study of 50 patients, the technical feasibility of this type of monitoring with a small laboratory computer has been demonstrated. In some instances, evoked potentials and EEG show changes prior to detectable neurologic changes. The study suggests that this type of monitoring can provide a valuable adjunct for evaluation of physiologic function in neurosurgical intensive care. Patient monitoring

Evoked potentials

Electroencephalography (EEG)

1. Introduction

Minicomputer

tain evoked potentials, and the large data volumes resulting from frequent data acquisition, a computer system was developed.

The variables usually monitored in intensive care units such as EKG, blood pressure and temperature, are usually late indicators of neurologic deterioration. The level of responsiveness and development of lateralizing signs are of far greater importance; however, these are subjective measures and can only be evaluated periodically. This study was undertaken to determine the feasibility o f providing more continuous measures of neurologic status with the emphasis on non-invasive techniques. Previous studies both by others and in our laboratories demonstrated that evoked potentials are sensitive indicators of abnormalities in the afferent pathways and cortical areas. Similarly, electroencephalography (EEG) can provide a useful adjunct for assessment of cortical function. Studies both by others and in our laboratories also suggested that transcranial impedance may be useful for detecting cerebral edema and unilateral spaceoccupying lesions, and that transthoracic impedance measurements proyide a convenient means for monitoring tidal volume and for detecting development of intrathoracic fluid accumulation. This study was undertaken to determine the feasibility of obtaining frequent unattended recordings of these variables along with conventional parameters and to assess the utility of the measures for neurosurgical patient monitoring. Because o f the need for averaging to ob-

2. Hardware More comprehensive background information and description of the monitoring instruments are reported elsewhere [1] but are summarized here. Bedside instruments include the following General Electric 3100-series modules: 2-channel non-fade oscilloscope; 2 pressure amplifiers, 1 for intra-arterial blood pressure and the other for intracranial pressure; ECG amplifier; pulse amplifier; heart rate monitor; temperature monitor; and 2 modified EEG amplifiers. For EEG recording, bandwidth is 0.5 Hz to 20 Hz and for evoked potentials 10 Hz to 1 kHz; frequency response is selected by a remote contact closure. A Grass model $44 stimulator in conjunction with a model SIU5 stimulus isolation unit and a CCU1A constant-current unit is used for median nerve stimulation. A transcranial impedance monitor and transthoracic impedance monitor fabricated in our laboratories are also included. Evoked potentials and EEGs from the right and left hemispheres are recorded using electrodes placed bilaterally in parasagittal planes 3 cm lateral to the midline. Three electrodes are placed on either side of the scalp at 5 cm intervals 81

82

J.J. Ackmann, Neurosurgical patient monitoring

with the center electrode located midway between inion and nasion. Recordings are bipolar with the cen ter electrode indifferent, anterior electrode positive, and posterior electrode negative. Two additional electrodes for injection of transcranial impedance measurement current are applied on the midsagittal plane approximately 2 cm above the globella and 2 cm above the external occipital protuberance. For evoked potential stimulation, two 0.5 cm stainless steel disks separated by 5 cm and attached to a plastit substrate are placed over the palmaris longus tendon at the flexion crease of the wrist. The computer is a Digital Equipment Corporation LINC-8 computer with 8 K words of core memory and a dual tapedrive. Peripherals include a Centronics Model 101A printer, a Houston Instruments Model DP1 plotter, an Ann Arbor Model T208 video terminal, a real-time clock with two independent adjustable oscillators, and a time-of-day clock. All bedside instruments are interfaced to the computer through appropriate networks. The computer is remotely located and hardwired to the bedside instruments. Computer relays enable and disable the stimulator and select the stimulus site, transcranial measurement site, and EEG/ evoked potential amplifier frequency response. Video terminals for data display are located at bedside, in the computer room, and at the nurses' station. Binary-coded decimal thumb-wheel switches located at the terminals are interfaced to the computer through a 5 bit read-only buffer. These are used in conjunction with push-button switches interfaced to a sense line through a flip-flop to request trend plots of monitored variables.

current 3 h of any parameter upon request; (5) An EEG/evoked potential module; (6) A module for generating hard copy of parameter values and for generating plots of evoked potentials. 3.1. Memory usage and overlay structure The memory usage and overlay structure are illustrated (fig. 1). The mainline module occupies bank 1 along with a subroutine for analog sampling of all variables except EEG and evoked potentials. The interrupt service routines are also contained within this bank. A storage routine and routines for outputting current data and graphical module occupy bank 2. The EEG and evoked potential module occupies bank 3 and a plotting and printing module is overlaid into this area. Bank 4 is used for display and storage buffers, ASCII code for graph labels, and a number of flags and constants. A double-precision floating point package along with a graph generating module occupy bank 5. Bank 6 is used to accumulate sums of samples for evoked potentials and bank 7 for accumulating sums of the samples squared. The initialization module is overlaid into this bank. 3. 2. Mainline The flowchart for the overall program is illustrated (fig. 2). To begin monitoring, the system tape is

AEP SUMS OF SQUARES

7

3. Implementation and usage The program consists of the following basic modules: (1) A mainline module which controls execution, schedules tasks, and performs A/D sampling; (2) An initialization module which permits selection of parameters to be monitored, accepts patient identification and date, and sets up a corresponding file header; (3) A module which controls storage and output of current parameter values to the video terminals; (4) A module which generates graphs of the most

SETUP

6

5 4

AEP SUMS FLOATING POINT PACKAGE GRAPHICS DISPLAY BUFFERS GRAPH LABELS EVOKED POTENTIALSoEEG

5

2 I

.~J#PLOT, PRINT

STORAGE,OUTPUT MAINLINE SLOW VARIABLE SAMPLING INTERRUPT SERVICE

Fig. 1. Memory usage and overlay structure; * overlaid.

J.J. Ackmann, Neurosurgicalpanent monitoring

83

,() N

Y

Y

N

N

Y

Fig. 2. Mainline flowchart.

mounted on drive 0 and a data tape. on drive 1. The system loader was modified so that the mainline module loads automatically via the computer load switch. After loading, the mainline module overlays the initialization module and begins execution. This module accepts patient name, Julian date, and param eters to be monitored. The data tape is then scanned to find the first available storage area. A contiguous file structure is used. One header block is initially written which contains patient identification, date monitoring was begun, and the parameters monitored. Based on the parameters to be monitored, the available storage time is calculated and displayed. The operator then has the option of beginning monitoring or replacing the data tape if insufficient storage is available. If all parameters are monitored and evoked potentials are recorded at hourly intervals, 120 h of data can be accumulated on one computer tape. Once begun, monitoring proceeds automatically. At the beginning of an epoch the program proceeds through a checklist to determine which parameters to acquire (fig. 2). 'Slow' variables are defined as all parameters having sampling rates of 100 Hz or less. These include all variables except EEG and evoked potentials. As subsequently detailed, these variables

are monitored for 3 min. During this time, the trendplot request sense line is interrogated to determine if a request has been entered. Every 3 h, hardcopy of the slow variables is generated. One minute epochs of EEG from either side of the scalp are then analyzed. Every third or sixth epoch (30 min or 60 rain) evoked potentials are recorded from both sides of the scalp secondary to stimulation of the contralateral median nerve. When all variables have been sampled, the storage and output routine is entered. All variables, except evoked potentials, are placed on core-resistant push-down stack buffers which hold 3 h of data. When the buffers are filled with all new data, the data is transferred to tape in two-block segments. In each segment, 6 header-words contain the time-of-day and a code distinguishing the data from evoked potentials. Individual evoked potentials are stored in 4-block segments. Ten headerwords contain the time-of-day, scale factor, and recording site. After storage, current parameters are output to the video terminals. A loop is then entered in which the trend-plot sense-line is continually interrogated and the time-of-day clock is read. Upon request, a graph of the most current 3 h of the requested oarameter is generated using the core resis-

J.J. Ackmann, Neurosurgical patient monitoring

84

tant data. When a total time of 10 min from the beginning of the epoch elapses, the entire cycle repeats. To terminate monitoring, a sense switch is raised. In this event, a finalization routine is entered which completes data storage if necessary.

3.3. Slow variable sampling The slow variable sampling routine (fig. 3) uses double buffering; real-time clock interrupts determine the sample time. Upon entering the routine a set of pointers is initialized and the real-time clock is started. A loop is then entered which continually interrogates the trend-plot sense-line and the graphics routine is entered if requested. Clock interrupts occur at 10 ms intervals. Because of machine architecture and because interrupts can occur with the program running in either of 2 lower memory banks, the interrupt service routine is somewhat complex. After saving the necessary registers, the sampling routine is ultimately entered. Blood pressure and pulse wave-

¥

forms are sampled every clock interrupt corresponding to a simpling rate of I00 Hz; respiration is sampled every 4 interrupts corresponding to a rate of 25 Hz, and the remaining variables are sampled every 48 interrupts. The buffer sizes are such that all fill simultaneously (48 samples for blood pressure and pulse, 12 samples for respiration, and 1 sample for remaining variables). When 1 set of buffers fills (every 0.48 s) the sampling and processing pointers are swapped and a process routine is entered. The systolic and diastolic points of the blood pressure waveform are determined using a peak-detection algorithm with a sliding window. When the systolic point is found, the algorithm is advanced by 0.24 s to avoid the dicrotic notch. As each systole is determined, a counter is incremented to permit computation of heart rate. Similarly, a peak-detection algorithm is used to determine tire peaks and troughs of the respiration waveform. The remaining variables are simply summed into double precision accumulators. When an interrupt is complete, registers are restored and the program restarted where interrupted. Because of machine architecture, the final step in this process is through a PDP-8 mode routine which ultimately restarts the LINC processor at the appropriate location. As the buffer sets are processed a counter is incremented. When 375 buffers have been processed corresponding to 3 min of elapsed time, averages of all parameters are computed and placed in a temporary buffer; control is then returned to the mainline program.

3.4. EEG

Fig. 3. Slow variable sampling routine flowchart.

In the initial phases of the project, a period-coding algorithm based on zero-crossing was used. As the signal crossed a preset threshold in the positive direction, the real-time clock was started. At the first crossing of the threshold in the negative direction, the clock was read and the data used to classify each contiguous half-wave into the canonical EEG frequency bands (delta 0 . 5 - 4 Hz; theta 4 - 8 Hz; alpha 8 - 1 3 Hz; beta 13-20 Hz). Because of baseline drift secondary to patient movement, this algorithm was subject to serious error. A peak-detection algorithm was therefore developed off-line. This is described in detail elsewhere [2,3]. Briefly, 1 min epochs of data are analyzed. Data is sampled every 2 ms correspond-

J.J. Ackmann, Neurosurgicalpatient monitoring ing to a sampling rate of 500 Hz. Three contiguous sliding windows are used; each window consists of 8 samples corresponding to a window width of 16 ms. In each window, the average value of the 8 samples and the largest and smallest samples along with locations within the window are determined. The signal is moved through the 3 windows at 2 ins intervals. To detect the peak, average values of the windows are compared. If the middle window average is greater than the average values of the 2 adjacent windows, a peak is defined to exist. The procedure is then repeated for detecting a trough. As each p e a k trough combination is detected, the period and amplitude of the half-wave are determined. An amplitude threshold criterion of 5/aV is then applied. If the amplitude is below threshold, the wave is lumped appropriately with the next or previous wave. If above threshold, the wave is classified into one of the canonical bands. Artifact discriminators for low frequency (20 Hz), and large amplitudes secondary to motion artifact (amplitude > -+100/aV) are also incorporated. While epoch length is somewhat arbitrary, a 1 rain length was selected based on a stationarity analysis. At the end of an epoch, the following parameters are calculated: (1) The percentage time spent in each band; (2) The average amplitude and frequency within each band; (3) The percentage artifact; (4) The mean overall frequency; (5) The mean overall peak-to-trough amplitude. A statistical tracking procedure using Trigg's method as outlined by Lewis [4] was also implemented to determine when EEG parameters showed statistically significant temporal changes. The method. was applied to the data of this study and also to a study of patients with Reye's syndrome [5].

3.5. Evoked potentials Somatosensory evoked potentials are evoked secondary to stimulation of the contralateral median nerve with a rectangular constant-current stimulating pulse of 400 ms duration, 4 Hz repetition rate, and amplitude approximately 10% greater than that required to evoke a motor response. Amplitude is adjusted at the time of electrode application and manually checked periodically thereafter. The stimu-

85

lator is started by the computer via a relay contact closure. The evoked potential is computed by ensemble averaging of 200 consecutive sweeps. At the beginning of each sweep, a synchronizing pulse is delivered to the computer via a sense-line. A 10 ms pre-stimulus delay is introduced by the stimulator. 512 samples/sweep at a repetition time of 195/as are taken, corresponding to a total sweep-time of 100 ms. Discounting the pre-stimulus delay, analysis time is 90 ms. This analysis time was selected since evoked potentials are reasonably repeatable in normals for these latencies. In contrast, longer latency waves are quite variable and are affected by a variety of factors. Each sample is summed into a double precision array, and also squared and summed into a second double precision array. After the 200 sweeps, the mean and standard deviation for each time point are computed. The mean is plotted on the digital plotter and the mean and standard deviation are written on tape. Because of the high PDP-8 mode overhead for servicing interrupts (at least 150/as required to restart LINC processor) it is not possible to use the real-time clock to determine sampling rate. Rather, instruction timing is used to set the 195/as sampling interval.

3.6. Graphics The graphics module uses look-up tables for labels and scale factors. The parameter number is passed to the package by the mainline program. All data are stored as single precision numbers in the push-down buffers. These may reflect an actual value (e.g., heart rate, respiration rate) or may be an amplitude stored as an AID count (e.g., pressures, impedances). The graphics package performs the proper conversion for the video terminal. The screen is a 24 × 80 grid. For the vertical axes of the graphs, 20 discrete levels are used, thus providing 5% resolution. Each graph requires approximately 2 s to generate and output. If variable sampling is being done, this time increases by approximately 20%.

4. Results This system has been used to monitor 50 neurosurgical patients including 40 cases of head trauma and 10 with other disorders. Monitoring time varied from 10 h to 243 h with a mean of 81 h. The results

86

J.J. Ackmann, Neurosurgical patient monitoring

of the studies are detailed in [6]. The technical feasibility of recording and analyzing the non-invasive parameters with an automated system has been demonstrated. Based on the results of this study, it appears that the measures under study provide a valuable adjunct for monitoring neurosurgical patients. In some cases, evoked potential and EEG changes showed changes in advance of observable clinical changes. To illustrate, the following case report is included. This patient was a 69 year old female who fell while running to catch a bus. She incurred momentary unconsciousness and right facial trauma. Upon admission to the hospital, the neurologic examination was normal. The patient was treated for hypertension and placed under observation. After approximately

18 h, the patient became unresponsive except to painful stimuli. Emergency angiography revealed a large, right, extra-axial avascular space. A large subacute, right frontal-parietal subdural hematoma was evacuated at surgery. Postoperative monitoring was begun at approximately 1:00 a.m. (fig. 4). Evoked potentials on the left were approximately normal and evoked potentials on the right, while not strictly normal, were polyphasic. The patient was lethargic, but moved all four extremities to command. Vital signs were stable. Evoked potentials remained stable until approximately 12:00 p.m. when the right-side responses deteriorated abruptly. Over the next 28 h, evoked potentials on the right became progressively more depressed and evoked potentials on the left became progressively more monophasic. Clinical

A°U.

LEFT

RIGHT

filly I

r%

_

~

lil,Oi I'M

. . . .

x.2.2

_+ •

i,

,.

"l

i

i

J.~,-+-.-r

i

i

i

!

~

lilll

lOsall

I~

!

Fig. 4. Evoked potentials recorded following evacuation of right subdural hematoma. Responses were stable from 1:00 a.m. until 11: 00 a.m. of day 1 ; left responses were reasonably normal and right responses were polyphasic. Right responses deteriorated abruptly at approximately 12:00 p.m. of day 1. Left responses became progressively more monophasic through the next 28 h period. Patient became less responsive at approximately 4:00 p.m. of day 2; repeat arteriogram revealed right avaseular space. Epidural hematoma was evacuated at surgery. EEG data are presented in fig. 5.

J.J. Ackrnann, Neurosurgical patient monitoring condition remained essentially unchanged. At 4:00 p.m. on day 2, the patient became less responsive and no longer followed verbal commands. A repeat arteriogram again revealed a right frontal-parietal avascular space and a right-to-left midline shift. The patient was returned to the operating room where an epidural hematoma was removed. Following the second surgery, the patient improved slowly but progressively. In this instance, flattening of the evoked potential on the right side presumably could result from compression of the neural elements and also shunting of electrical activity due to the presence of blood. The compression of the left side of the brain demonstrated by the midline shift was reflected in a tendency toward a monophasic response. In this case, the evoked potential changes preceded detectable clinical changes by 28 h.

87

The EEG data for the same patient previously described (fig. 4). are presented (fig. 5). An EEG recording was begun at 10:00 a.m. of day 1. The percentage delta on both side was approximately 9% and the mean frequency approximately 8.5 Hz. At approximately 11:30 p.m., the tracking signal showed a significant change in the right EEG. The percentage :telta activity had increased from approximately 9% ~o approximately 15% and the mean frequency had decreased to approximately 7.4 Hz. Parameters on the left remained relatively unchanged. As previously indicated, the next serial evoked potential recorded at 12:08 p.m. showed severe deterioration. At 4:30 p.m., the percentage delta activity on the right again increased significantly to approximately 25% and the mean frequency decreased to approximately 7 Hz. The right-left asymmetry became more pronounced. Thus, in this patient, both EEG and evoked potentials

AU SO-

¢z 40F._1

30I-Z

~ 20-

o- 1 0 0m

lO Rrl

I

-I

12 Prl

I

I

2 PR TIRE

I

I

4 Pit

I

I

G PR

I

I

8 PR

(DgY 1 ]

I0-

F~ -r )(J Z td --t Cl Id b. 9. t'r tt'-d

87GS4-

R IGHT

32I0I 10 fir

I

I 12

pll

I

I 2 PI1

I

I 4 Pit

I

I 6 PI1

I

I 8 prl

TIME (DRY I~

Fig. 5. Percent delta and mean frequency for same patient of fig. 4. Statistically significant increase in percent delta and decrease in mean frequency (arrows) occurred on right side at 11:30 p.m. Further changes occurred at approximately 4:30 p.m.

88

J.Z Ackmann, Neurosurgical patient monitoring

showed significant changes prior to detectable clinical changes.

5, Hardware and software specifications The program was written for a standard LINC-8 computer with 8 K of core memory. The programmable real-time clock, graph-select switch, and parallel interface for the Centronics printer, Ann Arbor video terminal, and time-of-day clock were designed and fabricated using standard DEC modules. The program is coded in LINC mode assembler language using the LAP-6W system. Portions of the interrupt routines and peripheral drivers are coded in PDP-8 assembler language. The program uses the floating-point and incremental plotter packages developed by the University of Wisconsin (DPFLOAT and PLOT). The program will run on a PDP-12 with appropriate modifications for clock interrupt servicing and variations in lOT instructions for peripherals.

6. Availability A complete program listing is available from the author. The complete collections of manuscripts along with the binary program are also available on LINC tape under LAP-6W. Portions of the program such as the evoked potential routines and doublebuffered sampling routines can readily be extracted for other uses. It is noted that the EEG peak-detection algorithm was developed off-line using 10 : I time compression by means of a tape recorder. The

program was written using instruction loop timing and because the entire system is currently being replaced by a PDP-11/34 system, the program was not modified for on-line use. The unmodified version is available on LINC tape and a FORTRAN version of the same algorithm has also been developed [2]. A source listing of the FORTRAN version is available from the author. The algorithm using zerocrossings is included in the program manuscript; this version may be useful for data having a stable baseline. Diagrams of all interfaces are also available on request.

References [1] J.J. Ackmann, S.J. Larson, A. Sances,jr and R.E. Barr, Non-invasive monitoring techniques in neurosurgical intensive care. J. Clin. Eng. (1979) submitted. [2] R.E. Barr, J.J. Ackmann and J. Sonnenfeld, A peakdetection algorithm for EEG analysis. Int. J. Biomed. Comput. 9 (1978) 465-476. [3] R.E. Barr, Parametric tracking of the electroencephalogram in coma using a computerized peak-detection algorithm. (Ph.D. disseration, Marquette University, 1975). [4] C. Lewis, Statistical monitoring techniques. Med. Biol. Eng. 9 (1971) 315-322. [5] R.E. Barr, J.J. Ackmann, G.J. Harrington, R.R. Varma, J.D. Lewis and J.I. Caspar, Computerized evaluation of electroencephalographic changes accompanyingexchange transfusion in Reye's syndrome. Electroenceph. Clin. Neurophysiol. 42 (1977) 466-479. [6] J.J. Ackmann, S.J. Larson, R.E. Barr and A. Sances,jr, Evoked potential and EEG monitoringin neurosurgical intensive care. Neurosurg. (1979) submitted.

A computer system for neurosurgical patient monitoring.

Computer Programs in Biomedicine 10 (1979) 81-88 © Elsevier/North-Holland Biomedical Press A COMPUTER SYSTEM FOR NEUROSURGICAL PATIENT MONITORING J...
555KB Sizes 0 Downloads 0 Views