fix:
No SOFA trend chart or organ-system timeline No GCS trend chart or component history No qSOFA history view
This commit is contained in:
+1705
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace VigilCareClinicalAPI.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddQsofaEvaluations : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "qsofa_evaluations",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"),
|
||||
encounter_id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
patient_id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
active_criteria = table.Column<int>(type: "integer", nullable: false),
|
||||
resp_rate = table.Column<decimal>(type: "numeric", nullable: true),
|
||||
systolic_bp = table.Column<decimal>(type: "numeric", nullable: true),
|
||||
avpu = table.Column<decimal>(type: "numeric", nullable: true),
|
||||
screen_alert_fired = table.Column<bool>(type: "boolean", nullable: false),
|
||||
evaluated_at = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false),
|
||||
created_at = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_qsofa_evaluations", x => x.id);
|
||||
table.CheckConstraint("chk_qsofa_evaluations_active_criteria", "active_criteria >= 0 AND active_criteria <= 3");
|
||||
table.ForeignKey(
|
||||
name: "FK_qsofa_evaluations_encounters_encounter_id",
|
||||
column: x => x.encounter_id,
|
||||
principalTable: "encounters",
|
||||
principalColumn: "id",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_qsofa_evaluations_encounter_id_evaluated_at",
|
||||
table: "qsofa_evaluations",
|
||||
columns: new[] { "encounter_id", "evaluated_at" });
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "qsofa_evaluations");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1122,6 +1122,60 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
b.ToTable("phi_access_logs", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("QsofaEvaluation", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("id")
|
||||
.HasDefaultValueSql("gen_random_uuid()");
|
||||
|
||||
b.Property<int>("ActiveCriteria")
|
||||
.HasColumnType("integer")
|
||||
.HasColumnName("active_criteria");
|
||||
|
||||
b.Property<decimal?>("Avpu")
|
||||
.HasColumnType("numeric")
|
||||
.HasColumnName("avpu");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_at");
|
||||
|
||||
b.Property<Guid>("EncounterId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("encounter_id");
|
||||
|
||||
b.Property<DateTimeOffset>("EvaluatedAt")
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("evaluated_at");
|
||||
|
||||
b.Property<Guid>("PatientId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("patient_id");
|
||||
|
||||
b.Property<decimal?>("RespRate")
|
||||
.HasColumnType("numeric")
|
||||
.HasColumnName("resp_rate");
|
||||
|
||||
b.Property<bool>("ScreenAlertFired")
|
||||
.HasColumnType("boolean")
|
||||
.HasColumnName("screen_alert_fired");
|
||||
|
||||
b.Property<decimal?>("SystolicBp")
|
||||
.HasColumnType("numeric")
|
||||
.HasColumnName("systolic_bp");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("EncounterId", "EvaluatedAt");
|
||||
|
||||
b.ToTable("qsofa_evaluations", null, t =>
|
||||
{
|
||||
t.HasCheckConstraint("chk_qsofa_evaluations_active_criteria", "active_criteria >= 0 AND active_criteria <= 3");
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReconciliationAlert", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
@@ -1527,6 +1581,17 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
b.Navigation("Encounter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("QsofaEvaluation", b =>
|
||||
{
|
||||
b.HasOne("Encounter", "Encounter")
|
||||
.WithMany()
|
||||
.HasForeignKey("EncounterId")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Encounter");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ReconciliationAlert", b =>
|
||||
{
|
||||
b.HasOne("Encounter", "Encounter")
|
||||
|
||||
Reference in New Issue
Block a user