This commit is contained in:
he
2023-02-20 13:53:17 +08:00
parent 6192c2e144
commit a81bb9e3b9
10 changed files with 59 additions and 14 deletions
@@ -51,9 +51,12 @@ namespace IRaCIS.Application.Services
foreach (var answer in item.AnswerList)
{
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == item.VisitTaskId && x.GlobalAnswerType == answer.GlobalAnswerType && x.QuestionId == answer.QuestionId);
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId, x => new ReadingTaskQuestionAnswer()
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId
&& x.Answer != answer.Answer && x.Answer != string.Empty
, x => new ReadingTaskQuestionAnswer()
{
GlobalChangeAnswer = answer.Answer
GlobalChangeAnswer = answer.Answer,
IsGlobalChange=true,
});
}
}
@@ -233,7 +236,7 @@ namespace IRaCIS.Application.Services
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
// 如果不是PCWG3 Before的Answer取自于 上一次全局阅片的结果, 如果没有上一次全局阅片的结果 取访视的答案
// Before的Answer取自于 上一次全局阅片的结果, 如果没有上一次全局阅片的结果 取访视的答案
var lastGlobalTask = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Global &&
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
@@ -354,8 +357,6 @@ namespace IRaCIS.Application.Services
if (criterionType == CriterionType.PCWG3)
{
// PCWG3 访视点肿瘤评估 采用上一次全局阅片的答案 如果没有 就采用访视的答案
// 找到上一个全局阅片