Add remain services and fixes

This commit is contained in:
voltsrage
2026-06-18 23:33:39 +08:00
parent 4b46c09f90
commit e2d40331b7
9 changed files with 291 additions and 40 deletions
@@ -101,8 +101,7 @@ public class SirsDetectorTests : IAsyncLifetime
alert.PatientId.Should().Be(_patientId);
// Verify outbox event was written in the same transaction
var outbox = await db.OutboxEvents.SingleAsync();
outbox.Topic.Should().Be("alert.generated");
var outbox = await db.OutboxEvents.SingleAsync(e => e.Topic == "alert.generated");
outbox.PartitionKey.Should().Be(_encounterId.ToString());
}
@@ -189,7 +188,7 @@ public class SirsDetectorTests : IAsyncLifetime
var alertCount = await db.ClinicalAlerts.CountAsync();
alertCount.Should().Be(1, "WHERE NOT EXISTS prevents duplicate alert on redelivery");
var outboxCount = await db.OutboxEvents.CountAsync();
var outboxCount = await db.OutboxEvents.CountAsync(e => e.Topic == "alert.generated");
outboxCount.Should().Be(1, "outbox event must be written exactly once");
}