From a67472c9b4f9a670d2da15c52822204ea4823c87 Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Tue, 4 Nov 2025 10:37:15 +0800
Subject: [PATCH] =?UTF-8?q?=E9=98=85=E7=89=87=E6=9C=9F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Service/Reading/Dto/GetReadModuleDto.cs | 92 +-
.../Reading/Dto/ReadingPeriodSetViewModel.cs | 17 +-
.../ReadingPeriod/ReadModuleService.cs | 26 +-
.../ReadingPeriod/ReadingPeriodSetService.cs | 90 +-
.../Service/Reading/_MapConfig.cs | 6 +
.../Reading/ReadingPeriod/ReadModule.cs | 5 +
...1104012347_ReadingPeriodPlanId.Designer.cs | 20976 ++++++++++++++++
.../20251104012347_ReadingPeriodPlanId.cs | 29 +
.../IRaCISDBContextModelSnapshot.cs | 3 +
9 files changed, 21161 insertions(+), 83 deletions(-)
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20251104012347_ReadingPeriodPlanId.Designer.cs
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20251104012347_ReadingPeriodPlanId.cs
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs
index dbd0eed72..19fa125de 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs
@@ -46,12 +46,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class GetReadModulePageListInDto : PageInput
{
public Guid TrialId { get; set; }
+
+ public Guid TrialReadingCriterionId { get; set; }
+
+ ///
+ /// 阅片期名称
+ ///
+ public string ModuleName { get; set; } = string.Empty;
+
public string SubjectCode { get; set; }
public string VisitName { get; set; }
- [NotDefault]
- public Guid TrialReadingCriterionId { get; set; }
+
+
///
/// 阅片配置的类型
///
@@ -59,54 +67,60 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public ReadModuleAddType? ReadModuleAddTypeEnum { get; set; }
}
+
+
public class GetReadModulePageListOutDto
{
- public Guid SubjectId { get; set; }
- public string SubjectCode { get; set; }
+ public Guid Id { get; set; }
- public Guid TrialReadingCriterionId { get; set; }
-
-
- public ModuleTypeEnum ModuleType { get; set; }
-
- public string VisitName { get; set; } = string.Empty;
-
-
- public string ModuleName { get; set; } = string.Empty;
-
-
- public bool? IsUrgent { get; set; }
-
- public Guid SubjectVisitId { get; set; }
-
- public Guid? ReadingPeriodSetId { get; set; }
-
- public Guid TrialId { get; set; }
- public bool IsCRCConfirm { get; set; } = false;
-
- public bool IsPMConfirm { get; set; } = false;
-
- public bool IsNotNeedPMConfirm { get; set; } = false;
-
-
- public bool IsCRCApplicationRevoke { get; set; } = false;
- [Comment("临床数据是否完整")]
- public bool? IsClinicalDataComplete { get; set; }
-
- [Comment("临床数据是否盲化")]
- public bool? IsClinicalDataBlind { get; set; }
-
- [Comment("阅片配置的类型")]
+ ///
+ /// 阅片期类型
+ ///
public ReadingSetType ReadingSetType { get; set; }
///
- /// 添加方式
+ /// 阅片期名称
+ ///
+ public string ModuleName { get; set; } = string.Empty;
+
+ ///
+ /// 中心编号
+ ///
+ public string SiteCode { get; set; }
+
+ ///
+ /// 受试者编号
+ ///
+
+ public string SubjectCode { get; set; }
+
+ ///
+ /// 访视名称
+ ///
+ public string VisitName { get; set; } = string.Empty;
+
+ ///
+ /// 最晚拍片日期
+ ///
+ public DateTime? LatestScanDate { get; set; }
+
+
+ ///
+ /// 来源
///
public ReadModuleAddType ReadModuleAddTypeEnum { get; set; } = ReadModuleAddType.Normal;
+ ///
+ /// 是否生成任务
+ ///
+ public bool IsGenerateTask { get; set; }
+
+ ///
+ /// 生成任务时间
+ ///
+ public DateTime? GenerateTaskTime { get; set; }
- public ReadingStatusEnum ReadingStatus { get; set; } = ReadingStatusEnum.TaskAllocate;
}
public class GetSubjectReadVisitsOutDto
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs
index 7cdc0eb58..9bd415890 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs
@@ -138,11 +138,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public List SubjectVisitIdList { get; set; } = new List();
- ///
- /// 是否加入阅片计划
- ///
- public bool IsJoin { get; set; }
-
public Guid Id { get; set; }
}
@@ -283,6 +278,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public bool? IsGenerate { get; set; }
+ ///
+ /// 是否生成任务
+ ///
+ public bool? IsGenerateTask { get; set; }
+
+ ///
+ /// 生成时间
+ ///
+ public DateTime? GeneratedTime { get; set; }
+
}
public class ReadingPeriodSetView
@@ -431,6 +436,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class AddReadModuleVisitInfo
{
public Guid SubjectId { get; set; }
+
+ public Guid? ReadingPeriodPlanId { get; set; }
public bool IsUrgent { get; set; }
public Guid SubjectVisitId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs
index 3a45641d4..ee6c03d4c 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadModuleService.cs
@@ -836,15 +836,27 @@ namespace IRaCIS.Core.Application.Service
{
var readModuleQueryable = _readModuleRepository
- .Where(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
- .WhereIf(inDto.ReadModuleAddTypeEnum != null, x => x.ReadModuleAddTypeEnum == inDto.ReadModuleAddTypeEnum)
- .WhereIf(inDto.ReadingSetType != null, x => x.ReadingSetType == inDto.ReadingSetType)
- .WhereIf(inDto.SubjectCode.IsNotNullOrEmpty(), x => x.Subject.Code.Contains(inDto.SubjectCode))
- .WhereIf(inDto.VisitName.IsNotNullOrEmpty(), x => x.SubjectVisit.VisitName.Contains(inDto.VisitName))
- .ProjectTo(_mapper.ConfigurationProvider);
+ .Where(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
+ .WhereIf(inDto.ReadModuleAddTypeEnum != null, x => x.ReadModuleAddTypeEnum == inDto.ReadModuleAddTypeEnum)
+ .WhereIf(inDto.ReadingSetType != null, x => x.ReadingSetType == inDto.ReadingSetType)
+ .WhereIf(inDto.SubjectCode.IsNotNullOrEmpty(), x => x.Subject.Code.Contains(inDto.SubjectCode))
+ .WhereIf(inDto.VisitName.IsNotNullOrEmpty(), x => x.SubjectVisit.VisitName.Contains(inDto.VisitName))
+ .ProjectTo(_mapper.ConfigurationProvider);
+
var pageList = await readModuleQueryable.ToPagedListAsync(inDto);
-
+ var ids = pageList.CurrentPageData.Select(x => x.Id as Guid?).ToList();
+
+
+ var taskList=await _visitTaskRepository.Where(x => ids.Contains(x.SouceReadModuleId)).ToListAsync();
+
+ pageList.CurrentPageData.ForEach(x =>
+ {
+
+ x.IsGenerateTask= taskList.Any(t => t.SouceReadModuleId == x.Id);
+ x.GenerateTaskTime= taskList.Where(t => t.SouceReadModuleId == x.Id).OrderByDescending(t => t.CreateTime).Select(t => t.CreateTime).FirstOrDefault();
+
+ });
return pageList;
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadingPeriodSetService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadingPeriodSetService.cs
index e944c024c..4f53a4af7 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadingPeriodSetService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriod/ReadingPeriodSetService.cs
@@ -1,4 +1,5 @@
-using IRaCIS.Core.Application.Contracts;
+using DocumentFormat.OpenXml.Drawing;
+using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Application.Filter;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Application.ViewModel;
@@ -205,7 +206,7 @@ namespace IRaCIS.Core.Application.Service
{
SubjectId = x.SubjectVisit.SubjectId,
SubjectVisitId = x.SubjectVisitId,
-
+ ReadingPeriodPlanId=x.Id,
IsUrgent = false
}).ToList()
@@ -285,6 +286,7 @@ namespace IRaCIS.Core.Application.Service
SubjectVisitId = item.SubjectVisitId,
ReadingSetType = inDto.ReadingSetType,
ReadingPeriodSetId = inDto.ReadingPeriodSetId,
+ ReadingPeriodPlanId= item.ReadingPeriodPlanId,
ReadingStatus = ReadingStatusEnum.TaskAllocate,
TrialId = inDto.TrialId,
//VisitNum = item.SubjectVisit.VisitNum,
@@ -615,11 +617,12 @@ namespace IRaCIS.Core.Application.Service
TrialId = readingPeriodSet.TrialId,
ReadingPeriodSetId = readingPeriodSet.Id,
TrialReadingCriterionId = readingPeriodSet.TrialReadingCriterionId,
- VisitInfoList = subejctVisits.Select(x => new AddReadModuleVisitInfo()
+ VisitInfoList = plans.Select(x => new AddReadModuleVisitInfo()
{
- SubjectId = x.SubjectId,
+ SubjectId = subejctVisits.Where(y=>y.Id==x.SubjectVisitId).Select(x=>x.SubjectId).FirstOrDefault(),
SubjectVisitId = x.Id,
- IsUrgent = x.IsUrgent,
+ ReadingPeriodPlanId= x.Id,
+ IsUrgent = subejctVisits.Where(y => y.Id == x.SubjectVisitId).Select(x => x.IsUrgent).FirstOrDefault(),
}).ToList()
@@ -629,36 +632,35 @@ namespace IRaCIS.Core.Application.Service
}
///
- /// 设置加入或者移除阅片计划
+ /// 移除阅片计划
///
///
///
[HttpPost]
- public async Task SetBatchAddOrRemoveReadingPlan(SetBatchAddOrRemoveReadingPlanInDto inDto)
+ public async Task SetBatchRemoveReadingPlan(SetBatchAddOrRemoveReadingPlanInDto inDto)
{
+ var planSet = await _readingPeriodSetRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync();
+ List isGenerateTaskVisitIds = new List();
+ List readModules = new List();
- if (inDto.IsJoin)
- {
- var existsVisitIds = await _readingPeriodPlanRepository.Where(x => x.ReadingPeriodSetId == inDto.Id).Select(x => x.SubjectVisitId).ToListAsync();
+ readModules = await _readModuleRepository.Where(x => x.ReadingPeriodSetId == inDto.Id).ToListAsync();
- inDto.SubjectVisitIdList = inDto.SubjectVisitIdList.Where(x => !existsVisitIds.Contains(x)).ToList();
+ var readModuleIds = readModules.Select(x => x.Id).ToList();
- List plans = inDto.SubjectVisitIdList.Select(x => new ReadingPeriodPlan()
- {
- SubjectVisitId = x,
- ReadingPeriodSetId = inDto.Id
- }).ToList();
+ var souceReadModuleIds = await _visitTaskRepository.Where(x => x.TrialReadingCriterionId == planSet.TrialReadingCriterionId && readModuleIds.Contains(x.SouceReadModuleId ?? default(Guid))).Select(x => x.SouceReadModuleId).ToListAsync();
- await _readingPeriodPlanRepository.AddRangeAsync(plans);
- }
- else
- {
- await _readingPeriodPlanRepository.UpdatePartialFromQueryAsync(x => x.ReadingPeriodSetId == inDto.Id && inDto.SubjectVisitIdList.Contains(x.SubjectVisitId), x => new ReadingPeriodPlan()
- {
- IsDeleted = true
- });
- }
+ isGenerateTaskVisitIds = await _readModuleRepository.Where(x => souceReadModuleIds.Contains(x.Id) && x.ReadingPeriodPlanId != null).Select(x => x.SubjectVisitId).ToListAsync();
+
+ inDto.SubjectVisitIdList= inDto.SubjectVisitIdList.Where(x => !isGenerateTaskVisitIds.Contains(x)).ToList();
+
+ var planIds= await _readingPeriodPlanRepository.Where(x => x.ReadingPeriodSetId == inDto.Id && inDto.SubjectVisitIdList.Contains(x.SubjectVisitId)).Select(x=>x.Id).ToListAsync();
+
+
+ var deletePlasIds= planIds.Select(x=>(Guid?)x).ToList();
+
+ await _readModuleRepository.DeleteFromQueryAsync(x => deletePlasIds.Contains(x.ReadingPeriodPlanId));
+ await _readingPeriodPlanRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == inDto.Id && inDto.SubjectVisitIdList.Contains(x.SubjectVisitId);
await _readingPeriodPlanRepository.SaveChangesAsync();
@@ -690,10 +692,26 @@ namespace IRaCIS.Core.Application.Service
});
List isChooseVisitIds = new List();
-
- if (isChangeReadingPlan)
+ List IsGenerateVisitIds = new List();
+ List chooseVisitVisitList = new List();
+ List isGenerateTaskVisitIds = new List();
+ List readModules = new List();
+ if (!isChangeReadingPlan)
{
- isChooseVisitIds= await _readingPeriodPlanRepository.Where(x => x.ReadingPeriodSetId == inDto.Id).Select(x => x.SubjectVisitId).ToListAsync();
+ if (inDto.Id != null)
+ {
+ readModules = await _readModuleRepository.Where(x => x.ReadingPeriodSetId == inDto.Id).ToListAsync();
+
+ var readModuleIds= readModules.Select(x => x.Id).ToList();
+
+ var souceReadModuleIds = await _visitTaskRepository.Where(x => x.TrialReadingCriterionId == inDto.TrialReadingCriterionId && readModuleIds.Contains(x.SouceReadModuleId ?? default(Guid))).Select(x=>x.SouceReadModuleId).ToListAsync();
+
+ isGenerateTaskVisitIds = await _readModuleRepository.Where(x => souceReadModuleIds.Contains(x.Id)&&x.ReadingPeriodPlanId!=null).Select(x=>x.SubjectVisitId).ToListAsync();
+ }
+
+ chooseVisitVisitList = await _readingPeriodPlanRepository.Where(x => x.ReadingPeriodSetId == inDto.Id).ToListAsync();
+ isChooseVisitIds= chooseVisitVisitList.Select(x => x.SubjectVisitId).ToList();
+ IsGenerateVisitIds= chooseVisitVisitList.Where(x => x.IsGenerate).Select(x => x.SubjectVisitId).ToList();
}
var isTakeEffect = await _readingPeriodSetRepository.Where(x => x.Id == inDto.Id).Select(x => x.IsTakeEffect).FirstOrDefaultAsync();
@@ -704,6 +722,11 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inDto.ReadingScope == ReadingScopeEnum.Site, x => inDto.SiteIds.Contains(x.TrialSiteId))
.Where(x => !x.IsBaseLine);// 排除基线
+
+ var chooseVisitQuery = _subjectVisitRepository.Where(x => isChooseVisitIds.Contains(x.Id));
+
+
+ visitQuery= visitQuery.Union(chooseVisitQuery);
// 已经存在的访视 需要排除
var existsBubjectVisitsQuery = _readModuleRepository.Where(y => y.ReadingSetType == inDto.ReadingSetType && y.TrialId == inDto.TrialId && y.TrialReadingCriterionId == inDto.TrialReadingCriterionId).Select(x => x.SubjectVisitId);
@@ -716,10 +739,11 @@ namespace IRaCIS.Core.Application.Service
.WhereIf(inDto.SiteId != null,x=> x.Subject.TrialSiteId==inDto.SiteId)
.WhereIf(inDto.SubjectCode.IsNotNullOrEmpty(), x =>x.Subject.Code.Contains(inDto.SubjectCode))
.WhereIf(inDto.IsJoin != null && inDto.IsJoin.Value, x => isChooseVisitIds.Contains(x.Id))
- .WhereIf(inDto.IsGenerate != null && inDto.IsGenerate.Value, x => isChooseVisitIds.Contains(x.Id)&& isTakeEffect== ReadingPeriodStatus.TakeEffect)
- ;
+ .WhereIf(inDto.IsGenerate != null && inDto.IsGenerate.Value, x => IsGenerateVisitIds.Contains(x.Id))
+ .WhereIf(inDto.IsJoin != null && !inDto.IsJoin.Value, x => !isChooseVisitIds.Contains(x.Id))
+ .WhereIf(inDto.IsGenerate != null && !inDto.IsGenerate.Value, x => !IsGenerateVisitIds.Contains(x.Id));
- //.Where(x => isChooseVisitIds.Contains(x.Id));
+ //.Where(x => isChooseVisitIds.Contains(x.Id));
var subjectIdlist = await visitQuery.OrderBy(x => x.SubjectId).Select(x => x.SubjectId).Distinct().Skip((inDto.PageIndex - 1) * inDto.PageSize).Take(inDto.PageSize).ToListAsync();
@@ -759,7 +783,9 @@ namespace IRaCIS.Core.Application.Service
SubjectId = x.SubjectId,
SubjectVisitName = x.VisitName,
IsJoin= isChooseVisitIds.Contains(x.Id),
- IsGenerate= isChooseVisitIds.Contains(x.Id)&& isTakeEffect== ReadingPeriodStatus.TakeEffect,
+ IsGenerate = IsGenerateVisitIds.Contains(x.Id),
+ IsGenerateTask = isGenerateTaskVisitIds.Contains(x.Id),
+ GeneratedTime = chooseVisitVisitList.Where(y=>y.SubjectVisitId==x.Id).Select(y=>y.GeneratedTime).FirstOrDefault(),
}).ToList(),
PageSize = inDto.PageSize,
PageIndex = inDto.PageIndex,
diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
index 1a15016d7..76d0127e1 100644
--- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
@@ -18,6 +18,12 @@ namespace IRaCIS.Core.Application.Service
//标准Id
List CriterionIds = new List();
+ CreateMap()
+ .ForMember(d => d.SiteCode, u => u.MapFrom(s => s.Subject.TrialSite.TrialSiteCode))
+ .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
+ .ForMember(d => d.VisitName, u => u.MapFrom(s => s.SubjectVisit.VisitName))
+ .ForMember(d => d.LatestScanDate, u => u.MapFrom(s => s.SubjectVisit.LatestScanDate));
+
#region 临床问题
CreateMap()
.ForMember(d => d.GroupName, opt => opt.MapFrom(src => src.GroupQuestin.QuestionName))
diff --git a/IRaCIS.Core.Domain/Reading/ReadingPeriod/ReadModule.cs b/IRaCIS.Core.Domain/Reading/ReadingPeriod/ReadModule.cs
index a6df09c0c..dff226574 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingPeriod/ReadModule.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingPeriod/ReadModule.cs
@@ -54,6 +54,11 @@ public class ReadModule : BaseFullDeleteAuditEntity
[Comment("阅片计划ID")]
public Guid? ReadingPeriodSetId { get; set; }
+ ///
+ /// 阅片计划
+ ///
+ public Guid? ReadingPeriodPlanId { get; set; }
+
public Guid TrialId { get; set; }
public bool IsCRCConfirm { get; set; } = false;
diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20251104012347_ReadingPeriodPlanId.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20251104012347_ReadingPeriodPlanId.Designer.cs
new file mode 100644
index 000000000..1ffeac0ab
--- /dev/null
+++ b/IRaCIS.Core.Infra.EFCore/Migrations/20251104012347_ReadingPeriodPlanId.Designer.cs
@@ -0,0 +1,20976 @@
+//
+using System;
+using IRaCIS.Core.Infra.EFCore;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace IRaCIS.Core.Infra.EFCore.Migrations
+{
+ [DbContext(typeof(IRaCISDBContext))]
+ [Migration("20251104012347_ReadingPeriodPlanId")]
+ partial class ReadingPeriodPlanId
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.19")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.Attachment", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("编码");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DoctorId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ExpiryDate")
+ .HasColumnType("datetime2")
+ .HasComment("过期时间");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsAuthorizedView")
+ .HasColumnType("bit");
+
+ b.Property("IsOfficial")
+ .HasColumnType("bit")
+ .HasComment("是否正式简历");
+
+ b.Property("Language")
+ .HasColumnType("int")
+ .HasComment("1 中文 2为英文");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("文件类型名");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("DoctorId");
+
+ b.ToTable("Attachment", t =>
+ {
+ t.HasComment("医生 - 简历|证书 文档表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocument", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditDocumentTypeEnum")
+ .HasColumnType("int");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("FileFormat")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FilePath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("FileSize")
+ .HasPrecision(18, 2)
+ .HasColumnType("decimal(18,2)");
+
+ b.Property("IsAuthorization")
+ .HasColumnType("bit");
+
+ b.Property("MainFileId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Version")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("MainFileId");
+
+ b.ToTable("AuditDocument", t =>
+ {
+ t.HasComment("稽查文档管理");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditDocumentClosure", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AncestorId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("祖先");
+
+ b.Property("Depth")
+ .HasColumnType("int");
+
+ b.Property("DescendantId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("后代");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AncestorId");
+
+ b.HasIndex("DescendantId");
+
+ b.ToTable("AuditDocumentClosure");
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecord", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditContent")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("AuditState")
+ .HasColumnType("int")
+ .HasComment("稽查状态");
+
+ b.Property("AuditTime")
+ .HasColumnType("date")
+ .HasComment("稽查日期");
+
+ b.Property("AuditType")
+ .HasColumnType("int")
+ .HasComment("稽查形式");
+
+ b.Property("BeginTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CompanyName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("EndTime")
+ .HasColumnType("datetime2");
+
+ b.Property("IsViewTrainingRecord")
+ .HasColumnType("bit");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("AuditRecord");
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordIdentityUser", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditRecordId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IdentityUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditRecordId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("IdentityUserId");
+
+ b.ToTable("AuditRecordIdentityUser");
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.AuditRecordPermission", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditDocumentId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AuditRecordId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditDocumentId");
+
+ b.HasIndex("AuditRecordId");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("AuditRecordPermission");
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CRO", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CROCode")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CROName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CRONameCN")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsTrialLevel")
+ .HasColumnType("bit")
+ .HasComment("是否是项目级别");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CROCompany", t =>
+ {
+ t.HasComment("机构 - CRO");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CheckChallengeDialog", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsCRCNeedReply")
+ .HasColumnType("bit")
+ .HasComment("CRC是否需要回复 前端使用");
+
+ b.Property("ParamInfo")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)")
+ .HasComment("核查的检查信息Json");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TalkContent")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("UserTypeEnum")
+ .HasColumnType("int")
+ .HasComment("核查过程中的操作用户类型");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SubjectVisitId");
+
+ b.ToTable("CheckChallengeDialog", t =>
+ {
+ t.HasComment("一致性核查 - 对话记录表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalAnswerRowInfo", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("RowIndex")
+ .HasColumnType("int");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalAnswerRowInfo", t =>
+ {
+ t.HasComment("受试者 - 临床表单表格问题行记录");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataSystemSet", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalDataLevel")
+ .HasColumnType("int");
+
+ b.Property("ClinicalDataSetEnName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalDataSetEnum")
+ .HasColumnType("int")
+ .HasComment("枚举(字典里面取的)");
+
+ b.Property("ClinicalDataSetName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalUploadType")
+ .HasColumnType("int")
+ .HasComment("上传方式");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionEnumListStr")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("EnFileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("EnPath")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsApply")
+ .HasColumnType("bit")
+ .HasComment("是否应用");
+
+ b.Property("IsEnable")
+ .HasColumnType("bit");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("UploadRole")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalDataSystemSet", t =>
+ {
+ t.HasComment("系统 - 临床数据配置");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalDataTrialSet", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalDataLevel")
+ .HasColumnType("int")
+ .HasComment("临床级别");
+
+ b.Property("ClinicalDataSetEnName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalDataSetName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ClinicalUploadType")
+ .HasColumnType("int")
+ .HasComment("上传方式");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionEnumListStr")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("EnFileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("EnPath")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FileName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsApply")
+ .HasColumnType("bit")
+ .HasComment("是否应用");
+
+ b.Property("IsConfirm")
+ .HasColumnType("bit");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("SystemClinicalDataSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UploadRole")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SystemClinicalDataSetId");
+
+ b.HasIndex("TrialId");
+
+ b.ToTable("ClinicalDataTrialSet", t =>
+ {
+ t.HasComment("项目 - 临床数据适应标准配置");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalForm", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CheckDate")
+ .HasColumnType("datetime2")
+ .HasComment("检查日期");
+
+ b.Property("ClinicalDataTrialSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("PicturePath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)")
+ .HasComment("截图地址");
+
+ b.Property("ReadingId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClinicalDataTrialSetId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("ReadingId");
+
+ b.HasIndex("SubjectId");
+
+ b.ToTable("ClinicalForm", t =>
+ {
+ t.HasComment("受试者 - 临床表单");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalQuestionAnswer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Answer")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("ClinicalDataTrialSetId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.HasKey("Id");
+
+ b.HasIndex("ClinicalFormId");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("ClinicalQuestionAnswer", t =>
+ {
+ t.HasComment("受试者 - 临床表单问题答案");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.ClinicalTableAnswer", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Answer")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)")
+ .HasComment("答案");
+
+ b.Property("ClinicalFormId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("表单Id");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("QuestionId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("问题Id");
+
+ b.Property("RowId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("答案行的Id");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("受试者Id");
+
+ b.Property("TableQuestionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("RowId");
+
+ b.ToTable("ClinicalTableAnswer", t =>
+ {
+ t.HasComment("受试者 - 临床表单表格问题答案");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CommonDocument", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BusinessScenarioEnum")
+ .HasColumnType("int")
+ .HasComment("业务场景");
+
+ b.Property("Code")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionTypeEnum")
+ .HasColumnType("int")
+ .HasComment("系统标准枚举");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FileTypeEnum")
+ .HasColumnType("int")
+ .HasComment("类型-上传|导出|邮件附件");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("NameCN")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CommonDocument", t =>
+ {
+ t.HasComment("数据上传 | 数据导出 | 邮件附件 文件记录表 (需要同步)");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusSystem", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("IsSystemCriterion")
+ .HasColumnType("bit");
+
+ b.Property("LesionType")
+ .HasColumnType("int")
+ .HasComment("病灶类型");
+
+ b.Property("OrganType")
+ .HasColumnType("int")
+ .HasComment("器官类型");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("CriterionId");
+
+ b.ToTable("CriterionNidusSystem", t =>
+ {
+ t.HasComment("系统标准 - 病灶器官表 (需要同步)");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.CriterionNidusTrial", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("LesionType")
+ .HasColumnType("int");
+
+ b.Property("OrganType")
+ .HasColumnType("int");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.ToTable("CriterionNidusTrial", t =>
+ {
+ t.HasComment("项目标准 - 病灶器官表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DataInspection", b =>
+ {
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("BatchId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("批次Id");
+
+ b.Property("ChildrenTypeId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("子类");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("CreateUserName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("创建人姓名");
+
+ b.Property("CreateUserRealName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("DoctorUserId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("阅片医生");
+
+ b.Property("EntityName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("被稽查实体名");
+
+ b.Property("GeneralId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("要稽查对象Id");
+
+ b.Property("IP")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Identification")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("标识");
+
+ b.Property("IsFrontAdd")
+ .HasColumnType("bit")
+ .HasComment("是否是前端添加");
+
+ b.Property("IsSign")
+ .HasColumnType("bit");
+
+ b.Property("JsonDetail")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastJsonDetail")
+ .HasColumnType("nvarchar(max)")
+ .HasComment("上一条json");
+
+ b.Property("ModuleTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectRelationParentId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("被稽查对象外键1");
+
+ b.Property("ObjectRelationParentId2")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectRelationParentId3")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ObjectTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("OptTypeId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ParentId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("父ID");
+
+ b.Property("Reason")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("RoleName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("角色名称");
+
+ b.Property("SignId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialReadingCriterionId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialSiteId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitStageId")
+ .HasColumnType("uniqueidentifier")
+ .HasComment("访视计划ID");
+
+ b.Property("VisitTaskId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("TrialReadingCriterionId");
+
+ b.HasIndex("VisitTaskId");
+
+ b.ToTable("DataInspection", t =>
+ {
+ t.HasComment("稽查 - 记录表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomInstance", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("Anonymize")
+ .HasColumnType("bit");
+
+ b.Property("BitsAllocated")
+ .HasColumnType("int");
+
+ b.Property("CPIStatus")
+ .HasColumnType("bit");
+
+ b.Property("CorrectedImage")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DecayCorrection")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("EncapsulatedDocument")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FileSize")
+ .HasColumnType("bigint");
+
+ b.Property("FrameOfReferenceUID")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("FrameTime")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("HtmlPath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ImageColumns")
+ .HasColumnType("int");
+
+ b.Property("ImageOrientationPatient")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ImagePositionPatient")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ImageRows")
+ .HasColumnType("int");
+
+ b.Property("ImagerPixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("InstanceNumber")
+ .HasColumnType("int");
+
+ b.Property("InstanceTime")
+ .HasColumnType("datetime2");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("IsEncapsulated")
+ .HasColumnType("bit");
+
+ b.Property("IsReading")
+ .HasColumnType("bit");
+
+ b.Property