feature: Simulator Scenarios + Clinical Validation: SOFA/GCS
This commit is contained in:
@@ -53,7 +53,7 @@ public class SepsisRefactorTests : IAsyncLifetime
|
||||
await qsofa.ProcessObservationAsync(_encounterId, _patientId, "RESP_RATE", 22m);
|
||||
await qsofa.ProcessObservationAsync(_encounterId, _patientId, "WBC_K_UL", 15m);
|
||||
|
||||
(await db.ClinicalAlerts.CountAsync(a => a.AlertType == AlertType.SepsisWarning))
|
||||
(await db.ClinicalAlerts.CountAsync(a => a.AlertType == AlertTypeExtensions.FromDbString("SEPSIS_WARNING")))
|
||||
.Should().Be(0);
|
||||
}
|
||||
|
||||
@@ -124,20 +124,20 @@ public class SepsisRefactorTests : IAsyncLifetime
|
||||
db.ClinicalAlerts.Add(new ClinicalAlert
|
||||
{
|
||||
Id = Guid.NewGuid(), EncounterId = _encounterId, PatientId = _patientId,
|
||||
AlertType = AlertType.SepsisWarning, Severity = AlertSeverity.Critical,
|
||||
AlertType = AlertTypeExtensions.FromDbString("SEPSIS_WARNING"), Severity = AlertSeverity.Critical,
|
||||
Details = "Legacy SIRS alert", Status = AlertStatus.Resolved,
|
||||
TriggeredAt = DateTimeOffset.UtcNow.AddDays(-1)
|
||||
});
|
||||
await db.SaveChangesAsync();
|
||||
|
||||
var page = await alertService.ListByEncounterAsync(_encounterId, null, 1, 10);
|
||||
page.Items.Should().ContainSingle(a => a.AlertType == AlertType.SepsisWarning);
|
||||
page.Items.Should().ContainSingle(a => a.AlertType == AlertTypeExtensions.FromDbString("SEPSIS_WARNING"));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CannotCreateNewSepsisWarning()
|
||||
{
|
||||
var act = () => AlertCreationGuard.EnsureAllowed(AlertType.SepsisWarning);
|
||||
var act = () => AlertCreationGuard.EnsureAllowed(AlertTypeExtensions.FromDbString("SEPSIS_WARNING"));
|
||||
act.Should().Throw<InvalidOperationException>()
|
||||
.WithMessage("*deprecated*");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user