diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 6397217b6..af81fb592 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -2071,6 +2071,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common { extraIdentification = "/ConfirmSelect"; } + else if (_userInfo.RequestUrl == "ClinicalDataSet/applyTrialClinical") + { + extraIdentification = "/applyTrialClinical"; + } //获取配置的标准名称 @@ -2111,6 +2115,48 @@ namespace IRaCIS.Core.Infra.EFCore.Common }); } + + + //临床数据问题 + + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialClinicalQuestion))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as TrialClinicalQuestion; + + var trialId= await _dbContext.ClinicalDataTrialSet.Where(t => t.Id == entity.TrialClinicalId).Select(t => t.TrialId).FirstOrDefaultAsync(); + var GroupName = entity.GroupId == null ? entity.QuestionName: _dbContext.TrialClinicalQuestion.Where(t => t.Id == entity.GroupId).Select(t => t.QuestionName).FirstOrDefault(); + var GroupEnName = entity.GroupId == null ? entity.QuestionEnName : _dbContext.TrialClinicalQuestion.Where(t => t.Id == entity.GroupId).Select(t => t.QuestionEnName).FirstOrDefault(); + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + TrialId= trialId, + }, + new { + GroupName= GroupName, + GroupEnName= GroupEnName, + } + ); + } + + + //临床数据表格问题 + + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialClinicalTableQuestion))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as TrialClinicalTableQuestion; + + var trialId = await _dbContext.ClinicalDataTrialSet.Where(t => t.Id == entity.TrialClinicalId).Select(t => t.TrialId).FirstOrDefaultAsync(); + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + TrialId = trialId, + } + + ); + } + // CRC PM 临床数据 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingClinicalData))) { diff --git a/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs b/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs index 8ef19d6d2..2534fb6f9 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/Dto/SetDictionaryValueDto.cs @@ -152,6 +152,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common.Dto public bool IsSelfDefine = false; + // 额外标识 public string ExtraIndentification = string.Empty;