No SOFA trend chart or organ-system timeline
No GCS trend chart or component history
No qSOFA history view
This commit is contained in:
voltsrage
2026-06-23 18:00:43 +08:00
parent 729c19830c
commit 7751d6df06
30 changed files with 3866 additions and 41 deletions
@@ -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();
}
}