From 81c59c3f12952d0394db12b659adb65b50f587be Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 6 Mar 2023 13:38:58 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/IRaCIS.Core.Application.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index b0e13ad8..6e842f51 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1988,9 +1988,14 @@ 最低SOD + + + 当前SOD + + - 是否存在靶病灶 + 是否存在靶病灶 (当前访视 至少一个靶病灶的状态为存在) From b4171a60861d18acddf723e9d6996031b7dd6973 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 6 Mar 2023 13:44:54 +0800 Subject: [PATCH 2/5] =?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 --- .../Reading/ReadingImageTask/ReadingImageTaskService.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index e2e65f24..2bd8fec5 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1863,6 +1863,10 @@ namespace IRaCIS.Application.Services { TrialId = inDto.TrialId, TrialReadingCriterionId = trialReadingCriterionId.Value, + Page=new PageInput() { + PageIndex=1, + PageSize=99999, + } })).Item2; var index = 0; From 4f4a4525b45c2d71d77a2926a02a409939378c51 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 6 Mar 2023 14:36:33 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 25 ++++++-- .../Reading/Dto/ReadingCalculateViewModel.cs | 17 ++++-- .../RECIST1Point1CalculateService.cs | 59 +++++++++++++------ 3 files changed, 76 insertions(+), 25 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 6e842f51..26d9aad8 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1393,6 +1393,13 @@ + + + 获取存在淋巴结靶病灶且该病灶比上一访视短径增加5MM以上的病灶 + + + + 被评估为NE的单个靶病灶 @@ -2023,22 +2030,22 @@ SOD 百分比 与基线期SOD相比减小<30% - + SOD 百分比 整体访视期间SOD最低点SOD相比增加<20% - + SOD 百分比 比整体访视期间最低点SOD增加≥20% - + SOD 变化值 比整体访视期间最低点SOD绝对增加值<5 mm - + 比整体访视期间最低点SOD绝对增加值≥5 mm @@ -2073,6 +2080,16 @@ 该淋巴结靶病灶短径绝对增加值≥5 mm + + + 靶病灶短径增加值有5mm的Index + + + + + 短径有10mm的Index + + 阅片计算Dto diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs index 4fab6332..71fb881d 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingCalculateViewModel.cs @@ -62,22 +62,22 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// SOD 百分比 整体访视期间SOD最低点SOD相比增加<20% /// - public bool LowPercentLess20 { get; set; } + public bool LowSODPercentLess20 { get; set; } /// /// SOD 百分比 比整体访视期间最低点SOD增加≥20% /// - public bool LowPercentBigger20 { get; set; } + public bool LowSODPercentBigger20 { get; set; } /// /// SOD 变化值 比整体访视期间最低点SOD绝对增加值<5 mm /// - public bool LowChangeLess5 { get; set; } + public bool LowSODChangeLess5 { get; set; } /// /// 比整体访视期间最低点SOD绝对增加值≥5 mm /// - public bool LowChangeBigger5 { get; set; } + public bool LowSODChangeBigger5 { get; set; } /// /// 被评估为NE的单个靶病灶 是否存在状态为不可评估的靶病灶 @@ -109,6 +109,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public bool IsAddFive { get; set; } + /// + /// 靶病灶短径增加值有5mm的Index + /// + public List AddFiveIndexs { get; set; } + + /// + /// 短径有10mm的Index + /// + public List ShortBigger10Indexs { get; set; } } /// diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index d7fdd40b..51e12ca7 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -1045,15 +1045,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { return YesOrNoOrNa.NA.GetEnumInt(); } + var addFiveList = await GetIsAddFiveRowIndexs(inDto); + var isExists = addFiveList.Count() > 0 ? true : false; + return isExists ? YesOrNoOrNa.Yes.GetEnumInt() : YesOrNoOrNa.No.GetEnumInt(); + + } + + /// + /// 获取存在淋巴结靶病灶且该病灶比上一访视短径增加5MM以上的病灶 + /// + /// + /// + public async Task> GetIsAddFiveRowIndexs(ReadingCalculateDto inDto) + { + List result = new List(); var LastVisitTaskId = await this.GetLastVisitTaskId(inDto); - var questionIds = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).Select(x => x.QuestionId).ToList(); var lastQuestionAsnwer = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == LastVisitTaskId && questionIds.Contains(x.QuestionId)).Include(x => x.ReadingQuestionTrial).Include(x => x.ReadingTableQuestionTrial).ToListAsync(); var rowIndexs = lastQuestionAsnwer.Where(x => x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.IsLymph && x.Answer.EqEnum(YesOrNoOrNa.Yes)).Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList(); var thisQuestionAsnwer = inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).SelectMany(x => x.TableRowInfoList).ToList(); - - var isExists = false; foreach (var item in rowIndexs) { var lastValue = lastQuestionAsnwer.Where(x => x.RowIndex == item && x.ReadingTableQuestionTrial.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Answer).FirstOrDefault().IsNullOrEmptyReturn0(); @@ -1063,12 +1074,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (thisValue - lastValue >= 5) { - isExists = true; + result.Add(item); } } - return isExists ? YesOrNoOrNa.Yes.GetEnumInt() : YesOrNoOrNa.No.GetEnumInt(); - + return result; } #endregion @@ -1447,6 +1457,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate TargetLesionCalculateDto resultData = new TargetLesionCalculateDto() { + + // 是否存在靶病灶 ExistsTargetLesion = tableQuestion.Count() > 0, @@ -1466,24 +1478,24 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate SODPercent = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()), // SOD 百分比与基线期SOD相比减小≥30% bool - SODPercentBigger30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) <=- 30, + SODPercentBigger30 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) <= -30, // SOD 百分比 与基线期SOD相比减小<30% bool - SODPercentLess30 = 0>inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0())&& + SODPercentLess30 = 0 > inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) && inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.SODPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) > -30, // SOD 百分比 整体访视期间SOD最低点SOD相比增加<20% - LowPercentLess20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < 20, + LowSODPercentLess20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < 20, // SOD 百分比 比整体访视期间SOD最低点SOD增加≥20% - LowPercentBigger20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= 20, + LowSODPercentBigger20 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowPercent).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= 20, // SOD 变化值 比整体访视期间SOD最低点SOD绝对增加值<5 mm - LowChangeLess5 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowestIncrease).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < 5, - + LowSODChangeLess5 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowestIncrease).Sum(x => x.Answer.IsNullOrEmptyReturn0()) < 5, + // 比整体访视期间SOD最低点SOD绝对增加值≥5 mm - LowChangeBigger5 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowestIncrease).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= 5, + LowSODChangeBigger5 = inDto.QuestionInfo.Where(x => x.QuestionType == QuestionType.LowestIncrease).Sum(x => x.Answer.IsNullOrEmptyReturn0()) >= 5, // 被评估为NE的单个靶病灶 是否存在状态为不可评估的靶病灶 ExixtsNETargetLesion = tableQuestion.SelectMany(x => x.TableQuestionList).Any(x => x.QuestionMark == QuestionMark.State && x.Answer.EqEnum(TargetState.UnableEvaluate)), @@ -1497,6 +1509,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 当前访视点淋巴结病灶, 至少一个淋巴结靶病灶短径≥10 mm CurrenShortBigger10 = false, + // 靶病灶短径增加值有5mm的Index + AddFiveIndexs = await GetIsAddFiveRowIndexs(inDto), + + // 短径有10mm的Index + ShortBigger10Indexs = new List(), + //淋巴结非靶病灶状态全部为消失 NonTargetStateIsLoss = true, @@ -1523,7 +1541,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // 淋巴结的短径 resultData.DiameterLessThan10 = resultData.DiameterLessThan10&&(item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Answer).FirstOrDefault()).IsNullOrEmptyReturn0() < 10; - resultData.CurrenShortBigger10= resultData.CurrenShortBigger10|| (item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Answer).FirstOrDefault()).IsNullOrEmptyReturn0() >= 10; + var shortIsBigger10 = (item.TableQuestionList.Where(x => x.QuestionMark == QuestionMark.ShortAxis).Select(x => x.Answer).FirstOrDefault()).IsNullOrEmptyReturn0() >= 10; + resultData.CurrenShortBigger10= resultData.CurrenShortBigger10|| shortIsBigger10; + + if (shortIsBigger10) + { + resultData.ShortBigger10Indexs.Add(item.RowIndex); + } } @@ -1575,7 +1599,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (resultData.LowSod > 0) { // if(比整体访视期间最低点SOD增加≥20 % 且与整个访视期间最低点相比增加的值≥5 mm) - if (resultData.LowPercentBigger20 && resultData.LowChangeBigger5) + if (resultData.LowSODPercentBigger20 && resultData.LowSODChangeBigger5) { // 靶病灶疗效为 PD result = TargetAssessment.PD; @@ -1585,7 +1609,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { //进入该分支最低点SOD=0 // if (当前访视SOD > 0 且与整个访视期间最低点相比增加的值≥5 mm) - if (resultData.PresentSod > 0 && resultData.LowChangeBigger5) + if (resultData.PresentSod > 0 && resultData.LowSODChangeBigger5) { // 靶病灶疗效为PD result = TargetAssessment.PD; @@ -1595,7 +1619,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (resultData.LastTargetLesionEvaluate.EqEnum(TargetAssessment.CR)) { //if (当前访视点淋巴结病灶,至少一个淋巴结靶病灶短径≥10 mm 并且该淋巴结靶病灶短径绝对增加值≥5 mm) - if (resultData.CurrenShortBigger10 && resultData.IsAddFive) + // 换句话说 就是 ≥10 的病灶 和 增加值≥5的病灶 的交集数量大于0 + if (resultData.ShortBigger10Indexs.Intersect(resultData.AddFiveIndexs).ToList().Count()>0) { //靶病灶疗效为 PD result = TargetAssessment.PD; From 622d8bcb3a3f7331a463b2e6a54e2e1eb9d8785b Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 6 Mar 2023 14:37:01 +0800 Subject: [PATCH 4/5] =?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/RECIST1Point1CalculateService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index 51e12ca7..1bd970ed 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -1619,7 +1619,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if (resultData.LastTargetLesionEvaluate.EqEnum(TargetAssessment.CR)) { //if (当前访视点淋巴结病灶,至少一个淋巴结靶病灶短径≥10 mm 并且该淋巴结靶病灶短径绝对增加值≥5 mm) - // 换句话说 就是 ≥10 的病灶 和 增加值≥5的病灶 的交集数量大于0 + // 换句话说 就是 短径≥10 的病灶 和 短径增加值≥5的病灶 的交集数量大于0 if (resultData.ShortBigger10Indexs.Intersect(resultData.AddFiveIndexs).ToList().Count()>0) { //靶病灶疗效为 PD From 32ebad29782d44ea2052bbc6c4b8d3b5a8b3af24 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 7 Mar 2023 09:45:16 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs index 4f94fe61..a46afeba 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingGlobalTaskService.cs @@ -264,6 +264,7 @@ namespace IRaCIS.Application.Services x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && x.SubjectId == taskInfo.SubjectId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate && x.TaskState == TaskState.Effect && x.VisitTaskNum < taskInfo.VisitTaskNum) .Where(x => x.DoctorUserId == taskInfo.DoctorUserId) + .OrderByDescending(x=>x.VisitTaskNum) .FirstOrDefaultAsync(); List? globalAnswers = new List();