feature: FHIR R4 Inbound Facade
This commit is contained in:
+1131
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace VigilCareClinicalAPI.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddExternalResourceIdentifiers : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "external_resource_identifiers",
|
||||
columns: table => new
|
||||
{
|
||||
id = table.Column<Guid>(type: "uuid", nullable: false, defaultValueSql: "gen_random_uuid()"),
|
||||
resource_type = table.Column<string>(type: "character varying(20)", maxLength: 20, nullable: false),
|
||||
internal_id = table.Column<Guid>(type: "uuid", nullable: false),
|
||||
system = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: false),
|
||||
value = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: false),
|
||||
created_at = table.Column<DateTimeOffset>(type: "timestamp with time zone", nullable: false, defaultValueSql: "NOW()")
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_external_resource_identifiers", x => x.id);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_external_resource_identifiers_resource_type_internal_id",
|
||||
table: "external_resource_identifiers",
|
||||
columns: new[] { "resource_type", "internal_id" });
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_external_resource_identifiers_resource_type_system_value",
|
||||
table: "external_resource_identifiers",
|
||||
columns: new[] { "resource_type", "system", "value" },
|
||||
unique: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "external_resource_identifiers");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -250,6 +250,52 @@ namespace VigilCareClinicalAPI.Migrations
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("ExternalResourceIdentifier", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("id")
|
||||
.HasDefaultValueSql("gen_random_uuid()");
|
||||
|
||||
b.Property<DateTimeOffset>("CreatedAt")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("timestamp with time zone")
|
||||
.HasColumnName("created_at")
|
||||
.HasDefaultValueSql("NOW()");
|
||||
|
||||
b.Property<Guid>("InternalId")
|
||||
.HasColumnType("uuid")
|
||||
.HasColumnName("internal_id");
|
||||
|
||||
b.Property<string>("ResourceType")
|
||||
.IsRequired()
|
||||
.HasMaxLength(20)
|
||||
.HasColumnType("character varying(20)")
|
||||
.HasColumnName("resource_type");
|
||||
|
||||
b.Property<string>("System")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("character varying(500)")
|
||||
.HasColumnName("system");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.IsRequired()
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("character varying(200)")
|
||||
.HasColumnName("value");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.HasIndex("ResourceType", "InternalId");
|
||||
|
||||
b.HasIndex("ResourceType", "System", "Value")
|
||||
.IsUnique();
|
||||
|
||||
b.ToTable("external_resource_identifiers", (string)null);
|
||||
});
|
||||
|
||||
modelBuilder.Entity("GcsScore", b =>
|
||||
{
|
||||
b.Property<Guid>("Id")
|
||||
|
||||
Reference in New Issue
Block a user