From c87c72468510f0cd83052e8cac6ec4e811ac747b Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Wed, 8 Jan 2025 16:02:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingCalculate/MRIPDFFCalculateService.cs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs index 543d25cad..4668b088d 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/MRIPDFFCalculateService.cs @@ -600,8 +600,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var rowInfo = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) .SelectMany(x => x.TableRowInfoList).ToList(); - var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable&& x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList(); + var tableQuestionList = rowInfo.Where(x=>x.TableQuestionList.Any(x=>x.QuestionMark== QuestionMark.IsMeasurable && x.Answer.EqEnum(YesOrNoOrNa.Yes))).SelectMany(x => x.TableQuestionList).ToList(); + if (rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).SelectMany(x => x.TableQuestionList).ToList().Count() != 8) + { + return string.Empty; + } if (tableQuestionList.Count() == 0) { return "NE"; @@ -619,10 +623,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate public async Task GetFattyLiverGrading(ReadingCalculateDto inDto) { var answer = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.TotalMeanFraction).Select(x => x.Answer).FirstIsNullReturnEmpty(); - if (answer == "NE" || answer == string.Empty) + if (answer == "NE") { return FattyLiverClassification.NE.GetEnumInt(); } + else if(answer == string.Empty) + { + return string.Empty; + } if (decimal.TryParse(answer, out var value)) { @@ -708,7 +716,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate var rowInfo = readingData.QuestionInfo.Where(x => x.LesionType == LesionType.FatFraction) .SelectMany(x => x.TableRowInfoList).ToList(); - var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.IsMeasurable && x.Answer.IsNotNullOrEmpty())).ToList(); + var tableQuestionList = rowInfo.Where(x => x.TableQuestionList.Any(x => x.QuestionMark == QuestionMark.AverageValue && x.Answer.IsNotNullOrEmpty())).ToList(); if (tableQuestionList.Count() != 8) {