Introduction

Aneurysmal subarachnoid hemorrhage (aSAH) accounts for 5 % of all strokes [1] but has a high mortality rate. In the United States, the median mortality rate across different epidemiological studies is 32 % [2]. Additionally, it causes permanent disabilities in around 50 % of survivors [1], leaving them unable to return to their prior normal activities. Cognitive deficits, functional decline, mood disorders, fatigue, and sleep disorders are among the common factors that contribute to functional dependence.

Patients with aSAH often develop hydrocephalus as blood from the ruptured aneurysm disrupts the ability of the arachnoid villi of the ventricular system to absorb cerebral spinal fluid (CSF). The incidence of acute hydrocephalus varies across studies ranging from 15 to 87 % of patients with aSAH [2]. External ventricular drains (EVD) are widely used to measure and manage intracranial pressure (ICP) for aSAH patients with acute hydrocephalus. The placement of an EVD allows CSF to be diverted, relieving temporally the patient’s ICP during the immediate period following SAH. While CSF flow dynamics return to normal in some patients, others develop chronic hydrocephalus (between 8.9 and 48 % of patients with aSAH, according to the review by Connolly et al.) and require a permanent shunt to help them cope with the accumulation of CSF.

EVDs remain throughout the vasospasm period, when the blood vessels in the brain are at risk of narrowing which leads to reduced blood flow to the brain (between 3 and 12 days after aSAH 3). After this period, an EVD weaning procedure is carried out in order to determine whether a particular patient will need the assistance of a surgically implanted shunt. While there is variability across centers for the logistics of EVD weaning [4], in general the process is as follows: The EVD is closed to stop external drainage of CSF to assess if the patient develops acute hydrocephalus. This period is commonly known as the EVD weaning trial and lasts approximately 24 h. If after this period no signs or symptoms of hydrocephalus are detected, the trial is considered successful and the EVD is removed. Otherwise, the trial is considered a failure and the EVD is re-opened to drainage pending surgical placement of an indwelling shunt. The current approach to determine the success or failure of an EVD weaning trial involves the monitoring of the mean ICP, the evaluation of pre- and post-EVD closure brain images, and the observation of clinical symptoms. This practice increases length of ICU stay and exposes patients to extra radiation and potential insult from ICP elevation during the trial. To address these drawbacks, we propose an approach that better utilizes the ICP pulse waveform available during an EVD weaning trial to provide an early and accurate determination of the EVD weaning trial outcome.

This new approach is motivated by a hypothesis that when an ICP dynamic system is in homeostasis, pulses with similar mean ICP will have similar waveform morphology. On the other hand, when an ICP dynamic system is undergoing acute changes, ICP pulses will not resemble each other even under similar mean ICP. In the context of EVD weaning trial, the most likely cause for breaking the homeostatic state of an ICP dynamic system will be the development of acute hydrocephalus. Therefore, by tracking the ICP pulse morphological difference among ICP pulses we could determine the EVD weaning trial outcome. As a first step toward developing this approach, we conducted a case–control study comparing statistical measures of several ICP pulse morphological distance metrics between a group of aSAH patients with failed EVD weaning trial with those from a group of aSAH patients passing the EVD weaning trial.

Methods

This is a retrospective case–control study with 50 adult patients, admitted to UCSF Medical Center between 03/2013 and 08/2014. By reviewing the clinical notes and pre/post-brain imaging results, 32 patients were determined as having passed the EVD weaning trial (group Pass) and 18 patients as having failed the trial (group Fail). The criteria used to retrospectively identify the EVD weaning trial of a patient as failure implicated the report in the charts of the occurrence of any of the following:

  • Changes in level of consciousness or other clinical symptoms due to EVD closure.

  • EVD urgently re-opened.

  • Changes in ventricular size on the Post-EVD weaning trial CT scan.

  • Shunt placement and/or the presence of acute hydrocephalus.

Blind to the chart review, we applied a previously validated ICP signal processing algorithm—Morphological Clustering and Analysis of ICP [MOCAIP, 5] to analyze ICP signal recordings to extract artifact-free ICP pulses, each of which is an average ICP pulse representing 30 s of data and termed a dominant pulse. Then, for each dominant pulse, pulses with similar mean ICP and within a 4-h window of this dominant pulse were identified. Finally, the Euclidean and Geodesic inter-pulse distances as well as difference between the ICP pulse amplitude were calculated to quantify the ICP pulse morphological distance.

Selection of Patients

We used the International Classification of Diseases code for aSAH (ICD-9-CM = 430) to identify a list of aSAH patients who were admitted to the UCSF Medical Center between 03/2013 and 08/2014. An initial list of 189 patients was obtained but 82 patients were excluded because they did not have ICP documented in the Electronic Health Record (EHR) system. Then, the waveform data during the EVD weaning trial of the remaining 107 patients were examined. Patients with usable ICP waveform recordings shorter than 2 h were discarded, resulting in a list of 70 patients with ICP recordings longer than 2 h. The review of the clinical notes of these 70 patients revealed that 16 patients did not have an EVD weaning trial documented on the charts, which shortened our study population to 54 patients. Finally, four patients were excluded from the analyses due to poor ICP signal quality (see Fig. 1 for an example), leaving a total number of 50 patients considered in our study. This process is summarized in Fig. 2.

Fig. 1
figure 1

Example of ICP signal quality a poor ICP signal; b good ICP signal)

Fig. 2
figure 2

Flowchart of patients who met the inclusion/exclusion criteria for the study population

Chart Review

Two EHR chart reviews (conducted by two different research assistants) were carried out to determine the outcome of the EVD weaning trial and to assign the case of one particular patient to the Pass or Fail groups. The chart review included: (i) review of the clinical notes before, during, and after the EVD weaning trial; (ii) review of the radiological readings and impressions of pre- and post-EVD weaning trial CT scans; (iii) review of discharge summary.

ICP Waveform Data Extraction and MOCAIP Algorithm

The extraction of the ICP waveform data from all the patients was carried out through an in-house software tool that converts data files in a proprietary file format that was defined by the vendor of data acquisition system BedMasterEx into binary data files in a publicly available file format1.Footnote 1 Then the MOCAIP algorithm [5] was used to extract artifact-free dominant pulses which represent a short segment of the ICP signal. The algorithm consists of five major components. First an ICP pulse detection component identifies individual ICP pulses in the ICP signal using the QRS complexes in the electrocardiogram (ECG) signal and interval constraints. In order to cope with noise and artifacts, a hierarchical clustering approach is used in short-time windows (30 s) of the ICP signal where raw ICP pulses are clustered based on their morphological distance. The largest cluster is identified and an average ICP pulse is obtained from this cluster. In order to deal with lengthy noisy segments, this representative (dominant) ICP pulse is further compared to a reference library of validated ICP pulses to support the recognition of non-artifactual ICP pulses. The next step consists in the detection of all the peak candidates using the second derivative of ICP pulse and definitions of peak locations. Finally, the last component optimally designates the three well-established ICP peaks in each non-artifactual dominant pulse using probability density functions, constructed from the locations of designated ICP peaks from a set of reference ICP pulses.

Framework Analysis of the Inter-Pulse Differences

Our analysis of the morphological differences between pulses is based on a framework previously proposed in [6]. A key aspect of this framework is the assumption that ICP pulses with similar mean ICP should be morphologically similar to each other. Therefore, the morphological differences were only calculated from pulses with similar mean ICP. This analysis framework facilitates the use of different methods to characterize the degree of similarity/difference between two pulses. In this study, we use the Euclidean, Geodesic, and amplitude distance to quantify morphological differences between pulses.

The first part of the analysis consisted of the use of the MOCAIP algorithm to extract artifact-free dominant pulses. Then, within a time window of 4 h, groups of pulses with similar mean ICP (i.e., absolute difference in mean ICP <1 mmHg) are created. After that, the Euclidean, Geodesic, and amplitude distance between each pair of pulses within the same group is calculated. Finally, a histogram of each distance metric is generated and statistical parameters such as mean, standard deviation, 90th percentile, and maximum value are extracted. The steps involved in the framework analysis are illustrated in Fig. 3.

Fig. 3
figure 3

Block diagram of the analysis procedure

Morphological Difference: Euclidean and Geodesic Distance

The Euclidean distance is the straight line distance between two points in space. An ICP pulse composed of n data points could be considered as a point in an n-dimensional Euclidean space. Thus, the calculation of the Euclidean distance between two ICP pulses (p and q) can be obtained with the following formula:

$$ {\text{d}}\;(p,q) = \sqrt {\sum\limits_{i = 0}^{n} {(q_{i} - p_{i} )^{2} } }. $$

On the other hand, the Geodesic distance follows the geometric structure of the data. It is the shortest distance between two points on a curved surface. Figure 4 illustrates an example of the geometric structure of the ICP pulses using dimensionality reduction with the locally linear embedding (LLE) algorithm. The difference between the Euclidean (E) and Geodesic (G) distance between two ICP pulses (p and q) is illustrated. In order to follow the geometric structure of the ICP pulses a K-neighborhood graph was constructed (orange circles in Fig. 4). After forming the graph, Geodesic distance between any pairs of pulses can be approximated by the total length of the shortest path along the graph linking the two vertices representing these two pulses. We used Dijkstra’s algorithm to find the shortest path.

Fig. 4
figure 4

Euclidean (E) and Geodesic (G) distance between p and q ICP pulses. The blue points represent ICP pulses and the orange circles the graph connection

Pulse Amplitude Difference

Using the MOCAIP analysis, ICP pulse amplitude can be readily calculated as the maximum amplitude among those of the three sub-peaks [7, 8]. Compared to computing the morphological distance between two pulses, a simpler way of measuring the dissimilarity between two pulses can be done by comparing the difference between their pulse amplitudes, and therefore, we also test this approach in the present work.

Metrics Calculation and Statistical Analyses

In order to compare the metrics of the amplitude and morphological differences of the pulses between the two groups of patients, we used non-parametric Mann–Whitney U tests. All statistical tests reported were two-tailed and when multiple comparisons were carried out the significance level was adjusted using the Benjamini and Hochberg method [9]. Statistical metrics such as mean, standard deviation, maximum, and 90th percentile were computed, from a vector of morphological distances between pulses with similar mean ICP, using a time window of 4 h. Then, the grand mean for the whole EVD weaning trial was calculated for each of these metrics. Figure 5a illustrates the calculation of the four statistical metrics from the vector of distances within a 4-h time window. The red point represents a point in time during the EVD weaning trial when these features were calculated. In this study, we used a 50 % overlapping moving window to calculate the grand mean of the whole EVD weaning trial, illustrated in Fig. 5b.

Fig. 5
figure 5

a Calculation of metrics from a vector of distances between pulses with similar mean ICP in a 4-h time window; b calculation of the grand mean of each of these four metrics for the whole weaning trial

Results

From the initial 189 aSAH patients found in our database, 56.61 % presented acute hydrocephalus requiring EVD. The data of 50 patients that met the inclusion and exclusion criteria were used for the analysis: based on the chart review 32 patients were assigned to the Pass group and 18 to the Fail group. There were 24 females and 8 males in the Pass group, with an average age of 56.0 years (SD 12.5). The Fail group was composed of 15 female and 3 male patients, with an average age of 60.2 years (SD 13.1). At least 9.52 % of the total patients diagnosed with aSAH failed the EVD weaning trial. However, due to the retrospective nature of this study, this percentage does not take into account patients with missing information about EVD weaning trial in the charts or the patients with unusable ICP signals, thus the true incidence of patients that required a shunt might be even higher.

There were a total of 660.05 h of analyzable ICP signals with 79,206 valid dominant pulses (extracted every 30 s with the MOCAIP algorithm) for the cases of the Pass group and 335.10 h of analyzable ICP signals with 40,212 valid dominant pulses for the cases of the Fail group. The mean duration of the EVD weaning trial (based on the chart review and continuous ICP signal) was 22.39 (SD 6.58) h for the cases in the Pass group and 19.48 (SD 11.39) h for the cases in the Fail group. The mean duration of analyzable ICP recordings during the EVD weaning trial was 20.62 (SD 6.22) h for the cases in the Pass group and 18.62 (SD 10.58) h for the cases in the Fail group. The average length of analyzable ICP recordings is slightly shorter than the period of time of the EVD weaning trial primarily because of short periods of time with no recordings, noisy data, or poor quality signal.

Results Based on Mean ICP

The mean ICP was calculated for the whole EVD weaning trial for each patient using the valid dominant pulses. A visual inspection of the mean ICP (see Fig. 6a) shows that overall, both groups of patients had similar mean ICP. Shapiro–Wilk test of normality revealed that the data from the Pass group was not normally distributed, thus Mann–Whitney U test was used to compare the mean ICP of the two groups and showed that the mean ICP was not significantly different between the Pass group (median 8.0, interquartile range 3.7) and the Fail group (median 8.1, interquartile range 5.4), U = 232, p = 0.26, r = 0.16. In terms of ROC analysis (see Fig. 6b), the test based on mean ICP only obtained a small area under the ROC curve (AUC 0.60, p = 0.26).

Fig. 6
figure 6

a Boxplot of mean ICP in both groups of patients; b ROC curve of ICP mean

Results Based on ICP Pulse Amplitude

The four metrics (mean, standard deviation, 90th percentile, and maximum value) calculated from the amplitude distance between pulses with similar mean ICP were larger in patients from group Fail compared to patients from group Pass (see Table 1). Mann–Whitney U tests confirmed that the inter-pulse amplitude distance was significantly larger in the Fail group than in the Pass group, p < 0.001 for all four statistical metrics.

Table 1 Summary of between-group statistical tests on the amplitude, Euclidean, and Geodesic inter-pulse distance

ROC analyses on the four metrics of the amplitude distance are illustrated in Fig. 7a. The mean amplitude inter-pulse distance had an area under the curve (AUC) = 0.85, p < 0.001; the standard deviation had an AUC 0.84, p < 0.001; the 90th percentile had an AUC  0.83, p < 0.001; and the maximum value AUC 0.81, p < 0.001.

Fig. 7
figure 7

ROC curves of the four statistical features analyzed for a amplitude inter-pulse distance; b Euclidean inter-pulse distance; c Geodesic inter-pulse distance (Color figure online)

Results Based on Euclidean Distance

Table 1 presents the morphological inter-pulse Euclidean distance between the Pass and Fail groups. As it can be observed in all four features, the Fail group has a larger inter-pulse distance than the Pass Group. Mann–Whitney U tests were used due to non-normally distributed data. These tests corroborated that the difference in the inter-pulse distance was significant in all four features (p ≤ 0.002).

Individual ROC analyses were carried out using the four statistical features. The mean of inter-pulse distance had an AUC 0.771 (p = 0.002); standard deviation of inter-pulse distance, AUC 0.807 (p < 0.001); maximum distance, AUC 0.809 (p < 0.001); and 90th percentile, AUC 0.773 (p = 0.002). Figure 7b illustrates the performance of a binary classifier with these four statistical features.

Results Based on Geodesic Distance

A visual inspection on the means of the four selected statistical features reveals that, as expected, there is a larger morphological ICP inter-pulse distance on the patients from the Fail group than on the patients from the Pass group (see Table 1).

Non-parametric Mann–Whitney U tests corroborated this observation: the four selected statistical features of the ICP inter-pulse distance were significantly different between the two groups (p ≤ 0.004).

Individual ROC analyses were carried out using the four statistical features. The mean of inter-pulse distance had an AUC 0.752 (p = 0.003); standard deviation of inter-pulse distance, AUC 0.788 (p = 0.001); maximum distance, AUC 0.802 (p < 0.001); and 90th percentile, AUC 0.745 (p = 0.004). Figure 7c illustrates the performance of a binary classifier with these four statistical features.

Discussion

In the present work, we investigated the feasibility of using morphological differences among ICP pulses to determine EVD weaning trial outcome in aSAH patients. The distribution of the aSAH patients reviewed in this study was consistent with epidemiological reports in the literature. The incidence of patients with acute hydrocephalus requiring EVD (56.61 %) was within the range of 15–87 % and the number of the patients that failed the EVD weaning trial (9.52 %) was within the range of 8.9–48 % reported in the literature.

Using previously developed approaches of characterizing ICP pulse waveform, we showed that all three distance metrics can discriminate between the Pass and Fail groups of patients. In addition, ROC analyses suggested good individual predictive capabilities for the outcome of patients during the EVD weaning trial. Among the three distance metrics, the pulse amplitude approach provided best discriminative power. Patients who failed EVD weaning trial showed not only a larger mean but also a larger variability of distances of pulse amplitude among ICP pulses that are matched at similar mean ICP levels. The typical length of the EVD weaning trial is 24 h in the current clinical practice. Our approach could potentially shorten the time needed to determine the EVD weaning trial outcome. This conclusion is supported by the comparison of AUC of the ROC curves for the four statistic measures (mean, standard deviation, maximum, and 90th percentile value) of the pulse amplitude difference that are calculated using data at different time points after the start of EVD weaning trial. As it can be observed in Fig. 8, all four measures have an AUC >0.73 (p < 0.008) using the data within 6 h after the start of the trial. Note in particular the mean distance parameter which reached an AUC 0.80 (p < 0.001) using data from 10 h after the start of the trial.

Fig. 8
figure 8

Performance of the ROC analyses at different times during the EVD weaning trial. The area under the curve of four parameters from the amplitude distance is plotted during different hours of the EVD weaning trial (Color figure online)

It is generally accepted that the amplitude of ICP pulses is positively correlated with the mean ICP, as illustrated in Fig. 9a for a patient with a successful EVD weaning trial. Furthermore, we can observe that the relationship between ICP pulse amplitude and mean ICP can be approximated by an exponential function. However, this generally accepted relationship will not be held when there are evolving changes in intracranial compartment as illustrated in Fig. 9b for a patient with a failed trial. It can be further discerned from Fig. 9b that a positive correlation between mean ICP and ICP pulse amplitude did exist only in short periods of time and can be approximated by exponential curves as well. But different exponential curves would be needed for different periods. By the time when an EVD weaning trial is attempted for a patient, the patient’s intracranial compartment is likely in homeostasis if no acute hydrocephalus occurs. Therefore, an indication of EVD weaning trial status can be based on whether ICP pulses have different amplitudes at similar mean ICP levels. We attempted to further expand this idea by quantifying the difference between the shapes of two ICP pulses. However, based on the results from the current study, statistical metrics of pulse amplitude difference had a larger area under the ROC curve as compared to those based on pulse morphological distance metrics. Although this result needs further validation using an independent test dataset, a potential explanation of this observation is that the development of acute hydrocephalus may predominantly affect the amplitude of ICP pulses but not the overall shape. The morphological difference between pulses therefore may dilute the signal for this case. Further studies are needed to evaluate these different ways of comparing two ICP pulses.

Fig. 9
figure 9

Example of the difference in the relationship between mean ICP and pulse amplitude between a a patient with a positive outcome and b a patient developing acute hydrocephalus. The colors of the ICP pulses represent the different time periods during the EVD weaning trial when they occurred specified on the color bar on the right (Color figure online)

The proposed approach can be implemented to analyze ICP waveforms that will become more readily available after EVD is closed to drainage. Based on the promising results in this retrospective case–control study, further prospective validation is warranted and needed. However, potential clinical benefits of more effectively using ICP monitoring alone to determine EVD weaning outcome are clear. Previous research provides evidence that timely placement of the shunt for patients with acute hydrocephalus leads to quicker discharge of patients and hence minimizes pulmonary or systemic complications associated with reduced mobility [10, 11]. As demonstrated in this work, our approach can potentially achieve same level of accuracy in determining EVD weaning outcome 6 h into the start of the trial as compared to the typical 24 h used in the current practice. Radiation exposure in the evaluation of aSAH patients can be substantial and can put patients at risk of intracranial and neck tumors. In a recent study to investigate radiation exposure in the neuroscience ICU at a single institution [12], it was found that patients with aSAH received the highest average levels of radiation exposure (37.1 mSv). As pointed out in the Guidelines for the Management of aSAH [2], these examinations are necessary but efforts need to be made to reduce the amount of radiation exposure. If the EVD weaning trial outcome can be determined primarily based on ICP monitoring, then perhaps pre- and post-CT brain imaging can be more discretely used on a case-by-case basis to provide supplement decision support when needed. Furthermore, if ICP waveform monitoring can be achieved even when EVD is open, then assessment of evolving intracranial changes can be done on a continuous basis without the need of a dedicated weaning trial leading to further savings on time and cost.

It should be also pointed out that we propose to use pulse waveform morphological difference as an indicator of acute hydrocephalus. This is feasible because acute hydrocephalus is the most likely cause of diverging pulse waveform differences after patients advance already to an EVD weaning trial. However, the current approach cannot yet detect specific intracranial changes per se without a proper clinical context to interpret results. Without context, a similar morphological difference could theoretically be seen in evolving brain edema or hyperemia in a dysautoregulated state (either from passive perfusion with supraoptimal cerebral perfusion pressure or cerebral vasoplegia from unchecked prolonged hypercarbia). Therefore, further methodological development is needed to extract etiological information that can provide specific diagnostic information.