Clinical Sync Batch Engine: first commit

This commit is contained in:
voltsrage
2026-06-23 03:02:30 +08:00
parent 90b8baa2a1
commit c9994b1ba2
60 changed files with 3547 additions and 31 deletions
@@ -12,6 +12,10 @@ public static class DbResetHelper
{
await db.Database.ExecuteSqlRawAsync(@"
DELETE FROM phi_access_logs;
DELETE FROM clinical_sync_conflicts;
DELETE FROM clinical_sync_batches;
DELETE FROM ward_gateways;
DELETE FROM clinical_sites;
DELETE FROM medication_administrations;
DELETE FROM sepsis_bundle_elements;
DELETE FROM sepsis_bundles;
@@ -0,0 +1,13 @@
public static class GatewayAuthHelper
{
public const string DevGatewayKey = "dev-gateway-key-change-in-production";
public static void WithGatewayApiKey(
this HttpClient client, Guid gatewayId, string? apiKey = null)
{
client.DefaultRequestHeaders.Remove("X-Api-Key");
client.DefaultRequestHeaders.Remove("X-Gateway-Id");
client.DefaultRequestHeaders.Add("X-Api-Key", apiKey ?? DevGatewayKey);
client.DefaultRequestHeaders.Add("X-Gateway-Id", gatewayId.ToString());
}
}