x
This commit is contained in:
@@ -191,31 +191,6 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
|
||||
#region 重阅/退回的时候,需要将之前取消分配的访视类型的 任务重新分配
|
||||
|
||||
var arm1DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
||||
var arm2DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null
|
||||
&& t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm1, u => new VisitTask()
|
||||
{
|
||||
TaskAllocationState=TaskAllocationState.Allocated,
|
||||
DoctorUserId= arm1DoctorUserId,
|
||||
AllocateTime=DateTime.Now,
|
||||
});
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm2, u => new VisitTask()
|
||||
{
|
||||
TaskAllocationState = TaskAllocationState.Allocated,
|
||||
DoctorUserId = arm2DoctorUserId,
|
||||
AllocateTime = DateTime.Now,
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
// 当前任务没有分配医生,初次分配
|
||||
@@ -227,10 +202,37 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
if (assignConfigList.Count>0)
|
||||
{
|
||||
#region 重阅/退回的时候,需要将之前取消分配的访视类型的 任务重新分配
|
||||
|
||||
var arm1DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm1).DoctorUserId;
|
||||
var arm2DoctorUserId = assignConfigList.FirstOrDefault(t => t.ArmEnum == Arm.DoubleReadingArm2).DoctorUserId;
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null
|
||||
&& t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm1, u => new VisitTask()
|
||||
{
|
||||
TaskAllocationState = TaskAllocationState.Allocated,
|
||||
DoctorUserId = arm1DoctorUserId,
|
||||
AllocateTime = DateTime.Now,
|
||||
});
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TaskState == TaskState.Effect && t.DoctorUserId == null && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.ArmEnum == Arm.DoubleReadingArm2, u => new VisitTask()
|
||||
{
|
||||
TaskAllocationState = TaskAllocationState.Allocated,
|
||||
DoctorUserId = arm2DoctorUserId,
|
||||
AllocateTime = DateTime.Now,
|
||||
});
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
else if (trialConfig.ReadingType == ReadingMethod.Single)
|
||||
{
|
||||
@@ -357,9 +359,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
|
||||
IsAnalysisCreate = reReadingVisitTask.IsAnalysisCreate,
|
||||
IsSelfAnalysis =reReadingVisitTask.IsSelfAnalysis,
|
||||
BlindSubjectCode=reReadingVisitTask.BlindSubjectCode,
|
||||
BlindTrialSiteCode=reReadingVisitTask.BlindTrialSiteCode
|
||||
IsSelfAnalysis = reReadingVisitTask.IsSelfAnalysis,
|
||||
BlindSubjectCode = reReadingVisitTask.BlindSubjectCode,
|
||||
BlindTrialSiteCode = reReadingVisitTask.BlindTrialSiteCode
|
||||
|
||||
// TaskAllocationState = reReadingVisitTask.TaskAllocationState,
|
||||
// AllocateTime = DateTime.Now,
|
||||
|
||||
Reference in New Issue
Block a user