diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index eb0a20540..ca595c584 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -298,6 +298,34 @@ namespace IRaCIS.Core.Application.ViewModel public Guid? VisistId { get; set; } public DateTime? SuggesteFinishedTime { get; set; } + public int? UrgentColor + { + get + { + if (this.SuggesteFinishedTime != null) + { + var date = DateTime.Now; + var timeSpan = date - SuggesteFinishedTime.Value; + if (timeSpan.TotalDays <= 2) + { + return 1; + } + else if (timeSpan.TotalDays <= 5) + { + return 2; + } + else + { + return 3; + } + } + else + { + return null; + } + } + } + public Guid TrialReadingCriterionId { get; set; } public bool IsNeedClinicalDataSign { get; set; }