fix errors of Degraded Operations Visibility
This commit is contained in:
@@ -32,13 +32,14 @@ public class ClinicalRefactorEndToEndTests : IAsyncLifetime
|
||||
public async Task SofaProgressionScenario_EndToEnd()
|
||||
{
|
||||
var scenario = ScenarioReplayHelper.Load("sepsis-sofa-progression-01.json");
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(_client, scenario);
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(
|
||||
_client, scenario, _fixture.Services);
|
||||
|
||||
await ScenarioReplayHelper.WaitForAlertTypeAsync(
|
||||
_fixture.Services, encounterId, AlertType.QsofaScreen, TimeSpan.FromSeconds(30));
|
||||
_fixture.Services, encounterId, AlertType.QsofaScreen, TimeSpan.FromSeconds(60));
|
||||
|
||||
await ScenarioReplayHelper.WaitForAlertTypeAsync(
|
||||
_fixture.Services, encounterId, AlertType.SofaSepsis, TimeSpan.FromSeconds(30));
|
||||
_fixture.Services, encounterId, AlertType.SofaSepsis, TimeSpan.FromSeconds(60));
|
||||
|
||||
SepsisBundle? bundle = null;
|
||||
var deadline = DateTime.UtcNow + TimeSpan.FromSeconds(10);
|
||||
@@ -58,13 +59,14 @@ public class ClinicalRefactorEndToEndTests : IAsyncLifetime
|
||||
public async Task GcsDeclineScenario_EndToEnd()
|
||||
{
|
||||
var scenario = ScenarioReplayHelper.Load("neurological-decline-gcs-01.json");
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(_client, scenario);
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(
|
||||
_client, scenario, _fixture.Services);
|
||||
|
||||
await ScenarioReplayHelper.WaitForAlertTypeAsync(
|
||||
_fixture.Services, encounterId, AlertType.GcsWarning, TimeSpan.FromSeconds(30));
|
||||
_fixture.Services, encounterId, AlertType.GcsWarning, TimeSpan.FromSeconds(60));
|
||||
|
||||
await ScenarioReplayHelper.WaitForAlertTypeAsync(
|
||||
_fixture.Services, encounterId, AlertType.GcsCritical, TimeSpan.FromSeconds(30));
|
||||
_fixture.Services, encounterId, AlertType.GcsCritical, TimeSpan.FromSeconds(60));
|
||||
|
||||
await ScenarioReplayHelper.AssertNoAlertTypeAsync(
|
||||
_fixture.Services, encounterId, AlertType.SofaSepsis, TimeSpan.FromSeconds(5));
|
||||
@@ -77,11 +79,12 @@ public class ClinicalRefactorEndToEndTests : IAsyncLifetime
|
||||
public async Task PartialSofaScenario_StalenessFlags()
|
||||
{
|
||||
var scenario = ScenarioReplayHelper.Load("sofa-partial-spo2-fallback-01.json");
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(_client, scenario);
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(
|
||||
_client, scenario, _fixture.Services);
|
||||
|
||||
var jsonOpts = new JsonSerializerOptions { PropertyNameCaseInsensitive = true };
|
||||
var sofa = await ScenarioReplayHelper.WaitForSofaScoreAsync(
|
||||
_fixture.Services, encounterId, TimeSpan.FromSeconds(45),
|
||||
_fixture.Services, encounterId, TimeSpan.FromSeconds(60),
|
||||
s =>
|
||||
{
|
||||
if (string.IsNullOrEmpty(s.StalenessFlags)) return false;
|
||||
@@ -113,10 +116,11 @@ public class ClinicalRefactorEndToEndTests : IAsyncLifetime
|
||||
public async Task UtiSepsisScenario_NowUsesSofa()
|
||||
{
|
||||
var scenario = ScenarioReplayHelper.Load("uti-sepsis-elderly-01.json");
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(_client, scenario);
|
||||
var (_, encounterId) = await ScenarioReplayHelper.ReplayObservationsAsync(
|
||||
_client, scenario, _fixture.Services);
|
||||
|
||||
await ScenarioReplayHelper.WaitForAlertTypeAsync(
|
||||
_fixture.Services, encounterId, AlertType.SofaSepsis, TimeSpan.FromSeconds(45));
|
||||
_fixture.Services, encounterId, AlertType.SofaSepsis, TimeSpan.FromSeconds(60));
|
||||
|
||||
await ScenarioReplayHelper.AssertNoAlertTypeAsync(
|
||||
_fixture.Services, encounterId, AlertTypeExtensions.FromDbString("SEPSIS_WARNING"), TimeSpan.FromSeconds(5));
|
||||
|
||||
Reference in New Issue
Block a user