diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 9301685d3..0d0fd4410 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -1632,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 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))