diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index b899b9a48..55f7ac0a8 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -314,7 +314,7 @@ namespace IRaCIS.Core.Domain.Models && t.ArmEnum == ArmEnum) || BeforeConvertedTaskId != null ).Any(); - [NotMapped] + //[NotMapped] public List CrterionDictionaryGroup { get @@ -322,7 +322,16 @@ namespace IRaCIS.Core.Domain.Models try { - if (this.IsConvertedTask) + + var isConverted= Subject.SubjectVisitTaskList.Where(t => (t.TrialReadingCriterionId == TrialReadingCriterionId + && t.DoctorUserId == DoctorUserId && t.BeforeConvertedTaskId != null + && t.TaskState == TaskState.Effect && + t.VisitTaskNum < VisitTaskNum + && t.IsSelfAnalysis == IsSelfAnalysis + && t.ArmEnum == ArmEnum) || BeforeConvertedTaskId != null + ).Any(); + + if (isConverted) { return new List() { Share.CrterionDictionaryGroup.General, Share.CrterionDictionaryGroup.Converted }; }