Abstract
Background/Objectives: Early identification of patients progressing toward brain death may reduce missed organ donation opportunities. We aimed to develop and internally validate an interpretable natural language processing (NLP) model using admission brain computed tomography (CT) reports. Methods: This single-centre retrospective study included 161 adults admitted between 2011 and 2024, of whom 94 subsequently fulfilled brain death criteria and 67 did not. Predictors were derived exclusively from admission CT reports using rule-based preprocessing and term frequency–inverse document frequency word-level 1–3-gram features, without a curated vocabulary. Logistic Regression, Random Forest, XGBoost and Support Vector Machine models were evaluated using repeated stratified five-fold cross-validation with 20 repetitions. Vectorisation, calibration and threshold selection were restricted to training partitions. A sensitivity target of at least 95% guided threshold selection. Confidence intervals were estimated using patient-cluster bootstrap resampling, and interpretability was assessed using SHapley Additive exPlanations (SHAP). Results: Logistic Regression achieved the highest mean ROC-AUC of 0.812 (95% CI 0.741–0.878), with a sensitivity of 94.1% and a specificity of 42.6%. Differences between models were relatively small, and the sensitivity target was not consistently achieved during validation. SHAP identified radiological expressions associated with severe neurological injury, alongside linguistic and report-related terms. Exploratory temporal analyses and documentary negative controls suggested potential confounding related to reporting practices and case selection. Conclusions: Admission CT reports may provide useful information for automated identification of patients at risk of subsequent brain death. However, limited specificity, temporal confounding and the absence of external validation preclude conclusions regarding clinical utility. Prospective multicentre studies are needed to establish generalisability and evaluate the potential contribution of NLP-assisted screening to donor-recognition pathways.
1. Introduction
The global shortage of organs for transplantation remains a pressing public health concern. The number of patients on waiting lists continues to far exceed the supply of available organs, particularly from deceased donors [1]. A key bottleneck in expanding the donor pool lies in the timely and accurate identification of patients progressing toward brain death—a process often hindered by manual observation, communication delays, and missed opportunities [2,3]. Previous research, including our earlier study Imaging Screening of Catastrophic Neurological Events Using a Software Tool: Preliminary Results [4], has demonstrated the potential of imaging-based early signaling. More recent advances highlight the effectiveness of machine learning (ML) algorithms and automated alert systems in analysing electronic health records to flag patients meeting specific clinical criteria for potential donation [5,6,7]. However, most existing approaches, including our prior work, primarily identify catastrophic neurological events after they have occurred rather than supporting earlier recognition of patients at high risk of progression toward brain death. In this context, an important distinction should be made between clinical prognostic models and automated screening systems. While the former generally rely on previously collected and interpreted clinical or radiological variables to estimate the likelihood of progression to brain death, the latter aim to identify potentially relevant patients directly from routinely generated clinical information, without requiring prior manual extraction of predictive variables. These approaches may therefore serve complementary roles within existing patient-identification pathways.
Our aim was to develop and internally validate an automated NLP-based screening tool capable of identifying patients at high risk of subsequent brain death from admission CT reports, automating initial screening and enabling targeted clinical assessment.
2. Materials and Methods
This was a single-centre, exploratory proof-of-concept retrospective cohort study including adult patients admitted to Hospital Prof. Doutor Fernando Fonseca between 2011 and 2024 with acute neurological events documented on admission brain CT scans. The study sample comprised patients meeting the predefined inclusion criteria during the study period. Given the exploratory nature of the study and the retrospective availability of eligible cases, no formal a priori sample size calculation was performed.
Two groups were defined: patients who were ultimately diagnosed with brain death (BD group) and patients admitted with severe acute neurological conditions requiring emergency neuroimaging but without subsequent clinical confirmation of brain death (NBD group). The NBD reports were retrieved from 2011–2012 and 2022–2024, whereas BD cases were identified throughout the 2011–2024 study period. Only admission CT reports corresponding to the index neurological event were included. For descriptive analyses, missing clinical data were handled using available-case analysis, without imputation. For the structured clinical comparator, missing numerical values were imputed using the median and missing categorical values using the most frequent category, with imputation performed exclusively within the training folds to prevent information leakage. Missing discharge or death dates were not imputed. No prespecified subgroup or model-fairness analyses were performed.
Brain death was diagnosed according to Portuguese Law No. 141/99 of 28 August [8] and the criteria established by the Portuguese Medical Association (Ordem dos Médicos) [9], as implemented in the institutional protocol. Diagnosis required clinical assessment by two appropriately qualified physicians, including examination of brainstem reflexes and apnoea testing, with ancillary examinations performed when indicated. The diagnostic pathway was coordinated through the institutional Hospital Organ Donation Coordination Unit (Núcleo de Coordenação Hospitalar de Doação).
Radiology reports in PDF format were retrieved from the institutional imaging archive and linked to confirmed clinical outcomes. This study was reported in accordance with the STROBE [10] reporting guidelines and TRIPOD + AI [11] statement for prediction model studies using regression or machine-learning methods.
Ethical approval was obtained from the Institutional Review Board of Hospital Prof. Doutor Fernando Fonseca (Approval No. 084/2025). The requirement for informed consent was waived owing to the retrospective design, inclusion of deceased patients over an extended time frame, and use of de-identified data.
2.1. Data Extraction and Pre-Processing
Radiology reports were extracted from PDF files using PyMuPDF and processed through a rule-based NLP pipeline before vectorisation.
Preprocessing included extraction of the clinical sections of each report, lowercasing, accent normalisation, punctuation removal, removal of numerical identifiers and repetitive administrative text, and standardisation of common Portuguese radiological expressions. The processing rules were developed retrospectively from the study corpus and subsequently applied uniformly to all reports.
Unlike the initial approach, the final preprocessing pipeline preserved Portuguese negation cues and their associated clinical expressions rather than removing or recoding negated findings. Expressions such as “sem sinais de”, “não se observa” and “não há evidência de” were retained to preserve the distinction between positive and negative radiological findings.
Preservation of negation cues was assessed by comparing their occurrence in the extracted clinical text and final processed text for each report. Ten illustrative clinical expressions were additionally examined to verify the preservation of negated findings (Supplementary Table S1A,B). These checks did not constitute an independent validation of negation interpretation.
2.2. Feature Engineering and Vectorisation
After preprocessing, reports were transformed into TF-IDF features using word-level 1–3-grams, without a manually curated clinical vocabulary. A minimum document frequency of two and a maximum of 5000 features were specified to limit sparsity and model complexity. Sublinear term-frequency scaling and L2 normalisation were also applied.
The TF-IDF vectoriser was fitted exclusively within each training fold and subsequently applied unchanged to the corresponding validation fold to minimise information leakage. The complete vectorisation settings are provided in Supplementary Table S2.
2.3. Machine Learning Models
Four supervised machine-learning algorithms were evaluated using TF-IDF features:
- •
- Logistic Regression (LR): L2 regularisation, liblinear solver, and balanced class weights.
- •
- Random Forest (RF): 500 estimators, a minimum of three samples per leaf, and balanced class weights.
- •
- Support Vector Machine (SVM): radial basis function kernel and balanced class weights.
- •
- XGBoost: 150 estimators, maximum tree depth of two, and a learning rate of 0.05.
All models were implemented using fixed hyperparameters, without data-driven hyperparameter optimisation. The complete model configurations are provided in Supplementary Table S2.
A separate structured clinical comparator was developed using logistic regression based on age, sex, and index neurological diagnosis, without radiological text features. Numerical and categorical variables were processed within the training folds, independently of the held-out observations.
2.4. Internal Validation and Model Evaluation
2.4.1. Internal Validation Strategy
To reduce dependence on a single random train–test partition, model performance was evaluated using repeated stratified five-fold cross-validation with 20 repetitions, generating 100 validation folds. Each patient contributed one out-of-fold prediction per repetition.
All procedures requiring model fitting, including TF-IDF vectorisation, model training, probability calibration and threshold selection, were restricted to the corresponding training partitions. The selected models and operating thresholds were subsequently applied to the held-out validation data. The structured clinical comparator followed the same internal validation procedure.
The complete NLP and machine-learning workflow is illustrated in Figure 1.
Figure 1.
Automated NLP and machine-learning workflow. Overview of text preprocessing, feature extraction, model development, internal cross-validation, calibration, training-only threshold selection, and held-out evaluation. The structured clinical comparator and exploratory SHAP analysis are shown as separate analytical branches.
2.4.2. Probability Calibration
Predicted probabilities were calibrated using Platt (sigmoid) scaling within each outer training partition, applying an internal three-fold cross-validation procedure. Calibrated probabilities were then obtained for the corresponding held-out observations.
Calibration was assessed using reliability diagrams, Brier scores, calibration intercepts and slopes. For this analysis, the 20 out-of-fold probabilities obtained for each patient were averaged to provide one predicted probability per patient. Calibration-in-the-large was estimated using logistic recalibration with the predicted log-odds as an offset, while calibration slopes were estimated with a freely fitted intercept.
2.4.3. Operating Threshold Selection
Given the intended application as a preliminary screening tool, sensitivity was prioritised over specificity. A predefined sensitivity target of at least 95% was therefore adopted for threshold selection.
Within each outer training partition, calibrated out-of-fold probabilities were obtained through a separate three-fold cross-validation procedure. The operating threshold was selected to maximise specificity while maintaining sensitivity ≥95% in these training predictions.
The selected threshold was subsequently applied unchanged to the corresponding held-out validation fold. Thresholds were therefore specific to each training partition, with their distribution and median reported descriptively rather than used as a single global operating point.
2.4.4. Performance Metrics and Uncertainty Estimation
Model discrimination was assessed using the area under the receiver operating characteristic curve (ROC-AUC). Sensitivity, specificity, positive predictive value (PPV), negative predictive value (NPV), accuracy and F1-score were calculated using the selected fold-specific thresholds.
Performance estimates were obtained by averaging the metrics across the 20 cross-validation repetitions. Ninety-five per cent confidence intervals were estimated using 2000 patient-cluster bootstrap resamples, preserving all repeated predictions from each patient. Paired bootstrap comparisons were also performed to assess differences in ROC-AUC between models.
For graphical presentation, ROC curves were generated using patient-level mean out-of-fold probabilities. These curves therefore represent a different AUC estimator from the mean repeated cross-validation estimates used for the primary performance assessment. Confusion matrices were summarised across repetitions without treating repeated predictions as independent observations.
2.4.5. Model Interpretability (SHAP)
Model interpretability was explored using SHAP (SHapley Additive exPlanations). A separate stratified five-fold cross-validation analysis was performed using uncalibrated logistic regression models, with SHAP values calculated exclusively for held-out observations.
Global feature importance was assessed using mean absolute SHAP values, expressed on the raw model output scale (log-odds). Ranking stability was evaluated by examining the frequency with which features appeared among the 20 highest-ranked features across folds and by calculating pairwise Spearman rank correlations.
2.4.6. Sensitivity and Temporal Analyses
Additional sensitivity analyses were performed using a training sensitivity target of 100% and an alternative preprocessing approach excluding selected documentary features.
Given the unequal temporal distribution of BD and NBD cases, exploratory analyses were also performed within the periods containing both outcome groups (2011–2012 and 2022–2024), including cross-period model evaluation.
To investigate potential documentary and temporal confounding, negative-control models were developed using report year, document-template characteristics and report length, independently of the radiological text features.
2.4.7. Software and Computational Environment
All analyses were performed using Python version 3.12.8. Machine-learning development and internal validation were implemented using scikit-learn version 1.9.1 and XGBoost version 3.0.2. Explainability analyses were performed using SHAP version 0.48.0. Data processing and numerical computations used pandas version 3.1.0, NumPy version 2.4.6 and SciPy version 1.18.1. Figures were generated using Matplotlib version 3.11.2. PDF text extraction was performed using PyMuPDF.
The complete analytical code, including preprocessing, model development, validation and explainability procedures, will be made publicly available in a dedicated GitHub repository upon publication.
3. Results
3.1. Cohort Characteristics
A total of 223 brain CT reports were initially identified, comprising 118 BD-associated and 105 NBD-associated reports. After excluding 22 non-index reports from the BD group and 38 from the NBD group, 163 records remained. Two records duplicated across both groups were subsequently confirmed as NBD and removed from the BD group. The final cohort comprised 161 unique patients (94 BD and 67 NBD), each contributing one index CT report (Figure 2).
Figure 2.
Patient selection flowchart. Flowchart showing the identification, exclusion, and reconciliation of CT reports, resulting in a final cohort of 161 unique patients (94 BD and 67 NBD).
The median age was 60 years (IQR 49.3–74.8) in the BD group and 68 years (IQR 53.3–81.0) in the NBD group. Male patients accounted for 53.2% and 64.2% of each group, respectively. Intracerebral haemorrhage was the most frequent neurological diagnosis in both groups (52.1% in BD and 44.8% in NBD).
Among BD patients, the median interval between index CT and documented BD diagnosis was 2 days (IQR 1–3). In the NBD group, the median interval from index CT to hospital discharge or death was 10.5 days (IQR 2.25–28.25; n = 66). Thirty-three NBD patients were discharged alive, 33 died during the index hospital episode, and one had no documented disposition. These intervals represent in-hospital observation rather than post-discharge follow-up. Demographic, clinical and outcome characteristics are presented in Table 1.
Table 1.
Demographic, clinical and in-hospital outcome characteristics.
3.2. Text Processing and Feature Extraction
The NLP pipeline successfully processed all 161 index CT reports. Following extraction of the clinical text and removal of administrative content, the final representation preserved Portuguese negation cues and their associated clinical expressions. A lexical consistency assessment confirmed the preservation of all 282 occurrences of the selected negation cues (sem, não and ausência) in each corresponding report (Supplementary Table S1A). Ten illustrative clinical expressions were also examined, confirming preservation of the negation cues and their associated findings (Supplementary Table S1B).
Report length distributions and changes in term-frequency patterns before and after preprocessing are illustrated in Supplementary Figure S1. The resulting TF-IDF feature space contained a median of 3267 features per training fold (range: 3077–3441).
3.3. Model Discrimination
All four NLP-based models demonstrated higher discrimination than the structured clinical comparator. Logistic Regression achieved the highest mean ROC-AUC of 0.812 (95% CI 0.741–0.878), followed by Random Forest (0.802; 95% CI 0.730–0.866), Support Vector Machine (0.801; 95% CI 0.725–0.868) and XGBoost (0.780; 95% CI 0.711–0.845). The structured clinical comparator, based on age, sex and neurological diagnosis, achieved an ROC-AUC of 0.507 (95% CI 0.454–0.560). Complete performance estimates are presented in Table 2.
Differences between the NLP models were relatively small. In the paired bootstrap comparison, the ROC-AUC difference between XGBoost and Logistic Regression was −0.032 (95% CI −0.076 to 0.014), providing insufficient evidence of a difference in discrimination between these models.
Receiver operating characteristic curves are presented in Figure 3. These curves were generated using mean out-of-fold predicted probabilities for each patient across the 20 cross-validation repetitions. The resulting AUC values differ slightly from the primary mean repeated cross-validation estimates reported in Table 2.
Figure 3.
ROC curves of the NLP models and structured clinical comparator. Curves were calculated using patient-level mean out-of-fold probabilities across 20 cross-validation repetitions. The corresponding AUC values differ from the mean repeated-CV AUC estimates reported in Table 2.
Table 2.
Discrimination and classification performance of the NLP models and the structured-data comparator.
3.4. Probability Calibration
Calibration was assessed using patient-level mean out-of-fold predicted probabilities. Logistic Regression yielded a calibration intercept of 0.026, a slope of 0.951 and a Brier score of 0.163. The corresponding Brier scores were 0.171 for Random Forest, 0.167 for Support Vector Machine and 0.180 for XGBoost. Calibration intercepts and slopes for all four models are presented in Supplementary Table S3.
Calibration curves showed some deviations from the ideal calibration line across the prediction range, with differences between models (Figure 4). These results reflect internal calibration within the selected study cohort and do not establish calibration in an independent clinical population.
Figure 4.
Calibration Curves. Calibration of mean-patient out-of-fold predicted probabilities for the structured clinical comparator and the four NLP-based models. Curves closer to the diagonal indicate better agreement between predicted and observed risk.
3.5. Operation Thresholds and Classification Performance
Operating thresholds were selected within each training partition to maximise specificity while maintaining a predefined sensitivity target of at least 95%. Their distribution across repeated cross-validation is presented in Supplementary Figure S2.
Despite this constraint during training, none of the four NLP models consistently achieved 95% sensitivity in held-out validation. Logistic Regression achieved a mean sensitivity of 94.1% (95% CI 89.9–97.8%) and a specificity of 42.6% (95% CI 32.6–52.5%). XGBoost achieved a slightly higher sensitivity of 94.5%, but with a lower specificity of 27.6%. Random Forest and Support Vector Machine achieved sensitivities of 94.4% and 94.3%, with specificities of 33.5% and 40.1%, respectively (Table 2).
The difference in sensitivity between XGBoost and Logistic Regression was approximately 0.4 percentage points, accompanied by a 15-percentage-point reduction in specificity. Thus, the sensitivity-oriented threshold selection resulted in a substantial proportion of false-positive classifications, particularly for XGBoost.
The corresponding confusion matrices are presented in Supplementary Figure S3. These represent mean classification counts across the 20 cross-validation repetitions, using fold-specific thresholds rather than a single global operating point.
3.6. Model Interpretability (SHAP)
Global interpretability was assessed using SHAP (SHapley Additive exPlanations) applied to uncalibrated Logistic Regression models in a separate stratified five-fold cross-validation analysis. The most influential feature was apagamento (effacement), followed by expressions including não, sem, axiais, isquémica and ventricular. Generic linguistic and report-related terms, particularly ce and tc ce, also ranked among the most influential features (Figure 5).
Figure 5.
SHAP feature importance and ranking stability in logistic regression. Bars represent mean absolute SHAP values across held-out observations, while dots indicate the number of folds (out of five) in which each feature appeared among the top 20. SHAP values are expressed on the log-odds scale.
Feature-importance rankings showed moderate stability across validation folds, with a mean pairwise Spearman correlation of 0.487 (range 0.305–0.572). Among the 20 highest-ranked features, 17 appeared in the top 20 in at least three folds, while seven appeared in all five folds.
Representative classification errors were also examined. One NBD patient whose CT report described diffuse sulcal effacement and suspected cerebral oedema was classified as positive in all 20 cross-validation repetitions. Conversely, a BD patient with comparatively limited acute abnormalities on the admission CT was classified as negative in 19 of 20 repetitions.
Although several influential expressions were consistent with severe neurological injury, the importance of linguistic and documentary terms suggests that model predictions may also reflect reporting characteristics rather than exclusively pathological findings.
3.7. Temporal Analysis and Documentary Controls
Exploratory temporal analyses identified a marked imbalance in the distribution of BD and NBD cases throughout the study period. Although BD cases were represented between 2011 and 2024, no NBD cases were included between 2013 and 2021. Both groups were represented in 2011–2012 (27 BD and 16 NBD) and 2022–2024 (18 BD and 51 NBD).
Within-period evaluation of Logistic Regression yielded ROC-AUC estimates of 0.642 for 2011–2012 and 0.713 for 2022–2024. Cross-period transfer analyses resulted in ROC-AUC estimates of 0.630 when training on the earlier period and evaluating on the later period, and 0.704 in the reverse direction.
An exploratory negative-control model based on report year, document-template characteristics and report length achieved a mean fold ROC-AUC of 0.873, compared with 0.820 for the NLP model evaluated using the corresponding fold-level estimator. These findings suggest that temporal and documentary characteristics may contribute to the observed discrimination. Detailed results are presented in Supplementary Table S4.
4. Discussion
Predicting brain death (BD) is a crucial area of research with significant implications for optimising organ donation and patient management in intensive care units (ICUs) [12,13,14,15]. The scientific literature highlights a multifaceted approach to improving the early and accurate identification of patients likely to progress to BD, combining traditional clinical and radiological methods with advanced machine-learning techniques [16,17,18,19,20,21,22,23]. The timely identification of potential donors remains a critical challenge in expanding the donor pool, as manual surveillance is inherently vulnerable to variability, communication delays and missed opportunities [4,7,24]. The overarching objective is to move beyond the recognition of catastrophic neurological events and towards the early prediction of progression to brain death itself. Nevertheless, publications addressing this specific challenge remain relatively scarce, with only a limited number of recent studies exploring automated donor-recognition strategies [25].
Several studies have underscored the importance of early clinical and radiological markers in predicting BD [17,21,23,26,27]. For example, Escudero et al. (2022) [28] identified multiple factors associated with early progression to BD, including a Glasgow Coma Scale (GCS) score below 5 at admission, midline shift, effacement of basal cisterns, effacement of cerebral sulci, obliteration of the suprasellar cistern and evidence of ependymal transudation. These variables provide important information regarding the severity of cerebral injury and the likelihood of irreversible neurological deterioration. Similarly, Galbois et al. (2013) [5] demonstrated that the number of abolished brainstem reflexes and the presence of the “swirl sign” on baseline CT imaging were strongly associated with progression towards BD in patients with spontaneous intracerebral haemorrhage. Their predictive scores achieved good sensitivity and specificity and highlighted the potential value of early radiological assessment for donor recognition.
Machine-learning approaches are increasingly emerging as useful tools for improving prognostic accuracy in critical care settings. Sauthier et al. (2023) [7] developed a temporal machine-learning model for automated donor screening using routine clinical and laboratory time-series data. Their neural-network model achieved excellent discrimination and outperformed conventional logistic regression. Similarly, Yap et al. (2025) [29] demonstrated that an XGBoost model could accurately predict mortality following spontaneous intracerebral haemorrhage using routinely available clinical variables, outperforming established severity scores such as APACHE II and SOFA. In traumatic brain injury, machine-learning models have also shown promising performance for predicting radiological progression and clinical deterioration [27]. Furthermore, Itagaki et al. (2022) [6] developed an early BD prediction model for out-of-hospital cardiac arrest patients based on age, low-flow time, pH and aetiology of arrest, and subsequent studies have demonstrated that machine-learning approaches may further improve predictive performance in this setting [18,19,22,26].
Earlier work by Fernandes et al. (2015) [4] introduced a keyword-based natural language processing (NLP) tool for screening catastrophic neurological events in CT reports. That study achieved a sensitivity of 77% and a specificity of 66%, demonstrating both the feasibility of radiology-report screening and the limitations associated with manually curated keyword strategies. Unlike earlier approaches based on manually selected keywords or single train–test partitions, the present study incorporated several methodological safeguards intended to improve robustness and reduce optimism bias. These included repeated stratified cross-validation, fold-specific TF-IDF vectorisation without a manually curated vocabulary, probability calibration performed exclusively within training partitions and operating-threshold selection based solely on training data before application to held-out validation observations. Confidence intervals were also estimated using patient-level cluster bootstrap resampling, accounting for the repeated evaluation of the same patients. Collectively, these measures were designed to minimise information leakage and provide a more rigorous assessment of predictive performance within a relatively small single-centre cohort. Building upon that foundational work, the present study further explores this concept by applying a calibrated NLP-based machine-learning framework to admission CT reports obtained between 2011 and 2024.
Among the evaluated algorithms, Logistic Regression achieved the highest mean ROC-AUC of 0.812 (95% CI 0.741–0.878), followed by Random Forest (0.802), Support Vector Machine (0.801) and XGBoost (0.780). The structured clinical comparator, based on age, sex and neurological aetiology, achieved an ROC-AUC of 0.507. Although Logistic Regression presented the highest point estimate, the differences between the NLP models were relatively small. In particular, the difference between XGBoost and Logistic Regression was −0.032 (95% CI −0.076 to 0.014), providing insufficient evidence of a difference in discrimination between these models.
The relatively small differences in performance between algorithms suggest that the observed discriminatory patterns were not strongly dependent on a single modelling approach. However, these findings do not establish that the predictive information was exclusively related to neurological abnormalities, as documentary and temporal characteristics may also have contributed to model performance.
Importantly, the predefined sensitivity-oriented threshold selection did not fully achieve the target of 95% during held-out validation. Logistic Regression achieved a sensitivity of 94.1% and a specificity of 42.6%, compared with 94.5% and 27.6%, respectively, for XGBoost. The marginal difference in sensitivity was therefore accompanied by a considerable reduction in specificity and a higher proportion of false-positive classifications. This represents an important limitation for a screening tool intended to support clinical identification pathways, where positive alerts would require subsequent manual assessment. For illustrative purposes, assuming a 5% prevalence of subsequent BD among eligible CT reports, Logistic Regression would generate approximately 59 positive alerts per 100 reports, of which approximately 55 would be false positives. These estimates are hypothetical and cannot be directly extrapolated to routine clinical practice. The acceptable balance between sensitivity and specificity will depend on local prevalence, clinical priorities and the resources available for manual assessment.
These findings reinforce the concept that routinely generated radiology reports may contain useful prognostic information that could be explored for donor-recognition purposes without requiring additional data acquisition. Global explainability analysis using SHAP identified several potentially relevant radiological expressions, with apagamento (effacement) emerging as the most influential feature. Other terms included difuso (diffuse), ventricular (ventricular) and isquémica (ischaemic), which may occur in descriptions of severe cerebral injury, cerebral oedema and distortion of normal intracranial anatomy. Nevertheless, these expressions cannot be assigned specific pathological meanings without considering their clinical and linguistic context. Their importance may provide some degree of face validity but does not establish biological validity or exclude statistical artefacts.
Although rule-based preprocessing was applied, generic linguistic and report-related terms, including não, sem, ce and tc ce, remained among the most influential SHAP features. Negation cues were deliberately preserved to avoid altering the meaning of radiological findings. However, the importance of these expressions, together with the moderate stability of feature rankings across validation folds, suggests that predictions may also reflect reporting conventions and linguistic patterns. Furthermore, SHAP values were derived from uncalibrated Logistic Regression models and represent contributions to raw model outputs rather than calibrated clinical probabilities. Representative false-positive and false-negative cases also illustrated that extensive radiological abnormalities do not necessarily imply subsequent formal BD diagnosis, while less characteristic initial findings do not exclude it.
These findings highlight the potential value of unstructured radiology text as an underused source of information for donor detection. Unlike many machine-learning systems requiring structured clinical databases or continuous physiological monitoring, CT reports are routinely generated in patients with severe neurological injury and are available early in the clinical pathway. Consequently, NLP-based screening systems may represent a pragmatic approach for supporting donor recognition, provided that their performance and operational feasibility are demonstrated in representative clinical populations. At the same time, the results emphasise the importance of standardised radiology reporting practices, as variability in terminology and reporting style may influence model performance and portability across institutions.
Despite the potential of the proposed framework, several limitations should be acknowledged. First, this was a single-centre retrospective study based on free-text radiology reports written in Portuguese. Consequently, model performance may be influenced by local reporting practices, institutional workflows and linguistic conventions. Although this limits immediate generalisability, the study provided a setting for developing and internally evaluating a proof-of-concept approach that may subsequently be adapted to other languages and institutions. Second, the relatively small sample size inevitably resulted in uncertainty around performance estimates. Although repeated cross-validation reduced dependence on a single data partition, the 100 validation folds were not independent. Patient-level bootstrap resampling accounted for repeated observations from the same individuals, but the resulting confidence intervals remain conditional on the fitted models and do not replace external validation. Similarly, the observed calibration was assessed only within the selected study cohort, whose BD prevalence is not representative of consecutive clinical admissions.
An additional major limitation concerns temporal selection bias and changes in radiological reporting practices throughout the study period. Although the cohort included patients from 2011 to 2024, the distribution of BD and NBD cases was markedly uneven, with no included NBD cases between 2013 and 2021. Exploratory temporal analyses demonstrated lower discrimination within individual periods and during cross-period transfer. Furthermore, models based exclusively on temporal and documentary metadata achieved substantial discriminatory performance, exceeding that of the NLP model in the corresponding exploratory comparison. This raises concern that changes in report templates, reporting conventions and case-selection patterns may have contributed to the apparent predictive ability of the models. Although the automated preprocessing pipeline was designed to standardise report text, it cannot eliminate these potential sources of confounding. Consequently, the present findings should not be interpreted as evidence of temporal generalisability.
Clinical variables were not systematically incorporated into the NLP models. A limited structured-data comparator based on age, sex and neurological aetiology was developed but showed substantially lower discrimination. However, Glasgow Coma Scale scores, brainstem reflex assessments, pupillary reactivity and standardised CT severity measurements were not consistently available. The limited comparator therefore does not establish superiority over established clinical prognostic scores or conventional manual screening. Future studies should explore the integration of structured clinical variables, including neurological examination findings, intracranial pressure measurements and severity scores. Such multimodal approaches may enable more accurate prediction while facilitating direct comparison between radiological and clinical information sources.
Another limitation concerns retrospective outcome ascertainment. The outcome was defined by formally documented BD diagnosis rather than by the possibility of unrecognised progression to BD. In the NBD group, 33 patients died during the index hospital episode, and comfort-focused care before death was documented in two cases. Although decisions regarding withdrawal of life-sustaining treatment follow a separate institutional pathway [30] from BD diagnosis, detailed treatment-limitation decisions and causes of death were not systematically available. Therefore, the possibility that some patients fulfilled BD criteria without formal confirmation before circulatory death cannot be entirely excluded. Institutional diagnostic protocols and audits of potentially missed donation opportunities may reduce this risk, but the extent of possible outcome misclassification could not be quantified.
The interval between the index CT examination and formal BD diagnosis was available for the BD group, with a median of 2 days (IQR 1–3). However, these data were based on retrospective documentation and did not provide the detailed temporal resolution required to model the progression of neurological deterioration. Future datasets incorporating precise timestamps and repeated clinical assessments could permit the development of temporal prediction models capable of estimating not only the probability of subsequent BD diagnosis but also its likely timing.
Future research should extend this text-based framework towards multimodal architectures integrating NLP-derived radiological features, structured clinical information and potentially image-based deep-learning approaches applied directly to CT data. Such integration may improve predictive performance, although this will require evaluation in larger and more representative populations. Prospective studies should also assess the actual burden of false-positive alerts, decision-curve net benefit, institution-specific calibration and the performance of NLP-assisted screening compared with existing manual identification pathways. Importantly, these systems should be viewed as decision-support tools rather than replacements for clinical judgement. Their intended role is to support the identification and prioritisation of potentially eligible patients while preserving clinician oversight throughout the donation pathway. As a proof-of-concept study, the present work provides a foundation for further development and external validation of AI-assisted donor-recognition systems, without establishing clinical effectiveness or an improvement in organ donation outcomes.
5. Conclusions
This study supports the feasibility of a natural language processing framework based exclusively on admission brain CT reports for identifying patients at risk of subsequent brain death. Using repeated cross-validation, training-only probability calibration and threshold selection, Logistic Regression achieved the highest mean ROC-AUC of 0.812 (95% CI 0.741–0.878), with a sensitivity of 94.1% and a specificity of 42.6%. Although these findings demonstrate the potential of routinely available radiological text for automated screening, the substantial proportion of false-positive classifications and the influence of temporal and documentary characteristics limit their immediate clinical applicability. Explainability analyses identified several relevant radiological expressions but also highlighted the potential contribution of linguistic and reporting patterns to model predictions.
Despite these limitations, the proposed framework provides a basis for further development of NLP-assisted donor-recognition systems as potential adjuncts to existing clinical workflows. Larger, prospective and multicentre studies are required to establish generalisability, evaluate clinical utility and determine whether these approaches can improve the identification of potential donors and reduce missed donation opportunities.
Supplementary Materials
The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/diagnostics16233995/s1, Supplementary Figure S1. Report length distributions and term-frequency visualizations of brain CT reports before and after NLP preprocessing. Panels A–B show the distributions of report lengths (word counts) in the brain death (BD) and non-brain death (NBD) groups, comparing the extracted clinical text with the final NLP-preprocessed text. Panels C–D show word clouds derived from the extracted clinical text in the BD and NBD groups. Panels E–F show word clouds derived from the corresponding NLP-preprocessed text. Panels G–H show the most frequent bigrams and trigrams identified after NLP preprocessing in the BD and NBD groups. Word size reflects relative term frequency. Supplementary Figure S2. Distribution of operating thresholds selected during repeated cross-validation. Thresholds were selected within training partitions to maximize specificity while targeting a sensitivity of ≥95%. Supplementary Figure S3. Confusion matrices of the four NLP-based models. Matrices show mean held-out classification counts across 20 cross-validation repetitions, using fold-specific thresholds. Percentages are calculated within each observed outcome group. Supplementary Table S1A. Lexical consistency of negation cues following NLP preprocessing. Comparison of the frequency of selected Portuguese negation cues in the extracted clinical text and the final NLP-preprocessed text across all 161 brain CT reports. Supplementary Table S1B. Illustrative preservation of clinically relevant negated expressions. Representative examples of negated radiological findings before and after NLP preprocessing in the brain death (BD) and non-brain death (NBD) groups. Supplementary Table S2. NLP, model configuration, internal validation, and software environment. Detailed description of the automated NLP pipeline, TF-IDF feature extraction, machine-learning model hyperparameters, internal validation strategy, probability calibration, operating threshold selection, sensitivity analyses, and computational environment. Supplementary Table S3. Internal calibration of machine-learning models. Calibration intercepts, calibration slopes, and Brier scores for the four NLP-based models, calculated using patient-level mean out-of-fold predicted probabilities across 20 cross-validation repetitions. Supplementary Table S4. Exploratory temporal analyses, documentary controls, and additional sensitivity analyses. Panel A shows the distribution of patients by CT report period and outcome group. Panel B presents the exploratory temporal performance of logistic regression, including period-specific cross-validation estimates and cross-period transfer analyses. Panel C presents documentary and temporal metadata negative-control analyses. Panel D presents additional sensitivity analyses using a higher training sensitivity target and selected documentary feature ablation.
Author Contributions
Conceptualization, A.G. (António Gomes) and A.P.F.; methodology, A.G. (António Gomes), A.G. (António Gonçalves) and A.P.F.; software, A.G. (António Gomes) and A.G. (António Gonçalves); validation, A.G. (António Gomes), A.F., A.G. (António Gonçalves), E.S. and A.P.F.; formal analysis, A.G. (António Gomes); investigation, A.P.F.; resources, A.P.F.; data curation, A.G. (António Gomes), A.P.F.; writing—original draft preparation, A.G. (António Gomes) and A.P.F.; writing—review and editing, A.G. (António Gomes), A.F., A.G. (António Gonçalves), E.S. and A.P.F.; visualization, A.G. (António Gomes); supervision, A.F. and A.P.F.; project administration, A.P.F.; funding acquisition, A.F., A.G. (António Gonçalves), E.S. All authors have read and agreed to the published version of the manuscript.
Funding
This research received no external funding. The article processing charge (APC) will be funded by TransplantHub® in the event of acceptance for publication.
Institutional Review Board Statement
The study was conducted in accordance with the Declaration of Helsinki and approved by the Institutional Review Board of Hospital Prof. Doutor Fernando Fonseca (Approval No. 084/2025, approval date: 15 October 2025).
Informed Consent Statement
Patient informed consent was waived due to the retrospective design of the study, the inclusion of deceased patients over an extended time-period, and the use of de-identified data.
Data Availability Statement
The clinical data supporting the findings of this study are not publicly available due to ethical and privacy restrictions. The analytical code used for data preprocessing, feature extraction, model development, validation, calibration, threshold selection, and explainability analyses will be made publicly available in a dedicated GitHub repository upon publication of the article.
Acknowledgments
During the preparation and revision of this manuscript, the authors used ChatGPT (OpenAI, GPT-5.6 Thinking, GPT-based models) for assistance with language editing, grammar and sentence structure, suggestions for alternative wording, formatting of tables, and debugging and troubleshooting of analytical code. The tool also assisted in drafting and refining selected passages based on information and results provided by the authors. All AI-assisted outputs, including suggested text and code modifications, were critically reviewed, edited and verified by the authors against the underlying data, analytical results and relevant scientific literature. All methodological decisions, scientific interpretations and conclusions remain the responsibility of the authors, who take full responsibility for the accuracy, integrity and final content of this publication.
Conflicts of Interest
The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.
Abbreviations
The following abbreviations are used in this manuscript:
| AI | Artificial Intelligence |
| APACHE II | Acute Physiology and Chronic Health Evaluation II |
| AUC | Area Under the Curve |
| BD | Brain Death |
| CI | Confidence Interval |
| CT | Computed Tomography |
| CV | Cross-Validation |
| F1 | F1 Score |
| GCS | Glasgow Coma Scale |
| HIBI | Hypoxic–Ischaemic Brain Injury |
| ICH | Intracerebral Haemorrhage |
| ICU | Intensive Care Unit |
| IQR | Interquartile Range |
| LR | Logistic Regression |
| ML | Machine Learning |
| NBD | Non-Brain Death |
| NLP | Natural Language Processing |
| NPV | Negative Predictive Value |
| Portable Document Format | |
| PPV | Positive Predictive Value |
| RBF | Radial Basis Function |
| RF | Random Forest |
| ROC | Receiver Operating Characteristic |
| ROC-AUC | Area Under the Receiver Operating Characteristic Curve |
| SAH | Subarachnoid Haemorrhage |
| SHAP | SHapley Additive exPlanations |
| SOFA | Sequential Organ Failure Assessment |
| STROBE | Strengthening the Reporting of Observational Studies in Epidemiology |
| SVM | Support Vector Machine |
| TF-IDF | Term Frequency–Inverse Document Frequency |
| TRIPOD + AI | Transparent Reporting of a multivariable prediction model for Individual Prognosis Or Diagnosis + Artificial Intelligence |
| XGBoost | Extreme Gradient Boosting |
References
- Martin, F.; Carmona, M.; Mahillo, B.; Alvarez, M.; Luengo, A.; Chatzixiros, E.; López-Fraga, M.; Domínguez-Gil, B.; Tullius, S.G. Organ Donation and Transplantation Worldwide: The Global Observatory on Donation and Transplantation 2024 Report. Transplantation 2026, 110, e655–e669. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ismail, A.J.B.; Ahmad, N.D.; Ching, C.S.; Lean, C.S.; Keong, T.T.B.; Zaini, M.I.; Kheng, C.P. Barriers to the identification of possible organ donors among brain-injured patients admitted to intensive care units. Korean J. Transplant. 2023, 37, 85–94. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Qu, Z.; Oedingen, C.; Bartling, T.; Beneke, J.; Zink, M.; Krauth, C.; Schrem, H. Systematic review on potential brain dead donor estimations and conversion rates to actually realized organ donations. Transplant. Rev. 2021, 35, 100638. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Fernandes, A.P.; Gomes, A.; Veiga, J.; Ermida, D.; Vardasca, T. Imaging screening of catastrophic neurological events using a software tool: Preliminary results. Transplant. Proc. 2015, 47, 1001–1004. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Galbois, A.; Boëlle, P.-Y.; Hainque, E.; Raynal, M.; Cazejust, J.; Baudel, J.-L.; Ait-Oufella, H.; Alves, M.; Bigé, N.; Maury, E.; et al. Prediction of evolution toward brain death upon admission to ICU in comatose patients with spontaneous intracerebral hemorrhage using simple signs. Transpl. Int. 2013, 26, 517–526. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Itagaki, Y.; Hayakawa, M.; Maekawa, K.; Kodate, A.; Moriki, K.; Takahashi, Y.; Sageshima, H. Early prediction model of brain death in out-of-hospital cardiac arrest patients: A single-center retrospective and internal validation analysis. BMC Emerg. Med. 2022, 22, 177. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Sauthier, N.; Bouchakri, R.; Carrier, F.M.; Sauthier, M.; Mullie, L.-A.; Cardinal, H.; Fortin, M.-C.; Lahrichi, N.; Chassé, M. Automated screening of potential organ donors using a temporal machine learning model. Sci. Rep. 2023, 13, 8459. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Assembleia da República. Lei n.º 141/99, de 28 de Agosto: Estabelece os Princípios em que se Baseia a Verificação da Morte. Diário da República 1999, Série I-A, 201, 5955. Available online: https://diariodarepublica.pt/dr/detalhe/lei/141-1999-532449 (accessed on 12 November 2026).
- Ordem dos Médicos. Critérios de Morte Cerebral: Declaração de 11 de Outubro de 1994. Diário da República 1994, Série I-B, 235, 6160. Available online: https://diariodarepublica.pt/dr/detalhe/declaracao/1994-618930 (accessed on 12 November 2026).
- Vandenbroucke, J.P.; von Elm, E.; Altman, D.G.; Gøtzsche, P.C.; Mulrow, C.D.; Pocock, S.J.; Poole, C.; Schlesselman, J.J.; Egger, M.; Strobe Initiative. Strengthening the Reporting of Observational Studies in Epidemiology (STROBE): Explanation and elaboration. PLoS Med. 2007, 4, e297. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Collins, G.S.; Moons, K.G.M.; Dhiman, P.; Riley, R.D.; Beam, A.L.; Van Calster, B.; Ghassemi, M.; Liu, X.; Reitsma, J.B.; van Smeden, M.; et al. TRIPOD+AI statement: Updated guidance for reporting clinical prediction models that use regression or machine learning methods. BMJ 2024, 385, e078378. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Agarwal, S.; Morris, N.; Der-Nigoghossian, C.; May, T.; Brodie, D. The Influence of Therapeutics on Prognostication After Cardiac Arrest. Curr. Treat. Options Neurol. 2019, 21, 60. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bevers, M.B. Refining the continuum of neurologic prognosis—Predicting brain death after cardiac arrest. Resuscitation 2023, 192, 109990. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Busl, K.M.; Maciel, C.B. When the heart comes back but the brain is lost-are we ready to predict brain death after cardiac arrest? Resuscitation 2022, 179, 256–258. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Heppekcan, D.; Ekin, S.; Çivi, M.; Aydın Tok, D. Impact of Secondary Insults in Brain Death After Traumatic Brain Injury. Transplant. Proc. 2019, 51, 2186–2188. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Arsava, E.M.; Ayvacioglu Cagan, C.; Gumeler, E.; Parlak, S.; Oguz, K.K.; Topcuoglu, M.A. Comparison of early- and late-phase CT angiography findings in brain death. J. Neurol. 2022, 269, 5973–5980. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Çevikkalp, E.; Taşkapılıoğlu, M. Predictive Values of Hematological Parameters for Determining Imminent Brain Death: A Retrospective Study. Medicina 2023, 59, 417. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cour, M.; Turc, J.; Madelaine, T.; Argaud, L. Risk factors for progression toward brain death after out-of-hospital cardiac arrest. Ann. Intensive Care 2019, 9, 45. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kitlen, E.; Kim, N.; Rubenstein, A.; Keenan, C.; Garcia, G.; Khosla, A.; Johnson, J.; Miller, P.E.; Wira, C.; Greer, D.; et al. Development and validation of a novel score to predict brain death after out-of-hospital cardiac arrest. Resuscitation 2023, 192, 109955. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Lee, B.K.; Min, J.H.; Park, J.S.; Kang, C.; Lee, B.K. Early identified risk factors and their predictive performance of brain death in out-of-hospital cardiac arrest survivors. Am. J. Emerg. Med. 2022, 56, 117–123. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Maniakhina, L.E.; Muir, S.M.; Tackett, N.; Johnson, D.; Mentzer, C.J.; Mount, M.G. Significant Hypophosphatemia Is Predictive of Brain Death in Severe Traumatic Brain Injury. Am. Surg. 2023, 89, 3278–3280. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Song, H.; Oh, S.H.; Woo, H.R.; on behalf of CROWN Investigators. Brain Death and Its Prediction in Out-of-Hospital Cardiac Arrest Patients Treated with Targeted Temperature Management. Diagnostics 2022, 12, 1190. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Stefani, M.A.; Modkovski, R.; Hansel, G.; Zimmer, E.R.; Kopczynski, A.; Muller, A.P.; Strogulski, N.R.; Rodolphi, M.S.; Carteri, R.K.; Schmidt, A.P.; et al. Elevated glutamate and lactate predict brain death after severe head trauma. Ann. Clin. Transl. Neurol. 2017, 4, 392–402. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tommasino, N.; Forteza, D.; Godino, M.; Mizraji, R.; Álvarez, I. A Model to Predict Progression in Brain-Injured Patients. Transplant. Proc. 2014, 46, 2950–2952. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Schoene, D.; Freigang, N.; Trabitzsch, A.; Pleul, K.; Kaiser, D.P.O.; Roessler, M.; Winzer, S.; Hugo, C.; Günther, A.; Puetz, V.; et al. Identification of patients at high risk for brain death using an automated digital screening tool: A prospective diagnostic accuracy study. J. Neurol. 2023, 270, 5935–5944. [Google Scholar] [CrossRef] [Scilit]
- Sandroni, C.; D’aRrigo, S.; Cacciola, S.; Hoedemaekers, C.W.E.; Kamps, M.J.A.; Oddo, M.; Taccone, F.S.; Di Rocco, A.; Meijer, F.J.A.; Westhall, E.; et al. Prediction of poor neurological outcome in comatose survivors of cardiac arrest: A systematic review. Intensive Care Med. 2020, 46, 1803–1851. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Shafiei, M.; Sabouri, M.; Veshnavei, H.A.; Tehrani, D.S. Predictors of radiological contusion progression in traumatic brain injury. Int. J. Burns Trauma 2023, 13, 58–64. [Google Scholar]
- Escudero, D.; Astola, I.; Balboa, S.; Leoz, B.; Meilan, Á.; del Busto, C.; Quindós, B.; Forcelledo, L.; Vizcaino, D.; Martín, L.; et al. Clinico-radiological related to early brain death factors. Med. Intensiv. Engl. Ed. 2022, 46, 1–7. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Yap, X.-H.V.; Tu, K.-C.; Chen, N.-C.; Wang, C.-C.; Chen, C.-J.; Liu, C.-F.; Nya, T.-T.E.; Kuo, C.-L. Developing a high-performance AI model for spontaneous intracerebral hemorrhage mortality prediction using machine learning in ICU settings. BMC Med. Inform. Decis. Mak. 2025, 25, 149, Correction in BMC Med. Inform. Decis. Mak. 2026, 26, 54. https://doi.org/10.1186/s12911-026-03377-5. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Nunes, R. Proposta sobre suspensão e abstenção de tratamento em doentes terminais. Rev. Bioét. 2009, 17, 29–39. [Google Scholar]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.




