viewof clinicalRequirement = Inputs.range([5, 30], {
value: 15,
step: 1,
label: "Clinical Response Requirement (minutes)"
})
viewof emsResponse = Inputs.range([3, 15], {
value: 8,
step: 0.5,
label: "Average EMS Response Time (minutes)"
})
viewof detectionTime = Inputs.range([1, 10], {
value: 5.1,
step: 0.1,
label: "Fall Detection Time (seconds)"
})
viewof notificationTime = Inputs.range([0.5, 5], {
value: 2.1,
step: 0.1,
label: "Notification Chain Time (seconds)"
})
// Calculations
totalLatency = detectionTime + notificationTime
availableMinutes = clinicalRequirement - emsResponse
availableSeconds = availableMinutes * 60
caregiverWindow = availableSeconds - totalLatency
caregiverMinutes = caregiverWindow / 60
safetyMargin = clinicalRequirement - emsResponse - (totalLatency / 60) - 5 // minutes left after the stated 5-minute alert cascade
safetyMarginPercent = (safetyMargin / clinicalRequirement) * 100
// Results display
html`<div style="background: #f8f9fa; padding: 20px; border-radius: 8px; border-left: 4px solid #16A085; margin-top: 20px;">
<h4 style="color: #2C3E50; margin-top: 0;">Alert Cascade Budget Results</h4>
<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 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 System Latency</div>
<div style="font-size: 1.8em; font-weight: bold; color: #E67E22; margin-top: 5px;">${totalLatency.toFixed(1)}s</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">Detection + Notification</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;">Caregiver Window</div>
<div style="font-size: 1.8em; font-weight: bold; color: #16A085; margin-top: 5px;">${caregiverMinutes.toFixed(1)} min</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">${caregiverWindow.toFixed(0)} seconds available</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;">Safety Margin</div>
<div style="font-size: 1.8em; font-weight: bold; color: ${safetyMarginPercent >= 10 ? '#16A085' : '#E74C3C'}; margin-top: 5px;">${safetyMargin.toFixed(1)} min</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">${safetyMarginPercent.toFixed(1)}% buffer</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;">Total Response Time</div>
<div style="font-size: 1.8em; font-weight: bold; color: #2C3E50; margin-top: 5px;">${(totalLatency/60 + 5 + emsResponse).toFixed(1)} min</div>
<div style="font-size: 0.8em; color: #7F8C8D; margin-top: 5px;">System + 5-minute alert cascade + EMS</div>
</div>
</div>
<div style="margin-top: 20px; padding: 12px; background: ${safetyMargin >= 0 ? '#d4edda' : '#f8d7da'}; border-radius: 6px; border: 1px solid ${safetyMargin >= 0 ? '#c3e6cb' : '#f5c6cb'};">
<strong style="color: ${safetyMargin >= 0 ? '#155724' : '#721c24'};">
${safetyMargin >= 0 ? 'OK: Stated cascade fits within the scenario target' : 'Warning: Stated cascade exceeds the scenario target'}
</strong>
<div style="font-size: 0.9em; color: ${safetyMargin >= 0 ? '#155724' : '#721c24'}; margin-top: 5px;">
${safetyMargin >= 0 ?
'Recommended cascade: 30s patient cancel → 3min primary caregiver → 5min auto-911' :
'Reduce detection latency or shorten the alert cascade so it fits the scenario target'}
</div>
</div>
</div>`Fall Detection Latency Budget
Fall Detection Latency Budget
animation
applications
connected-health
Try Increase Average EMS Response Time (minutes) while keeping the clinical response requirement unchanged. Then press Calculate latency budget.
Observe After pressing Calculate latency budget, watch caregiver window and safety margin as Average EMS Response Time (minutes) changes.
Explain Explain why fall detection Time (seconds) reduces the available caregiver window after you press Calculate latency budget.
Technical boundaries. Total response time adds detection, notification, a fixed 5-minute alert cascade, and average EMS response time. The safety margin compares this sum with the scenario target.
Fall Detection Latency Budget
Calculate your fall detection system’s alert cascade timing based on clinical requirements.
Key Insight: For a clinically effective system, aim for at least 5 minutes of caregiver window to allow graduated response. Less than 3 minutes forces aggressive auto-911 dispatch, increasing false alarm impact.