手动发送邮件
This commit is contained in:
+10
-7
@@ -1720,17 +1720,19 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<IResponseOutput> VerifyDefaultQuestionBeAnswer(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.TrialReadingCriterion).Include(x=>x.SourceSubjectVisit).FirstNotNullAsync();
|
||||
|
||||
var criterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).FirstNotNullAsync();
|
||||
|
||||
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();
|
||||
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId)
|
||||
.WhereIf(taskInfo.SourceSubjectVisit.IsBaseLine,x=> ((x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show)&&(x.LimitEdit==LimitEdit.None||x.LimitEdit==LimitEdit.OnlyBaseLine)))
|
||||
.WhereIf(!taskInfo.SourceSubjectVisit.IsBaseLine, x => ((x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show) && (x.LimitEdit == LimitEdit.None || x.LimitEdit == LimitEdit.OnlyVisit)))
|
||||
.WhereIf(taskInfo.TrialReadingCriterion.CriterionType==CriterionType.PCWG3, x => x.QuestionType != QuestionType.SiteVisitForTumorEvaluation)
|
||||
|
||||
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.ReadingQuestionTrialId).ToListAsync();
|
||||
//.WhereIf(!criterion.IseCRFShowInDicomReading,x=>x.IsShowInDicom)
|
||||
.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();
|
||||
|
||||
@@ -1751,6 +1753,7 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<IResponseOutput> VerifyVisitTaskQuestions(VerifyVisitTaskQuestionsInDto inDto)
|
||||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
await VerifyDefaultQuestionBeAnswer(inDto);
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var isBaseline = await _subjectVisitRepository.Where(x => x.Id == taskInfo.SourceSubjectVisitId).Select(x => x.IsBaseLine).FirstOrDefaultAsync();
|
||||
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId
|
||||
|
||||
Reference in New Issue
Block a user