· 6 min read
Designing the Algorithmic ER Triage Queue: Why Rules Beat Complex ML for Initial Dispatch
- Architecture
- Node.js
- MySQL
When building intake software for emergency room triage, machine learning is often proposed as the default solution. When developing our Algorithmic ER Triage & Resource Dispatch System, we deliberately avoided predictive ML for initial intake, choosing deterministic rule-based scoring instead.
In acute clinical triage, predictability, explainability, and zero hallucination risk are strict requirements.
1. The Core Scoring Engine
Our triage score evaluates incoming patient vitals against standardized clinical thresholds:
- SpO2: Saturation below 90% immediately escalates the patient to CRITICAL.
- Heart Rate: Extremes (<45 bpm or >130 bpm) add significant priority weight.
- Systolic Blood Pressure: Hypotensive crisis (<85 mmHg) or hypertensive crisis (>190 mmHg) triggers immediate alerts.
export function calculateTriageTier(vitals) {
let score = 0;
// Respiratory check
if (vitals.spo2 < 90) score += 50;
else if (vitals.spo2 < 94) score += 20;
// Cardiovascular check
if (vitals.heartRate > 130 || vitals.heartRate < 45) score += 30;
else if (vitals.heartRate > 110) score += 10;
// Blood pressure check
if (vitals.systolicBP < 85 || vitals.systolicBP > 190) score += 25;
return {
score,
tier: score >= 50 ? 'CRITICAL' : score >= 20 ? 'URGENT' : 'STABLE',
requiresImmediateDoctor: score >= 50
};
}