Uat_Study
parent
a522599eca
commit
30e7addc3b
|
@ -164,20 +164,20 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 组间一致性分析 选择Subejct 列表
|
///// 组间一致性分析 选择Subejct 列表
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <param name="inQuery"></param>
|
///// <param name="inQuery"></param>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
[HttpPost]
|
//[HttpPost]
|
||||||
public async Task<PageOutput<DoctorSelfConsistentSubjectView>> GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery)
|
//public async Task<PageOutput<DoctorSelfConsistentSubjectView>> GetGroupConsistentRuleSubjectList(GroupConsistentQuery inQuery)
|
||||||
{
|
//{
|
||||||
var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis==false);
|
// var filterObj = await _taskConsistentRuleRepository.FirstOrDefaultAsync(t => t.TrialId == inQuery.TrialId && t.IsSelfAnalysis==false);
|
||||||
|
|
||||||
var pagedList = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj).ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc);
|
// var pagedList = await GetIQueryableDoctorSelfConsistentSubjectView(filterObj).ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(DoctorSelfConsistentSubjectView.SubjectCode) : inQuery.SortField, inQuery.Asc);
|
||||||
|
|
||||||
return pagedList;
|
// return pagedList;
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -210,10 +210,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
//最后一个访视添加全局
|
//最后一个访视添加全局
|
||||||
var globalTask = (subject.VisitTaskList[filterObj.PlanVisitCount - 1]).Clone();
|
//var globalTask = (subject.VisitTaskList[filterObj.PlanVisitCount - 1]).Clone();
|
||||||
globalTask.ReadingCategory = ReadingCategory.Global;
|
//globalTask.ReadingCategory = ReadingCategory.Global;
|
||||||
globalTask.VisitTaskNum += ReadingCommon.TaskNumDic[ReadingCategory.Global];
|
//globalTask.VisitTaskNum += ReadingCommon.TaskNumDic[ReadingCategory.Global];
|
||||||
subject.VisitTaskList.Add(globalTask);
|
//subject.VisitTaskList.Add(globalTask);
|
||||||
|
|
||||||
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
await _visitTaskCommonService.AddTaskAsync(new GenerateTaskCommand()
|
||||||
{
|
{
|
||||||
|
@ -235,8 +235,14 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
private IQueryable<DoctorSelfConsistentSubjectView> GetIQueryableDoctorSelfConsistentSubjectView(TaskConsistentRule filterObj, Guid? doctorUserId=null, List<Guid>? subejctIdList = null)
|
/// 仅仅组内一致性时使用(
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="filterObj"></param>
|
||||||
|
/// <param name="doctorUserId"></param>
|
||||||
|
/// <param name="subejctIdList"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
private IQueryable<DoctorSelfConsistentSubjectView> GetIQueryableDoctorSelfConsistentSubjectView(TaskConsistentRule filterObj, Guid doctorUserId, List<Guid>? subejctIdList = null)
|
||||||
{
|
{
|
||||||
var trialId = filterObj.TrialId;
|
var trialId = filterObj.TrialId;
|
||||||
|
|
||||||
|
@ -250,16 +256,16 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
Expression<Func<VisitTask, bool>> subjectIsHaveGeneratedTaskFilter = c => c.IsAnalysisCreate;
|
Expression<Func<VisitTask, bool>> subjectIsHaveGeneratedTaskFilter = c => c.IsAnalysisCreate;
|
||||||
|
|
||||||
//组间一致性
|
////组间一致性
|
||||||
if (doctorUserId == null)
|
//if (doctorUserId == null)
|
||||||
{
|
//{
|
||||||
subjectIsHaveGeneratedTaskFilter = subjectIsHaveGeneratedTaskFilter.And(c => c.IsSelfAnalysis == false);
|
// subjectIsHaveGeneratedTaskFilter = subjectIsHaveGeneratedTaskFilter.And(c => c.IsSelfAnalysis == false);
|
||||||
}
|
//}
|
||||||
//组内
|
////组内
|
||||||
else
|
//else
|
||||||
{
|
//{
|
||||||
subjectIsHaveGeneratedTaskFilter = subjectIsHaveGeneratedTaskFilter.And(c => c.DoctorUserId == doctorUserId && c.IsSelfAnalysis == true);
|
// subjectIsHaveGeneratedTaskFilter = subjectIsHaveGeneratedTaskFilter.And(c => c.DoctorUserId == doctorUserId && c.IsSelfAnalysis == true);
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (subejctIdList != null && subejctIdList?.Count > 0)
|
if (subejctIdList != null && subejctIdList?.Count > 0)
|
||||||
{
|
{
|
||||||
|
@ -288,7 +294,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
BlindSubjectCode=t.SubjectVisitTaskList.Where(t=>t.IsAnalysisCreate).OrderByDescending(t=>t.BlindSubjectCode).Select(t=>t.BlindSubjectCode).FirstOrDefault(),
|
BlindSubjectCode=t.SubjectVisitTaskList.Where(t=>t.IsAnalysisCreate).OrderByDescending(t=>t.BlindSubjectCode).Select(t=>t.BlindSubjectCode).FirstOrDefault(),
|
||||||
|
|
||||||
IsHaveGeneratedTask = t.SubjectVisitTaskList.AsQueryable().Any(subjectIsHaveGeneratedTaskFilter),
|
IsHaveGeneratedTask = t.SubjectVisitTaskList.Any(c => c.DoctorUserId == doctorUserId && c.IsSelfAnalysis == true),
|
||||||
|
|
||||||
|
|
||||||
ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).Count(),
|
ValidVisitCount = t.SubjectVisitTaskList.AsQueryable().Where(visitTaskFilter).Count(),
|
||||||
|
|
Loading…
Reference in New Issue