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
@@ -0,0 +1,11 @@
namespace VigilCare.ClinicalContracts.Sync;
public record ClinicalSyncBatchRequest(
Guid BatchReference,
Guid GatewayId,
Guid SiteId,
DateTimeOffset CapturedAtUtc,
IReadOnlyList<SyncedObservation> Observations,
IReadOnlyList<SyncedAlertEvent> AlertEvents,
IReadOnlyList<SyncedAlertAcknowledgment> AlertAcknowledgments,
IReadOnlyList<SyncedAlertResolution> AlertResolutions);
@@ -0,0 +1,4 @@
public record GatewayHeartbeatRequest(
string Status, // ONLINE | DEGRADED | OFFLINE
int BufferDepth,
DateTimeOffset ReportedAtUtc);
@@ -0,0 +1,6 @@
public record SyncedAlertAcknowledgment(
Guid ClientRef,
Guid ClientAlertId,
string ClinicianId,
DateTimeOffset AcknowledgedAt,
string? Note);
@@ -0,0 +1,7 @@
public record SyncedAlertEvent(
Guid ClientAlertId,
Guid EncounterId,
string AlertType,
string Severity,
string Details,
DateTimeOffset GeneratedAt);
@@ -0,0 +1,6 @@
public record SyncedAlertResolution(
Guid ClientRef,
Guid ClientAlertId,
string ClinicianId,
DateTimeOffset ResolvedAt,
string? Note);
@@ -0,0 +1,9 @@
public record SyncedObservation(
Guid ClientRef,
string IdempotencyKey,
Guid EncounterId,
string ObservationCode,
decimal Value,
string? Unit,
string Source,
DateTimeOffset RecordedAt);