feature: Observation Ingest, Synchronous Alert Detection, and Alert Lifecycle

This commit is contained in:
voltsrage
2026-06-16 21:05:06 +08:00
parent 882d4af3e6
commit de603df151
26 changed files with 1471 additions and 5 deletions
@@ -0,0 +1,16 @@
using Microsoft.EntityFrameworkCore;
public static class DbResetHelper
{
// Truncate all data between tests — faster than dropping and re-creating
// the database, and preserves the schema (migrations do not re-run).
public static async Task ResetAsync(AppDbContext db)
{
await db.Database.ExecuteSqlRawAsync(@"
TRUNCATE TABLE reconciliation_alerts, outbox_events, orders,
clinical_alerts, observations, encounters,
alert_thresholds, patients
RESTART IDENTITY CASCADE;
");
}
}