From e745271671768f918fcb90392ec3443d13325804 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 19 Sep 2025 14:56:42 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9PD=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ReadingCalculate/PCWG3CalculateService.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index 76b639edf..5905518d8 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -1247,6 +1247,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 当前访视新病灶数量 var thisNewLesionsCount = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.NewLesionsCount).Select(x => x.Answer).FirstIsNullReturnEmpty().IsNullOrEmptyReturn0(); + // 其他访视的BTN var otherBTNStrList =await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId != inDto.VisitTaskId && taskIdList.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.QuestionType == QuestionType.BaseLineLesionsCount).Select(x=>new { x.VisitTask.VisitTaskNum, @@ -1254,13 +1255,24 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate }).ToListAsync(); // 最小的BTN 这个时候再转为int 避免查询报错 - var othenMinBTNCount= otherBTNStrList.Select(x => x.Answer.IsNullOrEmptyReturn0()).Min(); + var otherMinBTNCount= otherBTNStrList.Select(x => x.Answer.IsNullOrEmptyReturn0()).Min(); + + + // [(V3 - BTN - Min(V2 - BTN、V1 - BTN、BL - BTN)] 小于当0计算 + + var btnValue = thisBTN - otherMinBTNCount; + + if (btnValue < 0) + { + btnValue = 0; + } // 历史有PD if (pdTaskList.Count() > 0) { // 当前访视:自治疗后第二个访视点以来持续的新骨变数量 + [(V3 - BTN - Min(V2 - BTN、V1 - BTN、BL - BTN)] + 新病灶 >= 2 - if (thisNewBoneLesionsCount + thisBTN - othenMinBTNCount + thisNewLesionsCount >= 2) + + if (thisNewBoneLesionsCount + btnValue + thisNewLesionsCount >= 2) { result.IsPD = true; } @@ -1303,7 +1315,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 按上面条件写三个if看着清晰点 if (lastNewLesionsCount + lastBTN - lastTwoBTN >= 2) { - if (thisNewBoneLesionsCount + thisBTN - othenMinBTNCount + thisNewLesionsCount >= 2) + if (thisNewBoneLesionsCount + btnValue + thisNewLesionsCount >= 2) { if (daysBetween >= 42) { From e4cc044219e4887910d0af19fd95ef026a05e3d7 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Fri, 19 Sep 2025 15:56:05 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/ReadingCalculate/PCWG3CalculateService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index 5905518d8..ced5c5a11 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -1313,7 +1313,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // V3与V2的间隔 >= 6周 // 按上面条件写三个if看着清晰点 - if (lastNewLesionsCount + lastBTN - lastTwoBTN >= 2) + + var lastBtnSubMin = lastBTN - lastTwoBTN; + if (lastBtnSubMin < 0) + { + lastBtnSubMin = 0; + } + + if (lastNewLesionsCount + lastBtnSubMin >= 2) { if (thisNewBoneLesionsCount + btnValue + thisNewLesionsCount >= 2) {