viewof patients = Inputs.range([10, 1000], {
value: 500,
step: 10,
label: "Number of Patients"
})
viewof realFallsPerDay = Inputs.range([0.5, 10], {
value: 2,
step: 0.5,
label: "Real Falls Per Day (across all patients)"
})
viewof nonFallEventsPerDay = Inputs.range([1000, 50000], {
value: 10000,
step: 1000,
label: "Non-Fall Events Per Day (sitting, bending, etc.)"
})
viewof sensitivity = Inputs.range([85, 99], {
value: 95,
step: 1,
label: "Detection Sensitivity (%)"
})
viewof specificity = Inputs.range([85, 99], {
value: 95,
step: 1,
label: "Detection Specificity (%)"
})
// Calculations
truePositives = realFallsPerDay * (sensitivity / 100)
falseNegatives = realFallsPerDay * (1 - sensitivity / 100)
trueNegatives = nonFallEventsPerDay * (specificity / 100)
falsePositives = nonFallEventsPerDay * (1 - specificity / 100)
totalAlerts = truePositives + falsePositives
falseAlarmRate = (falsePositives / totalAlerts) * 100
alertsPerCaregiver = totalAlerts / patients
ppv = (truePositives / totalAlerts) * 100
// Results display
html`<div style="background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 4px solid #E67E22; margin-top: 20px;">
<h4 style="color: #2C3E50; margin-top: 0;">Alert Fatigue Analysis Results</h4>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 15px; margin-top: 15px;">
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0; min-width: 0; overflow-wrap: anywhere;">
<div style="font-size: 0.85em; color: #7F8C8D; text-transform: uppercase; letter-spacing: 0.5px;">Total Daily Alerts</div>
<div style="font-size: 1.8em; font-weight: bold; color: #E67E22; margin-top: 5px;">${totalAlerts.toFixed(0)}</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">${alertsPerCaregiver.toFixed(1)} per patient</div>
</div>
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0; min-width: 0; overflow-wrap: anywhere;">
<div style="font-size: 0.85em; color: #7F8C8D; text-transform: uppercase; letter-spacing: 0.5px;">True Falls Detected</div>
<div style="font-size: 1.8em; font-weight: bold; color: #16A085; margin-top: 5px;">${truePositives.toFixed(1)}</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">Real events caught</div>
</div>
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0; min-width: 0; overflow-wrap: anywhere;">
<div style="font-size: 0.85em; color: #7F8C8D; text-transform: uppercase; letter-spacing: 0.5px;">False Alarms</div>
<div style="font-size: 1.8em; font-weight: bold; color: #E74C3C; margin-top: 5px;">${falsePositives.toFixed(0)}</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">${falseAlarmRate.toFixed(1)}% of alerts</div>
</div>
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0; min-width: 0; overflow-wrap: anywhere;">
<div style="font-size: 0.85em; color: #7F8C8D; text-transform: uppercase; letter-spacing: 0.5px;">Missed Falls</div>
<div style="font-size: 1.8em; font-weight: bold; color: #E74C3C; margin-top: 5px;">${falseNegatives.toFixed(1)}</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">Real falls not detected</div>
</div>
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0; min-width: 0; overflow-wrap: anywhere;">
<div style="font-size: 0.85em; color: #7F8C8D; text-transform: uppercase; letter-spacing: 0.5px;">Positive Predictive Value</div>
<div style="font-size: 1.8em; font-weight: bold; color: ${ppv >= 50 ? '#16A085' : '#E67E22'}; margin-top: 5px;">${ppv.toFixed(1)}%</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">Alert reliability</div>
</div>
<div style="background: white; padding: 15px; border-radius: 6px; border: 1px solid #e0e0e0; min-width: 0; overflow-wrap: anywhere;">
<div style="font-size: 0.85em; color: #7F8C8D; text-transform: uppercase; letter-spacing: 0.5px;">False Alarm Ratio</div>
<div style="font-size: 1.8em; font-weight: bold; color: #2C3E50; margin-top: 5px;">${(falsePositives / truePositives).toFixed(0)}:1</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">False:True alarms</div>
</div>
</div>
<div style="margin-top: 20px; padding: 12px; background: #fff3cd; border-radius: 6px; border: 1px solid #ffeeba;">
<strong style="color: #856404;">
Review daily alert volume against service capacity
</strong>
<div style="font-size: 0.9em; color: #856404; margin-top: 5px;">
${ppv >= 10 ?
'PPV above 10% means more than one in ten alerts are true falls, not that most alerts are actionable. Consider patient self-cancel to reduce false-alarm burden.' :
'PPV below 10% means fewer than 1 in 10 alerts are real falls. Review daily alert volume and improve specificity through multi-sensor fusion or personalized thresholds.'}
</div>
</div>
</div>`Alert Fatigue Analysis
Alert Fatigue Analysis
animation
applications
connected-health
Try Increase Detection Specificity (%) while keeping the event counts unchanged. Then press Calculate alerts.
Observe After pressing Calculate alerts, watch false alarms and positive predictive value as Detection Specificity (%) changes.
Explain Explain why Detection Specificity (%) affects false alarms when falls are rare after you press Calculate alerts.
Technical boundaries. Daily event counts and fixed sensitivity and specificity determine alerts. Number of patients changes alerts per patient, not total alerts.
Alert Fatigue Analysis
Calculate daily false alarm volume based on system accuracy and patient population scale.
Key Insight: The base rate problem means even 95% specificity produces overwhelming false alarms when falls are rare (2 per day vs 10,000 non-fall events). For this worked example, with 2 falls/day, 10,000 nonfall events/day and 95% sensitivity, PPV above 10% requires specificity above about 99.83%; present this as arithmetic, not a universal fusion threshold.