public ApptReminderRule CopyWithClinicNum(long clinicNum) { ApptReminderRule retVal = Copy(); retVal.ClinicNum = clinicNum; return(retVal); }
///<summary></summary> public static long Insert(ApptReminderRule apptReminderRule) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { apptReminderRule.ApptReminderRuleNum = Meth.GetLong(MethodBase.GetCurrentMethod(), apptReminderRule); return(apptReminderRule.ApptReminderRuleNum); } return(Crud.ApptReminderRuleCrud.Insert(apptReminderRule)); }
///<summary></summary> public static void Update(ApptReminderRule apptReminderRule) { if (RemotingClient.RemotingRole == RemotingRole.ClientWeb) { Meth.GetVoid(MethodBase.GetCurrentMethod(), apptReminderRule); return; } Crud.ApptReminderRuleCrud.Update(apptReminderRule); }
public ApptReminderRule Copy() { ApptReminderRule retVal = (ApptReminderRule)this.MemberwiseClone(); return(retVal); }
public static ApptReminderRule CreateDefaultReminderRule(ApptReminderType ruleType, long clinicNum = 0, bool isBeforeAppointment = true) { ApptReminderRule rule = null; switch (ruleType) { case ApptReminderType.Reminder: rule = new ApptReminderRule() { ClinicNum = clinicNum, //works with practice too because _listClinics[0] is a spoofed "Practice/Defaults" clinic with ClinicNum=0 TypeCur = ApptReminderType.Reminder, TSPrior = TimeSpan.FromHours(3), TemplateSMS = "Appointment Reminder: [NameF] is scheduled for [ApptTime] on [ApptDate] at [ClinicName]. If you have questions call [ClinicPhone].", //default message TemplateEmail = @"[NameF], Your appointment is scheduled for [ApptTime] on [ApptDate] at [OfficeName]. If you have questions, call <a href=""tel:[OfficePhone]"">[OfficePhone]</a>.", TemplateEmailSubject = "Appointment Reminder", //default subject TemplateSMSAggShared = "Appointment Reminder:\n[Appts]\nIf you have questions call [ClinicPhone].", TemplateSMSAggPerAppt = "[NameF] is scheduled for [ApptTime] on [ApptDate] at [ClinicName].", TemplateEmailSubjAggShared = "Appointment Reminder", TemplateEmailAggShared = @"[Appts] If you have questions, call <a href=""tel:[OfficePhone]"">[OfficePhone]</a>.", TemplateEmailAggPerAppt = "[NameF] is scheduled for [ApptTime] on [ApptDate] at [ClinicName].", //SendOrder="0,1,2" //part of ctor }; break; case ApptReminderType.ConfirmationFutureDay: rule = new ApptReminderRule() { ClinicNum = clinicNum, //works with practice too because _listClinics[0] is a spoofed "Practice/Defaults" clinic with ClinicNum=0 TypeCur = ApptReminderType.ConfirmationFutureDay, TSPrior = TimeSpan.FromDays(7), TemplateSMS = "[NameF] is scheduled for [ApptTime] on [ApptDate] at [OfficeName]. Reply [ConfirmCode] to confirm or call [OfficePhone].", //default message TemplateEmail = @"[NameF], Your appointment is scheduled for [ApptTime] on [ApptDate] at [OfficeName]. Click <a href=""[ConfirmURL]"">[ConfirmURL]</a> to confirm " + @"or call <a href=""tel:[OfficePhone]"">[OfficePhone]</a>.", TemplateEmailSubject = "Appointment Confirmation", //default subject TemplateSMSAggShared = "[Appts]\nReply [ConfirmCode] to confirm or call [OfficePhone].", TemplateSMSAggPerAppt = "[NameF] is scheduled for [ApptTime] on [ApptDate] at [ClinicName].", TemplateEmailSubjAggShared = "Appointment Confirmation", TemplateEmailAggShared = @"[Appts] Click <a href=""[ConfirmURL]"">[ConfirmURL]</a> to confirm or call <a href=""tel:[OfficePhone]"">[OfficePhone]</a>.", TemplateEmailAggPerAppt = "[NameF] is scheduled for [ApptTime] on [ApptDate] at [ClinicName].", //SendOrder="0,1,2" //part of ctor DoNotSendWithin = TimeSpan.FromDays(1).Add(TimeSpan.FromHours(10)), TemplateAutoReply = "Thank you for confirming your appointment with [OfficeName]. We look forward to seeing you.", TemplateAutoReplyAgg = "Thank you for confirming your appointments with [OfficeName]. We look forward to seeing you", IsAutoReplyEnabled = true, }; break; case ApptReminderType.PatientPortalInvite: if (isBeforeAppointment) { rule = new ApptReminderRule() { ClinicNum = clinicNum, TypeCur = ApptReminderType.PatientPortalInvite, TSPrior = TimeSpan.FromDays(7), TemplateEmail = @"[NameF], In preparation for your upcoming dental appointment at [OfficeName], we invite you to log in to our Patient Portal. " + @" There you can view your scheduled appointments, view your treatment plan, send a message to your provider, and view your account balance. " + @" Visit our <a href=""[PatientPortalURL]"">Patient Portal</a> and use this temporary user name and password to log in: User name: [UserName] Password: [Password] If you have any questions, please give us a call at <a href=""tel:[OfficePhone]"">[OfficePhone]</a>, and we would be happy to answer any of your questions.", TemplateEmailSubject = "Patient Portal Invitation", TemplateEmailSubjAggShared = "Patient Portal Invitation", TemplateEmailAggShared = @"[NameF], In preparation for your upcoming dental appointments at [OfficeName], we invite you to log in to our Patient Portal. " + @" There you can view your scheduled appointments, view your treatment plan, send a message to your provider, and view your account balance. " + @" Visit our <a href=""[PatientPortalURL]"">Patient Portal</a> and use these temporary user names and passwords to log in: [Credentials] If you have any questions, please give us a call at <a href=""tel:[OfficePhone]"">[OfficePhone]</a>, and we would be happy to answer any of your questions.", TemplateEmailAggPerAppt = @"[NameF] User name: [UserName] Password: [Password] ", SendOrder = "2" //Email only }; break; } else //Same day { rule = new ApptReminderRule() { ClinicNum = clinicNum, TypeCur = ApptReminderType.PatientPortalInvite, TSPrior = new TimeSpan(-1, 0, 0), //Send 1 hour after the appointment TemplateEmail = @"[NameF], Thank you for coming in to visit [OfficeName] today. As a follow up to your appointment, we invite you to log in to our Patient Portal. " + @" There you can view your scheduled appointments, view your treatment plan, send a message to your provider, and view your account balance. " + @" Visit <a href=""[PatientPortalURL]"">Patient Portal</a> and use this temporary user name and password to log in: User name: [UserName] Password: [Password] If you have any questions, please give us a call at <a href=""tel:[OfficePhone]"">[OfficePhone]</a>, and we would be happy to answer any of your questions.", TemplateEmailSubject = "Patient Portal Invitation", TemplateEmailSubjAggShared = "Patient Portal Invitation", TemplateEmailAggShared = @"[NameF], Thank you for coming in to visit [OfficeName] today. As a follow up to your appointment, we invite you to log in to our Patient Portal. " + @" There you can view your scheduled appointments, view your treatment plan, send a message to your provider, and view your account balance. " + @" Visit <a href=""[PatientPortalURL]"">Patient Portal</a> and use these temporary user names and passwords to log in: [Credentials] If you have any questions, please give us a call at <a href=""tel:[OfficePhone]"">[OfficePhone]</a>, and we would be happy to answer any of your questions.", TemplateEmailAggPerAppt = @"[NameF] User name: [UserName] Password: [Password] ", SendOrder = "2" //Email only }; break; } case ApptReminderType.ScheduleThankYou: rule = new ApptReminderRule() { ClinicNum = clinicNum, //works with practice too because _listClinics[0] is a spoofed "Practice/Defaults" clinic with ClinicNum=0 TypeCur = ApptReminderType.ScheduleThankYou, TSPrior = new TimeSpan(-1, 0, 0), //default to send thank you 1 hour after creating appointment. TemplateSMS = "[NameF], thank you for scheduling with [OfficeName] on [ApptDate] at [ApptTime].", //default message TemplateEmail = @"[NameF], Thank you for scheduling your appointment with [OfficeName] on [ApptDate] at [ApptTime]. If you have questions, call <a href=""tel:[OfficePhone]"">[OfficePhone]</a>.", TemplateEmailSubject = "Appointment Thank You", //default subject TemplateSMSAggShared = "Thank you for scheduling these appointments: [Appts]", TemplateSMSAggPerAppt = "[NameF] for [ApptTime] on [ApptDate] at [ClinicName]", TemplateEmailSubjAggShared = "Appointment Thank You", TemplateEmailAggShared = @"Thank you for scheduling these appointments: [Appts] If you have questions, call <a href=""tel:[OfficePhone]"">[OfficePhone]</a>.", TemplateEmailAggPerAppt = "[NameF] is scheduled for [ApptTime] on [ApptDate] at [ClinicName].", //SendOrder="0,1,2" //part of ctor DoNotSendWithin = new TimeSpan(2, 0, 0), //Do not send within 2 hours of appointment.AptDateTime. }; break; } if (PrefC.GetBool(PrefName.EmailDisclaimerIsOn)) { rule.TemplateEmail += "\r\n\r\n\r\n[EmailDisclaimer]"; rule.TemplateEmailAggShared += "\r\n\r\n\r\n[EmailDisclaimer]"; } return(rule); }