top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Decoding ICU Risk: A Deep Dive into MOD Score Analysis and Radial Visualizations

Jan 13
4 min read

In this blog, I want to pull back the curtain on a challenging experience: Staging a raw healthcare dataset in PostgreSQL. In the high-stakes environment of the Intensive Care Unit (ICU), data isn’t just a collection of numbers — it’s a living narrative of patient survival. As data analysts in the healthcare space, our challenge is to transform thousands of rows of fragmented, hourly physiological data into a clear, actionable story.


In my latest project, I tackled the Multiple Organ Dysfunction (MOD) Score. The goal? To move beyond simple spreadsheets and create an Advanced Radial Mortality Chart that helps clinicians visualize risk distribution at a glance. Here is the journey of how I built it, the hurdles I faced, and the logic that powered it.


🔍 The Clinical Significance: Why MOD Scores?

Before touching the data, we must understand the clinical context. The MOD Score is a composite metric. It doesn’t just look at a single organ; it quantifies the severity of dysfunction across six organ systems: respiratory, renal, liver, hematologic, cardiovascular, and neurologic.


While the SOFA (Sequential Organ Failure Assessment) score is a more modern standard, the MOD score remains a powerhouse for longitudinal analysis. It tracks the progression from SIRS (Systemic Inflammatory Response Syndrome) to severe sepsis and, finally, MODS. In our analysis, we mapped these scores to specific mortality probabilities — ranging from a 7% risk at low scores to a near-certain 100% risk at the highest levels.


🚧 The Analytical Hurdles: Dealing with “Dirty” ICU Data

Analyzing ICU data is notoriously difficult due to its granularity. Here were the three primary challenges I faced:]


1. The Granularity Trap

MOD scores are recorded hourly. If a patient is in the ICU for ten days, they have 240 rows of data. If you simply average these scores, you “wash out” the severity. A patient who was stable for nine days but had a catastrophic organ failure on day ten might show a “low” average, even though their mortality risk was peaking.


2. The Logic of “Peak Severity”

Clinically, a patient’s risk is defined by their worst physiological state. To capture this, I had to ensure my analysis looked for the maximum score during the entire stay, not the most recent one or the mean.


3. Defining Clinical Thresholds

I had to strike a balance between clinical nuance and visual clarity. Using literature reviews and PhysioNet documentation, I grouped scores into six distinct “Mortality Bands” (7%, 16%, 50%, 80%, 90%, and 100%). This required ensuring there were no gaps or overlaps in the logic that could lead to misclassification.


🧮 The Technical Solution: Mastering the FIXED LOD

To solve the granularity trap, I turned to Tableau’s Level of Detail (LOD) expressions. By using a FIXED expression, I told Tableau to “ignore” the hourly rows and focus strictly on the individual patient.

The Calculation Logic:

Code snippet

// Mortality Risk Banding Logic

{ FIXED [Patient ID] :

IF MAX([mod_score]) <= 4 THEN “7%”

ELSEIF MAX([mod_score]) <= 8 THEN “16%”

ELSEIF MAX([mod_score]) <= 12 THEN “50%”

ELSEIF MAX([mod_score]) <= 16 THEN “80%”

ELSEIF MAX([mod_score]) <= 20 THEN “90%”

ELSE “100%”

END

}

This formula is the engine of the dashboard. It ensures that even if we filter the data by date or department, the patient remains in their “Peak Risk” category.


🌀 Designing the Advanced Radial Chart

I chose a Radial Chart over a standard bar chart to create a “Target” effect. In a radial layout, the inner rings represent lower risk, while the outer, more expansive rings represent escalating danger.


How to Build the Geometry:

Creating this in Tableau requires a bit of high school trigonometry. Since Tableau doesn’t have a “Radial” button, you have to plot the points manually on an X and Y axis using:


Step-by-Step Reconstruction of Your Chart

1. Data Densification (The “Path” Bin)

To draw a circle in Tableau, you need more than one data point.

  • You likely created a calculated field called Path (ranging from 0 to 270 or 360).

  • As seen in your Marks Card, you have Path (bin). This tells Tableau to create "dummy" points between your start and end values to draw a smooth, continuous line rather than just dots.


2. Mathematical Calculations (The X and Y Axes)

In your Columns and Rows, you have pills named D and C. These are likely your X and Y coordinates. In a radial chart, these are usually calculated using Sine and Cosine:

  • X-Axis (D): SIN(RADIANS([Index])) * [Value]

  •  

  • Y-Axis (C): COS(RADIANS([Index])) * [Value]

  • The Index is based on the Path (bin) to determine the position around the circle.


3. Defining the Marks

  • Shape: You selected Shape from the Marks dropdown.

  • Color: You dragged mortalityrate1 to the Color shelf. This creates the distinct blue, orange, and red colors for each ring.

  • Size: You dragged mortalityrate1 to the Size shelf as well. This is why the orange and red rings appear thicker than the Blue one—the thickness is tied to the mortality rate percentage.


4. Adding the Labels

  • You used a calculated field CNTD(Patient ..) (Count Distinct of Patients) on the Label shelf.

  • This is why the numbers 39,301, 908, and 127 appear at the top of their respective rings, representing the total patient count for each mortality bracket.


5. The Legend and Formatting

  • On the right, your legend shows three categories: 16% (Blue), 50% (Orange), and 80% (Red).

  • By placing these on the same view, Tableau stacks them concentrically because the “Radius” in your calculations is likely tied to these percentage values.


This math creates concentric layers. I then applied a color-coded system: Cool Blues for the 7% and 16% bands, shifting to Warning Oranges and Urgent Reds for the 80%+ bands. This creates an immediate psychological cue for the viewer.


✅ Why This Matters: From Data to Action

This chart isn’t just about “pretty” data; it’s a clinical tool. By visualizing the population this way, hospital leadership can:

  • Allocate Resources: If a specific wing has a high concentration of patients in the 80% band, staffing and “Rapid Response Teams” can be shifted accordingly.

  • Predict Outcomes: This feature enables a comparison between predicted mortality (represented by the bands) and actual outcomes, thereby validating the quality of care.

  • Simplify Complexity: It takes a complex composite score (MOD) and turns it into a language stakeholders understand: Risk Percentage.


Final Thoughts

Data science in healthcare is at its most powerful when it bridges the gap between the server room and the bedside. By using advanced LOD expressions and creative visualizations, we can turn “raw noise” into a roadmap for saving lives.

 
 

+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page