feature: qSOFA Scoring & Sepsis Bundle Compliance
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
public class SepsisAlertHandler
|
||||
{
|
||||
private readonly ISepsisBundleService _bundleService;
|
||||
private readonly ILogger<SepsisAlertHandler> _logger;
|
||||
|
||||
public SepsisAlertHandler(ISepsisBundleService bundleService, ILogger<SepsisAlertHandler> logger)
|
||||
{
|
||||
_bundleService = bundleService;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
public async Task OnSepsisAlertCreatedAsync(
|
||||
Guid encounterId, Guid alertId, AlertType alertType, CancellationToken ct)
|
||||
{
|
||||
var bundle = await _bundleService.TryCreateBundleAsync(encounterId, alertId, alertType, ct);
|
||||
|
||||
if (bundle is not null)
|
||||
_logger.LogInformation(
|
||||
"Sepsis bundle {BundleId} created for encounter {EncounterId} (trigger={AlertType})",
|
||||
bundle.Id, encounterId, alertType.ToDbString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user