Uat_Study
he 2022-08-04 11:57:00 +08:00
parent eaf486e7d3
commit 79fd496fc3
1 changed files with 15 additions and 11 deletions

View File

@ -170,13 +170,13 @@ namespace IRaCIS.Application.Services
{
VisitName = x.SourceSubjectVisit.VisitName,
VisitTaskId = x.Id,
QuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
.Select(y => new OncologyQuestion()
{
QuestionId = y.ReadingQuestionTrialId,
QuestionName = y.ReadingQuestionTrial.QuestionName,
Answer = y.GlobalChangeAnswer
}).ToList()
// QuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
//.Select(y => new OncologyQuestion()
//{
// QuestionId = y.ReadingQuestionTrialId,
// QuestionName = y.ReadingQuestionTrial.QuestionName,
// Answer = y.GlobalChangeAnswer
//}).ToList()
}).ToListAsync();
var oncologyReadingQuestions = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == inDto.VisitTaskId).ToListAsync();
@ -191,15 +191,19 @@ namespace IRaCIS.Application.Services
x.EvaluationReason = oncologyData.EvaluationReason;
}
x.QuestionList.ForEach(z =>
x.QuestionList = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(x => x.QuestionId != null)
.Select(y => new OncologyQuestion
{
z.Answer = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(y => z.QuestionId == y.QuestionId).Select(y => y.Answer).FirstOrDefault();
QuestionId = y.QuestionId ?? default(Guid),
QuestionName = y.QuestionName,
Answer = y.Answer
}).ToList();
});
x.IsHaveChange = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Any(y => y.IsHaveChange);
x.VisitRemark = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(y => y.QuestionId == null).Select(x => x.Answer).FirstOrDefault() ?? String.Empty;
x.VisitRemark = globalTaskReadingInfo.TaskList.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(y => y.QuestionId == null).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
});