From 01c9aeef48c0194c004a2d36bdec3580b141010c Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 13 Feb 2023 10:09:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingCalculate/PCWG3CalculateService.cs | 14 ++++++++++++-- IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs | 5 +++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index a72223f1b..7c27ed1f0 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -704,8 +704,18 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate public async Task GetBaseLineLesionsCount(ReadingCalculateDto inDto) { - return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.BaselineLesions).SelectMany(x => x.TableRowInfoList) - .Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.State && y.Answer == EvaluationOfState.Exists.GetEnumInt())).Count(); + try + { + return (int)(inDto.QuestionInfo.Where(x => x.LesionType == LesionType.BaselineLesions).SelectMany(x => x.TableRowInfoList) + + .Sum(x => x.TableQuestionList.Where(y => y.QuestionMark == QuestionMark.LesionNumber).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0())); + } + catch + { + + return 0; + } + } #endregion diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index c351feba3..8f08aeb73 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -1011,6 +1011,11 @@ namespace IRaCIS.Core.Domain.Share /// 所在部位 /// Part = 8, + + /// + /// 病灶数量 + /// + LesionNumber=11, } ///