feature: NEWS2 Composite Scoring Engine

This commit is contained in:
voltsrage
2026-06-18 17:39:31 +08:00
parent c3fbc20ddc
commit e6f7989298
31 changed files with 3118 additions and 45 deletions
@@ -24,6 +24,11 @@ public sealed class ClinicalMetrics
"sirs_detections_total",
"Total SEPSIS_WARNING alerts generated by the sepsis detection engine.");
public readonly Counter News2ScoresTotal = Metrics.CreateCounter(
"news2_scores_total",
"Total NEWS2 scores computed, labeled by risk level.",
labelNames: new[] { "risk_level" });
// Incremented by EscalationWorkerService when it processes a message from
// alerts.escalation.queue. A rising escalations_total is the strongest operational
// signal that critical alerts are not being acknowledged by the attending physician.
@@ -44,6 +49,14 @@ public sealed class ClinicalMetrics
Buckets = new[] { 0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0 }
});
public readonly Histogram News2ScoringDuration = Metrics.CreateHistogram(
"news2_scoring_duration_seconds",
"Time to compute a NEWS2 score from Redis state.",
new HistogramConfiguration
{
Buckets = new[] { 0.001, 0.005, 0.01, 0.025, 0.05, 0.1 }
});
// --- Gauges (set by background collectors, not incremented inline) ---
// The most clinically significant panel. A non-zero value means a patient's