diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 24af7028b..deee21df8 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -1286,27 +1286,6 @@
-
-
- 影像质控
-
-
-
-
-
-
- QC质疑
-
-
-
-
-
-
- 影像质疑
-
-
-
-
TrialEmailNoticeConfigService
@@ -12920,6 +12899,18 @@
MIM 回复医学返回通知IR
+
+
+ MIM 回复医学返回通知IR
+
+
+
+
+ MIM 回复医学返回通知IR
+
+
+
+
加急阅片 IR 申请重阅 或者PM 申请重阅
@@ -13071,6 +13062,16 @@
影像质控
+
+
+ 10分钟检测通知IR 已通知的进行标注,下次不会再通知
+
+
+
+
+ 10分钟检测通知IR 已通知的进行标注,下次不会再通知
+
+
TaskAllocationRuleView 列表视图模型
diff --git a/IRaCIS.Core.Application/MassTransit/Recurring/IRRecurringConsumer.cs b/IRaCIS.Core.Application/MassTransit/Recurring/IRRecurringConsumer.cs
new file mode 100644
index 000000000..9b582d7b4
--- /dev/null
+++ b/IRaCIS.Core.Application/MassTransit/Recurring/IRRecurringConsumer.cs
@@ -0,0 +1,85 @@
+using IRaCIS.Application.Contracts;
+using IRaCIS.Core.Application.Contracts;
+using IRaCIS.Core.Application.MassTransit.Consumer;
+using MassTransit;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace IRaCIS.Core.Application.MassTransit.Recurring
+{
+
+ ///
+ /// 10分钟检测通知IR 已通知的进行标注,下次不会再通知
+ ///
+ public class UrgentIRUnReadTaskRecurringEventConsumer(IRepository _trialReadingCriterionRepository,
+ IRepository _visitTaskRepository, IRepository _trialUserRepository) : IConsumer
+ {
+ public Task Consume(ConsumeContext context)
+ {
+ var trialId = context.Message.TrialId;
+
+ //找到该项目所有的IR 并且有加急 和Pd 未读的任务
+
+ Expression> comonTaskFilter = t => t.TrialId == trialId && t.TaskState == TaskState.Effect && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskAllocationState == TaskAllocationState.Allocated;
+
+ var trialUserList = _trialUserRepository.Where(t => t.TrialId == trialId).Select(t => new
+ {
+ t.UserId,
+ t.User.FullName,
+ t.User.UserName,
+ t.Trial.TrialCode,
+ t.Trial.ResearchProgramNo,
+ TrialReadingCriterionList = t.Trial.TrialReadingCriterionList.Select(t => new { t.CriterionName, TrialReadingCriterionId = t.Id }).ToList()
+ });
+
+
+ foreach (var trialUser in trialUserList)
+ {
+
+ var userId=trialUser.UserId;
+
+ var doctorCriterionList = _trialReadingCriterionRepository.Where(t => t.IsSigned && t.IsConfirm && t.Trial.TrialUserList.Any(t => t.UserId == userId))
+ .Select(c => new
+ {
+
+ TrialReadingCriterionId = c.Id,
+
+ UnReadList = c.VisitTaskList
+ .Where(t => t.DoctorUserId == userId && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
+ // 前序 不存在 未一致性核查未通过的
+ .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
+ //前序 不存在 未生成任务的访视
+ .Where(t => c.IsAutoCreate == false ? !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) : true)
+
+ .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
+
+ .Where(t=> t.SourceSubjectVisit.PDState==PDStateEnum.PDProgress || t.SourceSubjectVisit.IsEnrollmentConfirm ||
+ t.ReadModule.SubjectVisit.PDState == PDStateEnum.PDProgress || t.ReadModule.SubjectVisit.IsEnrollmentConfirm)
+ .Select(c=>new
+ {
+ SubejctCode= c.IsAnalysisCreate? c.BlindSubjectCode: c.Subject.Code,
+ c.TaskBlindName,
+ c.TaskName
+ }).ToList()
+
+ });
+
+
+
+ }
+
+
+
+
+
+
+
+ Console.WriteLine(DateTime.Now);
+
+ return Task.CompletedTask;
+ }
+ }
+}
diff --git a/IRaCIS.Core.Application/MassTransit/Recurring/RecurringEvent.cs b/IRaCIS.Core.Application/MassTransit/Recurring/RecurringEvent.cs
index 69ac68d78..72186cd10 100644
--- a/IRaCIS.Core.Application/MassTransit/Recurring/RecurringEvent.cs
+++ b/IRaCIS.Core.Application/MassTransit/Recurring/RecurringEvent.cs
@@ -10,7 +10,7 @@ namespace IRaCIS.Core.Application.MassTransit.Consumer;
///
/// QC 影像质疑待处理
///
-public class QCImageQuestionRecurringEvent :DomainEvent
+public class QCImageQuestionRecurringEvent : DomainEvent
{
public Guid TrialId { get; set; }
}
@@ -31,7 +31,10 @@ public class ImageQCRecurringEvent : DomainEvent
public Guid TrialId { get; set; }
}
-public class TestEvent
+//加急的待阅任务时,过10分钟,统计10分钟内该IR账号的全部待阅任务
+public class UrgentIRUnReadTaskRecurringEvent : DomainEvent
{
+ public Guid TrialId { get; set; }
+}
+
-}
\ No newline at end of file