← All articlesIA em Saúde

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

    Learn how AI combines vital signs, test results, and ICU clinical data to safely estimate the risks of sepsis, heart attacks, and pneumonia.

    September 07, 2026 · 8 min read

    AI applied in hospitals can estimate the risk of sepsis, heart attacks, and pneumonia in advance by analyzing time series of vital signs, laboratory test results, medications, and ICU clinical records. The system must function as decision support—with calibrated, explainable alerts integrated into the care workflow—and never as a replacement for physicians or clinical protocols.

    What AI Actually Predicts in an ICU

    A hospital predictive model does not “guess” a diagnosis. It calculates the probability of an outcome occurring within a defined window, such as sepsis within the next 6 hours, deterioration consistent with a heart attack within the next 2 hours, or ventilator-associated pneumonia within the next 24 hours.

    The output may be presented as a percentage risk, a risk category, or an operational alert. To be clinically useful, each prediction must report at least:

    • which outcome is being estimated;
    • the prediction horizon;
    • when the data was updated;
    • which variables contributed to the risk;
    • which institutional action the alert should trigger;
    • the degree of confidence in or limitations of the estimate.

    The goal is not merely to achieve a high metric in a retrospective test. The model must provide useful lead time for clinical assessment without generating excessive alerts.

    Which ICU Data Feeds the Models

    Prediction depends on longitudinal data, not only on an isolated snapshot of the patient. In an ICU, the most relevant sources include:

    Vital Signs and Monitoring

    • heart rate and respiratory rate;
    • systolic, diastolic, and mean arterial pressure;
    • peripheral oxygen saturation;
    • temperature;
    • urine output;
    • ventilator parameters;
    • electrocardiogram tracings and derived measurements, when available.

    Frequency, trend, and variability are often just as important as the absolute value. A blood pressure reading that is still within the expected range but is persistently declining may be more informative than an isolated measurement.

    Laboratory Tests

    White blood cell count, lactate, creatinine, platelets, bilirubin, blood gas analysis, C-reactive protein, electrolytes, and troponin may contribute to different tasks. However, missing test results must not automatically be interpreted as normal: their absence may reflect either low clinical suspicion or an integration failure.

    Clinical and Therapeutic Context

    Previous diagnoses, comorbidities, vasopressor use, antibiotics, mechanical ventilation, sedation, and procedures help contextualize the signals. Free-text information may be processed, but it requires additional privacy, terminology, and quality controls.

    Integration commonly involves HL7 v2 messages for hospital events and FHIR resources for the structured representation of patients, observations, conditions, medications, and procedures. FHIR facilitates interoperability, but it does not eliminate the need to map local codes, units, and clinical meanings.

    Sepsis Prediction

    Sepsis is a potentially fatal organ dysfunction caused by a dysregulated response to infection. In practice, a model may search for patterns that precede deterioration, such as combined changes in blood pressure, respiratory rate, temperature, lactate, level of consciousness, urine output, and the need for support.

    Development must avoid a common problem: using as input information that was recorded only after the care team had already recognized the condition. Including an antibiotic order entered after suspicion arose, for example, may cause data leakage and create an artificial impression of early prediction.

    The clinical label must also be defined. Criteria such as suspected infection associated with organ dysfunction are more defensible than isolated administrative codes, but they still require validation by specialists. Different definitions produce different models and alert rates.

    To assess usefulness, the hospital should measure:

    • median alert lead time;
    • sensitivity for the defined cases;
    • positive predictive value;
    • alerts per bed or per 100 patient-days;
    • proportion of alerts involving cases already recognized by the care team;
    • performance by unit and patient profile.

    Prediction of Heart Attacks and Cardiac Deterioration

    Acute myocardial infarction should not be inferred from a single vital sign. Its clinical assessment involves symptoms, electrocardiograms, troponin, and context, and some ICU patients may be unable to report pain or may present with nonspecific abnormalities.

    AI can support the identification of risk patterns by combining troponin trends, available electrocardiographic changes, hemodynamic instability, heart rate, oxygenation, and medical history. The scope must be explicit: a cardiovascular deterioration model is not automatically equivalent to a heart attack diagnosis.

    Another challenge is distinguishing myocardial injury from myocardial infarction. Elevated troponin can also occur in sepsis, kidney failure, and other critical conditions. Therefore, the alert should prompt clinical review and confirmatory tests according to the institutional protocol rather than state a definitive diagnosis.

    Pneumonia Prediction in the ICU

    In critically ill patients, the task may cover hospital-acquired pneumonia or ventilator-associated pneumonia. Relevant signals include worsening oxygenation, changes in ventilator parameters, temperature, white blood cell count, respiratory secretions, imaging findings, and microbiology.

    There are important limitations. Radiology reports may be ambiguous, cultures take time, and colonization does not necessarily mean infection. In addition, atelectasis, pulmonary edema, and respiratory distress syndrome may produce similar signs.

    A useful model must state which event it predicts and the population in which it was validated. Mixing ventilated and non-ventilated patients without accounting for this difference may degrade performance and generate alerts that are difficult to act upon.

    How to Build a Secure Architecture

    A typical hospital architecture has five layers:

    1. Ingestion: collects data from the electronic health record, laboratory, monitors, and auxiliary systems through HL7 v2, FHIR, or APIs.
    2. Normalization: converts units, codes, timestamps, and identifiers into a consistent model.
    3. Temporal processing: creates trends, rolling windows, and indicators of missing or delayed data.
    4. Inference: runs the versioned model and records inputs, output, and execution time.
    5. Delivery and auditing: displays the risk within the care workflow and stores alerts, confirmations, and interventions.

    Security requires encryption in transit and at rest, role-based access control, audit trails, environment segregation, and a retention policy. Data processing must comply with Brazil’s General Data Protection Law (LGPD), especially because it involves sensitive personal health data.

    If the system loses its connection or receives delayed data, it must indicate unavailability. A risk calculated using outdated vital signs cannot appear to be a current prediction.

    Metrics That Matter Beyond Accuracy

    Accuracy can be misleading when the event is rare. If only 5% of patients experience the outcome, a system that classifies everyone as negative will have 95% accuracy and no clinical usefulness.

    The assessment should consider:

    • sensitivity: proportion of cases captured;
    • specificity: proportion of non-cases correctly ruled out;
    • positive predictive value: how many alerts correspond to actual cases;
    • AUROC and AUPRC: discrimination capability, with particular attention to AUPRC for rare events;
    • calibration: agreement between predicted risk and observed frequency;
    • lead time: interval between the alert and the event;
    • alert burden: number of alerts received by the care team during each shift;
    • performance by subgroup: comparison by age, sex, comorbidities, unit, and other relevant groups.

    The operational threshold involves a trade-off. Lowering it increases sensitivity, but it may also increase false positives and alert fatigue. The decision must involve physicians, nursing staff, patient safety professionals, and clinical engineering.

    Checklist Before Deploying the Model to Production

    • Are the outcome and prediction window clearly defined?
    • Were the labels reviewed with clinical specialists?
    • Is there any leakage of information recorded after the event?
    • Was the model validated using local data separated over time?
    • Are probabilities calibrated for the current population?
    • Is data and performance drift monitored?
    • Do alerts indicate the time, relevant factors, and expected action?
    • Does the workflow cover confirmation, dismissal, and escalation?
    • Have users received training on the limitations?
    • Is there a contingency plan for integration failures?
    • Does the deployment meet privacy and security requirements?
    • Can model, data, and rule versions be audited?

    A prudent practice is to begin in “shadow mode”: the model calculates risks without alerting the care team. This phase makes it possible to measure local performance, alert frequency, and integration before there is any impact on care.

    How Predictor Solutions Addresses This

    Predictor Solutions develops healthcare systems with HL7 v2 and FHIR integration, data engineering, and artificial intelligence models applied to clinical operations. Predictor AI Hospitals was designed to support the prediction of sepsis, heart attacks, and pneumonia in the ICU, while Predictor Health centralizes health dashboards and wearable data.

    Implementation combines hospital workflow discovery, data normalization, temporal modeling, retrospective validation, controlled deployment, and monitoring. The company also works in cloud/DevOps and offensive security, which are necessary components for maintaining availability, traceability, and the protection of sensitive data.

    As a software house, Predictor Solutions has served 9 medium-sized and large companies, with reported overall results of R$ 1.32 million in average savings per client per year, an average productivity increase of 70%, and 43% profit growth within six months. These figures represent the company’s business portfolio and should not be interpreted as specific clinical evidence for its hospital models.

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

    Frequently asked questions

    Can artificial intelligence predict sepsis before physicians do?

    AI can identify combinations of signals associated with deterioration before some clinical criteria become evident, but this does not happen in every case. The result depends on data quality, the validated population, and the alert threshold, and it must always support—not replace—medical assessment.

    What data is used to predict heart attacks in ICU patients?

    Models may combine troponin trends, electrocardiographic data, blood pressure, heart rate, oxygenation, available symptoms, and medical history. Because elevated troponin also occurs in other critical conditions, the prediction must be confirmed through the institution’s diagnostic protocol.

    How does AI identify the risk of ventilator-associated pneumonia?

    The system analyzes trends in oxygenation, ventilator parameters, temperature, white blood cell count, secretions, imaging tests, and microbiology. Because pulmonary edema, atelectasis, and colonization may generate similar signs, the alert represents risk rather than a definitive diagnosis.

    Are HL7 and FHIR mandatory for using AI in hospitals?

    They are not the only possible methods, but HL7 v2 and FHIR reduce coupling between the model and hospital systems. Local codes, units, timestamps, and clinical concepts still need to be normalized to prevent predictions based on inconsistent data.

    How can a hospital determine whether a predictive model works in practice?

    In addition to AUROC, sensitivity, positive predictive value, calibration, lead time, and the number of alerts per shift or per patient-day should be measured. Validation must use local data, include a shadow-mode phase, and continue after deployment to detect drift.

    Keep reading