This commit is contained in:
he
2023-02-28 09:38:17 +08:00
parent 9ed80154af
commit efbe1d3511
3 changed files with 43 additions and 8 deletions
@@ -1727,10 +1727,9 @@ namespace IRaCIS.Application.Services
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId
&& (x.IsJudgeQuestion || (x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show))
)
.WhereIf(!criterion.IseCRFShowInDicomReading,x=>x.IsShowInDicom).ToListAsync();
).WhereIf(!criterion.IseCRFShowInDicomReading,x=>x.IsShowInDicom).ToListAsync();
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.ReadingQuestionTrialId).ToListAsync();
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId&&x.Answer!=string.Empty).Select(x => x.ReadingQuestionTrialId).ToListAsync();
readingQuestionList = readingQuestionList.Where(x => !answerQuestionIds.Contains(x.Id)).ToList();