diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index ed9083f54..2fbc28375 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -13030,22 +13030,33 @@
- QC回复 质控质疑,通知CRC
+ QC回复 质控质疑,通知CRC (014,015)
+
+
+
+
+ QC回复 质控质疑,通知CRC (014,015)
- CRC 回复一致性核查质疑 通知PM
+ CRC 回复一致性核查质疑 通知PM (019,020)
-
+
- PM 一致性核查 通知CRC
+ CRC 回复一致性核查质疑 通知PM (019,020)
+
- 通知PM 进行一致性核查
+ 通知PM 进行一致性核查 (018,030)
+
+
+
+
+ 通知PM 进行一致性核查 (018,030)
diff --git a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs
index 840578b7d..f05c99808 100644
--- a/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs
+++ b/IRaCIS.Core.Application/MassTransit/Consumer/SubjectVisitQCAndCheckConsumer.cs
@@ -3,6 +3,7 @@ using IRaCIS.Core.Application.MassTransit.Command;
using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain;
using IRaCIS.Core.Domain.BaseModel;
+using IRaCIS.Core.Domain.Models;
using IRaCIS.Core.Infra.EFCore.Common;
using MassTransit;
using Microsoft.Extensions.Options;
@@ -55,6 +56,20 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
auditStateCode = "AuditStateRC";
}
+
+
+ var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
+ {
+
+ DictionaryRepository = _dictionaryRepository,
+ IsEn_US = isEn_US,
+ DictionaryList = new List()
+ {
+ new DictionaryDto (){DictionaryCode= auditStateCode,EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
+
+ }
+ });
+
foreach (var userinfo in userinfoList)
{
var messageToSend = new MimeMessage();
@@ -66,17 +81,6 @@ public class CRCSubmitedAndQCToAuditEventConsumer(
var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
- var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
- {
-
- DictionaryRepository = _dictionaryRepository,
- IsEn_US = isEn_US,
- DictionaryList = new List()
- {
- new DictionaryDto (){DictionaryCode= auditStateCode,EnumValue=subjectVisit.AuditState.GetEnumInt(), }, //审核状态
-
- }
- });
Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
{
@@ -197,32 +201,193 @@ public class CRCRepliedQCChallengeEventConsumer(
///
-/// QC回复 质控质疑,通知CRC
+/// QC回复 质控质疑,通知CRC (014,015)
///
-public class QCRepliedQCChallengeEventConsumer : IConsumer
+public class QCRepliedQCChallengeEventConsumer(
+ IRepository _userRepository,
+ IRepository _trialUseRepository,
+ IRepository _subjectVisitRepository,
+ IRepository _trialRepository,
+ IRepository _qCChallengeRepository,
+ IRepository _qCChallengeDialogRepository,
+ IRepository _dictionaryRepository,
+ IRepository _emailNoticeConfigrepository,
+ IOptionsMonitor systemEmailConfig) : IConsumer
{
- public Task Consume(ConsumeContext context)
+ private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
+ public async Task Consume(ConsumeContext context)
{
- throw new NotImplementedException();
+ Console.WriteLine("发送(014,015) 【 QC回复 质控质疑,通知CRC】邮件!!!");
+ var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
+ var qCChallengeDialog = await _qCChallengeDialogRepository.Where(x => x.Id == context.Message.QCChallengeDialogId).Include(x => x.QCChallenge).FirstNotNullAsync();
+ var subjectVisitId = context.Message.SubjectVisitId;
+
+ var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
+
+ var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
+
+ var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator).ToList();
+
+ var craInfo = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.CRA).FirstOrDefault();
+
+ var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
+
+
+
+
+ var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
+ {
+
+ DictionaryRepository = _dictionaryRepository,
+ IsEn_US = isEn_US,
+ DictionaryList = new List()
+ {
+ new DictionaryDto (){DictionaryCode= "YesOrNo",EnumValue=qCChallengeDialog.QCChallenge.IsClosed.ToString(), }, //是否关闭
+
+ }
+ });
+
+
+ foreach (var userinfo in userinfoList)
+ {
+ var messageToSend = new MimeMessage();
+ //发件地址
+ messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
+ messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
+ if (craInfo != null)
+ {
+ messageToSend.Cc.Add(new MailboxAddress(String.Empty, craInfo.EMail));
+ }
+
+ var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
+
+
+
+
+ Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
+ {
+ var subjectCode = subjectVisit.Subject.Code;
+ var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
+ var htmlBodyStr = string.Format(
+ CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
+ trialInfo.ExperimentName, // 项目 {1}
+ userinfo.FullName, // 用户名 {1}
+ subjectCode, // 受试者 {2}
+ subjectVisit.VisitName, // 访视 {3}
+ dictionValue[0], // 质疑是否关闭 {4}
+ qCChallengeDialog.TalkContent, // 质疑内容 {5}
+ _systemEmailConfig.SiteUrl // 链接 {65}
+ );
+
+ return (topicStr, htmlBodyStr);
+ };
+
+ await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
+
+ context.Message.IsPd ? EmailBusinessScenario.PDVerification_ImageQuery : EmailBusinessScenario.EligibilityVerification_ImageQuery,
+
+ messageToSend, emailConfigFunc);
+
+ await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
+ }
}
}
///
-/// CRC 回复一致性核查质疑 通知PM
+/// CRC 回复一致性核查质疑 通知PM (019,020)
///
-public class CRCRepliedCheckChallengeEventConsumer : IConsumer
+public class CRCRepliedCheckChallengeEventConsumer(
+ IRepository _userRepository,
+ IRepository _trialUseRepository,
+ IRepository _subjectVisitRepository,
+ IRepository _trialRepository,
+ IRepository _qCChallengeRepository,
+ IRepository _qCChallengeDialogRepository,
+ IRepository _dictionaryRepository,
+ IRepository _emailNoticeConfigrepository,
+ IOptionsMonitor systemEmailConfig) : IConsumer
{
- public Task Consume(ConsumeContext context)
+
+ private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
+ public async Task Consume(ConsumeContext context)
{
- throw new NotImplementedException();
+ Console.WriteLine("发送(019,020) 【 CRC 回复一致性核查质疑 通知PM】邮件!!!");
+ var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
+
+ var subjectVisitId = context.Message.SubjectVisitId;
+
+ var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
+
+ var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
+
+ var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList();
+
+
+ var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
+
+
+
+
+ var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
+ {
+
+ DictionaryRepository = _dictionaryRepository,
+ IsEn_US = isEn_US,
+ DictionaryList = new List()
+ {
+ new DictionaryDto (){DictionaryCode= "CheckState",EnumValue=subjectVisit.CheckState.GetEnumInt(), }, //审核状态
+
+ }
+ });
+
+
+ foreach (var userinfo in userinfoList)
+ {
+ var messageToSend = new MimeMessage();
+ //发件地址
+ messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
+ messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
+
+
+ var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
+
+
+
+
+ Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
+ {
+ var subjectCode = subjectVisit.Subject.Code;
+ var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
+ var htmlBodyStr = string.Format(
+ CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
+ trialInfo.ExperimentName, // 项目 {1}
+ userinfo.FullName, // 用户名 {1}
+ subjectCode, // 受试者 {2}
+ subjectVisit.VisitName, // 访视 {3}
+ dictionValue[0], // 核查状态 {4}
+ _systemEmailConfig.SiteUrl // 链接 {5}
+ );
+
+ return (topicStr, htmlBodyStr);
+ };
+
+ await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
+
+ context.Message.IsPd ? EmailBusinessScenario.PDVerification_UnderDRForPMOrAPM : EmailBusinessScenario.EligibilityVerification_UnderDRForPMOrAPM,
+
+ messageToSend, emailConfigFunc);
+
+ await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
+ }
}
}
///
-/// PM 一致性核查 通知CRC
+/// PM 一致性核查 通知CRC (016,017)
+
///
public class PMRepliedCheckChallengeEventConsumer : IConsumer
{
@@ -234,13 +399,90 @@ public class PMRepliedCheckChallengeEventConsumer : IConsumer
-/// 通知PM 进行一致性核查
+/// 通知PM 进行一致性核查 (018,030)
///
-public class CheckStateChangedToAuditEventConsumer : IConsumer
+public class CheckStateChangedToAuditEventConsumer(
+ IRepository _userRepository,
+ IRepository _trialUseRepository,
+ IRepository _subjectVisitRepository,
+ IRepository _trialRepository,
+ IRepository _qCChallengeRepository,
+ IRepository _qCChallengeDialogRepository,
+ IRepository _dictionaryRepository,
+ IRepository _emailNoticeConfigrepository,
+ IOptionsMonitor systemEmailConfig) : IConsumer
{
- public Task Consume(ConsumeContext context)
+ private readonly SystemEmailSendConfig _systemEmailConfig = systemEmailConfig.CurrentValue;
+ public async Task Consume(ConsumeContext context)
{
- throw new NotImplementedException();
+ Console.WriteLine("发送(018,030) 【通知PM 进行一致性核查】邮件!!!");
+ var isEn_US = CultureInfo.CurrentCulture.Name == StaticData.CultureInfo.en_US;
+
+ var subjectVisitId = context.Message.SubjectVisitId;
+
+ var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == subjectVisitId).Include(x => x.Subject).FirstNotNullAsync();
+
+ var trialUser = await _trialUseRepository.Where(x => x.TrialId == subjectVisit.TrialId).Include(x => x.User).Select(x => x.User).ToListAsync();
+
+ var userinfoList = trialUser.Where(x => x.UserTypeEnum == UserTypeEnum.APM || x.UserTypeEnum == UserTypeEnum.ProjectManager).ToList();
+
+
+ var trialInfo = await _trialRepository.FirstOrDefaultAsync(t => t.Id == subjectVisit.TrialId);
+
+
+
+
+ var dictionValue = await CommonEmailHelper.TranslationDictionary(new TranslationDictionaryDto()
+ {
+
+ DictionaryRepository = _dictionaryRepository,
+ IsEn_US = isEn_US,
+ DictionaryList = new List()
+ {
+ new DictionaryDto (){DictionaryCode= "CheckState",EnumValue=subjectVisit.CheckState.GetEnumInt(), }, //审核状态
+
+ }
+ });
+
+
+ foreach (var userinfo in userinfoList)
+ {
+ var messageToSend = new MimeMessage();
+ //发件地址
+ messageToSend.From.Add(new MailboxAddress(_systemEmailConfig.FromName, _systemEmailConfig.FromEmail));
+ messageToSend.To.Add(new MailboxAddress(String.Empty, userinfo.EMail));
+
+
+ var companyName = isEn_US ? _systemEmailConfig.CompanyShortName : _systemEmailConfig.CompanyShortNameCN;
+
+
+
+
+ Func<(string topicStr, string htmlBodyStr), (string topicStr, string htmlBodyStr)> emailConfigFunc = input =>
+ {
+ var subjectCode = subjectVisit.Subject.Code;
+ var topicStr = string.Format(input.topicStr, trialInfo.ResearchProgramNo, subjectCode, subjectVisit.VisitName);
+ var htmlBodyStr = string.Format(
+ CommonEmailHelper.ReplaceCompanyName(_systemEmailConfig, input.htmlBodyStr),
+ trialInfo.ExperimentName, // 项目 {1}
+ userinfo.FullName, // 用户名 {1}
+ subjectCode, // 受试者 {2}
+ subjectVisit.VisitName, // 访视 {3}
+ dictionValue[0], // 核查状态 {4}
+ _systemEmailConfig.SiteUrl // 链接 {5}
+ );
+
+ return (topicStr, htmlBodyStr);
+ };
+
+ await CommonEmailHelper.GetEmailSubejctAndHtmlInfoAndBuildAsync(_emailNoticeConfigrepository,
+
+ context.Message.IsPd ? EmailBusinessScenario.PDVerification_DR : EmailBusinessScenario.EligibilityVerification_DR,
+
+ messageToSend, emailConfigFunc);
+
+ await SendEmailHelper.SendEmailAsync(messageToSend, _systemEmailConfig);
+ }
}
}
diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
index cef34031a..5011252ea 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
@@ -813,7 +813,7 @@ namespace IRaCIS.Application.Contracts
///
public string Remark { get; set; }
-
+ public bool IsIRUpload { get; set; } = false;
///
/// 文件类型
@@ -870,12 +870,15 @@ namespace IRaCIS.Application.Contracts
///
public DateTime CreateTime { get; set; }
+ public bool IsIRUpload { get; set; }
+
}
public class GetDoctorCriterionFileInDto
{
+
public Guid DoctorId { get; set; }
///
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index a8f9b8776..0d0fd4410 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -322,6 +322,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid? ClassifyTableQuestionId { get; set; }
+ ///
+ /// 分类问题类型
+ ///
+ public ClassifyType? ClassifyType { get; set; }
+
+
+
public string ClassifyAlgorithms { get; set; } = string.Empty;
@@ -465,6 +472,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string ExportResultStr { get; set; } = "[]";
public List ExportResult { get; set; }
+
+ [Comment("图片数量")]
+ public int? ImageCount { get; set; }
}
/// ReadingTableQuestionSystemAddOrEdit 列表查询参数模型
@@ -481,6 +491,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid? ClassifyTableQuestionId { get; set; }
+ ///
+ /// 分类问题类型
+ ///
+ public ClassifyType? ClassifyType { get; set; }
+
public string ClassifyAlgorithms { get; set; } = string.Empty;
///
@@ -581,7 +596,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public List ExportResult { get; set; }
-
+ [Comment("图片数量")]
+ public int? ImageCount { get; set; }
public List ParentTriggerValueList { get; set; } = new List();
public List RelevanceValueList { get; set; } = new List();
@@ -1146,6 +1162,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public string GroupEnName { get; set; } = string.Empty;
+
+ ///
+ /// 分类问题类型
+ ///
+ public ClassifyType? ClassifyType { get; set; }
public List ParentTriggerValueList { get; set; } = new List();
public List RelevanceValueList { get; set; } = new List();
public List CalculateQuestionList { get; set; }
@@ -1161,6 +1182,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
[Comment("导出标识")]
public ExportIdentification? ExportIdentification { get; set; }
+ ///
+ /// 分类问题类型
+ ///
+ public ClassifyType? ClassifyType { get; set; }
+
///
/// 分类算法
///
@@ -1606,6 +1632,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public string Type { get; set; }
+ public List TypeList { get; set; } = new List();
+
}
public class GetTrialGroupNameOutDto
@@ -1744,7 +1772,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class AddOrUpdateReadingQuestionSystemInDto
{
-
+ ///
+ /// 分类问题类型
+ ///
+ public ClassifyType? ClassifyType { get; set; }
///
/// 导出标识
@@ -1987,6 +2018,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
///
public Guid? Id { get; set; }
+ ///
+ /// 分类问题类型
+ ///
+ public ClassifyType? ClassifyType { get; set; }
+
///
/// 导出标识
///
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
index 5a44f2041..af07da1a0 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs
@@ -93,7 +93,8 @@ namespace IRaCIS.Core.Application.Service
var result = await _readingQuestionTrialRepository
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId)
- .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
+ .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
+ .WhereIf(inDto.TypeList.Count()>0, x => inDto.TypeList.Contains(x.Type))
.OrderBy(x => x.ShowOrder)
.Select(x => new GetCalculateQuestionsOutDto
()
@@ -380,7 +381,7 @@ namespace IRaCIS.Core.Application.Service
{
var types = new List()
{
- "select","radio"
+ "select","radio","class",
};
var questionList = await _readingTableQuestionSystemRepository.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId)
.Where(x => types.Contains(x.Type))
@@ -610,7 +611,7 @@ namespace IRaCIS.Core.Application.Service
{
var types = new List()
{
- "select","radio"
+ "select","radio","class",
};
var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
.Where(x => types.Contains(x.Type))
diff --git a/IRaCIS.Core.Domain.Share/QC/CheckStateEnum.cs b/IRaCIS.Core.Domain.Share/QC/CheckStateEnum.cs
index 390c52dcb..7aaf815e7 100644
--- a/IRaCIS.Core.Domain.Share/QC/CheckStateEnum.cs
+++ b/IRaCIS.Core.Domain.Share/QC/CheckStateEnum.cs
@@ -8,13 +8,14 @@ namespace IRaCIS.Core.Domain.Share
//不可用
None = 0,
+ //待核查
ToCheck = 9,
//核查中
CVIng = 10,
- // 通过CV,等待转发
+ // 通过CV,等待转发 核查通过
CVPassed = 11,
}
}
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index 2a70c97ac..682af1fd8 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -357,6 +357,24 @@ namespace IRaCIS.Core.Domain.Share
Automatic = 1
}
+
+ ///
+ /// 分类算法的类型
+ ///
+ public enum ClassifyType
+ {
+ ///
+ /// 数值
+ ///
+ NumericalValue = 0,
+
+ ///
+ /// 下拉框
+ ///
+ Dropdown = 1,
+
+ }
+
///
/// 问题分类
///
diff --git a/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs b/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs
index faeed942e..367c01f80 100644
--- a/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs
+++ b/IRaCIS.Core.Domain/Dcotor/DoctorCriterionFile.cs
@@ -34,4 +34,7 @@ public class DoctorCriterionFile : BaseAddAuditEntity
public Guid? TrialReadingCriterionId { get; set; }
+ [Comment("是否是IR上传")]
+ public bool IsIRUpload { get; set; } = false;
+
}
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs
index 9d9ab5d3a..a27dae89d 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionSystem.cs
@@ -185,6 +185,9 @@ public class ReadingQuestionSystem : BaseAddAuditEntity
[Comment("分组分类")]
public GroupClassify? GroupClassify { get; set; }
+ [Comment("分类类型")]
+ public ClassifyType? ClassifyType { get; set; }
+
[Comment("问题分类")]
public QuestionClassify? QuestionClassify { get; set; }
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
index ddbb78ff9..2309185a6 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingQuestionTrial.cs
@@ -232,6 +232,8 @@ public class ReadingQuestionTrial : BaseAddAuditEntity
[Comment("数据来源")]
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
+
+
[Comment("问题英文名称")]
public string QuestionEnName { get; set; } = string.Empty;
@@ -241,6 +243,9 @@ public class ReadingQuestionTrial : BaseAddAuditEntity
[Comment("分类算法")]
public string ClassifyAlgorithms { get; set; } = string.Empty;
+ [Comment("分类类型")]
+ public ClassifyType? ClassifyType { get; set; }
+
[Comment("分类问题Id")]
public Guid? ClassifyQuestionId { get; set; }
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs
index 75d0a4bb2..9ccfca6c8 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionSystem.cs
@@ -87,6 +87,9 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
[Comment("最大问题数")]
public int? MaxRowCount { get; set; }
+ [Comment("图片数量")]
+ public int? ImageCount { get; set; }
+
[Comment("数据表名称")]
public string DataTableName { get; set; } = string.Empty;
@@ -139,6 +142,9 @@ public class ReadingTableQuestionSystem : BaseAddAuditEntity
[Comment("分类问题表格Id")]
public Guid? ClassifyTableQuestionId { get; set; }
+ [Comment("分类类型")]
+ public ClassifyType? ClassifyType { get; set; }
+
[Comment("分类算法")]
public string ClassifyAlgorithms { get; set; } = string.Empty;
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs
index 908a97520..82f3b11d9 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingTableQuestionTrial.cs
@@ -93,6 +93,9 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
public int ShowQuestion { get; set; }
public int? MaxRowCount { get; set; }
+ [Comment("图片数量")]
+ public int? ImageCount { get; set; }
+
public string DataTableName { get; set; } = string.Empty;
public string DataTableColumn { get; set; } = string.Empty;
@@ -155,6 +158,9 @@ public class ReadingTableQuestionTrial : BaseAddAuditEntity
[Comment("分类问题表格Id")]
public Guid? ClassifyTableQuestionId { get; set; }
+ [Comment("分类类型")]
+ public ClassifyType? ClassifyType { get; set; }
+
[Comment("导出标识")]
public ExportIdentification? ExportIdentification { get; set; }
diff --git a/IRaCIS.Core.Domain/_DomainEvent/SubjectVisitStateChangedEvent.cs b/IRaCIS.Core.Domain/_DomainEvent/SubjectVisitStateChangedEvent.cs
index ef37d3221..82b0e428c 100644
--- a/IRaCIS.Core.Domain/_DomainEvent/SubjectVisitStateChangedEvent.cs
+++ b/IRaCIS.Core.Domain/_DomainEvent/SubjectVisitStateChangedEvent.cs
@@ -57,6 +57,9 @@ public class QCRepliedQCChallengeEvent : DomainEvent
///
public class CRCRepliedCheckChallengeEvent : DomainEvent
{
+
+ public bool IsPd { get; set; }
+
public Guid CheckChallengeDialogId { get; set; }
public Guid TrialId { get; set; }
@@ -81,6 +84,9 @@ public class PMRepliedCheckChallengeEvent : DomainEvent
///
public class CheckStateChangedToAuditEvent : DomainEvent
{
+
+ public bool IsPd { get; set; }
+
public Guid SubjectVisitId { get; set; }
}
diff --git a/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs b/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs
index 15a6a6de6..4c64a54a8 100644
--- a/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs
+++ b/IRaCIS.Core.Infra.EFCore/Interceptor/AddDomainExt.cs
@@ -89,7 +89,7 @@ public static class DBContext_Ext
if (originCheckState == CheckStateEnum.None && subjectVisit.CheckState == CheckStateEnum.ToCheck
)
{
- subjectVisit.AddDomainEvent(new CheckStateChangedToAuditEvent() { SubjectVisitId = subjectVisit.Id });
+ subjectVisit.AddDomainEvent(new CheckStateChangedToAuditEvent() { IsPd = subjectVisit.PDState == PDStateEnum.PDProgress, SubjectVisitId = subjectVisit.Id });
}
if (originCurrentActionUserId == null && subjectVisit.CurrentActionUserId != null)
@@ -149,7 +149,7 @@ public static class DBContext_Ext
//CRC 针对质控质疑进行回复
if (entry.State == EntityState.Added && checkChallengeDialog.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator)
{
- checkChallengeDialog.AddDomainEvent(new CRCRepliedCheckChallengeEvent() { CheckChallengeDialogId = checkChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
+ checkChallengeDialog.AddDomainEvent(new CRCRepliedCheckChallengeEvent() { IsPd = findSubjectVisit.PDState == PDStateEnum.PDProgress, CheckChallengeDialogId = checkChallengeDialog.Id, SubjectVisitId = findSubjectVisit.Id, TrialId = findSubjectVisit.TrialId });
}
else if (entry.State == EntityState.Added && checkChallengeDialog.UserTypeEnum == UserTypeEnum.ProjectManager)
{
diff --git a/IRaCIS.Core.Infra.EFCore/Migrations/20241023034834_iamgeandQuestion.Designer.cs b/IRaCIS.Core.Infra.EFCore/Migrations/20241023034834_iamgeandQuestion.Designer.cs
new file mode 100644
index 000000000..0fcea2caa
--- /dev/null
+++ b/IRaCIS.Core.Infra.EFCore/Migrations/20241023034834_iamgeandQuestion.Designer.cs
@@ -0,0 +1,17954 @@
+//
+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("20241023034834_iamgeandQuestion")]
+ partial class iamgeandQuestion
+ {
+ ///
+ 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