修改获取医生标准接口
This commit is contained in:
@@ -101,20 +101,20 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public UserSimpleInfo DoctorUser { get; set; }
|
||||
|
||||
//public List<ReadingCategory> ReadingCategoryList { get; set; }
|
||||
public List<ReadingCategory> ReadingCategoryList { get; set; }
|
||||
|
||||
public List<TrialReadingCriterionDto> TrialReadingCriterionList { get; set; }
|
||||
//public List<TrialReadingCriterionDto> TrialReadingCriterionList { get; set; }
|
||||
|
||||
public List<TrialCriterionReadingCategory> CriterionReadingCategoryList { get; set; }
|
||||
//public List<TrialCriterionReadingCategory> CriterionReadingCategoryList { get; set; }
|
||||
|
||||
public List<CriterionReadingCategory> CriterionCategoryList =>
|
||||
//public List<CriterionReadingCategory> CriterionCategoryList =>
|
||||
|
||||
TrialReadingCriterionList.Select(t =>
|
||||
new CriterionReadingCategory() {
|
||||
EnrollId = EnrollId,
|
||||
TrialReadingCriterionId = t.TrialReadingCriterionId,
|
||||
ReadingCategorys = CriterionReadingCategoryList.Where(c => c.TrialReadingCriterionId == t.TrialReadingCriterionId).Select(t => t.ReadingCategory).OrderBy(c => c).ToList()
|
||||
}).ToList();
|
||||
// TrialReadingCriterionList.Select(t =>
|
||||
// new CriterionReadingCategory() {
|
||||
// EnrollId = EnrollId,
|
||||
// TrialReadingCriterionId = t.TrialReadingCriterionId,
|
||||
// ReadingCategorys = CriterionReadingCategoryList.Where(c => c.TrialReadingCriterionId == t.TrialReadingCriterionId).Select(t => t.ReadingCategory).OrderBy(c => c).ToList()
|
||||
// }).ToList();
|
||||
|
||||
|
||||
|
||||
@@ -131,7 +131,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
public ReadingCategory? ReadingCategory { get; set; }
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -120,34 +120,6 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取访视任务 应用Subject后 医生比率情况
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Obsolete]
|
||||
public async Task<List<DoctorVisitTaskStatView>> GetSubjectApplyDoctorTaskStatList(ApplySubjectCommand assignConfirmCommand)
|
||||
{
|
||||
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == assignConfirmCommand.TrialId && t.IsJudgeDoctor == assignConfirmCommand.IsJudgeDoctor)
|
||||
.ProjectTo<DoctorVisitTaskStatView>(_mapper.ConfigurationProvider, new { subjectIdList = assignConfirmCommand.SubjectIdList, isJudgeDoctor = assignConfirmCommand.IsJudgeDoctor });
|
||||
|
||||
return await taskAllocationRuleQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Obsolete]
|
||||
public async Task<List<DoctorVisitTaskStatView>> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule)
|
||||
{
|
||||
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == queryTaskAllocationRule.TrialId /*&& t.IsJudgeDoctor == queryTaskAllocationRule.IsJudgeDoctor*/)
|
||||
.ProjectTo<DoctorVisitTaskStatView>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
//var trialTaskConfig = _trialRepository.Where(t => t.Id == queryTaskAllocationRule.TrialId).ProjectTo<TrialProcessConfigDTO>(_mapper.ConfigurationProvider, new { isJudgeDoctor = queryTaskAllocationRule.IsJudgeDoctor }).FirstOrDefault();
|
||||
|
||||
return await taskAllocationRuleQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -183,11 +155,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var query = from allocationRule in _taskAllocationRuleRepository.Where(t => t.TrialId == selectQuery.TrialId && t.IsEnable)
|
||||
.WhereIf(selectQuery.ReadingCategory != null, t => t.Enroll.EnrollReadingCategoryList.Any(t => t.ReadingCategory == selectQuery.ReadingCategory))
|
||||
.WhereIf(selectQuery.TrialReadingCriterionId != null, t => t.Enroll.EnrollReadingCategoryList.Any(t => t.TrialReadingCriterionId == selectQuery.TrialReadingCriterionId))
|
||||
join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
|
||||
select new TrialDoctorUserSelectView()
|
||||
{
|
||||
TrialId = allocationRule.TrialId,
|
||||
//ReadingType = allocationRule.Trial.ReadingType,
|
||||
DoctorUserId = user.Id,
|
||||
FullName = user.FullName,
|
||||
UserCode = user.UserCode,
|
||||
@@ -200,5 +172,36 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取访视任务 应用Subject后 医生比率情况
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[Obsolete]
|
||||
public async Task<List<DoctorVisitTaskStatView>> GetSubjectApplyDoctorTaskStatList(ApplySubjectCommand assignConfirmCommand)
|
||||
{
|
||||
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == assignConfirmCommand.TrialId && t.IsJudgeDoctor == assignConfirmCommand.IsJudgeDoctor)
|
||||
.ProjectTo<DoctorVisitTaskStatView>(_mapper.ConfigurationProvider, new { subjectIdList = assignConfirmCommand.SubjectIdList, isJudgeDoctor = assignConfirmCommand.IsJudgeDoctor });
|
||||
|
||||
return await taskAllocationRuleQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
[HttpPost]
|
||||
[Obsolete]
|
||||
public async Task<List<DoctorVisitTaskStatView>> GetTaskAllocationRuleList(TaskAllocationRuleQuery queryTaskAllocationRule)
|
||||
{
|
||||
var taskAllocationRuleQueryable = _taskAllocationRuleRepository.Where(t => t.TrialId == queryTaskAllocationRule.TrialId /*&& t.IsJudgeDoctor == queryTaskAllocationRule.IsJudgeDoctor*/)
|
||||
.ProjectTo<DoctorVisitTaskStatView>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
//var trialTaskConfig = _trialRepository.Where(t => t.Id == queryTaskAllocationRule.TrialId).ProjectTo<TrialProcessConfigDTO>(_mapper.ConfigurationProvider, new { isJudgeDoctor = queryTaskAllocationRule.IsJudgeDoctor }).FirstOrDefault();
|
||||
|
||||
return await taskAllocationRuleQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,7 +176,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||
/// <returns></returns>
|
||||
public async Task<(List<AssignDoctorStatView>,object)> GetDoctorSubjectStat(Guid trialId, Guid trialReadingCriterionId )
|
||||
{
|
||||
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId).ProjectTo<AssignDoctorStatView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var list = await _taskAllocationRuleRepository.Where(t => t.TrialId == trialId)
|
||||
.Where( t => t.Enroll.EnrollReadingCategoryList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId))
|
||||
.ProjectTo<AssignDoctorStatView>(_mapper.ConfigurationProvider,new { trialReadingCriterionId= trialReadingCriterionId }).ToListAsync();
|
||||
|
||||
var criterionConfig = (await _trialReadingCriterionRepository.Where(x => x.Id == trialReadingCriterionId).Select(x => new { x.ReadingTool, x.IsReadingTaskViewInOrder,x.ReadingType }).FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
@@ -65,11 +65,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
;
|
||||
|
||||
var trialReadingCriterionId = Guid.Empty;
|
||||
CreateMap<TaskAllocationRule, TaskAllocationRuleDTO>()
|
||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser))
|
||||
.ForMember(o => o.CriterionReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Select(t => new TrialCriterionReadingCategory() { EnrollId = t.EnrollId, ReadingCategory = t.ReadingCategory, TrialReadingCriterionId = t.TrialReadingCriterionId })))
|
||||
.ForMember(o => o.TrialReadingCriterionList, t => t.MapFrom(u => u.Trial.ReadingQuestionCriterionTrialList.Where(t => t.IsConfirm).Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, TrialReadingCriterionName = t.CriterionName })))
|
||||
//.ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.OrderBy(t => t.ReadingCategory).Select(t => t.ReadingCategory).ToList()))
|
||||
//.ForMember(o => o.CriterionReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Select(t => new TrialCriterionReadingCategory() { EnrollId = t.EnrollId, ReadingCategory = t.ReadingCategory, TrialReadingCriterionId = t.TrialReadingCriterionId })))
|
||||
//.ForMember(o => o.TrialReadingCriterionList, t => t.MapFrom(u => u.Trial.ReadingQuestionCriterionTrialList.Where(t => t.IsConfirm).Select(t => new TrialReadingCriterionDto() { TrialReadingCriterionId = t.Id, TrialReadingCriterionName = t.CriterionName })))
|
||||
.ForMember(o => o.ReadingCategoryList, t => t.MapFrom(u => u.Enroll.EnrollReadingCategoryList.Where(t=>t.TrialReadingCriterionId== trialReadingCriterionId).OrderBy(t => t.ReadingCategory).Select(t => t.ReadingCategory).ToList()))
|
||||
;
|
||||
|
||||
CreateMap<TaskAllocationRule, AssignDoctorStatView>().IncludeBase<TaskAllocationRule, TaskAllocationRuleDTO>()
|
||||
@@ -78,7 +79,6 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(o => o.WaitDealAllTaskCount, t => t.MapFrom(u => u.DoctorUser.VisitTaskList.Where(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect).Count()));
|
||||
|
||||
|
||||
Guid trialReadingCriterionId = Guid.Empty;
|
||||
CreateMap<Subject, SubjectAssignStat>()
|
||||
|
||||
.ForMember(o => o.SubjectId, t => t.MapFrom(u => u.Id))
|
||||
|
||||
Reference in New Issue
Block a user