From 9f765f1db18bfd140ca6b69b5e23cc61f4e833d6 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 3 Nov 2022 11:34:53 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialConfigService.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 0c5849118..a92a08470 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -24,6 +24,7 @@ namespace IRaCIS.Core.Application private readonly IRepository _trialQCQuestionRepository; private readonly IRepository _readingQuestionCriterionTrialRepository; private readonly IRepository _readingQuestionTrialRepository; + private readonly IRepository _readingQuestionCriterionSystemRepository; private readonly IRepository _clinicalDataTrialSetRepository; private readonly IRepository _readingCriterionPageRepository; private readonly IEasyCachingProvider _provider; @@ -36,6 +37,7 @@ namespace IRaCIS.Core.Application IRepository trialQCQuestionRepository, IRepository readingQuestionCriterionTrialRepository, IRepository readingQuestionTrialRepository, + IRepository readingQuestionCriterionSystemRepository, IRepository clinicalDataTrialSetRepository, IRepository readingCriterionPageRepository, IRepository taskAllocationRuleRepository, @@ -52,6 +54,7 @@ namespace IRaCIS.Core.Application this._trialQCQuestionRepository = trialQCQuestionRepository; this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository; this._readingQuestionTrialRepository = readingQuestionTrialRepository; + this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository; this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository; this._readingCriterionPageRepository = readingCriterionPageRepository; this._provider = provider; @@ -186,6 +189,15 @@ namespace IRaCIS.Core.Application TrialReadingCriterionId = inDto.TrialReadingCriterionId, }); + + var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync(); + + await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial() + { + IsOncologyReading = systemCriterion.IsOncologyReading, + }); + + } await _readingCriterionDictionaryRepository.AddRangeAsync(criterionDictionaryList);