|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
using IRaCIS.Application.Contracts;
|
|
|
|
|
using IRaCIS.Core.Application.Contracts;
|
|
|
|
|
using IRaCIS.Core.Application.Interfaces;
|
|
|
|
|
using IRaCIS.Core.Application.Service.Reading.Interface;
|
|
|
|
|
using IRaCIS.Core.Application.ViewModel;
|
|
|
|
|
using IRaCIS.Core.Domain.Models;
|
|
|
|
|
using IRaCIS.Core.Domain.Share;
|
|
|
|
@ -22,11 +23,13 @@ namespace IRaCIS.Core.Application
|
|
|
|
|
private readonly IRepository<TrialDocument> _trialDocumentRepository;
|
|
|
|
|
private readonly IRepository<SystemDocument> _systemDocumentRepository;
|
|
|
|
|
private readonly IRepository<ReadModule> _readModuleRepository;
|
|
|
|
|
private readonly IClinicalAnswerService _clinicalAnswerService;
|
|
|
|
|
private readonly IRepository<SystemNotice> _systemNoticeRepository;
|
|
|
|
|
|
|
|
|
|
public PersonalWorkstation(IRepository<Trial> trialRepository, IRepository<TrialUser> trialUserRepository, IRepository<TrialDocument> trialDocumentRepository,
|
|
|
|
|
IRepository<SystemDocument> systemDocumentRepository,
|
|
|
|
|
IRepository<ReadModule> readModuleRepository,
|
|
|
|
|
IClinicalAnswerService clinicalAnswerService,
|
|
|
|
|
IRepository<SystemNotice> systemNoticeRepository)
|
|
|
|
|
{
|
|
|
|
|
_trialRepository = trialRepository;
|
|
|
|
@ -34,6 +37,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
|
_trialDocumentRepository = trialDocumentRepository;
|
|
|
|
|
_systemDocumentRepository = systemDocumentRepository;
|
|
|
|
|
this._readModuleRepository = readModuleRepository;
|
|
|
|
|
this._clinicalAnswerService = clinicalAnswerService;
|
|
|
|
|
_systemNoticeRepository = systemNoticeRepository;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -511,6 +515,20 @@ namespace IRaCIS.Core.Application
|
|
|
|
|
|
|
|
|
|
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc, string.IsNullOrWhiteSpace(inQuery.SortField), defalutSortArray);
|
|
|
|
|
|
|
|
|
|
// ReadModuleCount情况太多了 暂时用之前的方法
|
|
|
|
|
foreach (var item in result.CurrentPageData)
|
|
|
|
|
{
|
|
|
|
|
item.ReadModuleCount = (await _clinicalAnswerService.GetCRCConfirmList(new Service.Reading.Dto.GetCRCConfirmListInDto()
|
|
|
|
|
{
|
|
|
|
|
TrialId = item.TrialId,
|
|
|
|
|
PageIndex = 1,
|
|
|
|
|
PageSize = 9999,
|
|
|
|
|
|
|
|
|
|
})).CurrentPageData.SelectMany(x => x.ClinicalFormList).Count();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var toBeDealedCount = _subjectVisitRepository
|
|
|
|
|
//.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id) && t.Trial.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
|
|
|
|