sofa-score

Calculate hourly SOFA scores from ICU data across six organ systems.

40|17|Updated Oct 27, 2025
One-click install
npx skills add https://github.com/hannesill/m4 --skill sofa-score
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sofa-score
Source: https://github.com/hannesill/m4/tree/main/src/m4/skills/clinical/sofa-score
Command: npx skills add https://github.com/hannesill/m4 --skill sofa-score

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

SOFA scoring quantifies organ dysfunction over time in ICU patients, enabling sepsis evaluation and prognosis.

Core Features & Use Cases

  • Hourly SOFA calculation across six organ systems using ICU data for time-resolved organ dysfunction.
  • Supports sepsis-3 criteria assessment, mortality risk stratification, and cross-patient comparisons.
  • Integrates arterial blood gases, labs, vitals, and vasopressor data to produce sofa_24hours with imputation for missing data.

Quick Start

Run the sofa.sql script against the MIMIC-derived ICU data to generate hourly SOFA scores.

Frequently Asked Questions about sofa-score

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I calculate SOFA scores for ICU patients using hourly data?

Calculate SOFA scores by running the sofa.sql script against MIMIC-derived ICU data to generate hourly organ dysfunction measurements across six organ systems. The script processes arterial blood gases, labs, vitals, and vasopressor data to output time-resolved sofa_24hours scores.

How does the SOFA score calculation handle missing ICU data and respiratory variables?

The SOFA score calculation handles missing ICU data by imputing it as zero. It resolves respiratory scores by distinguishing between ventilated and non-ventilated PaO2/FiO2 data, ensuring accurate organ dysfunction quantification even with incomplete patient records.

Can I use this SOFA scoring approach for sepsis-3 criteria assessment and mortality risk stratification?

Yes, this SOFA scoring approach supports sepsis-3 criteria assessment, mortality risk stratification, and cross-patient comparisons. It calculates time-resolved organ dysfunction using a 24-hour rolling window aggregation, enabling longitudinal sepsis evaluation and prognosis research.

What ICU data sources and formats are needed to compute SOFA scores for sepsis severity?

You need MIMIC-derived ICU data containing arterial blood gases, labs, vitals, and vasopressor information. The sofa.sql script runs against this relational data to compute hourly SOFA scores, requiring no additional dependencies beyond a SQL environment.

What is the best way to quantify organ dysfunction over time for cross-patient ICU comparisons?

Quantify organ dysfunction over time by applying a 24-hour rolling window aggregation to hourly ICU data. This produces standardized sofa_24hours scores across six organ systems, enabling reliable cross-patient comparisons and sepsis severity tracking.

Why does my SOFA score calculation not reflect ventilated patient respiratory dysfunction correctly?

SOFA score calculation resolves respiratory dysfunction by separating vent vs non-vent PaO2/FiO2 data. If your ICU data does not distinguish ventilated status, the respiratory component may be inaccurate. Ensure your input data includes ventilation indicators for correct scoring.