← All articlesIA em Saúde

    AI Applied in Hospitals: How to Predict Sepsis, Heart Attacks, and Pneumonia Using ICU Data

    Learn how ICU data, HL7/FHIR integration, and predictive models can safely anticipate the risks of sepsis, heart attacks, and pneumonia.

    September 23, 2026 · 8 min read

    AI applied in hospitals can estimate the risk of sepsis, heart attacks, and pneumonia in advance by continuously analyzing vital signs, test results, medications, and clinical progression recorded in the ICU. These models do not replace medical diagnosis: they function as decision-support systems, prioritizing patients for assessment and enabling faster interventions when properly integrated into the care workflow.

    What a Hospital Predictive System Actually Does

    A predictive model receives data available up to a given point in time and calculates the probability of a clinical event within a future window. Instead of stating that a patient “has sepsis,” for example, the system may indicate that the risk has increased significantly over the past few hours and recommend an assessment by the responsible team.

    The output must answer four questions:

    1. What event is being predicted? Sepsis, acute myocardial infarction, or pneumonia, for example.
    2. Within what time horizon? Over the next few hours, during the shift, or before ICU discharge.
    3. With what degree of confidence? The probability must be calibrated and accompanied by clinical metrics.
    4. What action will be taken? Request an assessment, repeat tests, or activate an institutional protocol.

    Without a predefined action, the alert tends to become just another notification in the electronic health record.

    What ICU Data Can Feed the AI

    Prediction depends less on an isolated algorithm and more on the quality of the clinical time series. An ICU produces high-frequency data, but these data may be scattered across monitors, electronic health records, laboratories, pharmacies, and life-support equipment.

    Vital Signs and Monitoring

    The most common data include:

    • heart rate and respiratory rate;
    • systolic, diastolic, and mean arterial pressure;
    • peripheral oxygen saturation;
    • temperature;
    • urine output;
    • fraction of inspired oxygen;
    • mechanical ventilation parameters;
    • level of consciousness and documented clinical scores.

    Rather than considering only an isolated value, the model can assess trends, rate of change, variability, and persistence. A progressive drop in blood pressure may be more informative than a single abnormal measurement.

    Tests, Medications, and Clinical Context

    Complete blood counts, lactate, creatinine, troponin, blood gas analysis, C-reactive protein, and other available results may also be used. Prescriptions for antibiotics, vasopressors, anticoagulants, and ventilatory support help contextualize the care trajectory, but require caution: a medication may reveal that the physician already suspected the event, causing information leakage during training.

    Age, comorbidities, admission diagnosis, procedures, and recent history complete the context. Sensitive data should only be used when necessary for the clinical purpose, in compliance with Brazil’s General Data Protection Law, the LGPD.

    How Prediction Works for Each Condition

    Sepsis

    According to the Sepsis-3 definition, sepsis involves life-threatening organ dysfunction caused by a dysregulated response to infection. A model may look for combinations such as hemodynamic instability, respiratory changes, altered consciousness, worsening renal function, elevated lactate, and indirect signs of infection.

    The main challenge is correctly defining the label used in training. The time of diagnosis in the electronic health record, protocol initiation, culture, antibiotic administration, and organ dysfunction criteria do not necessarily represent the same clinical moment. An inconsistent definition produces a model that appears accurate but is of little use during a shift.

    Heart Attack

    In heart attack prediction, AI can combine documented symptoms, risk profile, electrocardiogram, troponin trends, heart rate, and hemodynamic changes. When the raw ECG signal is available, specific models can analyze morphology and temporal patterns; when it is not, the system depends on structured measurements and reports.

    The objective must be clearly defined: detecting an event already in progress is different from predicting future cardiovascular deterioration. False negatives may delay a critical assessment, while excessive false positives increase unnecessary tests and alarms.

    Pneumonia

    For pneumonia, especially in patients receiving mechanical ventilation, the system may analyze temperature, oxygenation, documented secretions, white blood cell counts, ventilatory parameters, microbiology, and imaging reports. Chest images can feed dedicated models, but they require infrastructure, anonymization, and validation separate from tabular data.

    It is necessary to distinguish between community-acquired, hospital-acquired, and ventilator-associated pneumonia. Mixing populations and diagnostic criteria may produce a system with good average performance that is nevertheless unsuitable for the actual ICU population.

    Data Architecture: From the Monitor to the Clinical Alert

    A hospital project usually needs to connect heterogeneous systems. Under the HL7 v2 standard, ADT messages can report admissions and transfers, while ORU commonly transports results and observations. In FHIR, resources such as Patient, Encounter, Observation, Condition, MedicationRequest, and DiagnosticReport help represent data through more modern APIs.

    A typical technical workflow includes:

    1. ingestion of messages, APIs, and device data;
    2. secure identification of the patient and hospitalization episode;
    3. normalization of units, codes, and timestamps;
    4. management of missing, duplicated, or delayed data;
    5. construction of temporal variables;
    6. model execution;
    7. application of clinical rules and thresholds;
    8. delivery of the alert within the system already used by the team;
    9. recording of the response and outcome for auditing.

    Timestamps require special attention. Collection, laboratory release, entry into the electronic health record, and arrival in the data lake occur at different times. Accidentally using the wrong timestamp can allow the training process to see information that did not yet exist at the moment of prediction.

    How to Assess Whether the Model Is Clinically Useful

    Accuracy alone is inadequate for infrequent events. A model that always predicts “no event” may appear correct in most cases and still be useless.

    The minimum metrics include:

    • sensitivity: proportion of events correctly flagged;
    • specificity: proportion of cases without the event correctly ruled out;
    • positive predictive value: how many alerts actually correspond to the outcome;
    • AUROC and AUPRC: discrimination capacity, with AUPRC being especially relevant for imbalanced classes;
    • calibration: correspondence between predicted risk and observed frequency;
    • clinical lead time: time between the alert and recognition or occurrence of the event;
    • alerts per patient/day: operational measure of the generated workload;
    • time to assessment: actual impact on the care workflow.

    Validation must be temporal and, whenever possible, external. Randomly splitting records from the same patient between training and testing creates leakage. Performance must also be measured by unit, age group, sex, clinical profile, and other relevant groups, without automatically concluding that statistical differences represent causality.

    Before influencing clinical decisions, it is prudent to run the system in silent mode: it calculates risks but does not display alerts. This makes it possible to compare predictions, outcomes, and the potential notification burden without interfering with care.

    Main Risks and Trade-Offs

    Sensitivity Versus Alarm Fatigue

    Lowering the threshold increases the chance of detecting at-risk patients, but it also increases false positives. The operating point must account for the severity of the event, team capacity, and an acceptable number of additional assessments.

    Sophisticated Model Versus Explainability

    Neural networks can capture complex temporal relationships, while regression, tree-based, and boosting models may be easier to audit. Local explanations help, but they do not prove causality. The choice must balance performance, maintenance, data availability, and clinical investigation capabilities.

    Updates Versus Stability

    Protocols, equipment, and patient profiles change. This causes data drift and concept drift. The hospital must monitor variable distributions, calibration, performance, and alert volume while maintaining version control and rollback capabilities.

    Checklist for Deploying Predictive AI in an ICU

    Before putting a model into production, verify:

    • [ ] outcome and prediction window defined with the clinical team;
    • [ ] action protocol associated with each alert;
    • [ ] data representative of the target population;
    • [ ] prevention of temporal leakage during training;
    • [ ] retrospective, temporal, and prospective validation;
    • [ ] analysis of false positives and false negatives;
    • [ ] integration with the electronic health record through HL7 v2, FHIR, or a secure API;
    • [ ] audit trail for input, version, output, and response;
    • [ ] access controls, encryption, and an incident response plan;
    • [ ] legal basis, purpose, and retention aligned with the LGPD;
    • [ ] assessment of the regulatory classification applicable to the software;
    • [ ] continuous monitoring and a shutdown procedure.

    Depending on its purpose, autonomy, and clinical impact, the system may require an assessment of whether it qualifies as software as a medical device. This assessment must involve clinical, legal, security, quality, and regulatory teams; technical compliance should not be assumed merely because the system is presented as “decision support.”

    How Predictor Solutions Addresses This

    Predictor Solutions develops Predictor AI Hospitals, designed to predict sepsis, heart attacks, and pneumonia in ICUs by combining data engineering, applied artificial intelligence, and integration with hospital environments. The implementation considers interoperability through HL7 v2 and FHIR, time-series normalization, model validation, security, auditing, and integration of alerts into the clinical workflow, rather than operating as an isolated dashboard.

    The company also maintains Predictor Health, featuring health dashboards and wearable integration. Across its project portfolio, Predictor Solutions reports having served nine medium-sized and large companies, with average savings of R$ 1.32 million per client per year, an average productivity increase of 70%, and profit growth of 43% in six months; these figures represent overall project results and should not be interpreted as clinical accuracy metrics.

    Hospital software development should begin with defining the outcome, data quality, and care protocol. Only then should the algorithm, threshold, and interface be selected, always with human validation and post-deployment monitoring.

    Contact: contato@predictorsolutions.com / WhatsApp +55 31 98835-3246

    Frequently asked questions

    How can artificial intelligence predict sepsis before diagnosis?

    AI tracks combined changes in vital signs, test results, organ function, medications, and clinical context. It calculates risk within a future window and flags deterioration that deserves assessment, but it does not confirm sepsis or replace medical criteria.

    What ICU data are needed to predict heart attacks and pneumonia?

    Vital signs, laboratory results, electrocardiograms, troponin, oxygenation, ventilatory parameters, medications, comorbidities, and reports may be used. The selection depends on the event, real-time availability, and assurance that no future data leaked into training.

    Can an AI alert make clinical decisions automatically?

    In general, the model should support decision-making, with institutional protocols and review by qualified professionals. The degree of automation depends on the risk, validation, clinical governance, and applicable regulatory classification.

    How can predictive AI be integrated into a hospital’s electronic health record?

    Integration can use HL7 v2 messages, FHIR resources, or APIs from the electronic health record vendor. The workflow must reconcile the patient and hospitalization, normalize codes and timestamps, record the model version, and return the alert to the system already used by the team.

    How can you determine whether an AI model for the ICU actually works?

    Sensitivity, positive predictive value, calibration, alert lead time, and notifications per patient/day must be measured using data separate from training. After retrospective validation, silent-mode operation and prospective evaluation are recommended in the population and hospital where the model will be used.

    Keep reading