From 20cc4301323da3af409aad0d5339af7795b9587f Mon Sep 17 00:00:00 2001
From: he <109787524@qq.com>
Date: Tue, 29 Oct 2024 13:56:35 +0800
Subject: [PATCH 1/4] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E5=8C=BB=E7=94=9F?=
=?UTF-8?q?=E7=AE=80=E5=8E=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/ExtraController.cs | 46 +-
IRaCIS.Core.API/IRaCIS.Core.API.xml | 7 +-
.../IRaCIS.Core.Application.xml | 24 +-
.../Service/Doctor/DTO/DoctorModel.cs | 15 +
.../Doctor/DTO/ResearchPublicationModel.cs | 14 +
.../Doctor/DTO/TrialExperienceModel.cs | 8 +
.../Service/Doctor/DoctorService.cs | 46 +-
.../Doctor/Interface/IDoctorService.cs | 4 +-
.../Interface/ITrialExperienceService.cs | 11 +-
.../Service/Doctor/TrialExperienceService.cs | 80 +-
IRaCIS.Core.Domain/Dcotor/Doctor.cs | 10 +
IRaCIS.Core.Domain/Dcotor/TrialExperience.cs | 41 +
.../20241029055220_doctorinfo1029.Designer.cs | 18011 ++++++++++++++++
.../20241029055220_doctorinfo1029.cs | 92 +
.../IRaCISDBContextModelSnapshot.cs | 377 +-
15 files changed, 18558 insertions(+), 228 deletions(-)
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20241029055220_doctorinfo1029.Designer.cs
create mode 100644 IRaCIS.Core.Infra.EFCore/Migrations/20241029055220_doctorinfo1029.cs
diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs
index e24c7e99c..f7f603695 100644
--- a/IRaCIS.Core.API/Controllers/ExtraController.cs
+++ b/IRaCIS.Core.API/Controllers/ExtraController.cs
@@ -29,7 +29,10 @@ namespace IRaCIS.Api.Controllers
/// 医生基本信息 、工作信息 专业信息、审核状态
///
[ApiController, ApiExplorerSettings(GroupName = "Reviewer")]
- public class ExtraController : ControllerBase
+ public class ExtraController([FromServices] IAttachmentService attachmentService, [FromServices] IDoctorService _doctorService,
+ [FromServices] IEducationService _educationService, [FromServices] ITrialExperienceService _trialExperienceService,
+
+ [FromServices] IResearchPublicationService _researchPublicationService, [FromServices] IVacationService _vacationService) : ControllerBase
{
@@ -44,35 +47,38 @@ namespace IRaCIS.Api.Controllers
///
///
///
- [HttpGet, Route("doctor/getDetail/{doctorId:guid}")]
+ [HttpGet, Route("doctor/getDetail")]
- public async Task> GetDoctorDetail([FromServices] IAttachmentService attachmentService, [FromServices] IDoctorService _doctorService,
- [FromServices] IEducationService _educationService, [FromServices] ITrialExperienceService _trialExperienceService,
-
- [FromServices] IResearchPublicationService _researchPublicationService, [FromServices] IVacationService _vacationService, Guid doctorId)
+ public async Task> GetDoctorDetail(GetDoctorDetailInDto inDto)
{
- var education = await _educationService.GetEducation(doctorId);
+ var education = await _educationService.GetEducation(inDto.doctorId);
- var sowList = _doctorService.GetDoctorSowList(doctorId);
- var ackSowList = _doctorService.GetDoctorAckSowList(doctorId);
+ var sowList = _doctorService.GetDoctorSowList(inDto.doctorId);
+ var ackSowList = _doctorService.GetDoctorAckSowList(inDto.doctorId);
var doctorDetail = new DoctorDetailDTO
{
- AuditView = await _doctorService.GetAuditState(doctorId),
- BasicInfoView = await _doctorService.GetBasicInfo(doctorId),
- EmploymentView = await _doctorService.GetEmploymentInfo(doctorId),
- AttachmentList = await attachmentService.GetAttachments(doctorId),
- SummarizeInfo = await _doctorService.GetSummarizeInfo(doctorId),
- PaymentModeInfo = await _doctorService.GetPaymentMode(doctorId),
+ AuditView = await _doctorService.GetAuditState(inDto.doctorId),
+ BasicInfoView = await _doctorService.GetBasicInfo(inDto.doctorId),
+ EmploymentView = await _doctorService.GetEmploymentInfo(inDto.doctorId),
+ AttachmentList = await attachmentService.GetAttachments(inDto.doctorId),
+ SummarizeInfo = await _doctorService.GetSummarizeInfo(new GetSummarizeInfoInDto() {
+ DoctorId = inDto.doctorId,
+ TrialId=inDto.TrialId
+ }),
+ PaymentModeInfo = await _doctorService.GetPaymentMode(inDto.doctorId),
EducationList = education.EducationList,
PostgraduateList = education.PostgraduateList,
- TrialExperienceView = await _trialExperienceService.GetTrialExperience(doctorId),
- ResearchPublicationView = await _researchPublicationService.GetResearchPublication(doctorId),
+ TrialExperienceView = await _trialExperienceService.GetTrialExperience(new TrialExperienceModelIndto() {
+ DoctorId = inDto.doctorId,
+ TrialId = inDto.TrialId
+ }),
+ ResearchPublicationView = await _researchPublicationService.GetResearchPublication(inDto.doctorId),
- SpecialtyView = await _doctorService.GetSpecialtyInfo(doctorId),
- InHoliday = (await _vacationService.OnVacation(doctorId)).IsSuccess,
- IntoGroupInfo = _doctorService.GetDoctorIntoGroupInfo(doctorId),
+ SpecialtyView = await _doctorService.GetSpecialtyInfo(inDto.doctorId),
+ InHoliday = (await _vacationService.OnVacation(inDto.doctorId)).IsSuccess,
+ IntoGroupInfo = _doctorService.GetDoctorIntoGroupInfo(inDto.doctorId),
SowList = sowList,
AckSowList = ackSowList
};
diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml
index 4b4186d94..6482e6934 100644
--- a/IRaCIS.Core.API/IRaCIS.Core.API.xml
+++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml
@@ -16,7 +16,12 @@
医生基本信息 、工作信息 专业信息、审核状态
-
+
+
+ 医生基本信息 、工作信息 专业信息、审核状态
+
+
+
获取医生详情
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 0e8920bc6..f8a323bf6 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1173,7 +1173,7 @@
-
+
获取概述
@@ -1285,11 +1285,18 @@
-
+
- 根据医生Id,获取临床试验经历 界面所有数据
+ 根据医生Id,获取临床试验经历 界面所有数据 获取其他相关经历
+
+
+ 获取项目编辑的医生信息
+
+
+
+
添加或更新医生临床经验列表项
@@ -17259,11 +17266,11 @@
-
+
获取概述
-
+
@@ -17302,6 +17309,13 @@
获取医生入组的 ack Sow
+
+
+ 获取项目医生编辑的信息
+
+
+
+
判断当前时间是否在休假
diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
index 8221204be..d1bb78ff6 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
@@ -237,6 +237,12 @@ namespace IRaCIS.Application.Contracts
#endregion
+ public class GetDoctorDetailInDto
+ {
+ public Guid doctorId { get; set; }
+
+ public Guid? TrialId { get; set; }
+ }
public class DoctorDetailDTO
{
public DoctorBasicInfoDTO BasicInfoView { get; set; }
@@ -355,10 +361,19 @@ namespace IRaCIS.Application.Contracts
}
+ public class GetSummarizeInfoInDto
+ {
+ public Guid DoctorId { get; set; }
+
+ public Guid? TrialId { get; set; }
+ }
+
public class UpdateGneralSituationDto
{
public Guid Id { get; set; }
+ public Guid? TrialId { get; set; }
+
///
/// 概述
///
diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/ResearchPublicationModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/ResearchPublicationModel.cs
index cc33f5a77..669e818d6 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DTO/ResearchPublicationModel.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DTO/ResearchPublicationModel.cs
@@ -1,5 +1,19 @@
namespace IRaCIS.Application.Contracts
{
+ public class GetTrialDoctorInfoInDto
+ {
+ public Guid DoctorId { get; set; }
+
+ public Guid TrialId { get; set; }
+ }
+
+ public class ResearchPublicationInDTO
+ {
+ public Guid DoctorId { get; set; }
+
+ public Guid? TrialId { get; set; }
+
+ }
public class ResearchPublicationDTO
{
public Guid? Id { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/TrialExperienceModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/TrialExperienceModel.cs
index 463f47cce..61ee612a0 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DTO/TrialExperienceModel.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DTO/TrialExperienceModel.cs
@@ -49,6 +49,12 @@
// public string EvaluationCriteria { get; set; }
//}
+ public class TrialExperienceModelIndto
+ {
+ public Guid DoctorId { get; set; }
+
+ public Guid? TrialId { get; set; }
+ }
public class TrialExperienceModel : GcpAndOtherExperienceDTO
{
@@ -111,6 +117,8 @@
{
public Guid DoctorId { get; set; }
+ public Guid? TrialId { get; set; }
+
public string OtherClinicalExperience { get; set; } = String.Empty;
public string OtherClinicalExperienceCN { get; set; } = String.Empty;
}
diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
index 5fd272523..e77010be6 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DoctorService.cs
@@ -20,6 +20,7 @@ namespace IRaCIS.Core.Application.Service
IRepository _trialRepository,
IRepository _vacationRepository,
IOptionsMonitor systemEmailConfig,
+ ITrialExperienceService trialExperienceService,
IRepository _trialExtRepository, IMapper _mapper, IUserInfo _userInfo, IStringLocalizer _localizer) : BaseService, IDoctorService
{
@@ -219,12 +220,25 @@ namespace IRaCIS.Core.Application.Service
[HttpPost]
public async Task UpdateGneralSituation(UpdateGneralSituationDto inDto)
{
-
- await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Doctor()
+ if (inDto.TrialId != null)
{
- Summarize = inDto.Summarize,
- SummarizeEn = inDto.SummarizeEn,
- });
+ await _doctorRepository.UpdatePartialFromQueryAsync(x => x.DoctorId == inDto.Id&&x.TrialId==inDto.TrialId.Value, x => new Doctor()
+ {
+ Summarize = inDto.Summarize,
+ SummarizeEn = inDto.SummarizeEn,
+ });
+
+ }
+ else
+ {
+ await _doctorRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.Id, x => new Doctor()
+ {
+ Summarize = inDto.Summarize,
+ SummarizeEn = inDto.SummarizeEn,
+ });
+ }
+
+
var success= await _doctorRepository.SaveChangesAsync();
return success;
}
@@ -235,10 +249,26 @@ namespace IRaCIS.Core.Application.Service
///
///
///
- public async Task GetSummarizeInfo(Guid Id)
+ public async Task GetSummarizeInfo(GetSummarizeInfoInDto inDto)
{
- var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == Id)
- .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
+ var doctorBasicInfo = (await _doctorRepository.Where(t => t.Id == inDto.DoctorId)
+ .ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync()).IfNullThrowException();
+ if (inDto.TrialId != null)
+ {
+ var doctorInfo = await trialExperienceService.GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
+ {
+ TrialId = inDto.TrialId.Value,
+ DoctorId = inDto.DoctorId,
+ });
+
+ doctorBasicInfo = new UpdateGneralSituationDto()
+ {
+ Summarize = doctorInfo.Summarize,
+ SummarizeEn = doctorInfo.SummarizeEn,
+
+ };
+ }
+
return doctorBasicInfo;
}
diff --git a/IRaCIS.Core.Application/Service/Doctor/Interface/IDoctorService.cs b/IRaCIS.Core.Application/Service/Doctor/Interface/IDoctorService.cs
index 0a70ba78e..13fa16990 100644
--- a/IRaCIS.Core.Application/Service/Doctor/Interface/IDoctorService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/Interface/IDoctorService.cs
@@ -42,9 +42,9 @@ namespace IRaCIS.Application.Interfaces
///
/// 获取概述
///
- ///
+ ///
///
- Task GetSummarizeInfo(Guid Id);
+ Task GetSummarizeInfo(GetSummarizeInfoInDto inDto);
///
/// 更新医生 工作信息
diff --git a/IRaCIS.Core.Application/Service/Doctor/Interface/ITrialExperienceService.cs b/IRaCIS.Core.Application/Service/Doctor/Interface/ITrialExperienceService.cs
index 68c679246..bef386e32 100644
--- a/IRaCIS.Core.Application/Service/Doctor/Interface/ITrialExperienceService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/Interface/ITrialExperienceService.cs
@@ -4,7 +4,16 @@ namespace IRaCIS.Application.Interfaces
{
public interface ITrialExperienceService
{
- Task GetTrialExperience(Guid doctorId);
+
+ ///
+ /// 获取项目医生编辑的信息
+ ///
+ ///
+ ///
+ Task GetTrialDoctorInfo(GetTrialDoctorInfoInDto inDto);
+
+
+ Task GetTrialExperience(TrialExperienceModelIndto indto);
Task AddOrUpdateTrialExperience(TrialExperienceCommand model);
Task DeleteTrialExperience(Guid id);
Task UpdateGcpExperience(GCPExperienceCommand model);
diff --git a/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs b/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs
index 4038f9d9a..f1bb50f6d 100644
--- a/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/TrialExperienceService.cs
@@ -14,26 +14,36 @@ namespace IRaCIS.Core.Application.Service
///
- /// 根据医生Id,获取临床试验经历 界面所有数据
+ /// 根据医生Id,获取临床试验经历 界面所有数据 获取其他相关经历
///
[HttpGet("{doctorId:guid}")]
- public async Task GetTrialExperience(Guid doctorId)
+ public async Task GetTrialExperience(TrialExperienceModelIndto indto)
{
var trialExperience = new TrialExperienceModel();
- var doctor = await _doctorRepository.Where(o => o.Id == doctorId)
+ var doctor = await _doctorRepository.Where(o => o.Id == indto.DoctorId)
.ProjectTo(_mapper.ConfigurationProvider).FirstOrDefaultAsync();
- trialExperience.ClinicalTrialExperienceList = await GetTrialExperienceList(doctorId);
+ trialExperience.ClinicalTrialExperienceList = await GetTrialExperienceList(indto.DoctorId);
if (doctor != null)
{
+ var trialDoctor = new Doctor();
+ if (indto.TrialId != null)
+ {
+ trialDoctor = await GetTrialDoctorInfo(new GetTrialDoctorInfoInDto()
+ {
+ DoctorId = indto.DoctorId,
+ TrialId = indto.TrialId.Value,
+ });
+ }
+
trialExperience.GCP = doctor.GCP;
trialExperience.Id = doctor.Id;
trialExperience.GCPTime = doctor.GCPTime;
trialExperience.GCPAgencies = doctor.GCPAgencies;
- trialExperience.OtherClinicalExperience = doctor.OtherClinicalExperience ?? "";
- trialExperience.OtherClinicalExperienceCN = doctor.OtherClinicalExperienceCN ?? "";
+ trialExperience.OtherClinicalExperience =(indto.TrialId != null? trialDoctor.OtherClinicalExperience: doctor.OtherClinicalExperience) ?? "";
+ trialExperience.OtherClinicalExperienceCN = (indto.TrialId != null ? trialDoctor.OtherClinicalExperienceCN : doctor.OtherClinicalExperienceCN) ?? "";
var attachment = await _attachmentRepository.FirstOrDefaultAsync(t => t.Id == doctor.GCPId);
if (attachment != null)
{
@@ -51,6 +61,35 @@ namespace IRaCIS.Core.Application.Service
return trialExperience;
}
+ ///
+ /// 获取项目编辑的医生信息
+ ///
+ ///
+ ///
+ public async Task GetTrialDoctorInfo(GetTrialDoctorInfoInDto inDto)
+ {
+ var doctorInfo = await _doctorRepository.Where(x => x.DoctorId == inDto.DoctorId && x.TrialId == inDto.TrialId).FirstOrDefaultAsync();
+ if (doctorInfo == null)
+ {
+
+ var systemInfoDcotor = await _doctorRepository.Where(x => x.Id == inDto.DoctorId).FirstNotNullAsync();
+
+ Doctor doctor = new Doctor()
+ {
+ DoctorId = inDto.DoctorId,
+ TrialId = inDto.TrialId,
+ OtherClinicalExperience = systemInfoDcotor.OtherClinicalExperience,
+ OtherClinicalExperienceCN = systemInfoDcotor.OtherClinicalExperienceCN,
+ Summarize = systemInfoDcotor.Summarize,
+ SummarizeEn = systemInfoDcotor.SummarizeEn,
+ };
+
+ doctorInfo = await _doctorRepository.AddAsync(doctor, true);
+ }
+
+ return doctorInfo;
+ }
+
private async Task> GetTrialExperienceList(Guid doctorId)
{
var doctorClinicalTrialExperienceList = await _trialExperienceRepository.Where(o => o.DoctorId == doctorId).OrderBy(t => t.CreateTime)
@@ -155,15 +194,30 @@ namespace IRaCIS.Core.Application.Service
///
[HttpPost]
- public async Task UpdateOtherExperience(ClinicalExperienceCommand updateOtherClinicalExperience)
+ public async Task UpdateOtherExperience(ClinicalExperienceCommand inDto)
{
- var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == updateOtherClinicalExperience.DoctorId, u => new Doctor()
- {
- OtherClinicalExperience = updateOtherClinicalExperience.OtherClinicalExperience ?? string.Empty,
- OtherClinicalExperienceCN = updateOtherClinicalExperience.OtherClinicalExperienceCN ?? string.Empty
- });
- return ResponseOutput.Result(success);
+ if (inDto.TrialId != null)
+ {
+ var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == inDto.DoctorId&&o.TrialId==inDto.TrialId.Value, u => new Doctor()
+ {
+ OtherClinicalExperience = inDto.OtherClinicalExperience ?? string.Empty,
+ OtherClinicalExperienceCN = inDto.OtherClinicalExperienceCN ?? string.Empty
+ });
+
+ return ResponseOutput.Result(success);
+ }
+ else
+ {
+ var success = await _doctorRepository.BatchUpdateNoTrackingAsync(o => o.Id == inDto.DoctorId, u => new Doctor()
+ {
+ OtherClinicalExperience = inDto.OtherClinicalExperience ?? string.Empty,
+ OtherClinicalExperienceCN = inDto.OtherClinicalExperienceCN ?? string.Empty
+ });
+
+ return ResponseOutput.Result(success);
+ }
+
}
}
diff --git a/IRaCIS.Core.Domain/Dcotor/Doctor.cs b/IRaCIS.Core.Domain/Dcotor/Doctor.cs
index a9730a421..893f1b4d2 100644
--- a/IRaCIS.Core.Domain/Dcotor/Doctor.cs
+++ b/IRaCIS.Core.Domain/Dcotor/Doctor.cs
@@ -231,4 +231,14 @@ public class Doctor : BaseFullAuditEntity
[NotMapped]
public string FullName => LastName + " / " + FirstName;
+
+ ///
+ /// ҽId
+ ///
+ public Guid? DoctorId { get; set; }
+
+ ///
+ /// ĿId
+ ///
+ public Guid? TrialId { get; set; }
}
diff --git a/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs b/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs
index 88aaea914..af769eefd 100644
--- a/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs
+++ b/IRaCIS.Core.Domain/Dcotor/TrialExperience.cs
@@ -1,3 +1,5 @@
+using IRaCIS.Core.Domain.Share;
+
namespace IRaCIS.Core.Domain.Models;
[Comment("ҽ - Ŀٴ")]
@@ -31,4 +33,43 @@ public partial class TrialExperience : BaseFullAuditEntity
///
///
public string OtherCriterion { get; set; } = string.Empty;
+
+ ///
+ /// Ӧ֢ö
+ ///
+ public int IndicationEnum { get; set; } = -1;
+
+ ///
+ ///
+ ///
+ public ExperienceDataType ExperienceDataType { get; set; }
+
+ ///
+ /// ĿId
+ ///
+ public Guid? TrialId { get; set; }
+
+ ///
+ /// Ƭ
+ ///
+ public CriterionType? CriterionType { get; set; }
}
+
+
+public enum ExperienceDataType
+{
+ ///
+ /// ϵͳ
+ ///
+ System = 0,
+
+ ///
+ /// Ŀ
+ ///
+ Trial=1,
+
+ ///
+ /// Զ
+ ///
+ Auto = 2,
+}
\ No newline at end of file
diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241029055220_doctorinfo1029.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241029055220_doctorinfo1029.Designer.cs
new file mode 100644
index 000000000..e6424065d
--- /dev/null
+++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241029055220_doctorinfo1029.Designer.cs
@@ -0,0 +1,18011 @@
+//
+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("20241029055220_doctorinfo1029")]
+ partial class doctorinfo1029
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "8.0.10")
+ .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("IsOfficial")
+ .HasColumnType("bit")
+ .HasComment("是否正式简历");
+
+ b.Property("Language")
+ .HasColumnType("int")
+ .HasComment("1 中文 2为英文");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("Type")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)")
+ .HasComment("文件类型名");
+
+ b.HasKey("Id");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("DoctorId");
+
+ b.ToTable("Attachment", t =>
+ {
+ t.HasComment("医生 - 简历|证书 文档表");
+ });
+ });
+
+ 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("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("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("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("CPIStatus")
+ .HasColumnType("bit");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("FileSize")
+ .HasColumnType("bigint");
+
+ b.Property("FrameOfReferenceUID")
+ .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("ImageRows")
+ .HasColumnType("int");
+
+ b.Property("ImagerPixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("InstanceNumber")
+ .HasColumnType("int");
+
+ b.Property("InstanceTime")
+ .HasColumnType("datetime2");
+
+ b.Property("NumberOfFrames")
+ .HasColumnType("int");
+
+ b.Property("Path")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("PixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SeriesId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SeriesInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SliceLocation")
+ .HasColumnType("int");
+
+ b.Property("SliceThickness")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SopInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("StudyId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StudyInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("WindowCenter")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("WindowWidth")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.HasKey("SeqId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("SeriesId");
+
+ b.HasIndex("StudyId");
+
+ b.ToTable("DicomInstance", t =>
+ {
+ t.HasComment("归档 - Instance表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomSeries", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("AcquisitionNumber")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("AcquisitionTime")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("BodyPartExamined")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("BodyPartForEdit")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("ImageOrientationPatient")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ImagePositionPatient")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ImageResizePath")
+ .IsRequired()
+ .HasMaxLength(1000)
+ .HasColumnType("nvarchar(1000)");
+
+ b.Property("ImagerPixelSpacing")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("InstanceCount")
+ .HasColumnType("int");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property("IsReading")
+ .HasColumnType("bit");
+
+ b.Property("Modality")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("ProtocolName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SequenceName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SeriesInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SeriesNumber")
+ .HasColumnType("int");
+
+ b.Property("SeriesTime")
+ .HasColumnType("datetime2");
+
+ b.Property("SliceThickness")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("StudyId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("StudyInstanceUid")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("SubjectId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("SubjectVisitId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TrialId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("TriggerTime")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("UpdateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("UpdateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("VisitTaskId")
+ .HasColumnType("uniqueidentifier");
+
+ b.HasKey("SeqId");
+
+ b.HasIndex("CreateUserId");
+
+ b.HasIndex("StudyId");
+
+ b.ToTable("DicomSeries", t =>
+ {
+ t.HasComment("归档 - 序列表");
+ });
+ });
+
+ modelBuilder.Entity("IRaCIS.Core.Domain.Models.DicomStudy", b =>
+ {
+ b.Property("SeqId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("uniqueidentifier")
+ .HasComment("序列Id 避免内存移动");
+
+ b.Property("AccessionNumber")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("AcquisitionNumber")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("AcquisitionTime")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("BodyPartExamined")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("BodyPartForEdit")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Code")
+ .HasColumnType("int");
+
+ b.Property("CreateTime")
+ .HasColumnType("datetime2");
+
+ b.Property("CreateUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeleteUserId")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("DeletedTime")
+ .HasColumnType("datetime2");
+
+ b.Property("Description")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("Id")
+ .HasColumnType("uniqueidentifier");
+
+ b.Property("InstanceCount")
+ .HasColumnType("int");
+
+ b.Property("InstitutionName")
+ .IsRequired()
+ .HasMaxLength(400)
+ .HasColumnType("nvarchar(400)");
+
+ b.Property("IsDeleted")
+ .HasColumnType("bit");
+
+ b.Property