diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 328e313f8..b1d9efd92 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1764,6 +1764,19 @@ + + + 计算靶病灶状态 + + + + + + + 获取分裂病灶的PPd之和 不包括当前的主病灶 + + + 将上一次的访视病灶添加到这一次 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index f78d2a27b..85e3c0a1e 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1398,7 +1398,7 @@ namespace IRaCIS.Application.Services /// - /// 拆分病灶 + /// 拆分病灶 分裂病灶 /// /// [HttpPost] @@ -1444,7 +1444,12 @@ namespace IRaCIS.Application.Services }); await _readingTableAnswerRowInfoRepository.AddAsync(rowAnswer); await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); - await _readingTableAnswerRowInfoRepository.SaveChangesAsync(); + await _readingTableAnswerRowInfoRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.RowId, x => new ReadingTableAnswerRowInfo() + { + SplitOrMergeType = SplitOrMergeType.SplitMain + }); + + await _readingTableAnswerRowInfoRepository.SaveChangesAsync(); } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs index d68e11325..849a25dee 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/Dto/CriterionCalculateDto.cs @@ -26,6 +26,8 @@ namespace IRaCIS.Core.Application.ViewModel { public Guid RowId { get; set; } + public string RowIndex { get; set; } + public decimal AllPPD { get; set; } } diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index b1a2c4efd..c7d12d6c6 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -1028,12 +1028,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate x.RowIndex, Answer = x.Answer.IsNullOrEmptyReturn0() }).ToList(); - var maxRowIndex = answerList.Max(x => x.RowIndex); + var maxRowIndex = answerList.MaxOrDefault(x => x.RowIndex); for (int i = 1; i < maxRowIndex; i++) { result.Add(new GetSplitPPdOutDto() { RowId = answerList.Where(x => x.RowIndex == i).Select(x => x.RowId).FirstOrDefault(), + RowIndex = answerList.Where(x => x.RowIndex == i).Select(x => x.RowIndex).FirstOrDefault().ToString(), AllPPD = answerList.Where(x => x.RowIndex > i && x.RowIndex < (i + 1)).Sum(x => x.Answer), }); } diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index fd28b89c1..d492b9a32 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -633,27 +633,32 @@ namespace IRaCIS.Core.Domain.Share } - /// - /// 病灶分裂或合并 - /// - public enum SplitOrMergeType - { + /// + /// 病灶分裂或合并 + /// + public enum SplitOrMergeType + { + /// + /// 分裂 + /// + Split = 0, - /// - /// 分裂 - /// - Split = 0, + /// + /// 合并 + /// + Merge = 1, - /// - /// 合并 - /// - Merge = 1 - } + /// + /// 分裂主病灶 + /// + SplitMain = 2, - /// - /// 是否存在或者NA - /// - public enum ExistOrNA + } + + /// + /// 是否存在或者NA + /// + public enum ExistOrNA { /// /// NA