Uat_Study
parent
0fd2ecd995
commit
0c0c6b8297
|
@ -94,7 +94,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public class DoctorGroupConsistentSubjectView: ConsistentCommonView
|
public class DoctorGroupConsistentSubjectView: ConsistentCommonView
|
||||||
{
|
{
|
||||||
|
|
||||||
public List<VisitTaskGroupSimpleDTO> TaskList => VisitTaskList.GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).SelectMany(g => g.ToList()).OrderBy(t=>t.VisitTaskNum).ToList();
|
public List<VisitTaskGroupSimpleDTO> SubjectTaskVisitList => VisitTaskList.GroupBy(t => new { t.SubjectId, t.VisitTaskNum }).Where(g => g.Count() == 2).Select(g => g.First()).OrderBy(t=>t.VisitTaskNum).ToList();
|
||||||
|
|
||||||
public List<VisitTaskGroupSimpleDTO> VisitTaskList { get; set; } = new List<VisitTaskGroupSimpleDTO>();
|
public List<VisitTaskGroupSimpleDTO> VisitTaskList { get; set; } = new List<VisitTaskGroupSimpleDTO>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -243,7 +243,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
SubjectId = c.SubjectId,
|
SubjectId = c.SubjectId,
|
||||||
VisitTaskNum = c.VisitTaskNum,
|
VisitTaskNum = c.VisitTaskNum,
|
||||||
TrialId = c.TrialId,
|
TrialId = c.TrialId,
|
||||||
DoctorUserId = c.DoctorUserId
|
DoctorUserId = c.DoctorUserId,
|
||||||
|
|
||||||
|
SourceSubjectVisitId = c.SourceSubjectVisitId,
|
||||||
|
SouceReadModuleId = c.SouceReadModuleId,
|
||||||
|
|
||||||
}).ToList()
|
}).ToList()
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -328,7 +332,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
|
|
||||||
//每个医生 都生成处理的任务
|
//每个医生 都生成处理的任务
|
||||||
foreach (var task in subject.TaskList.Take(filterObj.PlanVisitCount))
|
foreach (var task in subject.SubjectTaskVisitList.Take(filterObj.PlanVisitCount))
|
||||||
{
|
{
|
||||||
|
|
||||||
subjectAddTaskList.Add(new VisitTaskGroupSimpleDTO()
|
subjectAddTaskList.Add(new VisitTaskGroupSimpleDTO()
|
||||||
|
@ -351,7 +355,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (filterObj.IsGenerateGlobalTask)
|
if (filterObj.IsGenerateGlobalTask)
|
||||||
{
|
{
|
||||||
var globalTask = (subject.TaskList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
var globalTask = (subject.SubjectTaskVisitList.Take(filterObj.PlanVisitCount).Last()).Clone();
|
||||||
globalTask.TaskName = (int)globalTask.VisitTaskNum + "Global";
|
globalTask.TaskName = (int)globalTask.VisitTaskNum + "Global";
|
||||||
globalTask.TaskBlindName = (int)globalTask.VisitTaskNum + "Global";
|
globalTask.TaskBlindName = (int)globalTask.VisitTaskNum + "Global";
|
||||||
globalTask.ReadingCategory = ReadingCategory.Global;
|
globalTask.ReadingCategory = ReadingCategory.Global;
|
||||||
|
@ -417,10 +421,13 @@ namespace IRaCIS.Core.Application.Service
|
||||||
//这里的过滤条件 不能用 where(comonTaskFilter) 会报错,奇怪的问题 只能重新写一遍
|
//这里的过滤条件 不能用 where(comonTaskFilter) 会报错,奇怪的问题 只能重新写一遍
|
||||||
visitTaskFilter = visitTaskFilter.And(c => c.Subject.SubjectVisitTaskList.Any(t => t.VisitTaskNum == c.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global] && t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
visitTaskFilter = visitTaskFilter.And(c => c.Subject.SubjectVisitTaskList.Any(t => t.VisitTaskNum == c.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global] && t.ReadingCategory == ReadingCategory.Global && t.IsAnalysisCreate == false && t.TaskState == TaskState.Effect && t.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||||
t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject)));
|
t.SignTime!.Value.AddDays(filterObj.IntervalWeeks * 7) < DateTime.Now && (t.ReReadingApplyState == ReReadingApplyState.Default || t.ReReadingApplyState == ReReadingApplyState.Reject)));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var subjectQuery = _subjectRepository.Where(t => t.TrialId == trialId && t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).Count() >= filterObj.PlanVisitCount);
|
var subjectQuery = _subjectRepository.Where(t => t.TrialId == trialId && t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).Count() >= filterObj.PlanVisitCount)
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
var query = subjectQuery.Select(t => new DoctorSelfConsistentSubjectView()
|
var query = subjectQuery.Select(t => new DoctorSelfConsistentSubjectView()
|
||||||
|
|
Loading…
Reference in New Issue