随机阅片-NextTask-5
parent
180b02b28c
commit
77d198cb09
|
@ -13379,7 +13379,7 @@
|
|||
生成的阅片模块(在大列表上展示的) 阅片期
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadModuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataTrialSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModuleView},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingClinicalData},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingPeriodSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadModuleService.#ctor(IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.SubjectVisit},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Subject},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.UserRole},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.Trial},IRaCIS.Core.Application.Service.IVisitTaskHelpeService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.VisitTask},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ClinicalDataTrialSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModuleView},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingQuestionCriterionTrial},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.DicomInstance},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.NoneDicomStudyFile},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingClinicalData},IRaCIS.Core.Application.Contracts.IReadingImageTaskService,IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadingPeriodSet},IRaCIS.Core.Infra.EFCore.IRepository{IRaCIS.Core.Domain.Models.ReadModule},AutoMapper.IMapper,IRaCIS.Core.Domain.Share.IUserInfo,Microsoft.Extensions.Localization.IStringLocalizer)">
|
||||
<summary>
|
||||
生成的阅片模块(在大列表上展示的) 阅片期
|
||||
</summary>
|
||||
|
|
|
@ -3122,22 +3122,26 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
Random random = new Random();
|
||||
var skipcount = 0;
|
||||
|
||||
var maxReadingTime = query.MaxOrDefault(x => x.FirstReadingTime);
|
||||
if (maxReadingTime != null)
|
||||
{
|
||||
query = query.Where(x => x.FirstReadingTime == maxReadingTime);
|
||||
skipcount = 0;
|
||||
}
|
||||
|
||||
|
||||
var minRandomOrder = query.Where(t => t.RandomOrder != null).Select(t => t.RandomOrder).MinOrDefault();
|
||||
|
||||
//阅片中的可能没序号,以阅片中优先先给IR
|
||||
if (minRandomOrder != null && maxReadingTime == null)
|
||||
//以随机序号优先,阅片中优先先给IR
|
||||
if (minRandomOrder != null)
|
||||
{
|
||||
query = query.Where(x => x.RandomOrder == minRandomOrder);
|
||||
skipcount = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
//没有随机序号的,那么就按照阅片中最新的时间给
|
||||
var maxReadingTime = query.MaxOrDefault(x => x.FirstReadingTime);
|
||||
if (maxReadingTime != null)
|
||||
{
|
||||
query = query.Where(x => x.FirstReadingTime == maxReadingTime);
|
||||
skipcount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
var count = await query.CountAsync();
|
||||
|
|
Loading…
Reference in New Issue