xiaohongshu
xiaohongshu
apsiii-score
Calculate APACHE III (Acute Physiology Score III) for ICU patients in MIMIC-IV. Use for mortality prediction, severity stratification, case-mix adjustment, or risk-adjusted outcome comparisons.
Full skill instructions
The Acute Physiology Score III (APS III) is the physiological component of APACHE III. It measures patient severity of illness on the first day of ICU stay and provides hospital mortality probability estimates.
The APS III uses the worst values from the first 24 hours of ICU stay:
SELECT
subject_id,
hadm_id,
stay_id,
apsiii,
apsiii_prob, -- Predicted hospital mortality probability
hr_score,
mbp_score,
temp_score,
resp_rate_score,
pao2_aado2_score,
hematocrit_score,
wbc_score,
creatinine_score,
uo_score,
bun_score,
sodium_score,
albumin_score,
bilirubin_score,
glucose_score,
acidbase_score,
gcs_score
FROM mimiciv_derived.apsiii;
Worst Value Definition: "Worst" means furthest from a predefined normal reference value, not simply min or max. For example:
Acute Renal Failure (ARF) Modifier: ARF is defined as:
Ventilation Interaction:
pH/PaCO2 Interaction: The acid-base score requires both pH and PaCO2 together - different combinations yield different scores.
GCS Scoring: Complex interaction matrix between eye, verbal, and motor scores. Sedated/intubated patients default to normal (score 0).
Temperature: Axillary measurements should theoretically be increased by 1 degree, but this is not implemented.
Mortality Probability: Calculated using logistic regression:
apsiii_prob = 1 / (1 + exp(-(-4.4360 + 0.04726 * apsiii)))
SELECT
CASE
WHEN apsiii < 30 THEN 'Low (<30)'
WHEN apsiii < 60 THEN 'Moderate (30-59)'
WHEN apsiii < 90 THEN 'High (60-89)'
ELSE 'Very High (>=90)'
END AS severity_category,
COUNT(*) AS n_patients,
ROUND(AVG(apsiii_prob), 3) AS avg_predicted_mortality
FROM mimiciv_derived.apsiii
GROUP BY 1
ORDER BY 1;
SELECT
ROUND(apsiii_prob, 1) AS predicted_mortality_decile,
COUNT(*) AS n_patients,
SUM(adm.hospital_expire_flag) AS actual_deaths,
ROUND(AVG(adm.hospital_expire_flag), 3) AS observed_mortality
FROM mimiciv_derived.apsiii a
INNER JOIN mimiciv_hosp.admissions adm
ON a.hadm_id = adm.hadm_id
GROUP BY 1
ORDER BY 1;
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience