|
|
|
@ -44,7 +44,6 @@ namespace IRaCIS.Core.Application
|
|
|
|
_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM)
|
|
|
|
_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return await _trialRepository
|
|
|
|
return await _trialRepository
|
|
|
|
.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0)
|
|
|
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.APM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.SPMApproved).Count() > 0)
|
|
|
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0)
|
|
|
|
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.CPM || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SPM, c => c.TrialSiteSurveyList.Where(t => t.State == TrialSiteSurveyEnum.CRCSubmitted).Count() > 0)
|
|
|
|
@ -106,7 +105,6 @@ namespace IRaCIS.Core.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new CheckToBeDoneDto()
|
|
|
|
.Select(t => new CheckToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -194,7 +192,6 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var query = _trialRepository
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new ReviewerSelectToBeDoneDto()
|
|
|
|
.Select(t => new ReviewerSelectToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -230,7 +227,6 @@ namespace IRaCIS.Core.Application
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
|
|
|
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -251,7 +247,6 @@ namespace IRaCIS.Core.Application
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var all = await _trialRepository
|
|
|
|
var all = await _trialRepository
|
|
|
|
.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
|
|
|
.Select(t => new GetPMClinicalDataToBeDoneListOutDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -280,7 +275,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
, [FromServices] IRepository<Enroll> _enrollRepository,
|
|
|
|
, [FromServices] IRepository<Enroll> _enrollRepository,
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new ReviewerSelectToBeDoneDto()
|
|
|
|
.Select(t => new ReviewerSelectToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -367,7 +362,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
//.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
|
|
|
//.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
|
|
|
.Select(t => new ImageClinicalDataToBeDoneDto()
|
|
|
|
.Select(t => new ImageClinicalDataToBeDoneDto()
|
|
|
|
@ -409,7 +404,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
//.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
|
|
|
//.Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
|
|
|
|
.Select(t => new ImageClinicalDataToBeDoneDto()
|
|
|
|
.Select(t => new ImageClinicalDataToBeDoneDto()
|
|
|
|
@ -470,7 +465,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new ImageQuestionToBeDoneDto()
|
|
|
|
.Select(t => new ImageQuestionToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -518,7 +513,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new ImageCheckQuestionToBeDoneDto()
|
|
|
|
.Select(t => new ImageCheckQuestionToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -564,7 +559,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new ImageReUploadToBeDoneDto()
|
|
|
|
.Select(t => new ImageReUploadToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -611,7 +606,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id) && (t.IsUrgent || t.IsSubjectExpeditedView || t.IsEnrollementQualificationConfirm || t.IsPDProgressView))
|
|
|
|
.Select(t => new ImageSubmittedToBeDoneDto()
|
|
|
|
.Select(t => new ImageSubmittedToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -667,7 +662,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
|
|
|
|
.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
|
|
|
|
.Select(t => new ImageQualityToBeDoneDto()
|
|
|
|
.Select(t => new ImageQualityToBeDoneDto()
|
|
|
|
@ -724,7 +719,7 @@ namespace IRaCIS.Core.Application
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
[FromServices] IRepository<Trial> _trialRepository)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
var query = _trialRepository.Where(t => t.TrialStatusStr == StaticData.TrialState.TrialOngoing)
|
|
|
|
var query = _trialRepository
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
|
|
|
.Select(t => new ImageQuestionToBeDoneDto()
|
|
|
|
.Select(t => new ImageQuestionToBeDoneDto()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|