← All articlesIA em Saúde

    AI Applied in Hospitals: Predicting Sepsis, Heart Attack, and Pneumonia With ICU Data

    Learn how to use ICU data to anticipate sepsis, heart attack, and pneumonia, validate clinical models, and integrate alerts into hospital workflows.

    October 14, 2026 · 8 min read

    AI applied in hospitals can estimate the risk of sepsis, heart attack, and pneumonia by continuously analyzing vital signs, laboratory tests, medications, and the patient’s clinical course in the ICU. The useful outcome is not an automatic diagnosis, but an early, calibrated alert integrated into the electronic health record so that the care team can investigate and intervene sooner.

    How clinical prediction works in an ICU

    An ICU produces high-frequency data: blood pressure, heart rate, oxygen saturation, temperature, mechanical ventilation, fluid balance, laboratory tests, and prescriptions. AI models combine the current state with trends from the previous hours to calculate the probability of an event within a defined window, such as 6, 12, or 24 hours.

    The process usually follows five steps:

    1. Capture: data is received from the electronic health record, laboratory, monitors, and prescription systems.
    2. Normalization: units, codes, timestamps, and identifiers are standardized.
    3. Temporal construction: the system calculates trends, variations, and time since the last measurement.
    4. Inference: a model estimates the individual patient’s risk.
    5. Clinical delivery: the alert reaches the responsible professional, accompanied by the factors that contributed most to the risk.

    Updates must reflect data availability. It does not make sense to recalculate risk every minute when laboratory results arrive every six hours. For continuous vital signs, 5- to 15-minute windows can reduce noise; for laboratory information, inference can be event-driven.

    What data helps predict sepsis, heart attack, and pneumonia

    The model should not use only variables associated with the disease. It must consider quality, frequency, availability at the time of the decision, and the risk of information leakage.

    Sepsis

    Frequently relevant variables include:

    • temperature, heart rate, and respiratory rate;
    • mean arterial pressure and vasopressor requirement;
    • oxygen saturation, blood gas analysis, and lactate;
    • white blood cells, platelets, creatinine, and bilirubin;
    • urine output and fluid balance;
    • cultures, antibiotics, and documented suspicion of infection;
    • altered level of consciousness.

    Sepsis-3 characterizes sepsis as life-threatening organ dysfunction caused by a dysregulated response to infection. In retrospective studies, an increase of at least 2 points in the SOFA score associated with suspected infection is often used as a reference, but the label must be adapted to the hospital’s clinical protocol.

    A fundamental precaution is preventing information recorded after the event from entering the training data. If antibiotic administration after clinical recognition is used to predict supposedly earlier sepsis, the evaluation will appear better than the model’s actual performance.

    Acute myocardial infarction

    Heart attack prediction may consider:

    • troponin trends and the interval between collections;
    • electrocardiogram changes, when structured;
    • blood pressure, heart rate, and oxygen saturation;
    • chest pain and recorded symptoms;
    • age, comorbidities, and cardiovascular history;
    • hemoglobin, kidney function, electrolytes, and inflammatory markers;
    • vasopressor use and the occurrence of hemodynamic instability.

    Elevated troponin alone does not confirm a heart attack. The clinical definition requires a rise or fall consistent with myocardial injury and evidence of ischemia, such as symptoms, electrocardiographic changes, imaging, or anatomical findings. Whenever possible, the model should distinguish a heart attack from other causes of myocardial injury commonly found in the ICU.

    Pneumonia

    For pneumonia, including ventilator-associated pneumonia, the following can be used:

    • ventilator parameters and increasing oxygen requirements;
    • temperature, tracheal secretions, and documented auscultation findings;
    • white blood cells and inflammatory markers;
    • microbiology and respiratory cultures;
    • radiography or CT scan reports;
    • duration of intubation, sedation, and aspiration;
    • response to antimicrobials.

    Images and text require specific pipelines. Reports can be processed using natural language processing, but the model must handle negations, hypotheses, and temporal context. The phrase “no evidence of consolidation” cannot be interpreted as confirmation of pneumonia.

    Integration with electronic health records, HL7 v2, and FHIR

    In practice, the algorithm is not always the greatest obstacle. Hospital data may be distributed across the electronic health record, LIS, PACS, monitors, and administrative systems.

    Legacy integrations frequently use HL7 v2 messages, such as ADT for patient movement, ORU for results, and ORM for orders. In modern architectures, FHIR makes it possible to represent resources such as Patient, Encounter, Observation, Condition, MedicationRequest, and DiagnosticReport through standardized APIs.

    A secure architecture may include:

    • an HL7/FHIR integration engine;
    • a patient identification and reconciliation layer;
    • auditable time-series storage;
    • a feature preparation service;
    • a versioned inference API;
    • records of the model, threshold, and explanations;
    • delivery of the alert back to the electronic health record or clinical dashboard.

    Each prediction must record the time, model version, data used, and alert destination. This audit trail makes it possible to investigate incidents and reproduce decisions.

    How to assess whether the model actually works

    A high AUROC is not enough. For relatively rare events, a model may have good discrimination and still generate too many alerts.

    The minimum metrics are:

    • sensitivity: proportion of events identified;
    • specificity: proportion of non-events correctly ruled out;
    • positive predictive value: how many alerts correspond to events;
    • AUPRC: performance while accounting for class imbalance;
    • calibration: agreement between predicted risk and observed frequency;
    • useful lead time: time between the alert and clinical recognition;
    • alerts per bed/day: an operational measure of alert fatigue;
    • response time: interval until an assessment or action is recorded.

    The training and test split must be performed by patient and, preferably, by time period. Mixing admissions from the same patient or records that are temporally close can cause leakage.

    The recommended validation takes place at three levels:

    1. Retrospective: measures performance using local historical data.
    2. Silent: runs the model in production without alerting the team.
    3. Prospective: assesses safety, adherence, operational burden, and outcomes in the actual workflow.

    Whenever possible, external validation should include another unit or hospital. A model trained on one population may lose calibration when faced with different protocols, equipment, and epidemiological profiles.

    From a score to an actionable clinical alert

    Displaying only “sepsis risk: 78%” provides little guidance. A better alert reports the trend, time horizon, and primary evidence—for example, a drop in mean arterial pressure, increased lactate, and worsening kidney function over the last six hours.

    The hospital must define:

    • who receives each alert;
    • through which channel and at what priority;
    • the expected time frame for assessment;
    • the associated protocol;
    • conditions for silencing or repeating the alert;
    • how agreement, disagreement, and actions taken are recorded.

    A low threshold increases sensitivity but also increases false positives. A high threshold reduces interruptions but may miss cases. One alternative is to adopt risk levels: monitoring, priority assessment, and critical escalation.

    The model should not prescribe antibiotics, indicate catheterization, or confirm pneumonia without professional assessment. Its role is to prioritize attention and provide context for decision-making.

    Security, LGPD, and clinical governance

    Health data is sensitive personal data under the LGPD. The project must implement a defined purpose, access control, encryption, operation logs, appropriate retention, and segregation between environments.

    It is also necessary to monitor:

    • performance degradation over time;
    • changes in event frequency;
    • increases in missing data;
    • differences between units and population groups;
    • changes in equipment or protocols;
    • integration failures and message delays.

    Model updates require approval, versioning, and rollback capability. Automatically retraining in production without clinical review may incorporate operational errors or temporary changes.

    Checklist before putting AI into production

    • [ ] Are the clinical event and prediction window defined?
    • [ ] Have the labels been reviewed by healthcare professionals?
    • [ ] Is there explicit prevention of temporal leakage?
    • [ ] Has performance been validated using recent local data?
    • [ ] Has calibration been verified by unit and population?
    • [ ] Is the expected number of alerts per shift acceptable?
    • [ ] Is there a protocol for responding to and documenting the alert?
    • [ ] Are all predictions auditable?
    • [ ] Is there a contingency plan for unavailability?
    • [ ] Have privacy, security, and responsibilities been formalized?

    How Predictor Solutions addresses this

    Predictor Solutions develops Predictor AI Hospitals, focused on predicting sepsis, heart attack, and pneumonia in ICUs. The implementation combines hospital data engineering, HL7 v2 and FHIR integration, temporal models, monitoring dashboards, versioned APIs, and performance monitoring.

    The work begins with the clinical definition of the event and the mapping of data sources. Auditable pipelines are then built, retrospective validation is performed, and a silent phase is carried out before any patient care alerts are issued. The model is treated as a decision-support component, not as a replacement for healthcare professionals.

    Predictor Solutions is a software house based in Lavras, Minas Gerais, Brazil, specializing in applied AI, healthcare systems, data engineering, cloud/DevOps, and security. Across its general portfolio, it has served 9 medium-sized and large companies, with reported aggregate results of R$ 1.32 million in average savings per client per year, an average productivity increase of 70%, and profit growth of 43% in six months; these figures do not represent clinical metrics for Predictor AI Hospitals.

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

    Frequently asked questions

    How can AI predict sepsis before the clinical diagnosis?

    AI identifies combinations and trends in vital signs, laboratory tests, medications, and the patient’s clinical course that may appear before sepsis is formally recognized. It calculates risk within a window, such as 6 or 12 hours, but the alert must be confirmed by the clinical team.

    Can an AI system diagnose a heart attack on its own in the ICU?

    It should not. Elevated troponin can indicate different types of myocardial injury, and a heart attack diagnosis also depends on evidence of ischemia, symptoms, an electrocardiogram, imaging, and medical assessment. AI serves to prioritize patients and highlight relevant changes.

    Which hospital systems need to be integrated to predict pneumonia?

    The electronic health record, laboratory, prescription system, monitors, ventilators, and, when necessary, PACS or imaging reports are typically integrated. HL7 v2 and FHIR help transport and standardize this data, but codes, units, and timestamps still need to be reconciled.

    How can we determine whether a clinical prediction model is safe for production?

    It must undergo local retrospective validation, silent operation, and prospective assessment of the care workflow. In addition to sensitivity and AUROC, it is necessary to measure calibration, positive predictive value, useful lead time, alerts per bed, and the impact on clinical routines.

    Does hospital AI need to comply with the LGPD?

    Yes. Health data is sensitive personal data and requires a defined purpose, access control, encryption, traceability, and appropriate retention. Governance must also specify who is responsible for alerts, model updates, and incident investigations.

    Keep reading