From 2d32a5e0de7a83fb4d8d1cc2ef54fdbfeb9829ce Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Thu, 10 Aug 2023 09:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E9=98=85=E7=89=87=E9=A2=9C=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/DTO/VisitTaskViewModel.cs | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) 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; }