feature: Sepsis Engine Refactor: Remove SIRS, Rewire qSOFA + Bundle
Frontend: GCS Entry, SOFA Display, Sepsis UI Refactor
This commit is contained in:
@@ -276,6 +276,8 @@ public class SofaDetector
|
||||
return false;
|
||||
}
|
||||
|
||||
AlertCreationGuard.EnsureAllowed(alertType);
|
||||
|
||||
using var scope = _services.CreateScope();
|
||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||
|
||||
@@ -332,6 +334,12 @@ public class SofaDetector
|
||||
await db.SaveChangesAsync(ct);
|
||||
await tx.CommitAsync(ct);
|
||||
|
||||
if (alertType == AlertType.SofaSepsis)
|
||||
{
|
||||
var handler = _services.GetRequiredService<SepsisAlertHandler>();
|
||||
await handler.OnSepsisAlertCreatedAsync(encounterId, alertId, alertType, ct);
|
||||
}
|
||||
|
||||
_metrics.ClinicalAlertsTotal
|
||||
.WithLabels(alertType.ToDbString(), severity.ToDbString()).Inc();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user