chore: necessary updates given the changes in the alert controller
This commit is contained in:
@@ -170,7 +170,8 @@ public sealed class SyncUploaderService : BackgroundService
|
||||
p.AlertType,
|
||||
p.Severity,
|
||||
p.Details,
|
||||
p.GeneratedAt);
|
||||
p.GeneratedAt,
|
||||
p.ExplanationJson);
|
||||
}
|
||||
|
||||
private static SyncedAlertAcknowledgment MapAck(BufferedSyncItem item)
|
||||
@@ -215,7 +216,8 @@ public sealed class SyncUploaderService : BackgroundService
|
||||
string AlertType,
|
||||
string Severity,
|
||||
string Details,
|
||||
DateTimeOffset GeneratedAt);
|
||||
DateTimeOffset GeneratedAt,
|
||||
string? ExplanationJson = null);
|
||||
|
||||
private sealed record BufferedAckPayload(
|
||||
Guid ClientRef,
|
||||
|
||||
@@ -65,6 +65,9 @@ public class LocalClinicalAlertConfiguration : IEntityTypeConfiguration<LocalCli
|
||||
builder.Property(a => a.ResolvedAt).HasColumnName("resolved_at");
|
||||
builder.Property(a => a.ClientAlertId).HasColumnName("client_alert_id").IsRequired();
|
||||
builder.Property(a => a.TriggeredAt).HasColumnName("triggered_at").HasDefaultValueSql("NOW()");
|
||||
builder.Property(a => a.ExplanationJson)
|
||||
.HasColumnName("explanation")
|
||||
.HasColumnType("jsonb");
|
||||
|
||||
builder.HasOne(a => a.Encounter)
|
||||
.WithMany(e => e.Alerts)
|
||||
|
||||
@@ -14,6 +14,7 @@ public class LocalClinicalAlert
|
||||
public DateTimeOffset? ResolvedAt { get; set; }
|
||||
public DateTimeOffset TriggeredAt { get; set; }
|
||||
public Guid ClientAlertId { get; set; }
|
||||
public string? ExplanationJson { get; set; }
|
||||
|
||||
public ReplicaEncounter Encounter { get; set; } = null!;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace VigilCare.WardGateway.Migrations;
|
||||
|
||||
public partial class AddLocalAlertExplanation : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "explanation",
|
||||
table: "clinical_alerts",
|
||||
type: "jsonb",
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "explanation",
|
||||
table: "clinical_alerts");
|
||||
}
|
||||
}
|
||||
@@ -140,6 +140,10 @@ namespace VigilCare.WardGateway.Migrations
|
||||
.HasColumnType("text")
|
||||
.HasColumnName("details");
|
||||
|
||||
b.Property<string>("ExplanationJson")
|
||||
.HasColumnType("jsonb")
|
||||
.HasColumnName("explanation");
|
||||
|
||||
b.Property<Guid>("EncounterId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("encounter_id");
|
||||
|
||||
Reference in New Issue
Block a user