优化代码
parent
988bf0e92c
commit
7e18b1287e
|
@ -957,12 +957,21 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
var readingTool = criterionConfig.ReadingTool;
|
||||
var isReadingTaskViewInOrder = criterionConfig.IsReadingTaskViewInOrder;
|
||||
|
||||
#region 按照Subject 维度
|
||||
|
||||
var result = new PageOutput<IRUnReadSubjectView>()
|
||||
{
|
||||
PageSize = inQuery.PageSize,
|
||||
PageIndex = inQuery.PageIndex,
|
||||
TotalCount = 0,
|
||||
CurrentPageData = null,
|
||||
};
|
||||
|
||||
IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto();
|
||||
|
||||
//subject 级别 有序 无序查询
|
||||
if (isReadingTaskViewInOrder == ReadingOrder.InOrder || isReadingTaskViewInOrder == ReadingOrder.SubjectRandom)
|
||||
{
|
||||
|
||||
|
||||
var result = await GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
||||
result = await GetSubjectReadingIQueryable(new GetReadingIQueryableInDto()
|
||||
{
|
||||
TrialId = trialId,
|
||||
TrialReadingCriterionId = trialReadingCriterionId,
|
||||
|
@ -974,26 +983,15 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
SortField = inQuery.SortField,
|
||||
});
|
||||
|
||||
return ResponseOutput.Ok(result, new
|
||||
{
|
||||
RandomReadInfo = new IRUnReadOutDto(),
|
||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
||||
ReadingTool = readingTool,
|
||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
||||
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
||||
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
||||
DigitPlaces = criterionConfig.DigitPlaces,
|
||||
CriterionType = criterionConfig.CriterionType,
|
||||
});
|
||||
}
|
||||
|
||||
//随机阅片
|
||||
else
|
||||
{
|
||||
var taskQuery = _visitTaskRepository.Where(x => x.TrialId == inQuery.TrialId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect && x.TrialReadingCriterionId == trialReadingCriterionId)
|
||||
// .Where(x=>x.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == x.SouceReadModuleId || c.ReadingId == x.SourceSubjectVisitId)))
|
||||
.Where(x => !x.Subject.IsDeleted).Where(x => (x.IsNeedClinicalDataSign && x.IsClinicalDataSign) || !x.IsNeedClinicalDataSign);
|
||||
|
||||
IRUnReadOutDto iRUnReadOut = new IRUnReadOutDto()
|
||||
iRUnReadOut = new IRUnReadOutDto()
|
||||
{
|
||||
FinishJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
||||
FinishTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).CountAsync(),
|
||||
|
@ -1001,32 +999,19 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
UnReadJudgeTaskCount = await taskQuery.Where(x => x.ReadingCategory == ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
||||
UnReadTaskCount = await taskQuery.Where(x => x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState != ReadingTaskState.HaveSigned).CountAsync(),
|
||||
};
|
||||
|
||||
var result = new PageOutput<IRUnReadSubjectView>()
|
||||
{
|
||||
PageSize = inQuery.PageSize,
|
||||
PageIndex = inQuery.PageIndex,
|
||||
TotalCount = 0,
|
||||
CurrentPageData = null,
|
||||
};
|
||||
|
||||
return ResponseOutput.Ok(result, new
|
||||
{
|
||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
||||
RandomReadInfo = iRUnReadOut,
|
||||
ReadingTool = readingTool,
|
||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
||||
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
||||
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
||||
DigitPlaces = criterionConfig.DigitPlaces,
|
||||
CriterionType = criterionConfig.CriterionType,
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
return ResponseOutput.Ok(result, new
|
||||
{
|
||||
IsReadingTaskViewInOrder = isReadingTaskViewInOrder,
|
||||
RandomReadInfo = iRUnReadOut,
|
||||
ReadingTool = readingTool,
|
||||
IseCRFShowInDicomReading = criterionConfig.IseCRFShowInDicomReading,
|
||||
IsReadingShowSubjectInfo = criterionConfig.IsReadingShowSubjectInfo,
|
||||
IsReadingShowPreviousResults = criterionConfig.IsReadingShowPreviousResults,
|
||||
DigitPlaces = criterionConfig.DigitPlaces,
|
||||
CriterionType = criterionConfig.CriterionType,
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue