sofa-score
/sofa-score
Oblicza wynik SOFA (Sequential Organ Failure Assessment) u pacjentów OIOM do oceny ciężkości sepsy, dysfunkcji narządów i kryteriów Sepsis-3.
- Autor
- hannesill ↗
- Repozytorium
- m4 ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 22.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 22.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Oblicza wynik SOFA (Sequential Organ Failure Assessment) u pacjentów OIOM do oceny ciężkości sepsy, dysfunkcji narządów i kryteriów Sepsis-3.
Oryginalny opis (EN)
Calculate SOFA (Sequential Organ Failure Assessment) score for ICU patients. Use for sepsis severity assessment, organ dysfunction quantification, mortality prediction, or Sepsis-3 criteria evaluation.
Jak działa
- M4Bench Use
- When to Use This Skill
- Components and Scoring
- Required Tables for Custom Calculation
- Critical Implementation Notes
- References
Podgląd SKILL.md
---
name: sofa-score
description: Calculate SOFA (Sequential Organ Failure Assessment) score for ICU patients. Use for sepsis severity assessment, organ dysfunction quantification, mortality prediction, or Sepsis-3 criteria evaluation.
tier: validated
category: clinical
---
# SOFA Score Calculation
The Sequential Organ Failure Assessment (SOFA) score quantifies organ dysfunction across 6 systems. Each component scores 0-4, with a total range of 0-24. Higher scores indicate greater organ dysfunction.
## M4Bench Use
In M4Bench, target concept tables listed in the task configuration are removed or unavailable in the agent database. Use this skill as procedural guidance and derive the requested output from available source or intermediate tables; do not rely on a precomputed target table or bundled SQL script.
## When to Use This Skill
- User asks about SOFA score calculation
- Sepsis-3 criteria assessment (SOFA >= 2 indicates organ dysfunction)
- Mortality prediction or severity stratification
- Comparing organ dysfunction between cohorts
- Calculating delta-SOFA (change from baseline)
## Components and Scoring
| System | 0 | 1 | 2 | 3 | 4 |
|--------|---|---|---|---|---|
| **Respiration** (PaO2/FiO2 mmHg) | >= 400 | < 400 | < 300 | < 200 + respiratory support | < 100 + respiratory support |
| **Coagulation** (Platelets x10^3/uL) | >= 150 | < 150 | < 100 | < 50 | < 20 |
| **Liver** (Bilirubin mg/dL) | < 1.2 | 1.2-1.9 | 2.0-5.9 | 6.0-11.9 | >= 12.0 |
| **Cardiovascular** | No hypotension | MAP < 70 | Dopa <= 5 or Dob | Dopa > 5 or Epi <= 0.1 or Norepi <= 0.1 | Dopa > 15 or Epi > 0.1 or Norepi > 0.1 |
| **CNS** (GCS) | 15 | 13-14 | 10-12 | 6-9 | < 6 |
| **Renal** (Creatinine mg/dL or UO) | < 1.2 | 1.2-1.9 | 2.0-3.4 | 3.5-4.9 or UO < 500 | >= 5.0 or UO < 200 |
Note: Vasopressor doses are in mcg/kg/min. UO is urine output in mL/day.
## Required Tables for Custom Calculation
- `mimiciv_icu.icustays` - ICU stay identifiers
- `mimiciv_derived.bg` - Blood gas for PaO2/FiO2 (specimen = 'ART.')
- `mimiciv_derived.chemistry` - Creatinine
- `mimiciv_derived.enzyme` - Bilirubin
- `mimiciv_derived.complete_blood_count` - Platelets
- `mimiciv_derived.gcs` - Glasgow Coma Scale
- `mimiciv_derived.urine_output_rate` - Daily urine output
- `mimiciv_derived.ventilation` - Ventilation status
- `mimiciv_derived.norepinephrine`, `epinephrine`, `dopamine`, `dobutamine` - Vasopressors
## Critical Implementation Notes
1. **Time Window**: The score uses the worst value in a 24-hour rolling window. SOFA calculated at hour 24 uses data from hours 0-24.
2. **Respiratory Score**: Requires interaction between PaO2/FiO2 ratio AND ventilation status:
- Scores of 3 or 4 require mechanical ventilation
- The lowest PaO2/FiO2 is tracked separately for ventilated vs non-ventilated periods
- Important: The original SOFA publication does not explicitly define "respiratory support." In our SQL implementation, we define it as invasive mechanical ventilation only (vd.ventilation_status = 'InvasiveVent'). If you wish to include non-invasive ventilation (e.g., CPAP, BiPAP), modify the filter to: vd.ventilation_status IN ('InvasiveVent', 'NonInvasiveVent').
3. **FiO2 Sources**: FiO2 can come from blood gas measurement OR charted FiO2. When not documented, estimate from supplemental O2 device.
4. **Vasopressor Units**: All vasopressor doses must be in mcg/kg/min. Weight is often estimated (check `mimiciv_derived.weight_durations`).
5. **GCS in Sedated Patients**: For sedated/intubated patients, use pre-sedation GCS or assume normal (GCS=15). The verbal component may be 0 for intubated patients - this is handled specially.
6. **Arterial Blood Gas**: Use only arterial specimens (`specimen = 'ART.'`) for PaO2/FiO2.
7. **Missing Components**: Missing data is imputed as 0 (normal) in the final score. Document which components are missing; do not claim complete scores when data is absent. If you prefer to treat missing data as NA rather than 0, you will need to modify the SQL (remove the COALESCE(..., 0) wrapper). Statistically, it is more appropriate to treat missing values as missing and calculate SOFA scores after proper imputation.
8. **Urine Output Calculation**: Uses `uo_tm_24hr` to verify 24 hours of data available before calculating rate.
## References
- Vincent JL et al. "The SOFA (Sepsis-related Organ Failure Assessment) score to describe organ dysfunction/failure." Intensive Care Medicine. 1996;24(7):707-710.
- Vincent JL et al. Use of the SOFA score to assess the incidence of organ dysfunction/failure in intensive care units: results of a multicenter, prospective study. Working group on "sepsis-related problems" of the European Society of Intensive Care Medicine. Crit Care Med. 1998 Nov;26(11):1793-800.
- Singer M et al. "The Third International Consensus Definitions for Sepsis and Septic Shock (Sepsis-3)." JAMA. 2016;315(8):801-810.
Wersje
| Repozytorium | Wynik | Licencja |
|---|---|---|
| Ta strona · hannesill/m4 | 90 | MIT |
| hannesill/m4 | 100 | MIT |
| hannesill/m4 | 90 | MIT |
Migawka bazy z 28.10.2026 · wersja paczki 6d3f3c10997c (skrót SHA-256 całej paczki)
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100lods-score
Oblicza wskaźnik LODS (Logistic Organ Dysfunction Score) dla pacjentów OIOM do oceny dysfunkcji narządów w sześciu układach z ważoną punktacją. - 100sepsis-3-cohort
Identyfikuje pacjentów z sepsą według konsensusowej definicji Sepsis-3 (SOFA co najmniej 2 i podejrzenie zakażenia) w badaniach kohortowych, badaniach wyników i metrykach jakości. - 90review-dialysis-organ-replacement
Przegląda pakiet dowodowy o temacie „dializa i zastępowanie funkcji narządów” i tworzy rejestr ustaleń powiązanych ze źródłami, z mianownikami i jawną listą odmów, bez rozstrzygania wyniku. - 96scienceclaw-benchmark-for42
Wyznacza alarmy posocznicy godzina po godzinie dla danych z oddziału intensywnej terapii i ocenia je klinicznie. - 100sofa-search
Przeszukuje Stack Overflow dla agentów (SOFA) w poszukiwaniu zweryfikowanego rozwiązania, zanim agent zacznie rozwiązywać problem od zera.