diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 94aec94c..978c0a63 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1384,9 +1384,12 @@ namespace IRaCIS.Application.Services case CriterionType.RECIST1Pointt1: var lastTaskinfo = await _visitTaskRepository .Where(x => x.IsAnalysisCreate == taskinfo.IsAnalysisCreate && + x.SubjectId==taskinfo.SubjectId&& x.ReadingCategory == taskinfo.ReadingCategory && x.DoctorUserId == taskinfo.DoctorUserId && x.ArmEnum == taskinfo.ArmEnum && + x.TrialReadingCriterionId==taskinfo.TrialReadingCriterionId&& + x.ReadingTaskState==ReadingTaskState.HaveSigned&& x.TaskState == TaskState.Effect && x.IsSelfAnalysis == taskinfo.IsSelfAnalysis && x.VisitTaskNum < taskinfo.VisitTaskNum @@ -1425,18 +1428,27 @@ namespace IRaCIS.Application.Services var thisAnswer = inDto.AnswerList.Where(x => x.TableQuestionId == shortAxisQuestion.Id).Select(x => x.Answer).FirstOrDefault(); if (!lastAnswer.IsNullOrEmpty() && !thisAnswer.IsNullOrEmpty()) { + + var lastvalue = 0m; + var thisvalue = 0m; try { - if (decimal.Parse(lastAnswer) >= decimal.Parse(thisAnswer)) - { - throw new BusinessValidationFailedException(_localizer["ReadingImage_IsLymphNotbigger"]); - } + lastvalue = decimal.Parse(lastAnswer); + thisvalue = decimal.Parse(thisAnswer); } catch (Exception) { } + + + if (lastvalue >= thisvalue) + { + throw new BusinessValidationFailedException(_localizer["ReadingImage_IsLymphNotbigger"]); + } + + } } } @@ -1453,18 +1465,25 @@ namespace IRaCIS.Application.Services var thisAnswer = inDto.AnswerList.Where(x => x.TableQuestionId == majorAxisQuestion.Id).Select(x => x.Answer).FirstOrDefault(); if (!lastAnswer.IsNullOrEmpty() && !thisAnswer.IsNullOrEmpty()) { + var lastvalue = 0m; + var thisvalue = 0m; try { - if (decimal.Parse(lastAnswer) >= decimal.Parse(thisAnswer)) - { - throw new BusinessValidationFailedException(_localizer["ReadingImage_NotLymphNotbigger"]); - } + lastvalue = decimal.Parse(lastAnswer); + thisvalue = decimal.Parse(thisAnswer); } catch (Exception) { - + } + + + if (lastvalue >= thisvalue) + { + throw new BusinessValidationFailedException(_localizer["ReadingImage_NotLymphNotbigger"]); + } + } } }