From 509d6ce6cb7d660a9ba4c95b617f35aa02d09310 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Tue, 28 Jun 2022 14:18:06 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8E=86=E5=8F=B2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../IRaCIS.Core.Application.xml | 7 ++
.../Allocation/DTO/VisitTaskViewModel.cs | 25 ++++++
.../Service/Allocation/VisitTaskService.cs | 78 +++++++++++++++----
IRaCIS.Core.Domain/Allocation/VisitTask.cs | 3 +
4 files changed, 97 insertions(+), 16 deletions(-)
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 6f454c02d..fd4050c87 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -91,6 +91,13 @@
+
+
+ 一致性分析列表 (一致性分析 最后勾选 产生的任务)
+
+
+
+
获取重阅影像阅片列表
diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
index c8b7f3b74..b346f0b39 100644
--- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs
@@ -204,6 +204,31 @@ namespace IRaCIS.Core.Application.ViewModel
public Guid? RootReReadingTaskId { get; set; }
}
+
+ public class SelfConsistentQuery
+ {
+ public Guid TrialId { get; set; }
+
+ public Guid? SiteId { get; set; }
+
+ public Guid? SubjectId { get; set; }
+
+
+ public int? SubjectCount { get; set; }
+ }
+
+
+ public class SelfConsistentView
+ {
+ public Guid TrialId { get; set; }
+ public Guid SiteId { get; set; }
+
+ public Guid SubjectId { get; set; }
+ public String TrialSiteCode { get; set; } = String.Empty;
+ public string SubjectCode { get; set; } = String.Empty;
+ }
+
+
public class IRUnReadSubjectQuery : PageInput
{
public Guid TrialId { get; set; }
diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
index 252d98e23..d133ec576 100644
--- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
+++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs
@@ -195,6 +195,46 @@ namespace IRaCIS.Core.Application.Service
return (pageList, trialTaskConfig);
}
+
+ ///
+ /// 一致性分析列表 (一致性分析 最后勾选 产生的任务)
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> GetAnalysisTaskList(VisitTaskQuery queryVisitTask)
+ {
+ var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId)
+ .Where(t => t.IsAnalysisCreate)
+
+ .WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId)
+ .WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId)
+ .WhereIf(queryVisitTask.IsUrgent != null, t => t.IsUrgent == queryVisitTask.IsUrgent)
+ .WhereIf(queryVisitTask.DoctorUserId != null, t => t.DoctorUserId == queryVisitTask.DoctorUserId)
+ .WhereIf(queryVisitTask.ReadingCategory != null, t => t.ReadingCategory == queryVisitTask.ReadingCategory)
+ .WhereIf(queryVisitTask.ReadingTaskState != null, t => t.ReadingTaskState == queryVisitTask.ReadingTaskState)
+ .WhereIf(queryVisitTask.TaskAllocationState != null, t => t.TaskAllocationState == queryVisitTask.TaskAllocationState)
+ .WhereIf(!string.IsNullOrEmpty(queryVisitTask.TaskName), t => t.TaskName.Contains(queryVisitTask.TaskName) || t.TaskBlindName.Contains(queryVisitTask.TaskName))
+ .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.Subject.Code.Contains(queryVisitTask.SubjectCode))
+ .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.AllocateTime > queryVisitTask.BeginAllocateDate)
+ .WhereIf(queryVisitTask.EndAllocateDate != null, t => t.AllocateTime < queryVisitTask.EndAllocateDate.Value.AddDays(1))
+ .ProjectTo(_mapper.ConfigurationProvider);
+
+ var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId) };
+
+ var pageList = await visitTaskQueryable.ToPagedListAsync(queryVisitTask.PageIndex, queryVisitTask.PageSize, queryVisitTask.SortField, queryVisitTask.Asc, string.IsNullOrWhiteSpace(queryVisitTask.SortField), defalutSortArray);
+
+ return (pageList);
+ }
+
+
+ //public async Task> GetSelfConsistentList(SelfConsistentQuery inQuery)
+ //{
+
+ //}
+
+
+
///
/// 获取重阅影像阅片列表
///
@@ -352,7 +392,7 @@ namespace IRaCIS.Core.Application.Service
{
var visitTaskQueryable = _visitTaskReReadingRepository
- .Where(t => t.NewReReadingTask.DoctorUserId == _userInfo.Id)
+ .Where(t => t.OriginalReReadingTask.DoctorUserId == _userInfo.Id)
.Where(t => t.NewReReadingTask.TrialId == queryVisitTask.TrialId)
.WhereIf(queryVisitTask.RootReReadingTaskId != null, t => t.RootReReadingTaskId == queryVisitTask.RootReReadingTaskId || t.OriginalReReadingTaskId == queryVisitTask.RootReReadingTaskId)
.WhereIf(queryVisitTask.SiteId != null, t => t.NewReReadingTask.Subject.SiteId == queryVisitTask.SiteId)
@@ -970,27 +1010,29 @@ namespace IRaCIS.Core.Application.Service
RequestReReadingRejectReason = agreeReReadingCommand.RequestReReadingRejectReason
});
- if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer)
+ if(agreeReReadingCommand.RequestReReadingResultEnum == RequestReReadingResult.Agree)
{
- await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == item.NewReReadingTaskId, u => new VisitTask()
+ if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer)
{
- TaskState = TaskState.Effect
- });
- }
- //立即分配
- else if(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
- {
- await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == item.NewReReadingTaskId, u => new VisitTask()
+ await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == item.NewReReadingTaskId, u => new VisitTask()
+ {
+ TaskState = TaskState.Effect
+ });
+ }
+ //立即分配
+ else if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager)
{
- TaskState = TaskState.Effect,
+ await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == item.NewReReadingTaskId, u => new VisitTask()
+ {
+ TaskState = TaskState.Effect,
- DoctorUserId=_userInfo.Id,
+ DoctorUserId = _userInfo.Id,
- AllocateTime= DateTime.Now,
- });
+ AllocateTime = DateTime.Now,
+ });
+ }
}
-
-
+
}
@@ -1001,5 +1043,9 @@ namespace IRaCIS.Core.Application.Service
return ResponseOutput.Ok();
}
+
+
+
+
}
}
diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
index 08375953c..689ef8e85 100644
--- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs
+++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs
@@ -176,6 +176,9 @@ namespace IRaCIS.Core.Domain.Models
public bool IsReReadingCreate { get; set; }
+ //是否是一致性分析产生
+ public bool IsAnalysisCreate { get; set; }
+
///
/// 裁判结果的任务ID