diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs index 7515fe9f..7222d463 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs @@ -45,7 +45,7 @@ namespace IRaCIS.Application.Contracts public Guid DeclarationTypeId { get; set; } public Guid IndicationTypeId { get; set; } - public Guid PhaseId { get; set; } + public Guid? PhaseId { get; set; } @@ -111,14 +111,10 @@ namespace IRaCIS.Application.Contracts public string IndicationType { get; set; } = string.Empty; - public bool IsLocked { get; set; } public int EnrollStatus { get; set; } - - public int? SubjectCount { get; set; } - public int? StudyCount { get; set; } = 0; - public int? SiteCount { get; set; } = 0; + public string ReviewMode { get; set; } = string.Empty; @@ -133,6 +129,13 @@ namespace IRaCIS.Application.Contracts public DateTime? CreateTime { get; set; } public bool IsDeleted { get; set; } + public bool IsLocked { get; set; } + //public int? SubjectCount { get; set; } + + //public int? StudyCount { get; set; } = 0; + //public int? SiteCount { get; set; } = 0; + + } public class TrialAndTrialStateVieModel diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index c80a0cec..5f181bfb 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -55,8 +55,8 @@ namespace IRaCIS.Application.Services .WhereIf(!string.IsNullOrEmpty(searchParam.ResearchProgramNo), o => o.ResearchProgramNo.Contains(searchParam.ResearchProgramNo)) .WhereIf(!string.IsNullOrWhiteSpace(searchParam.ExperimentName), o => o.ExperimentName.Contains(searchParam.ExperimentName)) .WhereIf(searchParam.PhaseId != null, o => o.PhaseId == searchParam.PhaseId) - .WhereIf(searchParam.DeclarationTypeId != null, o => o.PhaseId == searchParam.DeclarationTypeId) - .WhereIf(searchParam.IndicationTypeId != null, o => o.PhaseId == searchParam.IndicationTypeId) + .WhereIf(searchParam.DeclarationTypeId != null, o => o.DeclarationTypeId == searchParam.DeclarationTypeId) + .WhereIf(searchParam.IndicationTypeId != null, o => o.IndicationTypeId == searchParam.IndicationTypeId) .WhereIf(searchParam.CROId != null, o => o.CROId == searchParam.CROId) .WhereIf(searchParam.BeginDate != null, o => o.CreateTime >= searchParam.BeginDate) .WhereIf(searchParam.EndDate != null, o => o.CreateTime <= searchParam.EndDate) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs index 458b55ac..2cfd4b5b 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs @@ -61,9 +61,10 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.ReviewMode, u => u.MapFrom(s => s.ReviewMode.Value)) //.ForMember(d => d.ReviewType, u => u.MapFrom(s => s.ReviewType.Value)) .ForMember(d => d.IsLocked, u => u.MapFrom(s => s.WorkloadList.Any(u => u.DataFrom == (int)WorkLoadFromStatus.FinalConfirm))) - .ForMember(d => d.SiteCount, u => u.MapFrom(s => userTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator ? s.TrialSiteUserList.Count(k => k.UserId == userId) : s.TrialSiteList.Count())) - .ForMember(d => d.StudyCount, u => u.MapFrom(s => userTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator ? s.StudyList.Count(t => t.TrialSite.CRCUserList.Any(t => t.UserId == userId)) : s.StudyList.Count())) - .ForMember(d => d.SubjectCount, u => u.MapFrom(s => userTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator ? s.SubjectList.Count(t => t.TrialSite.CRCUserList.Any(t => t.UserId == userId)) : s.SubjectList.Count())); + //.ForMember(d => d.SiteCount, u => u.MapFrom(s => userTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator ? s.TrialSiteUserList.Count(k => k.UserId == userId) : s.TrialSiteList.Count())) + //.ForMember(d => d.StudyCount, u => u.MapFrom(s => userTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator ? s.StudyList.Count(t => t.TrialSite.CRCUserList.Any(t => t.UserId == userId)) : s.StudyList.Count())) + //.ForMember(d => d.SubjectCount, u => u.MapFrom(s => userTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator ? s.SubjectList.Count(t => t.TrialSite.CRCUserList.Any(t => t.UserId == userId)) : s.SubjectList.Count())) + ;