修改获取医生标准接口
parent
268d965cb5
commit
5b38464286
|
@ -54,12 +54,6 @@
|
||||||
<param name="trialId"></param>
|
<param name="trialId"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.TaskAllocationRuleService.GetSubjectApplyDoctorTaskStatList(IRaCIS.Core.Application.ViewModel.ApplySubjectCommand)">
|
|
||||||
<summary>
|
|
||||||
获取访视任务 应用Subject后 医生比率情况
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Core.Application.Service.TaskAllocationRuleService.GetDoctorUserSelectList(System.Guid,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll})">
|
<member name="M:IRaCIS.Core.Application.Service.TaskAllocationRuleService.GetDoctorUserSelectList(System.Guid,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Enroll})">
|
||||||
<summary>
|
<summary>
|
||||||
获取项目下 医生账户信息下拉
|
获取项目下 医生账户信息下拉
|
||||||
|
@ -68,6 +62,12 @@
|
||||||
<param name="_enrollRepository"></param>
|
<param name="_enrollRepository"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.TaskAllocationRuleService.GetSubjectApplyDoctorTaskStatList(IRaCIS.Core.Application.ViewModel.ApplySubjectCommand)">
|
||||||
|
<summary>
|
||||||
|
获取访视任务 应用Subject后 医生比率情况
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.TaskConsistentRuleService">
|
<member name="T:IRaCIS.Core.Application.Service.TaskConsistentRuleService">
|
||||||
<summary>
|
<summary>
|
||||||
一致性分析配置表
|
一致性分析配置表
|
||||||
|
|
|
@ -101,20 +101,20 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public UserSimpleInfo DoctorUser { get; set; }
|
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 =>
|
// TrialReadingCriterionList.Select(t =>
|
||||||
new CriterionReadingCategory() {
|
// new CriterionReadingCategory() {
|
||||||
EnrollId = EnrollId,
|
// EnrollId = EnrollId,
|
||||||
TrialReadingCriterionId = t.TrialReadingCriterionId,
|
// TrialReadingCriterionId = t.TrialReadingCriterionId,
|
||||||
ReadingCategorys = CriterionReadingCategoryList.Where(c => c.TrialReadingCriterionId == t.TrialReadingCriterionId).Select(t => t.ReadingCategory).OrderBy(c => c).ToList()
|
// ReadingCategorys = CriterionReadingCategoryList.Where(c => c.TrialReadingCriterionId == t.TrialReadingCriterionId).Select(t => t.ReadingCategory).OrderBy(c => c).ToList()
|
||||||
}).ToList();
|
// }).ToList();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -132,6 +132,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public Guid TrialId { get; set; }
|
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>
|
/// <summary>
|
||||||
|
@ -183,11 +155,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
var query = from allocationRule in _taskAllocationRuleRepository.Where(t => t.TrialId == selectQuery.TrialId && t.IsEnable)
|
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.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
|
join user in _userRepository.AsQueryable() on allocationRule.DoctorUserId equals user.Id
|
||||||
select new TrialDoctorUserSelectView()
|
select new TrialDoctorUserSelectView()
|
||||||
{
|
{
|
||||||
TrialId = allocationRule.TrialId,
|
TrialId = allocationRule.TrialId,
|
||||||
//ReadingType = allocationRule.Trial.ReadingType,
|
|
||||||
DoctorUserId = user.Id,
|
DoctorUserId = user.Id,
|
||||||
FullName = user.FullName,
|
FullName = user.FullName,
|
||||||
UserCode = user.UserCode,
|
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>
|
/// <returns></returns>
|
||||||
public async Task<(List<AssignDoctorStatView>,object)> GetDoctorSubjectStat(Guid trialId, Guid trialReadingCriterionId )
|
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();
|
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>()
|
CreateMap<TaskAllocationRule, TaskAllocationRuleDTO>()
|
||||||
.ForMember(o => o.DoctorUser, t => t.MapFrom(u => u.Enroll.DoctorUser))
|
.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.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.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.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>()
|
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()));
|
.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>()
|
CreateMap<Subject, SubjectAssignStat>()
|
||||||
|
|
||||||
.ForMember(o => o.SubjectId, t => t.MapFrom(u => u.Id))
|
.ForMember(o => o.SubjectId, t => t.MapFrom(u => u.Id))
|
||||||
|
|
|
@ -164,6 +164,7 @@ namespace IRaCIS.Application.Services
|
||||||
var stakeholderIds = new List<Guid>();
|
var stakeholderIds = new List<Guid>();
|
||||||
|
|
||||||
var subjectVisit =await _subjectVisitRepository.FirstOrDefaultAsync(x => x.Id == readModule.SubjectVisitId);
|
var subjectVisit =await _subjectVisitRepository.FirstOrDefaultAsync(x => x.Id == readModule.SubjectVisitId);
|
||||||
|
|
||||||
switch (readModule.Status)
|
switch (readModule.Status)
|
||||||
{
|
{
|
||||||
case ReadingStatusEnum.ImageNotSubmit:
|
case ReadingStatusEnum.ImageNotSubmit:
|
||||||
|
@ -211,10 +212,10 @@ namespace IRaCIS.Application.Services
|
||||||
public async Task<List<GetSubjectReadVisitsOutDto>> GetSubjectReadVisitList(GetSubjectReadVisitsInDto inDto)
|
public async Task<List<GetSubjectReadVisitsOutDto>> GetSubjectReadVisitList(GetSubjectReadVisitsInDto inDto)
|
||||||
{
|
{
|
||||||
//增加标准
|
//增加标准
|
||||||
var maxReadVisit = await _readModuleRepository.Where(x => x.SubjectId == inDto.SubjectId&&x.ReadingSetType==inDto.ReadingSetType && x.TrialReadingCriterionId==inDto.TrialReadingCriterionId).OrderByDescending(x=>x.VisitNum).FirstOrDefaultAsync();
|
var maxReadVisit = await _readModuleRepository.Where(x => x.SubjectId == inDto.SubjectId && x.ReadingSetType==inDto.ReadingSetType && x.TrialReadingCriterionId==inDto.TrialReadingCriterionId).OrderByDescending(x=>x.VisitNum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
var maxReadVisitNum= maxReadVisit==null?-1:maxReadVisit.VisitNum;
|
var maxReadVisitNum= maxReadVisit==null?-1:maxReadVisit.VisitNum;
|
||||||
var visitQuery = _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && x.LatestScanDate != null&&!x.IsLostVisit);
|
var visitQuery = _subjectVisitRepository.Where(x => x.SubjectId == inDto.SubjectId && x.LatestScanDate != null && !x.IsLostVisit);
|
||||||
var finalVisitNum = await visitQuery.Where(x => x.IsFinalVisit).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
var finalVisitNum = await visitQuery.Where(x => x.IsFinalVisit).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
//增加标准
|
//增加标准
|
||||||
|
|
Loading…
Reference in New Issue