Browse Source

危警值

master
wxd 1 year ago
parent
commit
a68243a2f8
  1. 15290
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240726100556_critical_value_update.Designer.cs
  2. 841
      src/Shentun.Peis.EntityFrameworkCore/Migrations/20240726100556_critical_value_update.cs
  3. 347
      src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

15290
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240726100556_critical_value_update.Designer.cs
File diff suppressed because it is too large
View File

841
src/Shentun.Peis.EntityFrameworkCore/Migrations/20240726100556_critical_value_update.cs

@ -0,0 +1,841 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Shentun.Peis.Migrations
{
public partial class critical_value_update : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "critical_value");
migrationBuilder.DropTable(
name: "phone_follow");
migrationBuilder.DropTable(
name: "critical_value_type");
migrationBuilder.DropColumn(
name: "follow_up_plan_id",
table: "sms_send");
migrationBuilder.DropColumn(
name: "critical_value_create_date",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_process_content",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_process_date",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_process_doctor",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_process_flag",
table: "register_check");
migrationBuilder.RenameColumn(
name: "critical_value_flag",
table: "register_check",
newName: "is_critical_value");
migrationBuilder.AlterColumn<string>(
name: "id",
table: "sms_type",
type: "character(2)",
fixedLength: true,
maxLength: 2,
nullable: false,
comment: "主键Id",
oldClrType: typeof(Guid),
oldType: "uuid",
oldFixedLength: true);
migrationBuilder.AlterColumn<string>(
name: "sms_type_id",
table: "sms_send",
type: "character(2)",
fixedLength: true,
maxLength: 2,
nullable: false,
comment: "短信类别ID",
oldClrType: typeof(Guid),
oldType: "uuid",
oldFixedLength: true,
oldComment: "短信类别ID");
migrationBuilder.AlterColumn<string>(
name: "patient_name",
table: "sms_send",
type: "character varying(30)",
maxLength: 30,
nullable: false,
comment: "姓名",
oldClrType: typeof(string),
oldType: "character varying(16)",
oldMaxLength: 16,
oldComment: "姓名");
migrationBuilder.AddColumn<Guid>(
name: "follow_up_id",
table: "sms_send",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "critical_value_content",
table: "register_check_item",
type: "character varying(300)",
maxLength: 300,
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "critical_value_creation_time",
table: "register_check_item",
type: "timestamp without time zone",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "critical_value_creator_id",
table: "register_check_item",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "critical_value_phone_creator_id",
table: "register_check_item",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "critical_value_sms_creator_id",
table: "register_check_item",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "follow_up_creation_time",
table: "register_check_item",
type: "timestamp without time zone",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "follow_up_creator_id",
table: "register_check_item",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<char>(
name: "follow_up_flag",
table: "register_check_item",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_critical_value",
table: "register_check_item",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_critical_value_audit",
table: "register_check_item",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_critical_value_phone_complete",
table: "register_check_item",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_critical_value_sms_complete",
table: "register_check_item",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_review",
table: "register_check_item",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "critical_value",
table: "register_check",
type: "character varying(300)",
maxLength: 300,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(100)",
oldMaxLength: 100,
oldNullable: true,
oldComment: "危急值");
migrationBuilder.AddColumn<string>(
name: "critical_range_value",
table: "register_check",
type: "character varying(300)",
maxLength: 300,
nullable: true,
comment: "危急值");
migrationBuilder.AddColumn<string>(
name: "critical_value_content",
table: "register_check",
type: "character varying(300)",
maxLength: 300,
nullable: true,
comment: "危急值处理内容");
migrationBuilder.AddColumn<DateTime>(
name: "critical_value_creation_time",
table: "register_check",
type: "timestamp without time zone",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "critical_value_creator_id",
table: "register_check",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "critical_value_phone_creator_id",
table: "register_check",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "critical_value_sms_creator_id",
table: "register_check",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "follow_up_creation_time",
table: "register_check",
type: "timestamp without time zone",
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "follow_up_creator_id",
table: "register_check",
type: "uuid",
nullable: true);
migrationBuilder.AddColumn<char>(
name: "follow_up_flag",
table: "register_check",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_critical_value_audit",
table: "register_check",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_critical_value_phone_complete",
table: "register_check",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_critical_value_sms_complete",
table: "register_check",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AddColumn<char>(
name: "is_review",
table: "register_check",
type: "character(1)",
maxLength: 1,
nullable: true);
migrationBuilder.AlterColumn<string>(
name: "critical_range_value",
table: "reference_range",
type: "character varying(150)",
maxLength: 150,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(50)",
oldMaxLength: 50,
oldNullable: true);
migrationBuilder.AddColumn<string>(
name: "follow_up_range_value",
table: "reference_range",
type: "character varying(150)",
maxLength: 150,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "critical_value_function",
table: "item",
type: "text",
nullable: true,
comment: "危急值函数");
migrationBuilder.AddColumn<string>(
name: "follow_up_function",
table: "item",
type: "text",
nullable: true,
comment: "随访函数");
migrationBuilder.AddColumn<char>(
name: "is_critical_value_function",
table: "item",
type: "character(1)",
maxLength: 1,
nullable: false,
defaultValueSql: "'N'",
comment: "是否启用危急值函数");
migrationBuilder.AddColumn<char>(
name: "is_follow_up_function",
table: "item",
type: "character(1)",
maxLength: 1,
nullable: false,
defaultValueSql: "'N'",
comment: "是否启用随访函数");
migrationBuilder.AddColumn<string>(
name: "critical_value_function",
table: "asbitem",
type: "text",
nullable: true,
comment: "危急值函数");
migrationBuilder.AddColumn<string>(
name: "follow_up_function",
table: "asbitem",
type: "text",
nullable: true,
comment: "随访函数");
migrationBuilder.AddColumn<char>(
name: "is_critical_value_function",
table: "asbitem",
type: "character(1)",
maxLength: 1,
nullable: false,
defaultValueSql: "'N'",
comment: "是否启用危急值函数");
migrationBuilder.AddColumn<char>(
name: "is_follow_up_function",
table: "asbitem",
type: "character(1)",
maxLength: 1,
nullable: false,
defaultValueSql: "'N'",
comment: "是否启用随访函数");
migrationBuilder.CreateTable(
name: "critical_follow_value_type",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false),
display_name = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false, comment: "名称"),
parent_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "父编号"),
path_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "路径编码"),
display_order = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "999999"),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_critical_follow_value_type", x => x.id);
},
comment: "危急值类别");
migrationBuilder.CreateTable(
name: "follow_up",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", nullable: false),
patient_register_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "人员登记ID"),
is_sms_complete = table.Column<char>(type: "character(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "是否短信随访创建完成"),
is_phone_complete = table.Column<char>(type: "character(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "是否电话随访创建完成"),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_follow_up", x => x.id);
},
comment: "随访表");
migrationBuilder.CreateTable(
name: "phone_follow_up",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", nullable: false),
patient_register_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "病人登记ID"),
follow_up_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "随访内容"),
reply_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "回复内容"),
follow_up_id = table.Column<Guid>(type: "uuid", nullable: true),
is_complete = table.Column<char>(type: "character(1)", maxLength: 1, nullable: false, defaultValueSql: "'N'", comment: "是否完成"),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_phone_follow_up", x => x.id);
table.ForeignKey(
name: "fk_phone_f",
column: x => x.patient_register_id,
principalTable: "patient_register",
principalColumn: "id");
},
comment: "电话随访");
migrationBuilder.CreateTable(
name: "critical_follow_value",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false),
display_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false, comment: "名称"),
critical_value_type_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "危急值类别编号"),
critical_follow_value_flag = table.Column<char>(type: "character(1)", nullable: false, comment: "危急随访值标志"),
display_order = table.Column<int>(type: "integer", nullable: false),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_critical_follow_value", x => x.id);
table.ForeignKey(
name: "fk_critica",
column: x => x.critical_value_type_id,
principalTable: "critical_follow_value_type",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
},
comment: "危急值关键字设置");
migrationBuilder.CreateIndex(
name: "ix_critical_follow_value",
table: "critical_follow_value",
column: "display_name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_critical_follow_value_critical_value_type_id",
table: "critical_follow_value",
column: "critical_value_type_id");
migrationBuilder.CreateIndex(
name: "ix_critical_follow_value_type",
table: "critical_follow_value_type",
column: "display_name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_phone_follow_up_patient_register_id",
table: "phone_follow_up",
column: "patient_register_id");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "critical_follow_value");
migrationBuilder.DropTable(
name: "follow_up");
migrationBuilder.DropTable(
name: "phone_follow_up");
migrationBuilder.DropTable(
name: "critical_follow_value_type");
migrationBuilder.DropColumn(
name: "follow_up_id",
table: "sms_send");
migrationBuilder.DropColumn(
name: "critical_value_content",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "critical_value_creation_time",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "critical_value_creator_id",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "critical_value_phone_creator_id",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "critical_value_sms_creator_id",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "follow_up_creation_time",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "follow_up_creator_id",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "follow_up_flag",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "is_critical_value",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "is_critical_value_audit",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "is_critical_value_phone_complete",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "is_critical_value_sms_complete",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "is_review",
table: "register_check_item");
migrationBuilder.DropColumn(
name: "critical_range_value",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_content",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_creation_time",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_creator_id",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_phone_creator_id",
table: "register_check");
migrationBuilder.DropColumn(
name: "critical_value_sms_creator_id",
table: "register_check");
migrationBuilder.DropColumn(
name: "follow_up_creation_time",
table: "register_check");
migrationBuilder.DropColumn(
name: "follow_up_creator_id",
table: "register_check");
migrationBuilder.DropColumn(
name: "follow_up_flag",
table: "register_check");
migrationBuilder.DropColumn(
name: "is_critical_value_audit",
table: "register_check");
migrationBuilder.DropColumn(
name: "is_critical_value_phone_complete",
table: "register_check");
migrationBuilder.DropColumn(
name: "is_critical_value_sms_complete",
table: "register_check");
migrationBuilder.DropColumn(
name: "is_review",
table: "register_check");
migrationBuilder.DropColumn(
name: "follow_up_range_value",
table: "reference_range");
migrationBuilder.DropColumn(
name: "critical_value_function",
table: "item");
migrationBuilder.DropColumn(
name: "follow_up_function",
table: "item");
migrationBuilder.DropColumn(
name: "is_critical_value_function",
table: "item");
migrationBuilder.DropColumn(
name: "is_follow_up_function",
table: "item");
migrationBuilder.DropColumn(
name: "critical_value_function",
table: "asbitem");
migrationBuilder.DropColumn(
name: "follow_up_function",
table: "asbitem");
migrationBuilder.DropColumn(
name: "is_critical_value_function",
table: "asbitem");
migrationBuilder.DropColumn(
name: "is_follow_up_function",
table: "asbitem");
migrationBuilder.RenameColumn(
name: "is_critical_value",
table: "register_check",
newName: "critical_value_flag");
migrationBuilder.AlterColumn<Guid>(
name: "id",
table: "sms_type",
type: "uuid",
fixedLength: true,
nullable: false,
oldClrType: typeof(string),
oldType: "character(2)",
oldFixedLength: true,
oldMaxLength: 2,
oldComment: "主键Id");
migrationBuilder.AlterColumn<Guid>(
name: "sms_type_id",
table: "sms_send",
type: "uuid",
fixedLength: true,
nullable: false,
comment: "短信类别ID",
oldClrType: typeof(string),
oldType: "character(2)",
oldFixedLength: true,
oldMaxLength: 2,
oldComment: "短信类别ID");
migrationBuilder.AlterColumn<string>(
name: "patient_name",
table: "sms_send",
type: "character varying(16)",
maxLength: 16,
nullable: false,
comment: "姓名",
oldClrType: typeof(string),
oldType: "character varying(30)",
oldMaxLength: 30,
oldComment: "姓名");
migrationBuilder.AddColumn<Guid>(
name: "follow_up_plan_id",
table: "sms_send",
type: "uuid",
nullable: true,
comment: "随访计划ID");
migrationBuilder.AlterColumn<string>(
name: "critical_value",
table: "register_check",
type: "character varying(100)",
maxLength: 100,
nullable: true,
comment: "危急值",
oldClrType: typeof(string),
oldType: "character varying(300)",
oldMaxLength: 300,
oldNullable: true);
migrationBuilder.AddColumn<DateTime>(
name: "critical_value_create_date",
table: "register_check",
type: "timestamp without time zone",
nullable: true,
comment: "危急值创建日期");
migrationBuilder.AddColumn<string>(
name: "critical_value_process_content",
table: "register_check",
type: "character varying(100)",
maxLength: 100,
nullable: true,
comment: "危急值处理内容");
migrationBuilder.AddColumn<DateTime>(
name: "critical_value_process_date",
table: "register_check",
type: "timestamp without time zone",
nullable: true,
comment: "危急值处理日期");
migrationBuilder.AddColumn<string>(
name: "critical_value_process_doctor",
table: "register_check",
type: "character varying(16)",
maxLength: 16,
nullable: true,
comment: "危急值处理医生");
migrationBuilder.AddColumn<char>(
name: "critical_value_process_flag",
table: "register_check",
type: "character(1)",
maxLength: 1,
nullable: true,
comment: "危急值处理标志");
migrationBuilder.AlterColumn<string>(
name: "critical_range_value",
table: "reference_range",
type: "character varying(50)",
maxLength: 50,
nullable: true,
oldClrType: typeof(string),
oldType: "character varying(150)",
oldMaxLength: 150,
oldNullable: true);
migrationBuilder.CreateTable(
name: "critical_value_type",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
display_name = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: false, comment: "名称"),
display_order = table.Column<int>(type: "integer", nullable: false, defaultValueSql: "999999"),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false),
parent_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "父编号"),
path_code = table.Column<string>(type: "character varying(50)", maxLength: 50, nullable: false, comment: "路径编码")
},
constraints: table =>
{
table.PrimaryKey("PK_critical_value_type", x => x.id);
},
comment: "危急值类别");
migrationBuilder.CreateTable(
name: "phone_follow",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", nullable: false),
patient_register_id = table.Column<Guid>(type: "uuid", nullable: false, comment: "病人登记ID"),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
follow_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "随访内容"),
follow_up_plan_id = table.Column<Guid>(type: "uuid", nullable: true, comment: "随访计划ID"),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false),
reply_content = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true, comment: "回复内容")
},
constraints: table =>
{
table.PrimaryKey("PK_phone_follow", x => x.id);
table.ForeignKey(
name: "fk_phone_f",
column: x => x.patient_register_id,
principalTable: "patient_register",
principalColumn: "id");
},
comment: "电话随访");
migrationBuilder.CreateTable(
name: "critical_value",
columns: table => new
{
id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false),
critical_value_type_id = table.Column<Guid>(type: "uuid", fixedLength: true, nullable: false, comment: "危急值类别编号"),
concurrency_stamp = table.Column<string>(type: "character varying(40)", maxLength: 40, nullable: true),
creation_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
creator_id = table.Column<Guid>(type: "uuid", nullable: false),
display_name = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: false, comment: "名称"),
display_order = table.Column<int>(type: "integer", nullable: false),
last_modification_time = table.Column<DateTime>(type: "timestamp without time zone", nullable: false),
last_modifier_id = table.Column<Guid>(type: "uuid", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_critical_value", x => x.id);
table.ForeignKey(
name: "fk_critica",
column: x => x.critical_value_type_id,
principalTable: "critical_value_type",
principalColumn: "id",
onDelete: ReferentialAction.Cascade);
},
comment: "危急值关键字设置");
migrationBuilder.CreateIndex(
name: "ix_critical_value",
table: "critical_value",
column: "display_name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_critical_value_critical_value_type_id",
table: "critical_value",
column: "critical_value_type_id");
migrationBuilder.CreateIndex(
name: "ix_critical_value_type",
table: "critical_value_type",
column: "display_name",
unique: true);
migrationBuilder.CreateIndex(
name: "IX_phone_follow_patient_register_id",
table: "phone_follow",
column: "patient_register_id");
}
}
}

347
src/Shentun.Peis.EntityFrameworkCore/Migrations/PeisDbContextModelSnapshot.cs

@ -461,6 +461,11 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<string>("CriticalValueFunction")
.HasColumnType("text")
.HasColumnName("critical_value_function")
.HasComment("危急值函数");
b.Property<string>("DefaultResult")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
@ -493,6 +498,11 @@ namespace Shentun.Peis.Migrations
.HasColumnType("integer")
.HasColumnName("display_order");
b.Property<string>("FollowUpFunction")
.HasColumnType("text")
.HasColumnName("follow_up_function")
.HasComment("随访函数");
b.Property<char>("ForPregnantFlag")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -541,6 +551,14 @@ namespace Shentun.Peis.Migrations
.HasDefaultValueSql("'N'")
.HasComment("诊断函数处理完毕后继续处理");
b.Property<char>("IsCriticalValueFunction")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_function")
.HasDefaultValueSql("'N'")
.HasComment("是否启用危急值函数");
b.Property<char>("IsDiagnosisFunction")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -549,6 +567,14 @@ namespace Shentun.Peis.Migrations
.HasDefaultValueSql("'N'")
.HasComment("启用诊断函数");
b.Property<char>("IsFollowUpFunction")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_follow_up_function")
.HasDefaultValueSql("'N'")
.HasComment("是否启用随访函数");
b.Property<char>("IsItemResultMerger")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -2416,7 +2442,7 @@ namespace Shentun.Peis.Migrations
b.HasComment("联系人");
});
modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b =>
modelBuilder.Entity("Shentun.Peis.Models.CriticalFollowValue", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
@ -2438,6 +2464,11 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<char>("CriticalFollowValueFlag")
.HasColumnType("character(1)")
.HasColumnName("critical_follow_value_flag")
.HasComment("危急随访值标志");
b.Property<Guid>("CriticalValueTypeId")
.HasColumnType("uuid")
.HasColumnName("critical_value_type_id")
@ -2469,15 +2500,15 @@ namespace Shentun.Peis.Migrations
b.HasIndex("CriticalValueTypeId");
b.HasIndex(new[] { "DisplayName" }, "ix_critical_value")
b.HasIndex(new[] { "DisplayName" }, "ix_critical_follow_value")
.IsUnique();
b.ToTable("critical_value");
b.ToTable("critical_follow_value");
b.HasComment("危急值关键字设置");
});
modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b =>
modelBuilder.Entity("Shentun.Peis.Models.CriticalFollowValueType", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
@ -2537,10 +2568,10 @@ namespace Shentun.Peis.Migrations
b.HasKey("Id");
b.HasIndex(new[] { "DisplayName" }, "ix_critical_value_type")
b.HasIndex(new[] { "DisplayName" }, "ix_critical_follow_value_type")
.IsUnique();
b.ToTable("critical_value_type");
b.ToTable("critical_follow_value_type");
b.HasComment("危急值类别");
});
@ -3857,6 +3888,65 @@ namespace Shentun.Peis.Migrations
b.HasComment("字段对照");
});
modelBuilder.Entity("Shentun.Peis.Models.FollowUp", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
.HasColumnName("id");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("character varying(40)")
.HasColumnName("concurrency_stamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("creation_time");
b.Property<Guid?>("CreatorId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<char>("IsPhoneComplete")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_phone_complete")
.HasDefaultValueSql("'N'")
.HasComment("是否电话随访创建完成");
b.Property<char>("IsSmsComplete")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_sms_complete")
.HasDefaultValueSql("'N'")
.HasComment("是否短信随访创建完成");
b.Property<DateTime?>("LastModificationTime")
.IsRequired()
.HasColumnType("timestamp without time zone")
.HasColumnName("last_modification_time");
b.Property<Guid?>("LastModifierId")
.IsRequired()
.HasColumnType("uuid")
.HasColumnName("last_modifier_id");
b.Property<Guid>("PatientRegisterId")
.HasColumnType("uuid")
.HasColumnName("patient_register_id")
.HasComment("人员登记ID");
b.HasKey("Id");
b.ToTable("follow_up");
b.HasComment("随访表");
});
modelBuilder.Entity("Shentun.Peis.Models.FollowUpMode", b =>
{
b.Property<Guid>("Id")
@ -4686,6 +4776,11 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<string>("CriticalValueFunction")
.HasColumnType("text")
.HasColumnName("critical_value_function")
.HasComment("危急值函数");
b.Property<string>("DefaultResult")
.HasMaxLength(200)
.HasColumnType("character varying(200)")
@ -4719,6 +4814,11 @@ namespace Shentun.Peis.Migrations
.HasColumnName("english_short_name")
.HasComment("英文缩写");
b.Property<string>("FollowUpFunction")
.HasColumnType("text")
.HasColumnName("follow_up_function")
.HasComment("随访函数");
b.Property<string>("InputCheck")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
@ -4749,6 +4849,14 @@ namespace Shentun.Peis.Migrations
.HasDefaultValueSql("'Y'")
.HasComment("是继续处理");
b.Property<char>("IsCriticalValueFunction")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_function")
.HasDefaultValueSql("'N'")
.HasComment("是否启用危急值函数");
b.Property<char>("IsDiagnosisFunction")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -4757,6 +4865,14 @@ namespace Shentun.Peis.Migrations
.HasDefaultValueSql("'N'")
.HasComment("启用诊断函数");
b.Property<char>("IsFollowUpFunction")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_follow_up_function")
.HasDefaultValueSql("'N'")
.HasComment("是否启用随访函数");
b.Property<char>("IsNameIntoSummary")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -7564,7 +7680,7 @@ namespace Shentun.Peis.Migrations
b.HasComment("人员类别设置");
});
modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b =>
modelBuilder.Entity("Shentun.Peis.Models.PhoneFollowUp", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
@ -7585,16 +7701,23 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<string>("FollowContent")
b.Property<string>("FollowUpContent")
.HasMaxLength(200)
.HasColumnType("character varying(200)")
.HasColumnName("follow_content")
.HasColumnName("follow_up_content")
.HasComment("随访内容");
b.Property<Guid?>("FollowUpPlanId")
b.Property<Guid?>("FollowUpId")
.HasColumnType("uuid")
.HasColumnName("follow_up_plan_id")
.HasComment("随访计划ID");
.HasColumnName("follow_up_id");
b.Property<char>("IsComplete")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_complete")
.HasDefaultValueSql("'N'")
.HasComment("是否完成");
b.Property<DateTime?>("LastModificationTime")
.IsRequired()
@ -7621,7 +7744,7 @@ namespace Shentun.Peis.Migrations
b.HasIndex("PatientRegisterId");
b.ToTable("phone_follow");
b.ToTable("phone_follow_up");
b.HasComment("电话随访");
});
@ -8117,10 +8240,15 @@ namespace Shentun.Peis.Migrations
.HasColumnName("creator_id");
b.Property<string>("CriticalRangeValue")
.HasMaxLength(50)
.HasColumnType("character varying(50)")
.HasMaxLength(150)
.HasColumnType("character varying(150)")
.HasColumnName("critical_range_value");
b.Property<string>("FollowUpRangeValue")
.HasMaxLength(150)
.HasColumnType("character varying(150)")
.HasColumnName("follow_up_range_value");
b.Property<char>("ForSexId")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -8241,58 +8369,85 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<string>("CriticalValue")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("critical_value")
b.Property<string>("CriticalRangeValue")
.HasMaxLength(300)
.HasColumnType("character varying(300)")
.HasColumnName("critical_range_value")
.HasComment("危急值");
b.Property<DateTime?>("CriticalValueCreateDate")
.HasColumnType("timestamp without time zone")
.HasColumnName("critical_value_create_date")
.HasComment("危急值创建日期");
b.Property<char?>("CriticalValueFlag")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("critical_value_flag")
.HasDefaultValueSql("0")
.HasComment("危急值标志");
b.Property<string>("CriticalValue")
.HasMaxLength(300)
.HasColumnType("character varying(300)")
.HasColumnName("critical_value");
b.Property<string>("CriticalValueProcessContent")
.HasMaxLength(100)
.HasColumnType("character varying(100)")
.HasColumnName("critical_value_process_content")
b.Property<string>("CriticalValueContent")
.HasMaxLength(300)
.HasColumnType("character varying(300)")
.HasColumnName("critical_value_content")
.HasComment("危急值处理内容");
b.Property<DateTime?>("CriticalValueProcessDate")
b.Property<DateTime?>("CriticalValueCreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("critical_value_process_date")
.HasComment("危急值处理日期");
.HasColumnName("critical_value_creation_time");
b.Property<string>("CriticalValueProcessDoctor")
.HasMaxLength(16)
.HasColumnType("character varying(16)")
.HasColumnName("critical_value_process_doctor")
.HasComment("危急值处理医生");
b.Property<Guid?>("CriticalValueCreatorId")
.HasColumnType("uuid")
.HasColumnName("critical_value_creator_id");
b.Property<char?>("CriticalValueProcessFlag")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("critical_value_process_flag")
.HasComment("危急值处理标志");
b.Property<Guid?>("CriticalValuePhoneCreatorId")
.HasColumnType("uuid")
.HasColumnName("critical_value_phone_creator_id");
b.Property<Guid?>("CriticalValueSmsCreatorId")
.HasColumnType("uuid")
.HasColumnName("critical_value_sms_creator_id");
b.Property<Guid?>("ExecOrganizationUnitId")
.HasColumnType("uuid")
.HasColumnName("exec_organization_unit_id");
b.Property<DateTime?>("FollowUpCreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("follow_up_creation_time");
b.Property<Guid?>("FollowUpCreatorId")
.HasColumnType("uuid")
.HasColumnName("follow_up_creator_id");
b.Property<char?>("FollowUpFlag")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("follow_up_flag");
b.Property<char>("IsAudit")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_audit")
.HasComment("是审核");
b.Property<char?>("IsCriticalValue")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value")
.HasDefaultValueSql("0")
.HasComment("危急值标志");
b.Property<char?>("IsCriticalValueAudit")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_audit");
b.Property<char?>("IsCriticalValuePhoneComplete")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_phone_complete");
b.Property<char?>("IsCriticalValueSmsComplete")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_sms_complete");
b.Property<char>("IsLock")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -8301,6 +8456,11 @@ namespace Shentun.Peis.Migrations
.HasDefaultValueSql("'N'")
.HasComment("是否锁住");
b.Property<char?>("IsReview")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_review");
b.Property<char>("IsSignIn")
.ValueGeneratedOnAdd()
.HasMaxLength(1)
@ -8595,6 +8755,65 @@ namespace Shentun.Peis.Migrations
.HasColumnName("critical_value")
.HasComment("危急值");
b.Property<string>("CriticalValueContent")
.HasMaxLength(300)
.HasColumnType("character varying(300)")
.HasColumnName("critical_value_content");
b.Property<DateTime?>("CriticalValueCreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("critical_value_creation_time");
b.Property<Guid?>("CriticalValueCreatorId")
.HasColumnType("uuid")
.HasColumnName("critical_value_creator_id");
b.Property<Guid?>("CriticalValuePhoneCreatorId")
.HasColumnType("uuid")
.HasColumnName("critical_value_phone_creator_id");
b.Property<Guid?>("CriticalValueSmsCreatorId")
.HasColumnType("uuid")
.HasColumnName("critical_value_sms_creator_id");
b.Property<DateTime?>("FollowUpCreationTime")
.HasColumnType("timestamp without time zone")
.HasColumnName("follow_up_creation_time");
b.Property<Guid?>("FollowUpCreatorId")
.HasColumnType("uuid")
.HasColumnName("follow_up_creator_id");
b.Property<char?>("FollowUpFlag")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("follow_up_flag");
b.Property<char?>("IsCriticalValue")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value");
b.Property<char?>("IsCriticalValueAudit")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_audit");
b.Property<char?>("IsCriticalValuePhoneComplete")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_phone_complete");
b.Property<char?>("IsCriticalValueSmsComplete")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_critical_value_sms_complete");
b.Property<char?>("IsReview")
.HasMaxLength(1)
.HasColumnType("character(1)")
.HasColumnName("is_review");
b.Property<DateTime?>("LastModificationTime")
.IsRequired()
.HasColumnType("timestamp without time zone")
@ -9974,10 +10193,9 @@ namespace Shentun.Peis.Migrations
.HasColumnType("uuid")
.HasColumnName("creator_id");
b.Property<Guid?>("FollowUpPlanId")
b.Property<Guid?>("FollowUpId")
.HasColumnType("uuid")
.HasColumnName("follow_up_plan_id")
.HasComment("随访计划ID");
.HasColumnName("follow_up_id");
b.Property<char>("IsComplete")
.ValueGeneratedOnAdd()
@ -10006,20 +10224,21 @@ namespace Shentun.Peis.Migrations
b.Property<Guid?>("PatientId")
.IsRequired()
.HasMaxLength(10)
.HasColumnType("uuid")
.HasColumnName("patient_id")
.HasComment("人员ID");
b.Property<string>("PatientName")
.IsRequired()
.HasMaxLength(16)
.HasColumnType("character varying(16)")
.HasMaxLength(30)
.HasColumnType("character varying(30)")
.HasColumnName("patient_name")
.HasComment("姓名");
b.Property<Guid>("SmsTypeId")
.HasColumnType("uuid")
b.Property<string>("SmsTypeId")
.IsRequired()
.HasMaxLength(2)
.HasColumnType("character(2)")
.HasColumnName("sms_type_id")
.IsFixedLength()
.HasComment("短信类别ID");
@ -10106,10 +10325,12 @@ namespace Shentun.Peis.Migrations
modelBuilder.Entity("Shentun.Peis.Models.SmsType", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uuid")
b.Property<string>("Id")
.HasMaxLength(2)
.HasColumnType("character(2)")
.HasColumnName("id")
.IsFixedLength();
.IsFixedLength()
.HasComment("主键Id");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
@ -13547,9 +13768,9 @@ namespace Shentun.Peis.Migrations
b.Navigation("CustomerOrg");
});
modelBuilder.Entity("Shentun.Peis.Models.CriticalValue", b =>
modelBuilder.Entity("Shentun.Peis.Models.CriticalFollowValue", b =>
{
b.HasOne("Shentun.Peis.Models.CriticalValueType", "CriticalValueType")
b.HasOne("Shentun.Peis.Models.CriticalFollowValueType", "CriticalValueType")
.WithMany("CriticalValues")
.HasForeignKey("CriticalValueTypeId")
.OnDelete(DeleteBehavior.Cascade)
@ -13993,7 +14214,7 @@ namespace Shentun.Peis.Migrations
b.Navigation("Symptom");
});
modelBuilder.Entity("Shentun.Peis.Models.PhoneFollow", b =>
modelBuilder.Entity("Shentun.Peis.Models.PhoneFollowUp", b =>
{
b.HasOne("Shentun.Peis.Models.PatientRegister", "PatientRegister")
.WithMany("PhoneFollows")
@ -14720,7 +14941,7 @@ namespace Shentun.Peis.Migrations
b.Navigation("ContactMethods");
});
modelBuilder.Entity("Shentun.Peis.Models.CriticalValueType", b =>
modelBuilder.Entity("Shentun.Peis.Models.CriticalFollowValueType", b =>
{
b.Navigation("CriticalValues");
});

Loading…
Cancel
Save