public ResultService(IResultArchivePollingAgent resultArchivePollingAgent, ILogManager logManager) { InitializeComponent(); _pollThread = new IntervalWorkThread(resultArchivePollingAgent.PollforUploadCompleteResultArchives); _timer = new Timer(x => _pollThread.Trigger(), new object(), new TimeSpan(0), _interval); _logger = logManager.GetLogger<ResultService>(); }
//public NotificationService(INotificationPollingAgent notificationPollingAgent, ILogManager logManager, IResultNotificationPollingAgent resultNotificationPollingAgent, ISurveyEmailPollingAgent surveyEmailPollingAgent, // IEvaluationReminderNotificationPollingAgent evaluationReminderNotificationPollingAgent, IScreeningReminderPollingAgent screeningReminderPollingAgent, IAnnualReminderPollingAgent annualReminderPollingAgent, // IProspectCustomerFollowupPollingAgent prospectCustomerFollowupPollingAgent, ISettings settings, ITestUpsellPollingAgent testUpsellPollingAgent, IResultReadyNotificationPollingAgent resultReadyNotificationPollingAgent, // IEventResultReadyNotificationPollingAgent eventResultReadyNotificationPollingAgent, ISecondScreeningReminderPollingAgent secondScreeningReminderPollingAgent, IKynFirstNotificationPollingAgent kynFirstNotificationPollingAgent, // IKynSecondNotificationPollingAgent kynSecondNotificationPollingAgent, ICallQueuePollingAgent callQueuePollingAgent, IPullBackCallQueueCustomerPollingAgent pullBackCallQueueCustomerPollingAgent, IPollForAppointmentReminderViaSms pollForAppointmentReminderViaSms, // IPhysicianPartnerQueueFaxPollingAgent faxResultNotification, IPhysicianPartnerSendFaxPollingAgent faxNotificationPollingAgent, IPriorityInQueueNotificationPollingAgent pollForPriorityInQueue, // ISystemGeneratedCallQueuePollingAgent systemGeneratedCallQueuePollingAgent, IFillEventsCallQueuePollingAgent fillEventsCallQueuePollingAgent, IDeletePastEventSystemGeneratedCallQueuePollingAgent deletePastEventSystemGeneratedCallQueue, // IUpsellCallQueuePollingAgent upsellCallQueuePollingAgent, IConfirmationCallQueuePollingAgent confirmationCallQueuePollingAgent, INoShowCustomerPollingAgent noShowCustomerPollingAgent, IDirectMailActivityReminderPollingAgent directMailActivityReminderPollingAgent, // ICorporateEventResultReadyNotificationPollingAgent corporateEventResultReadyNotificationPollingAgent) public NotificationService(INotificationPollingAgent notificationPollingAgent, ILogManager logManager, IResultNotificationPollingAgent resultNotificationPollingAgent, ISurveyEmailPollingAgent surveyEmailPollingAgent, IEvaluationReminderNotificationPollingAgent evaluationReminderNotificationPollingAgent, IScreeningReminderPollingAgent screeningReminderPollingAgent, IAnnualReminderPollingAgent annualReminderPollingAgent, IProspectCustomerFollowupPollingAgent prospectCustomerFollowupPollingAgent, ISettings settings, ITestUpsellPollingAgent testUpsellPollingAgent, IResultReadyNotificationPollingAgent resultReadyNotificationPollingAgent, IEventResultReadyNotificationPollingAgent eventResultReadyNotificationPollingAgent, ISecondScreeningReminderPollingAgent secondScreeningReminderPollingAgent, IKynFirstNotificationPollingAgent kynFirstNotificationPollingAgent, IKynSecondNotificationPollingAgent kynSecondNotificationPollingAgent, IPullBackCallQueueCustomerPollingAgent pullBackCallQueueCustomerPollingAgent, IPollForAppointmentReminderViaSms pollForAppointmentReminderViaSms, IPhysicianPartnerQueueFaxPollingAgent faxResultNotification, IPriorityInQueueNotificationPollingAgent pollForPriorityInQueue, IDeletePastEventSystemGeneratedCallQueuePollingAgent deletePastEventSystemGeneratedCallQueue, INoShowCustomerPollingAgent noShowCustomerPollingAgent, IDirectMailActivityReminderPollingAgent directMailActivityReminderPollingAgent, ICorporateEventResultReadyNotificationPollingAgent corporateEventResultReadyNotificationPollingAgent, IEventCustomNotificationPollingAgent eventCustomNotificationPolling, ISendNotiificationToNursePractitionerPollingAgent sendNotiificationToNursePractitionerPollingAgent, IPullBackPreAssessmentCallQueueCustomerPollingAgent pullBackPreAssessmentCallQueueCustomerPollingAgent) //IPhysicianPartnerSendFaxPollingAgent faxNotificationPollingAgent, { InitializeComponent(); _settings = settings; _pollThread = new IntervalWorkThread(notificationPollingAgent.PollForNotifications); _timer = new Timer(x => _pollThread.Trigger(), new object(), new TimeSpan(0), _interval); //_faxPollThread = new IntervalWorkThread(faxNotificationPollingAgent.PollForNotifications); //_faxTimer = new Timer(x => _faxPollThread.Trigger(), new object(), GetDueTime(_settings.FaxResultNotificationPushTime), new TimeSpan(0, _settings.FaxPushToApiServiceInterval, 0, 0)); _pollThreadForEvaluationReminderNotification = new IntervalWorkThread(evaluationReminderNotificationPollingAgent.PollForEvaluationReminderNotification); _timerForEvaluationReminderNotification = new Timer(x => _pollThreadForEvaluationReminderNotification.Trigger(), new object(), GetDueTime(_settings.EvaluationReminderSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadScreeningReminderNotification = new IntervalWorkThread(screeningReminderPollingAgent.PollforSendingScreeningReminders); _timerScreeningReminderNotification = new Timer(x => _pollThreadScreeningReminderNotification.Trigger(), new object(), GetDueTime(_settings.ScreeningReminderSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadResultDeliveredNotification = new IntervalWorkThread(resultNotificationPollingAgent.PollforResultNotification); _timerResultDelieveredNotification = new Timer(x => _pollThreadResultDeliveredNotification.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, _settings.IntervalResultDelivery, 0, 0)); _pollThreadAnnualReminderNotification = new IntervalWorkThread(annualReminderPollingAgent.PollforSendingAnnualReminders); _timerAnnualReminderNotification = new Timer(x => _pollThreadAnnualReminderNotification.Trigger(), new object(), GetDueTime(_settings.AnnualReminderSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadSurveyEmailNotification = new IntervalWorkThread(surveyEmailPollingAgent.PollforSurveyEmails); _timerSurveyEmailNotification = new Timer(x => _pollThreadSurveyEmailNotification.Trigger(), new object(), GetDueTime(_settings.SurveyEmailSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadProspectCustomerEmailNotification = new IntervalWorkThread(prospectCustomerFollowupPollingAgent.PollForSendingProspectCustomerReminders); _timerProspectCustomerEmailNotification = new Timer(x => _pollThreadProspectCustomerEmailNotification.Trigger(), new object(), GetDueTime(_settings.ProspectCustomerFollowUpSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadTestUpsellEmailNotification = new IntervalWorkThread(testUpsellPollingAgent.PollForTestUpsell); _timerTestUpsellEmailNotification = new Timer(x => _pollThreadTestUpsellEmailNotification.Trigger(), new object(), GetDueTime(_settings.TestUpsellSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadSecondResultReadyNotification = new IntervalWorkThread(resultReadyNotificationPollingAgent.PollforResultReadyNotification); _timerSecondResultReadyNotification = new Timer(x => _pollThreadSecondResultReadyNotification.Trigger(), new object(), GetDueTime(_settings.SecondResultReadyNotificationSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadEventResultReadyNotification = new IntervalWorkThread(eventResultReadyNotificationPollingAgent.PollforEventResultReadyNotification); _timerEventResultReadyNotification = new Timer(x => _pollThreadEventResultReadyNotification.Trigger(), new object(), GetDueTime(_settings.EventResultReadyNotificationSchedulingTime), new TimeSpan(0, _settings.IntervalEventResultReady, 0, 0)); _pollThreadSecondScreeningReminderNotification = new IntervalWorkThread(secondScreeningReminderPollingAgent.PollforSendingScondScreeningReminders); _timerSecondScreeningReminderNotification = new Timer(x => _pollThreadSecondScreeningReminderNotification.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, _settings.IntervalSecondScreeningReminder, 0, 0)); _pollThreadKynFirstNotification = new IntervalWorkThread(kynFirstNotificationPollingAgent.PollforKynNotification); _timerKynFirstNotification = new Timer(x => _pollThreadKynFirstNotification.Trigger(), new object(), GetDueTime(_settings.KynFirstNotificationSchedulingTime), new TimeSpan(0, 24, 0, 0)); _pollThreadKynSecondNotification = new IntervalWorkThread(kynSecondNotificationPollingAgent.PollforKynNotification); _timerKynSecondNotification = new Timer(x => _pollThreadKynSecondNotification.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, _settings.IntervalKynSecondNotification, 0, 0)); //_pollThreadCallQueuePollingAgent = new IntervalWorkThread(callQueuePollingAgent.SendCustomersOnCallQueue); //_timerCallQueuePollingAgent = new Timer(x => _pollThreadCallQueuePollingAgent.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, _settings.CallQueueServiceInterval, 0)); _pollThreadPullBackCallQueueCustomer = new IntervalWorkThread(pullBackCallQueueCustomerPollingAgent.PollforPullBackCallQueueCustomer); _timerPullBackCallQueueCustomer = new Timer(x => _pollThreadPullBackCallQueueCustomer.Trigger(), new object(), new TimeSpan(), new TimeSpan(0, 0, _settings.PullBackCallQueueCustomerServiceInterval, 0)); _pollForAppointmentReminderViaSms = new IntervalWorkThread(pollForAppointmentReminderViaSms.PollforSendingAppointmentReminderViaSms); _timerForAppointmentReminderViaSms = new Timer(x => _pollForAppointmentReminderViaSms.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, _settings.SmsInterval, 0, 0)); _pollForFaxResultNotification = new IntervalWorkThread(faxResultNotification.PollforFaxResultNotification); _timerForFaxResultNotification = new Timer(x => _pollForFaxResultNotification.Trigger(), new object(), GetDueTime(_settings.FaxResultNotificationQueueTime), new TimeSpan(0, 24, 0, 0)); _pollThreadPriorityInQueueNotification = new IntervalWorkThread(pollForPriorityInQueue.PollForPriorityInQueueNotification); _timerPriorityInQueueNotification = new Timer(x => _pollThreadPriorityInQueueNotification.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, _settings.PriorityInQueueInterval, 0)); //_pollThreadSystemGeneratedCallQueue = new IntervalWorkThread(systemGeneratedCallQueuePollingAgent.PollForCallQueue); //_timerSystemGeneratedCallQueue = new Timer(x => _pollThreadSystemGeneratedCallQueue.Trigger(), new object(), GetDueTime(_settings.SystemGeneratedCallQueueGenerationScheduleTime), // new TimeSpan(0, _settings.SystemGeneratedCallQueueGenerationInterval, 0, 0)); //_pollThreadFillEventsCallQueue = new IntervalWorkThread(fillEventsCallQueuePollingAgent.PollForCallQueue); //_timerFillEventsCallQueue = new Timer(x => _pollThreadFillEventsCallQueue.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, 10, 0)); _pollThreadDeletePastEventSystemGeneratedCallQueue = new IntervalWorkThread(deletePastEventSystemGeneratedCallQueue.PollForCallQueueDeletion); _timerDeletePastEventSystemGeneratedCallQueue = new Timer(x => _pollThreadDeletePastEventSystemGeneratedCallQueue.Trigger(), new object(), GetDueTime(_settings.SystemGeneratedCallQueuePastEventDeleteScheduleTime), new TimeSpan(_settings.SystemGeneratedCallQueuePastEventDeleteInterval, 0, 0, 0)); //_pollThreadUpsellCallQueue = new IntervalWorkThread(upsellCallQueuePollingAgent.PollForCallQueue); //_timerUpsellCallQueue = new Timer(x => _pollThreadUpsellCallQueue.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, 10, 0)); //_pollThreadConfirmationCallQueue = new IntervalWorkThread(confirmationCallQueuePollingAgent.PollForCallQueue); //_timerConfirmationCallQueue = new Timer(x => _pollThreadConfirmationCallQueue.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, 10, 0)); _pollThreadNoshowEventCustomerNotification = new IntervalWorkThread(noShowCustomerPollingAgent.PollForCustomerDoesNotAppearOnEvent); _timerNoshowEventCustomerNotification = new Timer(x => _pollThreadNoshowEventCustomerNotification.Trigger(), new object(), new TimeSpan(0), new TimeSpan(0, 0, _settings.NoShowCustomerScheduleInterval, 0)); _pollThreadDirectMailActivityReminderNotification = new IntervalWorkThread(directMailActivityReminderPollingAgent.PollforDirectMailNotification); _timerDirectMailActivityReminderNotification = new Timer(x => _pollThreadDirectMailActivityReminderNotification.Trigger(), new object(), GetDueTime(_settings.DirectMailActivityReminderScheduleTime), new TimeSpan(0, _settings.DirectMailActivityReminderInterval, 0, 0)); _pollThreadCorporateEventResultReadyNotification = new IntervalWorkThread(corporateEventResultReadyNotificationPollingAgent.PollforEventResultReadyNotification); _timerCorporateEventResultReadyNotification = new Timer(x => _pollThreadCorporateEventResultReadyNotification.Trigger(), new object(), GetDueTime(_settings.CorporateEventResultReadyNotificationSchedulingTime), new TimeSpan(0, _settings.IntervalCorporateEventResultReady, 0, 0)); _pollThreadCustomEventNotificationService = new IntervalWorkThread(eventCustomNotificationPolling.PollforCustomNotification); _timerCustomEventNotificationService = new Timer(x => _pollThreadCustomEventNotificationService.Trigger(), new object(), new TimeSpan(0), _interval); _pollThreadNotiificationToNursePractitioner = new IntervalWorkThread(sendNotiificationToNursePractitionerPollingAgent.PollForSendNotification); _timerNotiificationToNursePractitioner = new Timer(x => _pollThreadNotiificationToNursePractitioner.Trigger(), new object(), new TimeSpan(0, 0, 1, 0), new TimeSpan(0, 0, _settings.IntervalForSendNotificationToNursePractitioner, 0)); _PollforPullBackPreAssessmentCallQueueCustomer = new IntervalWorkThread(pullBackPreAssessmentCallQueueCustomerPollingAgent.PollforPullBackPreAssessmentCallQueueCustomer); _timerPollforPullBackPreAssessmentCallQueueCustomer = new Timer(x => _pollThreadPullBackCallQueueCustomer.Trigger(), new object(), new TimeSpan(), new TimeSpan(0, 0, _settings.PullBackPreAssessmentCallQueueCustomerInterval, 0)); _logger = logManager.GetLogger <NotificationService>(); }