From 8b86bc6b3ff21b36a95884dc65ec69a98786650c Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Tue, 20 Feb 2024 14:12:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E5=8F=AF=E8=9E=8D=E5=90=88?= =?UTF-8?q?=E7=9A=84=E7=97=85=E7=81=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 14 ++++ .../Reading/Dto/ReadingImageTaskViewModel.cs | 22 +++++- .../ReadingImageTaskService.cs | 74 +++++++++++++++++-- 3 files changed, 101 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 602e97a4b..e96b8314d 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1310,6 +1310,13 @@ + + + 计算靶病灶状态 + + + + 获取Sod的值 @@ -13413,6 +13420,13 @@ + + + 获取可合并的病灶 + + + + 保存影像质量 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index ace138aac..3856305be 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -297,7 +297,27 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List CrterionDictionaryGroup { get; set; } } - public class MergeLesionInDto + + public class GetCanMergeLesionOutDto + { + public Guid RowId { get; set; } + + public string OrderMarkName { get; set; } + + public Guid? OrganInfoId { get; set; } + + public decimal RowIndex { get; set; } + + public string Part { get; set; } + } + + + public class GetCanMergeLesionInDto + { + public Guid RowId { get; set; } + } + + public class MergeLesionInDto { public Guid VisitTaskId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index be1720087..f4cea5994 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -1515,19 +1515,77 @@ namespace IRaCIS.Application.Services } - - #endregion - - - - #region 访视任务 - Dicom 阅片 提交、修改 - /// - /// 保存影像质量 + /// 获取可合并的病灶 /// /// /// [HttpPost] + public async Task> GetCanMergeLesion(GetCanMergeLesionInDto inDto) + { + var rowinfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).Include(x=>x.ReadingQuestionTrial).FirstNotNullAsync(); + + // 需要排除的状态 + var needFilterState = new List(); + + switch (rowinfo.ReadingQuestionTrial.LesionType) + { + //状态为“消失”、“无法评估”的靶病灶不可融合; + case LesionType.TargetLesion: + needFilterState = new List() { + TargetState.Loss.GetEnumInt(), + TargetState.UnableEvaluate.GetEnumInt(), + }; + + break; + + } + + + var result = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == rowinfo.VisitTaskId && x.QuestionId == rowinfo.QuestionId && x.Id != rowinfo.Id) + // 筛选状态 + .Where(x => x.LesionAnswerList.Any(y => y.ReadingTableQuestionTrial.QuestionMark == QuestionMark.State && !needFilterState.Contains(y.Answer))) + .Select(x => new GetCanMergeLesionOutDto() + { + RowId = x.Id, + RowIndex = x.RowIndex, + OrderMarkName = x.ReadingQuestionTrial.OrderMark + x.RowIndex.GetLesionMark(), + OrganInfoId = x.OrganInfoId + }).OrderBy(x=>x.RowIndex).ToListAsync(); + + var organIds = result.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList(); + var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync(); + + result.ForEach(x => + { + + if (_userInfo.IsEn_Us) + { + x.Part = organList.Where(y => y.Id == x.OrganInfoId).Select(y => y.PartEN).FirstIsNullReturnEmpty(); + + } + else + { + x.Part = organList.Where(y => y.Id == x.OrganInfoId).Select(y => y.Part).FirstIsNullReturnEmpty(); + } + }); + + return result; + + } + + #endregion + + + + #region 访视任务 - Dicom 阅片 提交、修改 + + /// + /// 保存影像质量 + /// + /// + /// + [HttpPost] [TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })] public async Task SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto) {