diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs index 320784ee5..a8835e2cf 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs @@ -135,7 +135,7 @@ namespace IRaCIS.Application.Services var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync(); - result.TaskList.ForEach(x => + result.TaskList.ForEach(async x => { x.AfterQuestionList = x.BeforeQuestionList.Where(x=>x.IsJudgeQuestion).GroupJoin( globalReadingQuestion @@ -180,15 +180,17 @@ namespace IRaCIS.Application.Services }; + var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync(); + List questionTypes = new List() { - new GetGlobalQuestionType (){GlobalAnswerType=GlobalAnswerType.UpdateType,QuestionName="评估更新类型" }, - new GetGlobalQuestionType (){GlobalAnswerType=GlobalAnswerType.Reason,QuestionName="全局阅片备注" }, - //new GetGlobalQuestionType (){GlobalAnswerType=GlobalAnswerType.AgreeOrNot,QuestionName="是否同意访视结果" }, - }; + if(criterionType== CriterionType.PCWG3) + { + questionTypes.Add(new GetGlobalQuestionType() { GlobalAnswerType = GlobalAnswerType.UpdateType, QuestionName = "评估更新类型" }); - + } + questionTypes.Add(new GetGlobalQuestionType() { GlobalAnswerType = GlobalAnswerType.Reason, QuestionName = "全局阅片备注" }); foreach (var item in questionTypes) { x.AfterQuestionList.Add(new GlobalQuestionInfo() diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index c6446002e..7ef82e61b 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -936,7 +936,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate .Select(x => x.RowId).Distinct().ToListAsync(); - IEnumerable measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + List measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + + List stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + + + List allExists = measureDataList.Intersect(stateIsNullList).ToList(); + measureDataList = measureDataList.Except(allExists).ToList(); + stateIsNullList = stateIsNullList.Except(allExists).ToList(); if (measureDataList.Count() > 0) @@ -947,7 +954,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (tableAnswerList.Count > 0) { - errorMassage += $" 病灶{ string.Join(',', tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()))}状态为空,"; + errorMassage += $" 病灶{ string.Join(',', stateIsNullList)}状态为空,"; + } + + if (allExists.Count > 0) + { + errorMassage += $" 病灶{ string.Join(',', stateIsNullList)}未做标记,且状态为空,"; } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index 70dcbb2d7..33aa9a7f7 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -527,7 +527,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate .Select(x => x.RowId).Distinct().ToListAsync(); - IEnumerable measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + List measureDataList = rowAnswerList.Where(x => !unableEvaluateRowIds.Contains(x.Id)).Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + + List stateIsNullList = tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()).ToList(); + + + List allExists = measureDataList.Intersect(stateIsNullList).ToList(); + measureDataList = measureDataList.Except(allExists).ToList(); + stateIsNullList = stateIsNullList.Except(allExists).ToList(); if (measureDataList.Count() > 0) @@ -538,7 +545,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (tableAnswerList.Count > 0) { - errorMassage += $" 病灶{ string.Join(',', tableAnswerList.Select(x => x.OrderMark + x.RowIndex.GetLesionMark()))}状态为空,"; + errorMassage += $" 病灶{ string.Join(',', stateIsNullList)}状态为空,"; + } + + if (allExists.Count > 0) + { + errorMassage += $" 病灶{ string.Join(',', stateIsNullList)}未做标记,且状态为空,"; }