From 3898f1d63f444d953b02cc5769eaa2f9ef10e89b Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Sun, 9 Oct 2022 15:01:09 +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 --- .../Reading/ReadingImageTaskService.cs | 24 ++++--- .../TrialSiteUser/DTO/TrialConfigDTO.cs | 8 +-- .../TrialSiteUser/TrialConfigService.cs | 6 +- .../Reading/ReadingQuestionCriterionTrial.cs | 2 +- IRaCIS.Core.Domain/Trial/Trial.cs | 66 +++++++++---------- 5 files changed, 57 insertions(+), 49 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 973d4aebf..47d6c7167 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -239,7 +239,7 @@ namespace IRaCIS.Application.Services { var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync(); GetReadingToolOutDto result = new GetReadingToolOutDto(); - result.ReadingTool = await _trialRepository.Where(x => x.Id == visitTaskInfo.TrialId).Select(x => x.ReadingTool).FirstOrDefaultAsync(); + result.ReadingTool = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTaskInfo.TrialReadingCriterionId).Select(x => x.ReadingTool).FirstOrDefaultAsync(); return result; } @@ -1353,15 +1353,15 @@ namespace IRaCIS.Application.Services task.SubjectCode = visitTaskInfo.BlindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : visitTaskInfo.BlindSubjectCode; - var trialInfo = await _trialRepository.Where(x => x.Id == visitTaskInfo.TrialId).Select(x => new + var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTaskInfo.TrialReadingCriterionId).Select(x => new { x.IsReadingShowPreviousResults, x.IsReadingShowSubjectInfo, - x.ClinicalInformationTransmissionEnum, + }).FirstOrDefaultAsync(); - task.IsReadingShowPreviousResults = trialInfo.IsReadingShowPreviousResults; - task.IsReadingShowSubjectInfo = trialInfo.IsReadingShowSubjectInfo; + task.IsReadingShowPreviousResults = criterionInfo.IsReadingShowPreviousResults; + task.IsReadingShowSubjectInfo = criterionInfo.IsReadingShowSubjectInfo; @@ -1397,11 +1397,19 @@ namespace IRaCIS.Application.Services List result = await _noneDicomStudyRepository.Where(t => visitIds.Contains(t.SubjectVisitId)) .ProjectTo(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken }).ToListAsync(); + var taskinfo=await _visitTaskRepository.Where(x=>x.Id==inDto.VisistTaskId).FirstNotNullAsync(); + var trialInfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new + { + x.ClinicalInformationTransmissionEnum, + }).FirstOrDefaultAsync(); + + + var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskinfo.TrialReadingCriterionId).Select(x => new { x.IsReadingShowPreviousResults, x.IsReadingShowSubjectInfo, - x.ClinicalInformationTransmissionEnum, + }).FirstOrDefaultAsync(); #region 临床数据 @@ -1429,8 +1437,8 @@ namespace IRaCIS.Application.Services SubjectCode = taskInfo.BlindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : taskInfo.BlindSubjectCode, ReadingCategory = task.ReadingCategory, TaskBlindName = task.TaskBlindName, - IsReadingShowPreviousResults = trialInfo.IsReadingShowPreviousResults, - IsReadingShowSubjectInfo = trialInfo.IsReadingShowSubjectInfo, + IsReadingShowPreviousResults = criterionInfo.IsReadingShowPreviousResults, + IsReadingShowSubjectInfo = criterionInfo.IsReadingShowSubjectInfo, IsExistsClinicalData = isExistsClinicalData, }); } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs index 3b9dd8667..e675b7f33 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs @@ -757,14 +757,14 @@ namespace IRaCIS.Core.Application.Contracts public bool IsSignSave { get; set; } = false; } - public class SetTrialReadingInfoInDto + public class SetCriterionReadingInfoInDto { /// - /// 项目ID + /// 项目标准ID /// - public Guid TrialId { get; set; } + public Guid TrialCriterionId { get; set; } /// /// 阅片工具 @@ -775,7 +775,7 @@ namespace IRaCIS.Core.Application.Contracts /// /// 阅片平台 /// - public int ImagePlatform { get; set; } = 1; + public ImagePlatform ImagePlatform { get; set; } = ImagePlatform.MINT; /// diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 10b3a6274..6f9f81c83 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -312,15 +312,15 @@ namespace IRaCIS.Core.Application /// /// [HttpPost] - public async Task SetTrialReadingInfo(SetTrialReadingInfoInDto inDto) + public async Task SetCriterionReadingInfo(SetCriterionReadingInfoInDto inDto) { - await _trialRepository.UpdatePartialFromQueryAsync(inDto.TrialId, x => new Trial() + await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialCriterionId, x => new ReadingQuestionCriterionTrial() { ReadingTool=inDto.ReadingTool, //DigitPlaces=inDto.DigitPlaces, IsReadingTaskViewInOrder=inDto.IsReadingTaskViewInOrder, ReadingTaskViewEnum = inDto.ReadingTaskViewEnum, - IsImageIabeled = inDto.IsImageIabeled, + //IsImageIabeled = inDto.IsImageIabeled, IsReadingShowSubjectInfo = inDto.IsReadingShowSubjectInfo, IsReadingShowPreviousResults = inDto.IsReadingShowPreviousResults, ImagePlatform=inDto.ImagePlatform, diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs index b7e40fab1..1d744bb4a 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs @@ -171,7 +171,7 @@ namespace IRaCIS.Core.Domain.Models public bool IsOncologyReading { get; set; } /// - /// 任务展示访视 + /// 任务展示访视 读片任务显示是否顺序 /// public bool IsReadingTaskViewInOrder { get; set; } = true; diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 8b4a986d6..63e69acc3 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -25,7 +25,7 @@ namespace IRaCIS.Core.Domain.Models [JsonIgnore] public List TrialSiteSurveyList { get; set; } = new List(); - [JsonIgnore] + [JsonIgnore] public List TrialDocumentList { get; set; } [JsonIgnore] public List EnrollList { get; set; } = new List(); @@ -216,33 +216,33 @@ namespace IRaCIS.Core.Domain.Models public bool IsSubjectSecondCodeView { get; set; } - /// - /// 1 Mint2 PACS - /// + ///// + ///// 1 Mint2 PACS + ///// - public int ImagePlatform { get; set; } = 1; + //public int ImagePlatform { get; set; } = 1; //Ƭʽ public int ReadingMode { get; set; } = 1; - //Ƭ - public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double; + ////Ƭ + //public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double; - public bool IsGlobalReading { get; set; } = true; + //public bool IsGlobalReading { get; set; } = true; - /// - /// ٲƬ - /// - public bool? IsArbitrationReading { get; set; } = true; + ///// + ///// ٲƬ + ///// + //public bool? IsArbitrationReading { get; set; } = true; - public bool IsClinicalReading { get; set; } + //public bool IsClinicalReading { get; set; } - /// - /// ٲù - /// - public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.None; + ///// + ///// ٲù + ///// + //public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.None; public int ChangeDefalutDays { get; set; } = 5; @@ -356,22 +356,22 @@ namespace IRaCIS.Core.Domain.Models //ȫԶĬ״̬ public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated; - //Ƭʾ + ////Ƭʾ - public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; } + //public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; } - //ƬʾǷ˳ - public bool IsReadingTaskViewInOrder { get; set; } = true; + ////ƬʾǷ˳ + //public bool IsReadingTaskViewInOrder { get; set; } = true; - /// - /// ƬǷʾϢ - /// - public bool IsReadingShowSubjectInfo { get; set; } = false; + ///// + ///// ƬǷʾϢ + ///// + //public bool IsReadingShowSubjectInfo { get; set; } = false; - /// - /// ƬǷʾ - /// - public bool IsReadingShowPreviousResults { get; set; } = false; + ///// + ///// ƬǷʾ + ///// + //public bool IsReadingShowPreviousResults { get; set; } = false; /// @@ -396,10 +396,10 @@ namespace IRaCIS.Core.Domain.Models /// public DateTime? ReadingInfoSignTime { get; set; } - /// - /// Ƭ - /// - public ReadingTool? ReadingTool { get; set; } + ///// + ///// Ƭ + ///// + //public ReadingTool? ReadingTool { get; set; } //public Guid? ReviewTypeId { get; set; } = Guid.Empty;