From 273bfcc2e88cd7ac40e91eb80acd26303bc1490a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 19 Jul 2022 13:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E7=94=9F?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../IRaCIS.Core.Application.xml | 36 ++++++------ .../DTO/TaskConsistentRuleViewModel.cs | 30 ++++++++++ .../Service/Allocation/VisitTaskService.cs | 57 ++++++------------- .../Service/Allocation/_MapConfig.cs | 6 +- 4 files changed, 70 insertions(+), 59 deletions(-) diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index d96f721d8..6066874cf 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -171,18 +171,18 @@ 访视读片任务 - + 访视读片任务 - + 获取手动分配 未分配的Subject列表(IsHaveAssigned 传递false) - + 获取随访 阅片期 全局 任务列表 @@ -190,102 +190,102 @@ - + 获取裁判访视任务列表 - + 获取影像阅片列表 相比而言多了几个字段 和配置信息 - + PM 重阅追踪 - + 获取IR 重阅影像阅片列表 - + IR 待阅片任务列表 - + IR 已阅片任务 - + 批量为 多个Subject 分配医生 手动分配 IsReAssign 为true 批量删除 重新分配 - + 批量取消Subject 分配的医生 数量 - + 手动分配确认 绑定该Subject的已存在的任务给医生 - + 自动一次性分配所有未分配的 Subject 给医生 - + 任务 手动分配 重新分配 确认 取消分配 分配 - + 申请重阅 1:IR 2:PM - + 确认重阅与否 1同意 2 拒绝 - + PM 设置任务 退回 - + 影响提示列表 重阅仅仅针对已完成的任务申请 退回针对的是未完成的(退回仅仅针对是访视类型的) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs index 4ff042d81..3a19e1263 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskConsistentRuleViewModel.cs @@ -173,6 +173,36 @@ namespace IRaCIS.Core.Application.ViewModel // //public List HistoryDoctorUserList => VisitTaskList.SelectMany(t => t.RelationDoctorUserList).DistinctBy(t=>t.UserId).ToList(); //} + public class InfluenceTaskInfo + { + public Guid Id { get; set; } + public Guid TrialId { get; set; } + public Guid SiteId { get; set; } + + public Guid SubjectId { get; set; } + + public Arm ArmEnum { get; set; } + public string TaskCode { get; set; } + + public string TaskName { get; set; } + public string TaskBlindName { get; set; } + + public decimal VisitTaskNum { get; set; } + + public ReadingCategory ReadingCategory { get; set; } + + //任务阅片状态 + public ReadingTaskState ReadingTaskState { get; set; } + + public TaskState TaskState { get; set; } + + public String TrialSiteCode { get; set; } = String.Empty; + public string SubjectCode { get; set; } = String.Empty; + + + public UserSimpleInfo DoctorUser { get; set; } + } + public class VisitTaskSimpleView { public Guid Id { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 4fcd3a90f..119a7feae 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1283,11 +1283,12 @@ namespace IRaCIS.Core.Application.Service.Allocation //影响后续访视已经读完的,未读的不做处理 以及其他类型任务 filterExpression = filterExpression.And(t => t.VisitTaskNum > origenalTask.VisitTaskNum && t.DoctorUserId == origenalTask.DoctorUserId && - (t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit || + (t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState==ReadingTaskState.HaveSigned || t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Oncology || t.ReadingCategory == ReadingCategory.Judge) - ); + ) + ; break; case ReadingCategory.Global: @@ -1327,41 +1328,16 @@ namespace IRaCIS.Core.Application.Service.Allocation foreach (var influenceTask in influenceTaskList) { - if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) - { - influenceTask.TaskState = TaskState.HaveReturned; - } - else - { - influenceTask.TaskState = TaskState.Adbandon; - } - //影响其他的任务 如果是访视类型 需要重新生成 - if (influenceTask.ReadingCategory == ReadingCategory.Visit) - { - - await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand() + + if (influenceTask.ReadingTaskState == ReadingTaskState.HaveSigned) { - TrialId = trialId, - - ReadingCategory = GenerateTaskCategory.ReReading, - - ReReadingTask = origenalTask, - - //同步才可以 - Action = (newTask) => - { - //申请表 设置新任务Id - visitTaskReReadingAppply.NewReReadingTaskId = newTask.Id; - - //生成的任务分配给原始医生 - newTask.DoctorUserId = origenalTask.DoctorUserId; - newTask.TaskAllocationState = TaskAllocationState.Allocated; - newTask.AllocateTime = DateTime.Now; - - } - }); - } + influenceTask.TaskState = TaskState.HaveReturned; + } + else + { + influenceTask.TaskState = TaskState.Adbandon; + } } #endregion @@ -1764,7 +1740,7 @@ namespace IRaCIS.Core.Application.Service.Allocation /// /// [HttpGet("{taskId:guid}/{isReReading:bool}")] - public async Task> GetReReadingOrBackInfluenceTaskList(Guid taskId, bool isReReading, Guid? applyId) + public async Task> GetReReadingOrBackInfluenceTaskList(Guid taskId, bool isReReading, Guid? applyId) { var filterObj = (await _visitTaskRepository.FirstOrDefaultNoTrackingAsync(t => t.Id == taskId)).IfNullThrowException(); var trialId = filterObj.TrialId; @@ -1795,15 +1771,16 @@ namespace IRaCIS.Core.Application.Service.Allocation switch (filterObj.ReadingCategory) { case ReadingCategory.Visit: - //影响当前医生 以及当前医生之后的 1、访视任务 已经读完的,(未读完的或者未读的 不处理) + //影响当前医生 以及当前医生之后的 1、访视任务 已经读完的 //2、后续任务如果是全局、肿瘤学阅片任务,状态为阅片完成标记为重阅重置;若在阅片中,则标记为失效;若为待阅片,则标记为失效; //3、当前任务、后续访视任务或者全局任务触发了裁判任务,若裁判任务状态为阅片完成,则标记为重阅重置;若在阅片中或待阅片,则标记为失效 filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum && t.DoctorUserId == filterObj.DoctorUserId && - (t.ReadingTaskState == ReadingTaskState.HaveSigned && t.ReadingCategory == ReadingCategory.Visit || + (t.ReadingCategory == ReadingCategory.Visit &&t.ReadingTaskState==ReadingTaskState.HaveSigned|| t.ReadingCategory == ReadingCategory.Global || t.ReadingCategory == ReadingCategory.Oncology || t.ReadingCategory == ReadingCategory.Judge) - ); + ) + ; break; case ReadingCategory.Global: @@ -1943,7 +1920,7 @@ namespace IRaCIS.Core.Application.Service.Allocation } - var list = await _visitTaskRepository.Where(filterExpression).OrderBy(t => t.VisitTaskNum).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + var list = await _visitTaskRepository.Where(filterExpression).OrderBy(t => t.VisitTaskNum).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); return list; diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index fff0d3e63..3a6621281 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -217,7 +217,11 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)); - + CreateMap() + //.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.DoctorUser)) + .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) + .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)); + } }