hannesill/m4/sapsii-score

Claude Code and agent skill by hannesill/m4

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Calculate SAPS-II (Simplified Acute Physiology Score II) for ICU patients. Use for mortality prediction, severity assessment, or international ICU benchmarking.

Install

npx vskill@latest install hannesill/m4/sapsii-score

SKILL.md

The same SKILL.md was published earlier as 28sungmin/m4-add-skills/sapsii-score.

SAPS-II Score Calculation

The Simplified Acute Physiology Score II (SAPS-II) is a severity scoring system developed from a European/North American multicenter study. Calculated from the worst values in the first 24 hours of ICU stay.

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

  • Hospital mortality prediction
  • Severity stratification
  • International benchmarking (widely used in European ICUs)
  • Research cohort matching
  • Quality improvement initiatives

Score Components (First 24 Hours)

Use the worst value in the first 24 hours of ICU admission. When both low and high extremes can score, assign the score for the qualifying extreme with the highest SAPS-II point value. Missing components are scored as 0 in M4Bench.

ComponentValuePoints
Age, years< 400
Age, years40-597
Age, years60-6912
Age, years70-7415
Age, years75-7916
Age, years>= 8018
Heart rate, bpm< 4011
Heart rate, bpm40-692
Heart rate, bpm70-1190
Heart rate, bpm120-1594
Heart rate, bpm>= 1607
Systolic BP, mmHg< 7013
Systolic BP, mmHg70-995
Systolic BP, mmHg100-1990
Systolic BP, mmHg>= 2002
Temperature, deg C< 39.00
Temperature, deg C>= 39.03
PaO2/FiO2, if ventilated or CPAP/BiPAP< 10011
PaO2/FiO2, if ventilated or CPAP/BiPAP100-1999
PaO2/FiO2, if ventilated or CPAP/BiPAP>= 2006
PaO2/FiO2, not ventilated/CPAP/BiPAPAny value or missing0
Urine output, mL/day< 50011
Urine output, mL/day500-9994
Urine output, mL/day>= 10000
BUN, mg/dL< 280
BUN, mg/dL28-836
BUN, mg/dL>= 8410
WBC, x10^9/L< 1.012
WBC, x10^9/L1.0-19.90
WBC, x10^9/L>= 20.03
Potassium, mEq/L< 3.03
Potassium, mEq/L3.0-4.90
Potassium, mEq/L>= 5.03
Sodium, mEq/L< 1255
Sodium, mEq/L125-1440
Sodium, mEq/L>= 1451
Bicarbonate, mEq/L< 156
Bicarbonate, mEq/L15-193
Bicarbonate, mEq/L>= 200
Bilirubin, mg/dL< 4.00
Bilirubin, mg/dL4.0-5.94
Bilirubin, mg/dL>= 6.09
GCS< 3Treat as missing
GCS3-526
GCS6-813
GCS9-107
GCS11-135
GCS14-150
Chronic diseaseAIDS17
Chronic diseaseHematologic malignancy10
Chronic diseaseMetastatic cancer9
Chronic diseaseNone of the above0
Admission typeScheduled surgical0
Admission typeMedical6
Admission typeUnscheduled surgical8

Critical Implementation Notes

  1. PaO2/FiO2 Scoring: Only scored for patients on mechanical ventilation OR CPAP/BiPAP. Non-ventilated patients get 0 points for this component.
  1. Mortality Probability: Calculated using:

`` sapsii_prob = 1 / (1 + exp(-(-7.7631 + 0.0737*sapsii + 0.9971*ln(sapsii+1)))) `` This 1993 formula tends to overestimate mortality in modern ICU cohorts (calibration drift). Consider recalibration for contemporary populations.

  1. Time Window: Uses worst value from ICU admission to 24 hours after.

Dataset-Specific Implementation Notes

MIMIC-IV

MIMIC-IV implementation details:

  • Comorbidity Definitions (ICD-based):
  • AIDS: ICD-9 042-044, ICD-10 B20-B22, B24
  • Hematologic Malignancy: ICD-9 200xx-208xx, ICD-10 C81-C96
  • Metastatic Cancer: ICD-9 196x-199x, ICD-10 C77-C79, C800
  • Admission Type: Classified using admissions.admission_type (elective vs not) + surgical service flag from services table.
  • GCS Handling: GCS < 3 is treated as null (erroneous or tracheostomy). Sedated patients use pre-sedation GCS.

MIMIC-IV limitations:

  • Urine output is summed over available hours, not extrapolated to 24h. For stays <24h, this may overestimate severity.
  • Follow the MIT-LCP/mimic-code canonical component definitions.
eICU

For eICU, SAPS-II must be calculated from raw tables. 13 of 15 components are straightforward:

ComponenteICU Source
Agepatient.age (string; "> 89" for elderly)
Heart Rate, Systolic BP, Temperaturevitalperiodic / vitalaperiodic
PaO2, FiO2lab
Ventilation statusrespiratorycare / respiratorycharting
Urine Outputintakeoutput
BUN, WBC, K, Na, HCO3, Bilirubinlab (text labname, not numeric itemid)
GCSnursecharting

eICU limitations:

  • Comorbidities: The diagnosis table uses free-text diagnosisstring with variably populated icd9code across the 208 sites. ICD-based extraction (AIDS, hematologic malignancy, metastatic cancer) may have incomplete capture. Consider supplementing with pasthistory table or text matching on diagnosisstring.
  • Admission type: No direct elective/surgical classification as in MIMIC. Must approximate from patient.unitadmitsource and service fields.
  • Ventilation detection: Different logic than MIMIC — uses respiratorycare and respiratorycharting tables rather than procedural events.

References

  • Le Gall JR, Lemeshow S, Saulnier F. "A new Simplified Acute Physiology Score (SAPS II) based on a European/North American multicenter study." JAMA. 1993;270(24):2957-2963.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/hannesill/m4/sapsii-score/badge)](https://verified-skill.com/skills/hannesill/m4/sapsii-score)

Something wrong with this skill or its page? Tell us.