Fix issues with initial seeding
This commit is contained in:
@@ -92,6 +92,10 @@ public static class DataSeeder
|
|||||||
db.Observations.AddRange(observations);
|
db.Observations.AddRange(observations);
|
||||||
|
|
||||||
await db.SaveChangesAsync();
|
await db.SaveChangesAsync();
|
||||||
|
|
||||||
|
await db.Database.ExecuteSqlRawAsync(
|
||||||
|
"SELECT setval('mrn_seq', COALESCE((SELECT MAX(CAST(SUBSTRING(mrn FROM 5) AS bigint)) FROM patients WHERE mrn ~ '^MRN-[0-9]+$'), 0))");
|
||||||
|
|
||||||
await CacheThresholdsAsync(redis, thresholds);
|
await CacheThresholdsAsync(redis, thresholds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user