fix:
No SOFA trend chart or organ-system timeline No GCS trend chart or component history No qSOFA history view
This commit is contained in:
@@ -162,4 +162,25 @@ public class QsofaDetectorTests : IAsyncLifetime
|
||||
exists.Should().BeFalse("non-qSOFA codes must not create Redis state");
|
||||
}
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task CriteriaChange_PersistsEvaluationHistory()
|
||||
{
|
||||
using var scope = _fixture.Services.CreateScope();
|
||||
var detector = scope.ServiceProvider.GetRequiredService<QsofaDetector>();
|
||||
var db = scope.ServiceProvider.GetRequiredService<AppDbContext>();
|
||||
|
||||
await detector.ProcessObservationAsync(_encounterId, _patientId, "RESP_RATE", 24m);
|
||||
await detector.ProcessObservationAsync(_encounterId, _patientId, "SYSTOLIC_BP", 95m);
|
||||
|
||||
var evaluations = await db.QsofaEvaluations
|
||||
.Where(e => e.EncounterId == _encounterId)
|
||||
.OrderBy(e => e.EvaluatedAt)
|
||||
.ToListAsync();
|
||||
|
||||
evaluations.Should().HaveCount(2);
|
||||
evaluations[0].ActiveCriteria.Should().Be(1);
|
||||
evaluations[1].ActiveCriteria.Should().Be(2);
|
||||
evaluations[1].ScreenAlertFired.Should().BeTrue();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user