diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs index f7be20a48..92b3816c6 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskConsistentRuleService.cs @@ -670,7 +670,7 @@ namespace IRaCIS.Core.Application.Service { var trialId = inQuery.TrialId; - var taskConsistentRuleQueryable = from enroll in _repository.Where(t => t.TrialId == trialId) + var taskConsistentRuleQueryable = from enroll in _repository.Where(t => t.TrialId == trialId && t.EnrollStatus==EnrollStatus.ConfirmIntoGroup) join user in _repository.Where() on enroll.DoctorId equals user.DoctorId join taskConsistentRule in _repository.Where(t => t.TrialId == trialId &&t.TrialReadingCriterionId==inQuery.TrialReadingCriterionId && t.IsSelfAnalysis) on enroll.TrialId equals taskConsistentRule.TrialId select new TaskConsistentRuleView() diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 1db5a7201..70f2702a2 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -296,8 +296,8 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(o => o.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) - .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.Subject.TrialSite.TrialSiteCode)) - .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.Subject.Code)) + .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) + .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code)) .ForMember(o => o.OptType, t => t.Ignore()); diff --git a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs index 87e0b3ecf..2e5b6be67 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialEmailNoticeConfigService.cs @@ -288,10 +288,16 @@ namespace IRaCIS.Core.Application.Service - + t.IsAnalysisCreate, t.TrialReadingCriterionId, }).FirstNotNullAsync(); + + if (taskInfo.IsAnalysisCreate) + { + return string.Empty; + } + #endregion