This commit is contained in:
he
2022-11-04 10:55:01 +08:00
parent b28a88824f
commit fd02bc2dd5
8 changed files with 94 additions and 13 deletions
@@ -829,6 +829,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public GlobalAnswerType GlobalAnswerType { get; set; }
/// <summary>
/// 是否是裁判问题
/// </summary>
public bool IsJudgeQuestion { get; set; } = true;
}
public class GetReadingImgOutDto
@@ -111,7 +111,8 @@ namespace IRaCIS.Application.Services
VisitNum = x.SourceSubjectVisit.VisitNum,
IsBaseLine=x.SourceSubjectVisit.IsBaseLine,
VisitId = x.SourceSubjectVisitId.Value,
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType!=GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
.Select(y => new GlobalQuestionInfo()
{
QuestionId = y.ReadingQuestionTrialId,
@@ -121,11 +122,11 @@ namespace IRaCIS.Application.Services
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType,
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
JudgeType = y.ReadingQuestionTrial.JudgeType,
Type = y.ReadingQuestionTrial.Type,
TypeValue = y.ReadingQuestionTrial.TypeValue,
IsJudgeQuestion=y.ReadingQuestionTrial.IsJudgeQuestion,
Answer = y.Answer
}).ToList()
}).ToListAsync();
@@ -144,7 +145,6 @@ namespace IRaCIS.Application.Services
{
Answer = lr.global == null || lr.global.Count() == 0 ?
(inDto.UsingOriginalData ? lr.question.Answer : string.Empty) :
(lr.global.Select(x => x.Answer).FirstOrDefault().IsNullOrEmpty() && inDto.UsingOriginalData ?
lr.question.Answer : lr.global.Select(x => x.Answer).FirstOrDefault()
),
@@ -159,6 +159,7 @@ namespace IRaCIS.Application.Services
GlobalAnswerType = GlobalAnswerType.Question,
AnswerGroup = lr.question.AnswerGroup,
AnswerCombination = lr.question.AnswerCombination,
IsJudgeQuestion=lr.question.IsJudgeQuestion,
JudgeType = lr.question.JudgeType,
TypeValue = lr.question.TypeValue,
@@ -884,10 +884,9 @@ namespace IRaCIS.Application.Services
if (rowCount > item.MaxRowCount.Value - 1)
{
//throw new BusinessValidationFailedException($"问题{item.QuestionName}最大相同问题数为{item.MaxRowCount.Value},当前已存在{rowCount}条!");
throw new BusinessValidationFailedException($"当前器官上已有{rowCount}个靶病灶");
throw new BusinessValidationFailedException($"按照RECIST1.1的相关规则,同一器官的靶病灶数量不超过{item.MaxRowCount.Value}个,请确认!");
}
}
}
}
var isCurrentTaskAddList = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.QuestionId == inDto.QuestionId && x.TrialId == inDto.TrialId && x.RowIndex == inDto.RowIndex).Select(x => x.IsCurrentTaskAdd).ToListAsync();
@@ -422,8 +422,8 @@ namespace IRaCIS.Application.Services
}
else
{
var newlist = item.AfterQuestionList.Where(x => x.QuestionId != null).ToList().Union(
twoItem.AfterQuestionList.Where(x => x.QuestionId != null).ToList()
var newlist = item.AfterQuestionList.Where(x => x.QuestionId != null&&x.IsJudgeQuestion).ToList().Union(
twoItem.AfterQuestionList.Where(x => x.QuestionId != null&&x.IsJudgeQuestion).ToList()
).ToList();
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto