private void FillTabPatientPortal()
 {
     //Office may have set a customer URL
     textPatientFacingUrlPortal.Text = PrefC.GetString(PrefName.PatientPortalURL);
     //HQ provides this URL for this customer.
     WebServiceMainHQProxy.EServiceSetup.SignupOut.SignupOutEService urlsFromHQ = WebServiceMainHQProxy.GetSignups <WebServiceMainHQProxy.EServiceSetup.SignupOut.SignupOutEService>(_signupOut, eServiceCode.PatientPortal).FirstOrDefault() ?? new WebServiceMainHQProxy.EServiceSetup.SignupOut.SignupOutEService()
     {
         HostedUrl = "", HostedUrlPayment = ""
     };
     textHostedUrlPortal.Text        = urlsFromHQ.HostedUrl;
     textHostedUrlPortalPayment.Text = urlsFromHQ.HostedUrlPayment;
     if (textPatientFacingUrlPortal.Text == "")            //Customer has not set their own URL so use the URL provided by OD.
     {
         textPatientFacingUrlPortal.Text = urlsFromHQ.HostedUrl;
     }
     textBoxNotificationSubject.Text = PrefC.GetString(PrefName.PatientPortalNotifySubject);
     textBoxNotificationBody.Text    = PrefC.GetString(PrefName.PatientPortalNotifyBody);
     _listPatPortalInviteRules       = ApptReminderRules.GetForTypes(ApptReminderType.PatientPortalInvite);
     if (PrefC.HasClinicsEnabled)
     {
         _clinicCurPPInvite = comboClinicsPPInvites.SelectedTag <Clinic>();
     }
     else
     {
         _clinicCurPPInvite                = Clinics.GetPracticeAsClinicZero();
         labelClinicPPInvites.Visible      = false;
         checkUseDefaultsPPInvites.Visible = false;
         checkIsPPInvitesEnabled.Visible   = false;
     }
     FillPatPortalInvites();
 }
Пример #2
0
        ///<summary>Fills in memory Rules dictionary and clinics list based. This is very different from AppointmentReminderRules.GetRuleAndClinics.</summary>
        private void setListClinicsAndDictRulesHelper()
        {
            if (PrefC.HasClinicsEnabled)             //CLINICS
            {
                _ecListClinics = new List <Clinic>()
                {
                    new Clinic()
                    {
                        Description = "Defaults", Abbr = "Defaults"
                    }
                };
                _ecListClinics.AddRange(Clinics.GetForUserod(Security.CurUser));
            }
            else              //NO CLINICS
            {
                _ecListClinics = new List <Clinic>()
                {
                    new Clinic()
                    {
                        Description = "Practice", Abbr = "Practice"
                    }
                };
            }
            List <ApptReminderRule> listRulesTemp = ApptReminderRules.GetForTypes(ApptReminderType.Reminder, ApptReminderType.ConfirmationFutureDay
                                                                                  , ApptReminderType.ScheduleThankYou);

            _dictClinicRules = _ecListClinics.Select(x => x.ClinicNum).ToDictionary(x => x, x => listRulesTemp.FindAll(y => y.ClinicNum == x));
            int idx = comboClinicEConfirm.SelectedIndex > 0 ? comboClinicEConfirm.SelectedIndex : 0;

            comboClinicEConfirm.BeginUpdate();
            comboClinicEConfirm.Items.Clear();
            _ecListClinics.ForEach(x => comboClinicEConfirm.Items.Add(x.Abbr));            //combo clinics may not be visible.
            if (idx > -1 && idx < comboClinicEConfirm.Items.Count)
            {
                comboClinicEConfirm.SelectedIndex = idx;
            }
            comboClinicEConfirm.EndUpdate();
        }