From 5cf998bb9bc72ddac5f323d94a4d33e51e75edd9 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Fri, 9 Dec 2022 15:47:37 +0800 Subject: [PATCH] =?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 | 95 ++++++++++++++ .../Reading/Dto/ReadingImageTaskViewModel.cs | 122 +++++++++++++++++- .../Service/Reading/_MapConfig.cs | 8 +- .../ReadingCalculate/PCWG3CalculateService.cs | 14 +- .../RECIST1Point1CalculateService.cs | 10 +- 5 files changed, 228 insertions(+), 21 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index d49f63206..65764414d 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -2265,6 +2265,86 @@ 序号标记 + + + 第一层的Question + + + + + VisitTaskId + + + + + TrialId + + + + + InstanceId + + + + + SeriesId + + + + + StudyId + + + + + 是Dicom阅片 + + + + + RowIndex + + + + + MeasureData + + + + + CreateTime + + + + + 是否是当前任务添加 + + + + + SplitRowId + + + + + MergeRowId + + + + + 截图地址 + + + + + 第一次添加的任务ID + + + + + CreateUserId + + 问题标识 @@ -4246,6 +4326,21 @@ 自定义计算标记 + + + 数值类型 + + + + + 单位 + + + + + 自定义单位 + + 系统标准Id diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 5700821ae..5541ce5ad 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -311,7 +311,127 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid TrialId { get; set; } } - public class CopyTableAnswerRowInfo : ReadingTableAnswerRowInfo + public class ReadingTableAnswerRowInfoBase + { + public Guid Id { get; set; } + + /// + /// 第一层的Question + /// + public Guid QuestionId { get; set; } + + /// + /// VisitTaskId + /// + public Guid VisitTaskId { get; set; } + + /// + /// TrialId + /// + public Guid TrialId { get; set; } + + + /// + /// InstanceId + /// + public Guid? InstanceId { get; set; } + + /// + /// SeriesId + /// + public Guid? SeriesId { get; set; } + + + /// + /// StudyId + /// + public Guid? StudyId { get; set; } + + public bool IsCanEditPosition { get; set; } = false; + + + /// + /// 是Dicom阅片 + /// + public bool IsDicomReading { get; set; } = true; + + /// + /// RowIndex + /// + public decimal RowIndex { get; set; } + + /// + /// MeasureData + /// + public string MeasureData { get; set; } = string.Empty; + + /// + /// CreateTime + /// + public DateTime CreateTime { get; set; } + + /// + /// 是否是当前任务添加 + /// + public bool IsCurrentTaskAdd { get; set; } = false; + + + /// + /// SplitRowId + /// + public Guid? SplitRowId { get; set; } + + + /// + /// MergeRowId + /// + public Guid? MergeRowId { get; set; } + + public string BlindName { get; set; } = string.Empty; + + public string OrderMark { get; set; } = string.Empty; + + /// + /// 截图地址 + /// + public string PicturePath { get; set; } = string.Empty; + + /// + /// 第一次添加的任务ID + /// + public decimal FristAddTaskNum { get; set; } = 0; + + + public SplitOrMergeType? SplitOrMergeType { get; set; } + + /// + /// CreateUserId + /// + public Guid CreateUserId { get; set; } + + + public int? NumberOfFrames { get; set; } + + public Guid UpdateUserId { get; set; } + //string UpdateUserName { get; set; } + public DateTime UpdateTime { get; set; } + + + + + public bool IsDeleted { get; set; } + + public DateTime? DeletedTime { get; set; } + + public Guid? DeleteUserId { get; set; } + + + + + public string RowMark { get; set; } = string.Empty; + } + + public class CopyTableAnswerRowInfo : ReadingTableAnswerRowInfoBase { public Guid OriginalId { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index cb9c7b5d6..06b856bc0 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -68,9 +68,13 @@ namespace IRaCIS.Core.Application.Service CreateMap(); + + CreateMap(); + CreateMap() - .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)) - .ForMember(dest => dest.ReadingQuestionTrial, opt => opt.Ignore()); + .ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id)); + //.ForMember(dest => dest.Instance, opt => opt.Ignore()) + //.ForMember(dest => dest.ReadingQuestionTrial, opt => opt.Ignore()); #region 阅片问题 diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs index e1c141804..1f59d6b4d 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/PCWG3CalculateService.cs @@ -328,8 +328,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate { x.SplitRowId = tableRowAnswers.Where(y => y.OriginalId == x.SplitRowId).Select(y => y.Id).FirstOrDefault(); x.MergeRowId = tableRowAnswers.Where(y => y.OriginalId == x.MergeRowId).Select(y => y.Id).FirstOrDefault(); - x.MergeRow = null; - x.SplitRow = null; + }); List notNeedCopyMarks = new List() @@ -396,23 +395,16 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate throw new BusinessValidationFailedException($"PCWG3标准配置异常!"); } - - - - await _visitTaskRepository.UpdatePartialFromQueryAsync(visitTaskId, x => new VisitTask() { ReadingTaskState = ReadingTaskState.Reading, }); - + var addList = _mapper.Map>(tableRowAnswers); - - - - await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableRowAnswers); + await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); await _readingTableQuestionAnswerRepository.SaveChangesAsync(); diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs index fbe8e839e..e78beae58 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/RECIST1Point1CalculateService.cs @@ -611,7 +611,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate RowId = x.RowId, QuestionMark = x.ReadingTableQuestionTrial.QuestionMark, TableQuestionId = x.TableQuestionId, - RowIndex = x.RowIndex, TrialId = x.TrialId }).ToListAsync(); @@ -662,12 +661,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate }); - tableRowAnswers.ForEach(x => - { - x.MergeRow = null; - x.SplitRow = null; - }); - await _readingTableAnswerRowInfoRepository.AddRangeAsync(tableRowAnswers); + var addList= _mapper.Map>(tableRowAnswers); + + await _readingTableAnswerRowInfoRepository.AddRangeAsync(addList); await _readingTableQuestionAnswerRepository.AddRangeAsync(tableAnswers); await _readingTableQuestionAnswerRepository.SaveChangesAsync();