feature: Ward Gateway Service (Local-First Clinical Path)

This commit is contained in:
voltsrage
2026-06-23 16:45:38 +08:00
parent d8e142fffe
commit 1bf8359097
100 changed files with 5474 additions and 4 deletions
@@ -0,0 +1,24 @@
using System.Text.Json;
public static class BufferedSyncWriter
{
public static void Enqueue(
GatewayDbContext db,
BufferedSyncItemType itemType,
object payload,
string idempotencyKey,
Guid encounterId,
DateTimeOffset recordedAt)
{
db.BufferedSyncItems.Add(new BufferedSyncItem
{
Id = Guid.NewGuid(),
ItemType = itemType,
Payload = JsonSerializer.Serialize(payload),
IdempotencyKey = idempotencyKey,
EncounterId = encounterId,
RecordedAt = recordedAt,
CreatedAt = DateTimeOffset.UtcNow
});
}
}