Exemple #1
0
 private void SaveTabECR()
 {
     if (comboStatusESent.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusSent, _listDefsApptStatus[comboStatusESent.SelectedIndex].DefNum);
     }
     if (comboStatusEAccepted.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusAccepted, _listDefsApptStatus[comboStatusEAccepted.SelectedIndex].DefNum);
     }
     if (comboStatusEDeclined.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusDeclined, _listDefsApptStatus[comboStatusEDeclined.SelectedIndex].DefNum);
     }
     if (comboStatusEFailed.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.ApptEConfirmStatusSendFailed, _listDefsApptStatus[comboStatusEFailed.SelectedIndex].DefNum);
     }
     Prefs.UpdateBool(PrefName.ApptConfirmEnableForClinicZero, checkEnableNoClinic.Checked);
     Prefs.UpdateBool(PrefName.ApptEConfirm2ClickConfirmation, radio2ClickConfirm.Checked);
     ApptReminderRules.SyncByClinicAndTypes(_dictClinicRules[_ecClinicCur.ClinicNum], _ecClinicCur.ClinicNum,
                                            ApptReminderType.Reminder, ApptReminderType.ConfirmationFutureDay, ApptReminderType.ScheduleThankYou);
     if (_ecClinicCur != null && _ecClinicCur.ClinicNum != 0)
     {
         _ecClinicCur.IsConfirmEnabled = checkIsConfirmEnabled.Checked;
         Clinics.Update(_ecClinicCur);
     }
 }
Exemple #2
0
 private void butOK_Click(object sender, EventArgs e)
 {
     if (textOrthoMonthsTreat.errorProvider1.GetError(textOrthoMonthsTreat) != "")
     {
         MsgBox.Show(this, "Default months treatment must be between 0 and 255 months.");
         return;
     }
     if (PrefC.GetBool(PrefName.ShowFeaturePatientClone) != checkPatClone.Checked)
     {
         MsgBox.Show(this, "You will need to restart OpenDental for this change to take effect.");
     }
     if (Prefs.UpdateBool(PrefName.ShowFeaturePatientClone, checkPatClone.Checked)
         | Prefs.UpdateBool(PrefName.ApptModuleShowOrthoChartItem, checkApptModuleShowOrthoChartItem.Checked)
         | Prefs.UpdateBool(PrefName.OrthoEnabled, checkOrthoEnabled.Checked)
         | Prefs.UpdateBool(PrefName.OrthoCaseInfoInOrthoChart, checkOrthoFinancialInfoInChart.Checked)
         | Prefs.UpdateBool(PrefName.OrthoClaimMarkAsOrtho, checkOrthoClaimMarkAsOrtho.Checked)
         | Prefs.UpdateBool(PrefName.OrthoClaimUseDatePlacement, checkOrthoClaimUseDatePlacement.Checked)
         | Prefs.UpdateByte(PrefName.OrthoDefaultMonthsTreat, PIn.Byte(textOrthoMonthsTreat.Text))
         | Prefs.UpdateBool(PrefName.OrthoInsPayConsolidated, checkConsolidateInsPayment.Checked)
         | Prefs.UpdateLong(PrefName.OrthoAutoProcCodeNum, _orthoAutoProcCodeNum)
         | Prefs.UpdateString(PrefName.OrthoPlacementProcsList, string.Join(",", _listOrthoPlacementCodeNums))
         | Prefs.UpdateString(PrefName.OrthoBandingCodes, PIn.String(textBandingCodes.Text))
         | Prefs.UpdateString(PrefName.OrthoVisitCodes, PIn.String(textVisitCodes.Text))
         | Prefs.UpdateString(PrefName.OrthoDebondCodes, PIn.String(textDebondCodes.Text))
         )
     {
         _hasChanges = true;
     }
     DialogResult = DialogResult.OK;
 }
Exemple #3
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (textScanDocQuality.errorProvider1.GetError(textScanDocQuality) != "" ||
         textScanDocResolution.errorProvider1.GetError(textScanDocResolution) != "")
     {
         MessageBox.Show(Lan.g(this, "Please fix data entry errors first."));
         return;
     }
     ComputerPrefs.LocalComputer.ScanDocSelectSource = checkScanDocSelectSource.Checked;
     ComputerPrefs.LocalComputer.ScanDocShowOptions  = radioScanDocShowOptions.Checked;
     ComputerPrefs.LocalComputer.ScanDocDuplex       = checkScanDocDuplex.Checked;
     ComputerPrefs.LocalComputer.ScanDocGrayscale    = checkScanDocGrayscale.Checked;
     ComputerPrefs.LocalComputer.ScanDocResolution   = PIn.Int(textScanDocResolution.Text);
     ComputerPrefs.LocalComputer.ScanDocQuality      = PIn.Byte(textScanDocQuality.Text);
     //Prefs.UpdateLong(PrefName.ScannerCompression,PIn.Long(textScanDocQuality.Text));
     Prefs.UpdateLong(PrefName.ImageWindowingMin, slider.MinVal);
     Prefs.UpdateLong(PrefName.ImageWindowingMax, slider.MaxVal);
     //Prefs.UpdateBool(PrefName.ScannerSuppressDialog,checkScanDocShowOptions.Checked);
     //Prefs.UpdateLong(PrefName.ScannerResolution,PIn.Long(textScanDocResolution.Text));
     ComputerPrefs.LocalComputer.SensorType     = comboType.Text;
     ComputerPrefs.LocalComputer.SensorPort     = (int)upDownPort.Value;
     ComputerPrefs.LocalComputer.SensorExposure = (int)upDownExposure.Value;
     ComputerPrefs.LocalComputer.SensorBinned   = checkBinned.Checked;
     ComputerPrefs.Update(ComputerPrefs.LocalComputer);
     DataValid.SetInvalid(InvalidType.Prefs);
     DialogResult = DialogResult.OK;
 }
        private void butOK_Click(object sender, System.EventArgs e)
        {
            Cursor = Cursors.WaitCursor;
            if (!Directory.Exists(textExportFolder.Text))
            {
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Export folder does not exist.");
                return;
            }
            if (comboBillType.SelectedIndex == -1)
            {
                Cursor = Cursors.Default;
                MsgBox.Show(this, "Please select a billing type.");
                return;
            }
            long billtype = DefC.Short[(int)DefCat.BillingTypes][comboBillType.SelectedIndex].DefNum;

            if (Prefs.UpdateString(PrefName.TrojanExpressCollectPath, textExportFolder.Text)
                | Prefs.UpdateLong(PrefName.TrojanExpressCollectBillingType, billtype))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            Cursor       = Cursors.Default;
            DialogResult = DialogResult.OK;
        }
        private void butDefaultMedical_Click(object sender, EventArgs e)
        {
            if (gridMain.GetSelectedIndex() == -1)
            {
                MsgBox.Show(this, "Please select a row first.");
                return;
            }
            Clearinghouse ch = _listClearinghousesHq[gridMain.GetSelectedIndex()];

            if (ch.Eformat != ElectronicClaimFormat.x837_5010_med_inst)          //anything except the med/inst format
            {
                MsgBox.Show(this, "The selected clearinghouse must first be set to the med/inst e-claim format.");
                return;
            }
            bool isInvalid = false;

            if (!CultureInfo.CurrentCulture.Name.EndsWith("CA") &&
                PrefC.GetLong(PrefName.ClearinghouseDefaultEligibility) == 0 &&
                Prefs.UpdateLong(PrefName.ClearinghouseDefaultEligibility, ch.ClearinghouseNum))
            {
                isInvalid = true;
            }
            if (Prefs.UpdateLong(PrefName.ClearinghouseDefaultMed, ch.ClearinghouseNum))
            {
                isInvalid = true;
            }
            if (isInvalid)
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            FillGrid();
        }
        private void butClose_Click(object sender, EventArgs e)
        {
            if (!textSubInterval.IsValid)
            {
                MsgBox.Show(this, "Please fix data entry errors first.");
                return;
            }
            if (comboPayType.SelectedIndex < 0)
            {
                MsgBox.Show(this, "Please select a payment type.");
                return;
            }
            Program prog = Programs.GetCur(ProgramName.FHIR);

            prog.Enabled = checkEnabled.Checked;
            Programs.Update(prog);
            ProgramProperty progProp = ProgramProperties.GetPropByDesc("SubscriptionProcessingFrequency", ProgramProperties.GetForProgram(prog.ProgramNum));

            ProgramProperties.UpdateProgramPropertyWithValue(progProp, textSubInterval.Text);
            DataValid.SetInvalid(InvalidType.Programs);
            if (Prefs.UpdateLong(PrefName.ApiPaymentType, comboPayType.GetSelectedDefNum()))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            Close();
        }
Exemple #7
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     if (listSoftware.SelectedIndex == -1)
     {
         MsgBox.Show(this, "Must select an accounting software.");
         return;
     }
     if (listSoftware.SelectedIndex == 0)           //Open Dental
     {
         string depStr = "";
         for (int i = 0; i < depAL.Count; i++)
         {
             if (i > 0)
             {
                 depStr += ",";
             }
             depStr += depAL[i].ToString();
         }
         if (Prefs.UpdateString(PrefName.AccountingDepositAccounts, depStr))
         {
             DataValid.SetInvalid(InvalidType.Prefs);
         }
         if (Prefs.UpdateLong(PrefName.AccountingIncomeAccount, PickedDepAccountNum))
         {
             DataValid.SetInvalid(InvalidType.Prefs);
         }
         //pay------------------------------------------------------------------------------------------
         AccountingAutoPays.SaveList(payList);                //just deletes them all and starts over
         DataValid.SetInvalid(InvalidType.AccountingAutoPays);
         if (Prefs.UpdateLong(PrefName.AccountingCashIncomeAccount, PickedPayAccountNum))
         {
             DataValid.SetInvalid(InvalidType.Prefs);
         }
     }
     else              //QuickBooks
     {
         string depStr = "";
         for (int i = 0; i < listBoxAccountsQB.Items.Count; i++)
         {
             if (i > 0)
             {
                 depStr += ",";
             }
             depStr += listBoxAccountsQB.Items[i].ToString();
         }
         if (Prefs.UpdateString(PrefName.QuickBooksCompanyFile, textCompanyFileQB.Text)
             | Prefs.UpdateString(PrefName.QuickBooksDepositAccounts, depStr)
             | Prefs.UpdateString(PrefName.QuickBooksIncomeAccount, textIncomeAccountQB.Text))
         {
             DataValid.SetInvalid(InvalidType.Prefs);
         }
     }
     //Update the selected accounting software.
     if (Prefs.UpdateInt(PrefName.AccountingSoftware, listSoftware.SelectedIndex))
     {
         DataValid.SetInvalid(InvalidType.Prefs);
     }
     DialogResult = DialogResult.OK;
 }
Exemple #8
0
 private void butOK_Click(object sender, EventArgs e)
 {
     Prefs.UpdateBool(PrefName.PublicHealthScreeningUsePat, checkUsePat.Checked);
     if (comboExamSheets.SelectedIndex != -1)
     {
         Prefs.UpdateLong(PrefName.PublicHealthScreeningSheet, listSheets[comboExamSheets.SelectedIndex].SheetDefNum);
     }
     DialogResult = DialogResult.OK;
 }
        private void butOK_Click(object sender, EventArgs e)
        {
            if (textDays.errorProvider1.GetError(textDays) != "")
            {
                MsgBox.Show(this, "Please fix data entry errors first.");
                return;
            }
            string cc = "";

            if (checkMC.Checked)
            {
                cc = "MC";
            }
            if (checkV.Checked)
            {
                if (cc != "")
                {
                    cc += ",";
                }
                cc += "V";
            }
            if (checkD.Checked)
            {
                if (cc != "")
                {
                    cc += ",";
                }
                cc += "D";
            }
            if (checkAmEx.Checked)
            {
                if (cc != "")
                {
                    cc += ",";
                }
                cc += "A";
            }
            string billingUseElectronic = listElectBilling.SelectedIndex.ToString();

            if (Prefs.UpdateLong(PrefName.BillingDefaultsLastDays, PIn.Long(textDays.Text))
                | Prefs.UpdateBool(PrefName.BillingDefaultsIntermingle, checkIntermingled.Checked)
                | Prefs.UpdateString(PrefName.BillingDefaultsNote, textNote.Text)
                | Prefs.UpdateString(PrefName.BillingUseElectronic, billingUseElectronic)
                | Prefs.UpdateString(PrefName.BillingEmailSubject, textBillingEmailSubject.Text)
                | Prefs.UpdateString(PrefName.BillingEmailBodyText, textBillingEmailBody.Text)
                | Prefs.UpdateString(PrefName.BillingElectVendorId, textVendorId.Text)
                | Prefs.UpdateString(PrefName.BillingElectVendorPMSCode, textVendorPMScode.Text)
                | Prefs.UpdateString(PrefName.BillingElectCreditCardChoices, cc)
                | Prefs.UpdateString(PrefName.BillingElectClientAcctNumber, textClientAcctNumber.Text)
                | Prefs.UpdateString(PrefName.BillingElectUserName, textUserName.Text)
                | Prefs.UpdateString(PrefName.BillingElectPassword, textPassword.Text)
                | Prefs.UpdateString(PrefName.BillingDefaultsInvoiceNote, textInvoiceNote.Text))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
        private void butOK_Click(object sender, EventArgs e)
        {
            if (textLogOffAfterMinutes.Text != "")
            {
                try {
                    int logOffMinutes = Int32.Parse(textLogOffAfterMinutes.Text);
                    if (logOffMinutes < 0)                   //Automatic log off must be a positive numerical value.
                    {
                        throw new Exception();
                    }
                }
                catch {
                    MsgBox.Show(this, "Log off after minutes is invalid.");
                    return;
                }
            }
            DataValid.SetInvalid(InvalidType.Security);
            bool invalidatePrefs = false;

            if (            //Prefs.UpdateBool(PrefName.PasswordsMustBeStrong,checkPasswordsMustBeStrong.Checked) //handled when box clicked.
                Prefs.UpdateBool(PrefName.TimecardSecurityEnabled, checkTimecardSecurityEnabled.Checked)
                | Prefs.UpdateBool(PrefName.TimecardUsersDontEditOwnCard, checkCannotEditOwn.Checked)
                | Prefs.UpdateBool(PrefName.SecurityLogOffWithWindows, checkLogOffWindows.Checked)
                | Prefs.UpdateBool(PrefName.UserNameManualEntry, checkUserNameManualEntry.Checked)
                | Prefs.UpdateBool(PrefName.PasswordsStrongIncludeSpecial, checkPasswordsStrongIncludeSpecial.Checked)
                | Prefs.UpdateBool(PrefName.PasswordsWeakChangeToStrong, checkPasswordForceWeakToStrong.Checked)
                | Prefs.UpdateInt(PrefName.SecurityLogOffAfterMinutes, PIn.Int(textLogOffAfterMinutes.Text))
                | Prefs.UpdateString(PrefName.DomainLoginPath, PIn.String(textDomainLoginPath.Text))
                | Prefs.UpdateString(PrefName.DomainLoginPath, textDomainLoginPath.Text)
                | Prefs.UpdateString(PrefName.DomainLoginPath, textDomainLoginPath.Text)
                | Prefs.UpdateBool(PrefName.DomainLoginEnabled, checkDomainLoginEnabled.Checked)
                | Prefs.UpdateLong(PrefName.DefaultUserGroup, comboGroups.SelectedIndex == -1?0:comboGroups.GetSelected <UserGroup>().UserGroupNum)
                | Prefs.UpdateBool(PrefName.SecurityLogOffAllowUserOverride, checkAllowLogoffOverride.Checked)
                )
            {
                invalidatePrefs = true;
            }
            //if PasswordsMustBeStrong was unchecked, then reset the strong password flags.
            if (Prefs.UpdateBool(PrefName.PasswordsMustBeStrong, checkPasswordsMustBeStrong.Checked) && !checkPasswordsMustBeStrong.Checked)
            {
                invalidatePrefs = true;
                Userods.ResetStrongPasswordFlags();
            }
            if (checkDisableBackupReminder.Checked)
            {
                invalidatePrefs |= Prefs.UpdateDateT(PrefName.BackupReminderLastDateRun, DateTime.MaxValue.AddMonths(-1));              //if MaxValue, gives error on startup.
            }
            else
            {
                invalidatePrefs |= Prefs.UpdateDateT(PrefName.BackupReminderLastDateRun, DateTimeOD.Today);
            }
            if (invalidatePrefs)
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
        private void butOK_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(textSftpPort.errorProvider1.GetError(textSftpPort)))
            {
                MsgBox.Show(this, "Please enter a valid integer for the Sftp Server Port.");
                return;
            }
            int      sendFreq = (int)numericSendFrequency.Value;
            DateTime accountUpdatesRuntime = DateTime.MinValue;

            if (!string.IsNullOrWhiteSpace(textUpdatesTimeOfDay.Text) && !DateTime.TryParse(textUpdatesTimeOfDay.Text, out accountUpdatesRuntime))
            {
                MsgBox.Show(this, "Account Updates Run Time must be blank or a valid time of day.");
                return;
            }
            if (comboSendFrequencyUnits.SelectedIndex < 0 || comboSendFrequencyUnits.SelectedIndex >= Enum.GetNames(typeof(FrequencyUnit)).Length)
            {
                //shouldn't be possible, but just in case
                MsgBox.Show(this, "Please select a valid unit of measurement for the Account Activity Updates repeat frequency.");
                return;
            }
            if (numericSendFrequency.Value < 1 || numericSendFrequency.Value > new[] { 30, 24, 60 }[comboSendFrequencyUnits.SelectedIndex])
            {
                //shouldn't be possible, but just in case
                MsgBox.Show(this, "Please enter a valid value for the Account Activity Updates repeat frequency.");
                return;
            }
            long billTypePaidInFullDefNum = comboPaidInFullBillType.GetSelectedDefNum();

            if (billTypePaidInFullDefNum == 0 && checkEnabled.Checked)
            {
                MsgBox.Show(this, "Please select a Paid in Full Billing Type.");
                return;
            }
            SyncWithHQ();                                 //will remove any clinic from the dict if all props exactly match the HQ props, or add clinic props if different
            if (_progCur.Enabled != checkEnabled.Checked) //only update the program if the IsEnabled flag has changed
            {
                _progCur.Enabled = checkEnabled.Checked;
                Programs.Update(_progCur);
            }
            ProgramProperties.Sync(_dictClinicListProgProps.Where(x => _listUserClinicNums.Contains(x.Key)).SelectMany(x => x.Value).ToList(), _progCur.ProgramNum, _listUserClinicNums);
            DataValid.SetInvalid(InvalidType.Programs);
            string updateFreq = numericSendFrequency.Value + " " + (FrequencyUnit)comboSendFrequencyUnits.SelectedIndex;
            bool   hasChanged = false;

            if (Prefs.UpdateString(PrefName.TransworldServiceTimeDue, accountUpdatesRuntime == DateTime.MinValue?"":POut.Time(accountUpdatesRuntime.TimeOfDay, false))
                | Prefs.UpdateString(PrefName.TransworldServiceSendFrequency, updateFreq))
            {
                Prefs.UpdateDateT(PrefName.TransworldDateTimeLastUpdated, DateTime.MinValue);
                hasChanged = true;
            }
            if (Prefs.UpdateLong(PrefName.TransworldPaidInFullBillingType, billTypePaidInFullDefNum) | hasChanged)
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
Exemple #12
0
 private void butOK_Click(object sender, EventArgs e)
 {
     Schedules.SetForDay(SchedList, SchedCurDate);
     if (comboProv.SelectedIndex != -1 &&
         Prefs.UpdateLong(PrefName.ScheduleProvUnassigned, ProviderC.ListShort[comboProv.SelectedIndex].ProvNum))
     {
         DataValid.SetInvalid(InvalidType.Prefs);
     }
     DialogResult = DialogResult.OK;
 }
 private void butDefaultClinic_Click(object sender, EventArgs e)
 {
     if (_smsClinicSelected.ClinicNum == 0)
     {
         MsgBox.Show(this, "Select clinic to make default.");
         return;
     }
     Prefs.UpdateLong(PrefName.TextingDefaultClinicNum, (_smsClinicSelected.ClinicNum));
     Signalods.SetInvalid(InvalidType.Prefs);
     FillGridSmsUsage();
 }
 private void butOK_Click(object sender, EventArgs e)
 {
     Prefs.UpdateLong(PrefName.PerioColorCAL, this.butColorCal.BackColor.ToArgb());
     Prefs.UpdateLong(PrefName.PerioColorFurcations, this.butColorFurc.BackColor.ToArgb());
     Prefs.UpdateLong(PrefName.PerioColorFurcationsRed, this.butColorFurcRed.BackColor.ToArgb());
     Prefs.UpdateLong(PrefName.PerioColorGM, this.butColorGM.BackColor.ToArgb());
     Prefs.UpdateLong(PrefName.PerioColorMGJ, this.butColorMGJ.BackColor.ToArgb());
     Prefs.UpdateLong(PrefName.PerioColorProbing, this.butColorProbing.BackColor.ToArgb());
     Prefs.UpdateLong(PrefName.PerioColorProbingRed, this.butColorProbingRed.BackColor.ToArgb());
     DialogResult = DialogResult.OK;
 }
Exemple #15
0
        private void butOK_Click(object sender, EventArgs e)
        {
            int uschedDaysPastValue   = PIn.Int(textDaysPast.Text, false);
            int uschedDaysFutureValue = PIn.Int(textDaysFuture.Text, false);

            if (Prefs.UpdateInt(PrefName.PlannedApptDaysPast, uschedDaysPastValue)
                | Prefs.UpdateLong(PrefName.PlannedApptDaysFuture, uschedDaysFutureValue))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
Exemple #16
0
 private void comboLabel_SelectionChangeCommitted(object sender, EventArgs e)
 {
     if (comboLabel.SelectedIndex == 0)
     {
         Prefs.UpdateLong(PrefName.LabelPatientDefaultSheetDefNum, 0);
     }
     else
     {
         Prefs.UpdateLong(PrefName.LabelPatientDefaultSheetDefNum, LabelList[comboLabel.SelectedIndex - 1].SheetDefNum);
     }
     DataValid.SetInvalid(InvalidType.Prefs);
 }
Exemple #17
0
 private void butDefault_Click(object sender, EventArgs e)
 {
     if (listClaimForms.SelectedIndex == -1)
     {
         MsgBox.Show(this, "Please select a claimform from the list first.");
         return;
     }
     if (Prefs.UpdateLong(PrefName.DefaultClaimForm, ClaimForms.ListLong[listClaimForms.SelectedIndex].ClaimFormNum))
     {
         DataValid.SetInvalid(InvalidType.Prefs);
     }
     FillList();
 }
 private void butSetDefault_Click(object sender, EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select a row first.");
         return;
     }
     if (Prefs.UpdateLong(PrefName.EmailDefaultAddressNum, EmailAddresses.Listt[gridMain.GetSelectedIndex()].EmailAddressNum))
     {
         DataValid.SetInvalid(InvalidType.Prefs);
     }
     FillGrid();
 }
Exemple #19
0
 private void butOK_Click(object sender, EventArgs e)
 {
     Prefs.UpdateString(PrefName.EHREmailPOPserver, textPOPserver.Text);
     Prefs.UpdateString(PrefName.EHREmailFromAddress, textUsername.Text);
     Prefs.UpdateString(PrefName.EHREmailPassword, textPassword.Text);
     try{
         Prefs.UpdateLong(PrefName.EHREmailPort, PIn.Long(textPort.Text));
     }
     catch {
         MsgBox.Show(this, "invalid port number.");
     }
     DataValid.SetInvalid(InvalidType.Prefs);
     DialogResult = DialogResult.OK;
 }
Exemple #20
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (textDaysPast.errorProvider1.GetError(textDaysPast) != "" ||
                textMaxReminders.errorProvider1.GetError(textMaxReminders) != "")
            {
                MsgBox.Show(this, "Please fix data entry errors first.");
                return;
            }
            if (textPostcardsPerSheet.Text != "1" &&
                textPostcardsPerSheet.Text != "3" &&
                textPostcardsPerSheet.Text != "4")
            {
                MsgBox.Show(this, "The value in postcards per sheet must be 1, 3, or 4");
                return;
            }
            if (comboStatusMailedReactivation.SelectedIndex == -1 ||
                comboStatusEmailedReactivation.SelectedIndex == -1 ||
                comboStatusTextedReactivation.SelectedIndex == -1 ||
                comboStatusEmailTextReactivation.SelectedIndex == -1)
            {
                MsgBox.Show(this, "All status options on the left must be set.");
                return;
            }
            //End of Validation
            bool didChange = false;

            didChange |= Prefs.UpdateString(PrefName.ReactivationPostcardsPerSheet, textPostcardsPerSheet.Text);
            if (didChange)
            {
                if (textPostcardsPerSheet.Text == "1")
                {
                    MsgBox.Show(this, "If using 1 postcard per sheet, you must adjust the position, and also the preview will not work");
                }
            }
            didChange |= Prefs.UpdateBool(PrefName.ReactivationGroupByFamily, checkGroupFamilies.Checked);
            didChange |= Prefs.UpdateLongAsNegOne(PrefName.ReactivationDaysPast, textDaysPast.Text);
            didChange |= Prefs.UpdateLongAsNegOne(PrefName.ReactivationContactInterval, textDaysContactInterval.Text);
            didChange |= Prefs.UpdateLongAsNegOne(PrefName.ReactivationCountContactMax, textMaxReminders.Text);
            //combo boxes These have already been checked for -1
            didChange |= Prefs.UpdateLong(PrefName.ReactivationStatusEmailed, comboStatusEmailedReactivation.GetSelected <Def>().DefNum);
            didChange |= Prefs.UpdateLong(PrefName.ReactivationStatusMailed, comboStatusMailedReactivation.GetSelected <Def>().DefNum);
            didChange |= Prefs.UpdateLong(PrefName.ReactivationStatusTexted, comboStatusTextedReactivation.GetSelected <Def>().DefNum);
            didChange |= Prefs.UpdateLong(PrefName.ReactivationStatusEmailedTexted, comboStatusEmailTextReactivation.GetSelected <Def>().DefNum);
            if (didChange)
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
        private void butEligibility_Click(object sender, EventArgs e)
        {
            if (gridMain.GetSelectedIndex() == -1)
            {
                MsgBox.Show(this, "Please select a row first.");
                return;
            }
            Clearinghouse ch = _listClearinghousesHq[gridMain.GetSelectedIndex()];

            if (Prefs.UpdateLong(PrefName.ClearinghouseDefaultEligibility, ch.ClearinghouseNum))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            FillGrid();
        }
Exemple #22
0
        private void butOK_Click(object sender, EventArgs e)
        {
            bool isPrefsInvalid      = false;
            int  uschedDaysPastValue = PIn.Int(textDaysPast.Text, false);

            isPrefsInvalid = Prefs.UpdateInt(PrefName.UnschedDaysPast, uschedDaysPastValue);
            int uschedDaysFutureValue = PIn.Int(textDaysFuture.Text, false);

            isPrefsInvalid = (isPrefsInvalid || Prefs.UpdateLong(PrefName.UnschedDaysFuture, uschedDaysFutureValue));
            if (isPrefsInvalid)
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
Exemple #23
0
        ///<summary>Sets a custom claim form as the default.  We do not currently allow setting internal claim forms as default - users need to copy it over first.</summary>
        private void butDefault_Click(object sender, EventArgs e)
        {
            if (gridCustom.GetSelectedIndex() == -1)
            {
                MsgBox.Show(this, "Please select a claimform from the list first.");
                return;
            }
            ClaimForm claimFormCur = (ClaimForm)gridCustom.Rows[gridCustom.GetSelectedIndex()].Tag;

            if (Prefs.UpdateLong(PrefName.DefaultClaimForm, claimFormCur.ClaimFormNum))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            FillGridCustom();
        }
 private void butOK_Click(object sender, EventArgs e)
 {
     try {
         Schedules.SetForDay(SchedList, SchedCurDate);
     }
     catch (Exception ex) {
         MsgBox.Show(this, ex.Message);
         return;
     }
     if (comboProv.SelectedIndex != -1 &&
         Prefs.UpdateLong(PrefName.ScheduleProvUnassigned, ProviderC.ListShort[comboProv.SelectedIndex].ProvNum))
     {
         DataValid.SetInvalid(InvalidType.Prefs);
     }
     DialogResult = DialogResult.OK;
 }
Exemple #25
0
 private void butOK_Click(object sender, System.EventArgs e)
 {
     Prefs.UpdateString(PrefName.EmailSMTPserver, textSMTPserver.Text);
     Prefs.UpdateString(PrefName.EmailUsername, textUsername.Text);
     Prefs.UpdateString(PrefName.EmailPassword, textPassword.Text);
     try{
         Prefs.UpdateLong(PrefName.EmailPort, PIn.Long(textPort.Text));
     }
     catch {
         MsgBox.Show(this, "invalid port number.");
     }
     Prefs.UpdateBool(PrefName.EmailUseSSL, checkSSL.Checked);
     Prefs.UpdateString(PrefName.EmailSenderAddress, textSender.Text);
     DataValid.SetInvalid(InvalidType.Prefs);
     DialogResult = DialogResult.OK;
 }
        private void SaveTabWebSchedRecall()
        {
            WebSchedAutomaticSend sendType = WebSchedAutomaticSend.SendToEmailOnlyPreferred;

            if (radioDoNotSend.Checked)
            {
                sendType = WebSchedAutomaticSend.DoNotSend;
            }
            else if (radioSendToEmail.Checked)
            {
                sendType = WebSchedAutomaticSend.SendToEmail;
            }
            else if (radioSendToEmailNoPreferred.Checked)
            {
                sendType = WebSchedAutomaticSend.SendToEmailNoPreferred;
            }
            WebSchedAutomaticSend beforeEnum = (WebSchedAutomaticSend)PrefC.GetInt(PrefName.WebSchedAutomaticSendSetting);

            if (Prefs.UpdateInt(PrefName.WebSchedAutomaticSendSetting, (int)sendType))
            {
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "WebSched automated email preference changed from " + beforeEnum.ToString() + " to " + sendType.ToString() + ".");
            }
            WebSchedAutomaticSend sendTypeText = WebSchedAutomaticSend.SendToText;

            if (radioDoNotSendText.Checked)
            {
                sendTypeText = WebSchedAutomaticSend.DoNotSend;
            }
            beforeEnum = (WebSchedAutomaticSend)PrefC.GetInt(PrefName.WebSchedAutomaticSendTextSetting);
            if (Prefs.UpdateInt(PrefName.WebSchedAutomaticSendTextSetting, (int)sendTypeText))
            {
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "WebSched automated text preference changed from " + beforeEnum.ToString() + " to " + sendTypeText.ToString() + ".");
            }
            int beforeInt = PrefC.GetInt(PrefName.WebSchedTextsPerBatch);
            int afterInt  = PIn.Int(textWebSchedPerBatch.Text);

            if (Prefs.UpdateInt(PrefName.WebSchedTextsPerBatch, afterInt))
            {
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "WebSched batch size preference changed from " + beforeInt.ToString() + " to " + afterInt.ToString() + ".");
            }
            Prefs.UpdateBool(PrefName.WebSchedRecallAllowProvSelection, checkRecallAllowProvSelection.Checked);
            if (comboWSRConfirmStatus.SelectedIndex != -1)
            {
                Def newConfirmStatus = Defs.GetDefByExactName(DefCat.ApptConfirmed, comboWSRConfirmStatus.SelectedItem.ToString());
                Prefs.UpdateLong(PrefName.WebSchedRecallConfirmStatus, newConfirmStatus.DefNum);
            }
        }
        private void butOK_Click(object sender, EventArgs e)
        {
            if (!textDaysPast.IsValid || !textDaysFuture.IsValid)
            {
                MsgBox.Show("Please fix data entry errors first.");
                return;
            }
            int uschedDaysPastValue   = PIn.Int(textDaysPast.Text, false);
            int uschedDaysFutureValue = PIn.Int(textDaysFuture.Text, false);

            if (Prefs.UpdateInt(PrefName.PlannedApptDaysPast, uschedDaysPastValue)
                | Prefs.UpdateLong(PrefName.PlannedApptDaysFuture, uschedDaysFutureValue))
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            DialogResult = DialogResult.OK;
        }
Exemple #28
0
        private void butDefaultMedical_Click(object sender, EventArgs e)
        {
            if (gridMain.SelectedRow == -1)
            {
                MsgBox.Show(this, "Please select a row first.");
                return;
            }
            Clearinghouse ch = Clearinghouses.Listt[gridMain.SelectedRow];

            if (ch.Eformat != ElectronicClaimFormat.x837_5010_med_inst)          //anything except the med/inst format
            {
                MsgBox.Show(this, "The selected clearinghouse must first be set to the med/inst e-claim format.");
                return;
            }
            Prefs.UpdateLong(PrefName.ClearinghouseDefaultMed, Clearinghouses.Listt[gridMain.SelectedRow].ClearinghouseNum);
            FillGrid();
            DataValid.SetInvalid(InvalidType.Prefs);
        }
Exemple #29
0
 private void butWebMailNotify_Click(object sender, EventArgs e)
 {
     if (gridMain.GetSelectedIndex() == -1)
     {
         MsgBox.Show(this, "Please select a row first.");
         return;
     }
     if (gridMain.SelectedTag <EmailAddress>().UserNum > 0)
     {
         MsgBox.Show(this, "User email address cannot be set as WebMail Notify.");
         return;
     }
     if (Prefs.UpdateLong(PrefName.EmailNotifyAddressNum, _listEmailAddresses[gridMain.GetSelectedIndex()].EmailAddressNum))
     {
         DataValid.SetInvalid(InvalidType.Prefs);
     }
     FillGrid();
 }
Exemple #30
0
        private void SaveTabWebSchedNewPat()
        {
            Prefs.UpdateString(PrefName.WebSchedNewPatApptMessage, textWebSchedNewPatApptMessage.Text);
            List <ClinicPref> listClinicPrefs = new List <ClinicPref>();

            foreach (Control control in panelHostedURLs.Controls)
            {
                if (control.GetType() != typeof(ContrNewPatHostedURL))
                {
                    continue;
                }
                ContrNewPatHostedURL urlPanel = (ContrNewPatHostedURL)control;
                long   clinicNum     = urlPanel.GetClinicNum();
                string allowChildren = urlPanel.GetPrefValue(PrefName.WebSchedNewPatAllowChildren);
                string verifyInfo    = urlPanel.GetPrefValue(PrefName.WebSchedNewPatVerifyInfo);
                string doAuthEmail   = urlPanel.GetPrefValue(PrefName.WebSchedNewPatDoAuthEmail);
                string doAuthText    = urlPanel.GetPrefValue(PrefName.WebSchedNewPatDoAuthText);
                string webFormsURL   = urlPanel.GetPrefValue(PrefName.WebSchedNewPatWebFormsURL);
                if (clinicNum == 0)
                {
                    Prefs.UpdateString(PrefName.WebSchedNewPatAllowChildren, allowChildren);
                    Prefs.UpdateString(PrefName.WebSchedNewPatVerifyInfo, verifyInfo);
                    Prefs.UpdateString(PrefName.WebSchedNewPatDoAuthEmail, doAuthEmail);
                    Prefs.UpdateString(PrefName.WebSchedNewPatDoAuthText, doAuthText);
                    Prefs.UpdateString(PrefName.WebSchedNewPatWebFormsURL, webFormsURL);
                    continue;
                }
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatAllowChildren, allowChildren));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatVerifyInfo, verifyInfo));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatDoAuthEmail, doAuthEmail));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatDoAuthText, doAuthText));
                listClinicPrefs.Add(GetClinicPrefToSave(clinicNum, PrefName.WebSchedNewPatWebFormsURL, webFormsURL));
            }
            if (ClinicPrefs.Sync(listClinicPrefs, _listClinicPrefsWebSchedNewPats))
            {
                DataValid.SetInvalid(InvalidType.ClinicPrefs);
            }
            if (comboWSNPConfirmStatuses.SelectedIndex != -1)
            {
                Prefs.UpdateLong(PrefName.WebSchedNewPatConfirmStatus, comboWSNPConfirmStatuses.GetSelectedDefNum());
            }
            Prefs.UpdateBool(PrefName.WebSchedNewPatAllowProvSelection, checkNewPatAllowProvSelection.Checked);
            Prefs.UpdateInt(PrefName.WebSchedNewPatApptDoubleBooking, checkWSNPDoubleBooking.Checked?1:0);
        }