diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs index a53094fa6..5bb8ff5c3 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingQuestionService.cs @@ -56,6 +56,16 @@ namespace IRaCIS.Core.Application.Service [HttpPost] public async Task SetTrialQuestionExportResult(SetTrialQuestionExportResultInDto inDto) { + + var cDISCCodeList = inDto.QuestionList.Where(x => x.CDISCCode.IsNotNullOrEmpty()).Select(x => x.CDISCCode).ToList(); + + cDISCCodeList.AddRange(inDto.TableQuestionList.Where(x => x.CDISCCode.IsNotNullOrEmpty()).Select(x => x.CDISCCode).ToList()); + + if (cDISCCodeList.Distinct().Count() != cDISCCodeList.Count) + { + throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CDISCCodeRepeat"]); + } + List needAdd = new List() { ExportResult.DetailedTableOfAdjudicationResults,