From d1e9ab8033e22fadd313bc2f8f72d4dd6f40b132 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Wed, 22 Jun 2022 14:53:05 +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 --- .../DTO/TaskAllocationRuleViewModel.cs | 2 +- .../Service/Document/TrialDocumentService.cs | 7 +++- .../Reading/ReadingImageTaskService.cs | 23 ++++++++--- .../TrialSiteUser/DTO/TrialConfigDTO.cs | 38 +++++++++++++++++++ .../Service/TrialSiteUser/_MapConfig.cs | 2 +- 5 files changed, 63 insertions(+), 9 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs index 1eedb4fad..b118b83c7 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskAllocationRuleViewModel.cs @@ -143,7 +143,7 @@ namespace IRaCIS.Core.Application.ViewModel public class ReadingGenerataTaskDTO { - public Guid Id { get; set; } + public Guid ReadModuleId { get; set; } public Guid SubjectId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index f480d836e..875bf71e4 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -22,16 +22,19 @@ namespace IRaCIS.Core.Application.Services private readonly IRepository _trialDocumentRepository; private readonly IRepository _trialDocUserTypeConfirmedUserRepository; + private readonly IRepository _trialRepository; private readonly IRepository _systemDocConfirmedUserRepository; private readonly IRepository _systemDocumentRepository; public TrialDocumentService(IRepository trialDocumentRepository, IRepository trialDocUserTypeConfirmedUserRepository, + IRepository trialRepository, IRepository systemDocConfirmedUserRepository , IRepository systemDocumentRepository) { _trialDocumentRepository = trialDocumentRepository; this._trialDocUserTypeConfirmedUserRepository = trialDocUserTypeConfirmedUserRepository; + this._trialRepository = trialRepository; this._systemDocConfirmedUserRepository = systemDocConfirmedUserRepository; _systemDocumentRepository = systemDocumentRepository; } @@ -209,8 +212,10 @@ namespace IRaCIS.Core.Application.Services .Where(t => t.IsDeleted == false && !t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .CountAsync(); + var trialTaskConfig = _trialRepository.Where(t => t.Id == querySystemDocument.TrialId).ProjectTo(_mapper.ConfigurationProvider).FirstOrDefault(); - return (result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr= trialInfo.TrialStatusStr }); + + return (result, new { NeedSignCount = needSignTrialDocCount + needSignSystemDocCount, NeedSignTrialDocCount = needSignTrialDocCount, NeedSignSystemDocCount = needSignSystemDocCount, TrialStatusStr= trialInfo.TrialStatusStr,TrialConfig= trialTaskConfig }); } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 332e8e91e..cea9696f5 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -331,16 +331,27 @@ namespace IRaCIS.Application.Services var taskInfo = await _visitTaskRepository.Where(x => x.Id == VisitTaskId).FirstOrDefaultAsync(); - if (taskInfo.ReadingCategory == ReadingCategory.Visit) + + // 任务类型 + switch (taskInfo.ReadingCategory) { - if (!await _visitTaskRepository.AnyAsync(x => x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && x.ReadingTaskState != ReadingTaskState.HaveSigned)) - { - var needReadList = await _readModuleRepository.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId).ToListAsync(); + case ReadingCategory.Visit: + //if (!await _visitTaskRepository.AnyAsync(x => x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && x.ReadingTaskState != ReadingTaskState.HaveSigned)) + //{ + // var needReadList = await _readModuleRepository.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId) + // .Select(x=> new ReadingGenerataTaskDTO { + // IsUrgent=x.IsUrgent, + // SubjectId=x.SubjectId, + // ReadingName= + // }).ToListAsync(); + // if() - - } + //} + break; } + + } /// diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs index 849e9e3ed..b31c40d5b 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs @@ -146,6 +146,44 @@ namespace IRaCIS.Core.Application.Contracts + } + + public class TrialBasicConfigView : TrialTaskConfigView + { + /// + /// QC流程 0 不审,1 单审,2双审 + /// + public TrialQCProcess QCProcessEnum { get; set; } + + /// + /// 影像一致性核查 + /// + public bool IsImageConsistencyVerification { get; set; } = false; + + /// + /// 流程是否确认 + /// + public bool IsTrialProcessConfirmed { get; set; } = false; + + + + //阅片方式 + public int ReadingMode { get; set; } + + //阅片类型 + public int ReadingType { get; set; } + + + public bool IsGlobalReading { get; set; } = true; + + public bool? IsArbitrationReading { get; set; } + + public bool? IsClinicalReading { get; set; } + + + public int ArbitrationRule { get; set; } + + } public class TrialTaskConfigView : TrialTaskConfig diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs index cadb287d5..cb7af7723 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs @@ -216,7 +216,7 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - + CreateMap(); CreateMap()