using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace IRaCIS.Core.Infra.EFCore.Migrations
{
///
public partial class init : Migration
{
///
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "ImageShare",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
TrialId = table.Column(type: "uniqueidentifier", nullable: false),
SubjectId = table.Column(type: "uniqueidentifier", nullable: false),
StudyId = table.Column(type: "uniqueidentifier", nullable: false),
ExpireTime = table.Column(type: "datetime2", nullable: false),
Password = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ImageShare", x => x.Id);
},
comment: "影像 - 影像分享记录表");
migrationBuilder.CreateTable(
name: "TestLength",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
Name = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
StringList = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
DateTimeList = table.Column(type: "nvarchar(max)", nullable: false),
TestEnumList = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
TestJsonObjectLsit = table.Column(type: "nvarchar(max)", nullable: false),
TestDate = table.Column(type: "date", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TestLength", x => x.Id);
});
migrationBuilder.CreateTable(
name: "TrialRevenuesPriceVerification",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
TrialId = table.Column(type: "uniqueidentifier", nullable: false),
ReviewerId = table.Column(type: "uniqueidentifier", nullable: false),
YearMonth = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Training = table.Column(type: "bit", nullable: false),
Downtime = table.Column(type: "bit", nullable: false),
Global = table.Column(type: "bit", nullable: false),
Timepoint = table.Column(type: "bit", nullable: false),
TimepointIn24H = table.Column(type: "bit", nullable: false),
TimepointIn48H = table.Column(type: "bit", nullable: false),
Adjudication = table.Column(type: "bit", nullable: false),
AdjudicationIn24H = table.Column(type: "bit", nullable: false),
AdjudicationIn48H = table.Column(type: "bit", nullable: false),
RefresherTraining = table.Column(type: "bit", nullable: false),
WorkLoadDate = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TrialRevenuesPriceVerification", x => x.Id);
},
comment: "医生计费 - 项目收入价格验证");
migrationBuilder.CreateTable(
name: "TumorAssessment_IRECIST1Point1",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
TargetLesion = table.Column(type: "int", nullable: false, comment: "靶病灶"),
NonTargetLesions = table.Column(type: "int", nullable: false, comment: "非靶病灶"),
NewLesion = table.Column(type: "int", nullable: false, comment: "新病灶"),
OverallEfficacy = table.Column(type: "int", nullable: false, comment: "整体疗效")
},
constraints: table =>
{
table.PrimaryKey("PK_TumorAssessment_IRECIST1Point1", x => x.Id);
},
comment: "IRECIST1Point1肿瘤评估(系统标准)");
migrationBuilder.CreateTable(
name: "TumorAssessment_RECIST1Point1",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
TargetLesion = table.Column(type: "int", nullable: false, comment: "靶病灶"),
NonTargetLesions = table.Column(type: "int", nullable: false, comment: "非靶病灶"),
NewLesion = table.Column(type: "int", nullable: false, comment: "新病灶"),
OverallEfficacy = table.Column(type: "int", nullable: false, comment: "整体疗效")
},
constraints: table =>
{
table.PrimaryKey("PK_TumorAssessment_RECIST1Point1", x => x.Id);
},
comment: "RECIST1Point1肿瘤评估(系统标准)");
migrationBuilder.CreateTable(
name: "TumorAssessment_RECIST1Point1BM",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
TargetLesion = table.Column(type: "int", nullable: false, comment: "靶病灶"),
NonTargetLesions = table.Column(type: "int", nullable: false, comment: "非靶病灶"),
NewLesion = table.Column(type: "int", nullable: false, comment: "新病灶"),
OverallEfficacy = table.Column(type: "int", nullable: false, comment: "整体疗效")
},
constraints: table =>
{
table.PrimaryKey("PK_TumorAssessment_RECIST1Point1BM", x => x.Id);
},
comment: "RECIST1Point1BM肿瘤评估(系统标准)");
migrationBuilder.CreateTable(
name: "UserType",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
UserTypeEnum = table.Column(type: "int", nullable: false),
UserTypeName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Description = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Order = table.Column(type: "int", nullable: false),
UserTypeShortName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsEnable = table.Column(type: "bit", nullable: false),
PermissionStr = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_UserType", x => x.Id);
},
comment: "后台 - 系统用户类型 (需要同步)");
migrationBuilder.CreateTable(
name: "Attachment",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
Code = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "编码"),
DoctorId = table.Column(type: "uniqueidentifier", nullable: false),
ExpiryDate = table.Column(type: "datetime2", nullable: true, comment: "过期时间"),
FileName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsOfficial = table.Column(type: "bit", nullable: false, comment: "是否正式简历"),
Language = table.Column(type: "int", nullable: false, comment: "1 中文 2为英文"),
Path = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
Type = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "文件类型名"),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_Attachment", x => x.Id);
},
comment: "医生 - 简历|证书 文档表");
migrationBuilder.CreateTable(
name: "CheckChallengeDialog",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
IsCRCNeedReply = table.Column(type: "bit", nullable: true, comment: "CRC是否需要回复 前端使用"),
ParamInfo = table.Column(type: "nvarchar(max)", nullable: false, comment: "核查的检查信息Json"),
SubjectVisitId = table.Column(type: "uniqueidentifier", nullable: false),
TalkContent = table.Column(type: "nvarchar(max)", nullable: false),
UserTypeEnum = table.Column(type: "int", nullable: false, comment: "核查过程中的操作用户类型"),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CheckChallengeDialog", x => x.Id);
},
comment: "一致性核查 - 对话记录表");
migrationBuilder.CreateTable(
name: "ClinicalAnswerRowInfo",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
ClinicalFormId = table.Column(type: "uniqueidentifier", nullable: false, comment: "表单Id"),
QuestionId = table.Column(type: "uniqueidentifier", nullable: false, comment: "问题Id"),
RowIndex = table.Column(type: "int", nullable: false),
SubjectId = table.Column(type: "uniqueidentifier", nullable: false, comment: "受试者Id"),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClinicalAnswerRowInfo", x => x.Id);
},
comment: "受试者 - 临床表单表格问题行记录");
migrationBuilder.CreateTable(
name: "ClinicalDataSystemSet",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
ClinicalDataLevel = table.Column(type: "int", nullable: false),
ClinicalDataSetEnName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
ClinicalDataSetEnum = table.Column(type: "int", nullable: false, comment: "枚举(字典里面取的)"),
ClinicalDataSetName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
ClinicalUploadType = table.Column(type: "int", nullable: false, comment: "上传方式"),
CriterionEnumListStr = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
FileName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsApply = table.Column(type: "bit", nullable: false, comment: "是否应用"),
IsEnable = table.Column(type: "bit", nullable: false),
Path = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
UploadRole = table.Column(type: "int", nullable: false),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClinicalDataSystemSet", x => x.Id);
},
comment: "系统 - 临床数据配置");
migrationBuilder.CreateTable(
name: "ClinicalDataTrialSet",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
ClinicalDataLevel = table.Column(type: "int", nullable: false, comment: "临床级别"),
ClinicalDataSetEnName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
ClinicalDataSetName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
ClinicalUploadType = table.Column(type: "int", nullable: false, comment: "上传方式"),
CriterionEnumListStr = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
FileName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsApply = table.Column(type: "bit", nullable: false, comment: "是否应用"),
IsConfirm = table.Column(type: "bit", nullable: false),
Path = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
SystemClinicalDataSetId = table.Column(type: "uniqueidentifier", nullable: true),
TrialId = table.Column(type: "uniqueidentifier", nullable: false),
UploadRole = table.Column(type: "int", nullable: false),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClinicalDataTrialSet", x => x.Id);
table.ForeignKey(
name: "FK_ClinicalDataTrialSet_ClinicalDataSystemSet_SystemClinicalDataSetId",
column: x => x.SystemClinicalDataSetId,
principalTable: "ClinicalDataSystemSet",
principalColumn: "Id");
},
comment: "项目 - 临床数据适应标准配置");
migrationBuilder.CreateTable(
name: "ClinicalForm",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
CheckDate = table.Column(type: "datetime2", nullable: true, comment: "检查日期"),
ClinicalDataTrialSetId = table.Column(type: "uniqueidentifier", nullable: false),
PicturePath = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false, comment: "截图地址"),
ReadingId = table.Column(type: "uniqueidentifier", nullable: true),
SubjectId = table.Column(type: "uniqueidentifier", nullable: false, comment: "受试者Id"),
TrialId = table.Column(type: "uniqueidentifier", nullable: false),
VisitId = table.Column(type: "uniqueidentifier", nullable: true),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClinicalForm", x => x.Id);
table.ForeignKey(
name: "FK_ClinicalForm_ClinicalDataTrialSet_ClinicalDataTrialSetId",
column: x => x.ClinicalDataTrialSetId,
principalTable: "ClinicalDataTrialSet",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "受试者 - 临床表单");
migrationBuilder.CreateTable(
name: "ClinicalQuestionAnswer",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
Answer = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
ClinicalDataTrialSetId = table.Column(type: "uniqueidentifier", nullable: false),
ClinicalFormId = table.Column(type: "uniqueidentifier", nullable: false, comment: "表单Id"),
QuestionId = table.Column(type: "uniqueidentifier", nullable: false, comment: "问题Id"),
SubjectId = table.Column(type: "uniqueidentifier", nullable: false, comment: "受试者Id"),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClinicalQuestionAnswer", x => x.Id);
table.ForeignKey(
name: "FK_ClinicalQuestionAnswer_ClinicalForm_ClinicalFormId",
column: x => x.ClinicalFormId,
principalTable: "ClinicalForm",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "受试者 - 临床表单问题答案");
migrationBuilder.CreateTable(
name: "ClinicalTableAnswer",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
Answer = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false, comment: "答案"),
ClinicalFormId = table.Column(type: "uniqueidentifier", nullable: false, comment: "表单Id"),
QuestionId = table.Column(type: "uniqueidentifier", nullable: false, comment: "问题Id"),
RowId = table.Column(type: "uniqueidentifier", nullable: false, comment: "答案行的Id"),
SubjectId = table.Column(type: "uniqueidentifier", nullable: false, comment: "受试者Id"),
TableQuestionId = table.Column(type: "uniqueidentifier", nullable: false),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ClinicalTableAnswer", x => x.Id);
table.ForeignKey(
name: "FK_ClinicalTableAnswer_ClinicalAnswerRowInfo_RowId",
column: x => x.RowId,
principalTable: "ClinicalAnswerRowInfo",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
},
comment: "受试者 - 临床表单表格问题答案");
migrationBuilder.CreateTable(
name: "CommonDocument",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
BusinessScenarioEnum = table.Column(type: "int", nullable: false, comment: "业务场景"),
Code = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
CriterionTypeEnum = table.Column(type: "int", nullable: true, comment: "系统标准枚举"),
Description = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
FileTypeEnum = table.Column(type: "int", nullable: false, comment: "类型-上传|导出|邮件附件"),
Name = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
NameCN = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Path = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
DeleteUserId = table.Column(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column(type: "bit", nullable: false),
DeletedTime = table.Column(type: "datetime2", nullable: true),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false),
UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CommonDocument", x => x.Id);
},
comment: "数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)");
migrationBuilder.CreateTable(
name: "CriterionNidusSystem",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
CriterionId = table.Column(type: "uniqueidentifier", nullable: false),
IsSystemCriterion = table.Column(type: "bit", nullable: false),
LesionType = table.Column(type: "int", nullable: false, comment: "病灶类型"),
OrganType = table.Column(type: "int", nullable: false, comment: "器官类型"),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CriterionNidusSystem", x => x.Id);
},
comment: "系统标准 - 病灶器官表 (需要同步)");
migrationBuilder.CreateTable(
name: "CriterionNidusTrial",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
CriterionId = table.Column(type: "uniqueidentifier", nullable: false),
LesionType = table.Column(type: "int", nullable: false),
OrganType = table.Column(type: "int", nullable: false),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CriterionNidusTrial", x => x.Id);
},
comment: "项目标准 - 病灶器官表");
migrationBuilder.CreateTable(
name: "CROCompany",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
CROCode = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
CROName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
CRONameCN = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsTrialLevel = table.Column(type: "bit", nullable: false, comment: "是否是项目级别"),
TrialId = table.Column(type: "uniqueidentifier", nullable: true),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false),
UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_CROCompany", x => x.Id);
},
comment: "机构 - CRO");
migrationBuilder.CreateTable(
name: "DataInspection",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
BatchId = table.Column(type: "uniqueidentifier", nullable: false, comment: "批次Id"),
ChildrenTypeId = table.Column(type: "uniqueidentifier", nullable: true, comment: "子类"),
CreateUserName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "创建人姓名"),
CreateUserRealName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
DoctorUserId = table.Column(type: "uniqueidentifier", nullable: true, comment: "阅片医生"),
EntityName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "被稽查实体名"),
GeneralId = table.Column(type: "uniqueidentifier", nullable: true, comment: "要稽查对象Id"),
Identification = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "标识"),
IP = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
IsFrontAdd = table.Column(type: "bit", nullable: true, comment: "是否是前端添加"),
IsSign = table.Column(type: "bit", nullable: true),
JsonDetail = table.Column(type: "nvarchar(max)", nullable: true),
LastJsonDetail = table.Column(type: "nvarchar(max)", nullable: true, comment: "上一条json"),
ModuleTypeId = table.Column(type: "uniqueidentifier", nullable: true),
ObjectRelationParentId = table.Column(type: "uniqueidentifier", nullable: true, comment: "被稽查对象外键1"),
ObjectRelationParentId2 = table.Column(type: "uniqueidentifier", nullable: true),
ObjectRelationParentId3 = table.Column(type: "uniqueidentifier", nullable: true),
ObjectTypeId = table.Column(type: "uniqueidentifier", nullable: true),
OptTypeId = table.Column(type: "uniqueidentifier", nullable: true),
ParentId = table.Column(type: "uniqueidentifier", nullable: true, comment: "父ID"),
Reason = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
RoleName = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false, comment: "角色名称"),
SignId = table.Column(type: "uniqueidentifier", nullable: true),
SubjectId = table.Column(type: "uniqueidentifier", nullable: true),
SubjectVisitId = table.Column(type: "uniqueidentifier", nullable: true),
TrialId = table.Column(type: "uniqueidentifier", nullable: true),
TrialReadingCriterionId = table.Column(type: "uniqueidentifier", nullable: true),
TrialSiteId = table.Column(type: "uniqueidentifier", nullable: true),
VisitStageId = table.Column(type: "uniqueidentifier", nullable: true, comment: "访视计划ID"),
VisitTaskId = table.Column(type: "uniqueidentifier", nullable: true),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DataInspection", x => x.Id);
},
comment: "稽查 - 记录表");
migrationBuilder.CreateTable(
name: "DicomAE",
columns: table => new
{
Id = table.Column(type: "uniqueidentifier", nullable: false),
CalledAE = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
IP = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Port = table.Column(type: "int", nullable: false),
Modality = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Description = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
LatestTestTime = table.Column(type: "datetime2", nullable: true),
IsTestOK = table.Column(type: "bit", nullable: false),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false),
UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DicomAE", x => x.Id);
},
comment: "医院dicomAE 配置");
migrationBuilder.CreateTable(
name: "DicomInstance",
columns: table => new
{
SeqId = table.Column(type: "uniqueidentifier", nullable: false),
Anonymize = table.Column(type: "bit", nullable: false),
CPIStatus = table.Column(type: "bit", nullable: false),
FileSize = table.Column(type: "bigint", nullable: true),
FrameOfReferenceUID = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
HtmlPath = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
ImageColumns = table.Column(type: "int", nullable: false),
ImageRows = table.Column(type: "int", nullable: false),
ImagerPixelSpacing = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
InstanceNumber = table.Column(type: "int", nullable: false),
InstanceTime = table.Column(type: "datetime2", nullable: true),
NumberOfFrames = table.Column(type: "int", nullable: false),
Path = table.Column(type: "nvarchar(1000)", maxLength: 1000, nullable: false),
PixelSpacing = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
SeriesId = table.Column(type: "uniqueidentifier", nullable: false),
SeriesInstanceUid = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
SliceLocation = table.Column(type: "int", nullable: false),
SliceThickness = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
SopInstanceUid = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
StudyId = table.Column(type: "uniqueidentifier", nullable: false),
StudyInstanceUid = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
SubjectId = table.Column(type: "uniqueidentifier", nullable: false),
SubjectVisitId = table.Column(type: "uniqueidentifier", nullable: false),
TrialId = table.Column(type: "uniqueidentifier", nullable: false),
WindowCenter = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
WindowWidth = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Id = table.Column(type: "uniqueidentifier", nullable: false),
CreateUserId = table.Column(type: "uniqueidentifier", nullable: false),
CreateTime = table.Column(type: "datetime2", nullable: false),
UpdateUserId = table.Column(type: "uniqueidentifier", nullable: false),
UpdateTime = table.Column(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_DicomInstance", x => x.SeqId);
table.UniqueConstraint("AK_DicomInstance_Id", x => x.Id);
},
comment: "归档 - Instance表");
migrationBuilder.CreateTable(
name: "DicomSeries",
columns: table => new
{
SeqId = table.Column(type: "uniqueidentifier", nullable: false),
AcquisitionNumber = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
AcquisitionTime = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
BodyPartExamined = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
BodyPartForEdit = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
Description = table.Column(type: "nvarchar(400)", maxLength: 400, nullable: false),
ImageOrientationPatient = table.Column