Run initial test for Climate Resilience Verification Suite
Add first part of Alert Quality Analytics
This commit is contained in:
@@ -21,6 +21,145 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
|
||||
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
|
||||
|
||||
modelBuilder.Entity("AlertFeedback", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("id")
|
||||
.HasDefaultValueSql("gen_random_uuid()");
|
||||
|
||||
b.Property<Guid>("AlertId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("alert_id");
|
||||
|
||||
b.Property<string>("Comment")
|
||||
.HasMaxLength(1000)
|
||||
.HasColumnType("character varying(1000)")
|
||||
.HasColumnName("comment");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_at")
|
||||
.HasDefaultValueSql("NOW()");
|
||||
|
||||
b.Property<string>("FeedbackType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("character varying(30)")
|
||||
.HasColumnName("feedback_type");
|
||||
|
||||
b.Property<Guid>("UserId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("user_id");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("AlertId");
|
||||
|
||||
b.HasIndex("FeedbackType");
|
||||
|
||||
b.HasIndex("AlertId", "UserId")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("alert_feedbacks", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AlertQualityMetric", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("id")
|
||||
.HasDefaultValueSql("gen_random_uuid()");
|
||||
|
||||
b.Property<int>("AcknowledgedCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("acknowledged_count");
|
||||
|
||||
b.Property<double>("AcknowledgementRate")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("acknowledgement_rate");
|
||||
|
||||
b.Property<string>("AlertType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)")
|
||||
.HasColumnName("alert_type");
|
||||
|
||||
b.Property<double>("AvgSecondsToAcknowledge")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("avg_seconds_to_acknowledge");
|
||||
|
||||
b.Property<double>("AvgSecondsToResolution")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("avg_seconds_to_resolution");
|
||||
|
||||
b.Property<DateTimeOffset>("ComputedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("computed_at")
|
||||
.HasDefaultValueSql("NOW()");
|
||||
|
||||
b.Property<int>("EscalatedCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("escalated_count");
|
||||
|
||||
b.Property<double>("FalsePositiveRate")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("false_positive_rate");
|
||||
|
||||
b.Property<int>("FeedbackCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("feedback_count");
|
||||
|
||||
b.Property<int>("FeedbackFalsePositiveCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("feedback_false_positive_count");
|
||||
|
||||
b.Property<int>("FeedbackUsefulCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("feedback_useful_count");
|
||||
|
||||
b.Property<int>("FeedbackWouldActCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("feedback_would_act_count");
|
||||
|
||||
b.Property<int>("ResolvedCount")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("resolved_count");
|
||||
|
||||
b.Property<int>("TotalAlerts")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("total_alerts");
|
||||
|
||||
b.Property<double>("UsefulRate")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("useful_rate");
|
||||
|
||||
b.Property<DateTimeOffset>("WindowEnd")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("window_end");
|
||||
|
||||
b.Property<DateTimeOffset>("WindowStart")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("window_start");
|
||||
|
||||
b.Property<double>("WouldActRate")
|
||||
.HasColumnType("double precision")
|
||||
.HasColumnName("would_act_rate");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("WindowStart");
|
||||
|
||||
b.HasIndex("AlertType", "WindowStart", "WindowEnd")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("alert_quality_metrics", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AlertThreshold", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -117,6 +256,12 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("encounter_id");
|
||||
|
||||
b.Property<bool>("FeedbackReceived")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("boolean")
|
||||
.HasDefaultValue(false)
|
||||
.HasColumnName("feedback_received");
|
||||
|
||||
b.Property<string>("ObservationCode")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("character varying(50)")
|
||||
@@ -1476,6 +1621,17 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("AlertFeedback", b =>
|
||||
{
|
||||
b.HasOne("ClinicalAlert", "Alert")
|
||||
.WithMany("Feedbacks")
|
||||
.HasForeignKey("AlertId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Alert");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ClinicalAlert", b =>
|
||||
{
|
||||
b.HasOne("Encounter", "Encounter")
|
||||
@@ -1668,6 +1824,11 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
b.Navigation("Site");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ClinicalAlert", b =>
|
||||
{
|
||||
b.Navigation("Feedbacks");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ClinicalSite", b =>
|
||||
{
|
||||
b.Navigation("Gateways");
|
||||
|
||||
Reference in New Issue
Block a user