From a5dee142bf3b31d741368c9069e502cd74a1e65a Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 24 Nov 2023 10:28:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A8=BD=E6=9F=A5=E4=BF=AE=E6=94=B91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Common/AuditingData.cs | 46 +++++++++++++++++++ .../Common/Dto/SetDictionaryValueDto.cs | 1 + 2 files changed, 47 insertions(+) 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;