예제 #1
0
        private void SaveTabMisc()
        {
            Prefs.UpdateDateT(PrefName.AutomaticCommunicationTimeStart, dateRunStart.Value);
            Prefs.UpdateDateT(PrefName.AutomaticCommunicationTimeEnd, dateRunEnd.Value);
            string dateFormat;

            if (radioDateShortDate.Checked)
            {
                dateFormat = _shortDateFormat;
            }
            else if (radioDateLongDate.Checked)
            {
                dateFormat = _longDateFormat;
            }
            else if (radioDateMMMMdyyyy.Checked)
            {
                dateFormat = _dateFormatMMMMdyyyy;
            }
            else if (radioDatem.Checked)
            {
                dateFormat = _dateFormatm;
            }
            else
            {
                dateFormat = textDateCustom.Text;
            }
            Prefs.UpdateString(PrefName.PatientCommunicationDateFormat, dateFormat);
        }
예제 #2
0
        private bool UpdateClaimSnapshotRuntime()
        {
            DateTime claimSnapshotRunTime = DateTime.MinValue;

            DateTime.TryParse(textClaimSnapshotRunTime.Text, out claimSnapshotRunTime);           //This already gets checked in the validate method.
            claimSnapshotRunTime = new DateTime(1881, 01, 01, claimSnapshotRunTime.Hour, claimSnapshotRunTime.Minute, claimSnapshotRunTime.Second);
            return(Prefs.UpdateDateT(PrefName.ClaimSnapshotRunTime, claimSnapshotRunTime));
        }
예제 #3
0
        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;
        }
예제 #4
0
        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;
        }
예제 #5
0
        private void butOK_Click(object sender, System.EventArgs e)
        {
            if (textRegKey.Text != "" &&
                !Regex.IsMatch(textRegKey.Text, @"^[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$") &&
                !Regex.IsMatch(textRegKey.Text, @"^[A-Z0-9]{16}$"))
            {
                MsgBox.Show(this, "Invalid registration key format.");
                return;
            }
            if (textMultiple.Text.Contains(" "))
            {
                MsgBox.Show(this, "No spaces allowed in the database list.");
                return;
            }
            string regkey = "";

            if (Regex.IsMatch(textRegKey.Text, @"^[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}$"))
            {
                regkey = textRegKey.Text.Substring(0, 4) + textRegKey.Text.Substring(5, 4)
                         + textRegKey.Text.Substring(10, 4) + textRegKey.Text.Substring(15, 4);
            }
            else if (Regex.IsMatch(textRegKey.Text, @"^[A-Z0-9]{16}$"))
            {
                regkey = textRegKey.Text;
            }
            bool refreshCache = false;

            if (Prefs.UpdateString(PrefName.UpdateServerAddress, textUpdateServerAddress.Text)
                | Prefs.UpdateBool(PrefName.UpdateShowMsiButtons, checkShowMsi.Checked)
                | Prefs.UpdateString(PrefName.UpdateWebsitePath, textWebsitePath.Text)
                | Prefs.UpdateString(PrefName.UpdateWebProxyAddress, textWebProxyAddress.Text)
                | Prefs.UpdateString(PrefName.UpdateWebProxyUserName, textWebProxyUserName.Text)
                | Prefs.UpdateString(PrefName.UpdateWebProxyPassword, textWebProxyPassword.Text)
                | Prefs.UpdateString(PrefName.UpdateMultipleDatabases, textMultiple.Text)
                | Prefs.UpdateDateT(PrefName.UpdateDateTime, _updateTime))
            {
                refreshCache = true;
            }
            if (Prefs.UpdateString(PrefName.RegistrationKey, regkey))
            {
                FormOpenDental.RegKeyIsForTesting = PrefL.IsRegKeyForTesting();
                refreshCache = true;
            }
            if (refreshCache)
            {
                Cursor = Cursors.WaitCursor;
                DataValid.SetInvalid(InvalidType.Prefs);
                Cursor = Cursors.Default;
            }
            DialogResult = DialogResult.OK;
        }
예제 #6
0
 private void SaveChanges(bool suppressMessage)
 {
     if (ValidEntries())
     {
         Prefs.UpdateDateT(PrefName.ApptPrintTimeStart, PIn.DateT(textStartTime.Text));
         Prefs.UpdateDateT(PrefName.ApptPrintTimeStop, PIn.DateT(textStopTime.Text));
         Prefs.UpdateString(PrefName.ApptPrintFontSize, textFontSize.Text);
         Prefs.UpdateInt(PrefName.ApptPrintColumnsPerPage, PIn.Int(textColumnsPerPage.Text));
         if (!suppressMessage)
         {
             MsgBox.Show(this, "Settings saved.");
         }
     }
 }
예제 #7
0
        private void SaveTabMisc()
        {
            Prefs.UpdateDateT(PrefName.AutomaticCommunicationTimeStart, dateRunStart.Value);
            Prefs.UpdateDateT(PrefName.AutomaticCommunicationTimeEnd, dateRunEnd.Value);
            string curFormat = PrefC.GetString(PrefName.PatientCommunicationDateFormat);
            string dateFormat;

            if (radioDateShortDate.Checked)
            {
                if (_wasShortOrLongDateClicked)
                {
                    dateFormat = CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern;
                }
                else
                {
                    dateFormat = curFormat;                  //If the user didn't actually select this, we'll keep the pattern what it was before.
                }
            }
            else if (radioDateLongDate.Checked)
            {
                if (_wasShortOrLongDateClicked)
                {
                    dateFormat = CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern;
                }
                else
                {
                    dateFormat = curFormat;                  //If the user didn't actually select this, we'll keep the pattern what it was before.
                }
            }
            else if (radioDateMMMMdyyyy.Checked)
            {
                dateFormat = _dateFormatMMMMdyyyy;
            }
            else if (radioDatem.Checked)
            {
                dateFormat = _dateFormatm;
            }
            else
            {
                dateFormat = textDateCustom.Text;
            }
            Prefs.UpdateString(PrefName.PatientCommunicationDateFormat, dateFormat);
        }
예제 #8
0
        private void butChangeTime_Click(object sender, EventArgs e)
        {
            FormTimePick FormTP = new FormTimePick(true);

            if (_updateTime != DateTime.MinValue)
            {
                FormTP.SelectedDTime = _updateTime;
            }
            FormTP.ShowDialog();
            if (FormTP.DialogResult == DialogResult.OK)
            {
                _updateTime         = FormTP.SelectedDTime;
                textUpdateTime.Text = _updateTime.ToString();
                if (Prefs.UpdateDateT(PrefName.UpdateDateTime, _updateTime))
                {
                    //Updating to db now in case the user does not have enough permission to click the OK button on this form.
                    Cursor = Cursors.WaitCursor;
                    DataValid.SetInvalid(InvalidType.Prefs);
                    Cursor = Cursors.Default;
                }
            }
        }
예제 #9
0
        private void butClose_Click(object sender, System.EventArgs e)
        {
            if (textReportComputerName.Text.Trim().ToLower() == "localhost" || textReportComputerName.Text.Trim() == "127.0.0.1")
            {
                MsgBox.Show(this, "Computer name to fetch new reports from cannot be localhost or 127.0.0.1 or any other loopback address.");
                return;
            }
            int reportCheckIntervalMinuteCount = 0;

            try {
                reportCheckIntervalMinuteCount = PIn.Int(textReportCheckInterval.Text);
                if (textReportCheckInterval.Enabled && (reportCheckIntervalMinuteCount < 5 || reportCheckIntervalMinuteCount > 60))
                {
                    throw new ApplicationException("Invalid value.");                    //User never sees this message.
                }
            }
            catch {
                MsgBox.Show(this, "Report check interval must be between 5 and 60 inclusive.");
                return;
            }
            if (radioTime.Checked && (textReportCheckTime.Text == "" || !textReportCheckTime.IsEntryValid))
            {
                MsgBox.Show(this, "Please enter a time to receive reports.");
                return;
            }
            bool doRestartToShowChanges = false;
            bool doInvalidateCache      = false;

            if (Prefs.UpdateString(PrefName.ClaimReportComputerName, textReportComputerName.Text))
            {
                doRestartToShowChanges = true;
                //No point in invalidating prefs since this only affects a workstation on startup.
            }
            if (Prefs.UpdateInt(PrefName.ClaimReportReceiveInterval, reportCheckIntervalMinuteCount))
            {
                doInvalidateCache = true;
            }
            if (radioTime.Checked)
            {
                if (Prefs.UpdateDateT(PrefName.ClaimReportReceiveTime, PIn.DateT(textReportCheckTime.Text)))
                {
                    doInvalidateCache = true;
                }
            }
            else if (textReportCheckTime.Text == "" && Prefs.UpdateDateT(PrefName.ClaimReportReceiveTime, DateTime.MinValue))
            {
                doInvalidateCache = true;
            }
            if (Prefs.UpdateBool(PrefName.ClaimReportReceivedByService, checkReceiveReportsService.Checked))
            {
                if (checkReceiveReportsService.Checked)
                {
                    doInvalidateCache = true;
                }
                else
                {
                    doRestartToShowChanges = true;
                }
            }
            if (doRestartToShowChanges)
            {
                MsgBox.Show(this, "You will need to restart the program for changes to take effect.");
            }
            if (doInvalidateCache)
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
            Close();
        }
예제 #10
0
        ///<summary>This is the function that the worker thread uses to actually perform the upload.  Can also call this method in the ordinary way if the data to be transferred is small.  The timeSynchStarted must be passed in to ensure that no records are skipped due to small time differences.</summary>
        private static void UploadWorker(DateTime changedSince, DateTime timeSynchStarted)
        {
            int totalCount = 100;

            try {            //Dennis: try catch may not work: Does not work in threads, not sure about this. Note that all methods inside this try catch block are without exception handling. This is done on purpose so that when an exception does occur it does not update PrefName.MobileSyncDateTimeLastRun
                //The handling of PrefName.MobileSynchNewTables79 should never be removed in future versions
                DateTime changedProv      = changedSince;
                DateTime changedDeleted   = changedSince;
                DateTime changedPat       = changedSince;
                DateTime changedStatement = changedSince;
                DateTime changedDocument  = changedSince;
                DateTime changedRecall    = changedSince;
                if (!PrefC.GetBoolSilent(PrefName.MobileSynchNewTables79Done, false))
                {
                    changedProv    = DateTime.MinValue;
                    changedDeleted = DateTime.MinValue;
                }
                if (!PrefC.GetBoolSilent(PrefName.MobileSynchNewTables112Done, false))
                {
                    changedPat       = DateTime.MinValue;
                    changedStatement = DateTime.MinValue;
                    changedDocument  = DateTime.MinValue;
                }
                if (!PrefC.GetBoolSilent(PrefName.MobileSynchNewTables121Done, false))
                {
                    changedRecall = DateTime.MinValue;
                    UploadPreference(PrefName.PracticeTitle);                     //done again because the previous upload did not include the prefnum
                }
                bool synchDelPat = true;
                if (PrefC.GetDateT(PrefName.MobileSyncDateTimeLastRun).Hour == timeSynchStarted.Hour)
                {
                    synchDelPat = false;                  // synching delPatNumList is timeconsuming (15 seconds) for a dental office with around 5000 patients and it's mostly the same records that have to be deleted every time a synch happens. So it's done only once hourly.
                }
                //MobileWeb
                List <long> patNumList        = Patientms.GetChangedSincePatNums(changedPat);
                List <long> aptNumList        = Appointmentms.GetChangedSinceAptNums(changedSince, PrefC.GetDate(PrefName.MobileExcludeApptsBeforeDate));
                List <long> rxNumList         = RxPatms.GetChangedSinceRxNums(changedSince);
                List <long> provNumList       = Providerms.GetChangedSinceProvNums(changedProv);
                List <long> pharNumList       = Pharmacyms.GetChangedSincePharmacyNums(changedSince);
                List <long> allergyDefNumList = AllergyDefms.GetChangedSinceAllergyDefNums(changedSince);
                List <long> allergyNumList    = Allergyms.GetChangedSinceAllergyNums(changedSince);
                //exclusively Patient Portal
                List <long> eligibleForUploadPatNumList = Patientms.GetPatNumsEligibleForSynch();
                List <long> labPanelNumList             = LabPanelms.GetChangedSinceLabPanelNums(changedSince, eligibleForUploadPatNumList);
                List <long> labResultNumList            = LabResultms.GetChangedSinceLabResultNums(changedSince);
                List <long> medicationNumList           = Medicationms.GetChangedSinceMedicationNums(changedSince);
                List <long> medicationPatNumList        = MedicationPatms.GetChangedSinceMedicationPatNums(changedSince, eligibleForUploadPatNumList);
                List <long> diseaseDefNumList           = DiseaseDefms.GetChangedSinceDiseaseDefNums(changedSince);
                List <long> diseaseNumList   = Diseasems.GetChangedSinceDiseaseNums(changedSince, eligibleForUploadPatNumList);
                List <long> icd9NumList      = ICD9ms.GetChangedSinceICD9Nums(changedSince);
                List <long> statementNumList = Statementms.GetChangedSinceStatementNums(changedStatement, eligibleForUploadPatNumList, statementLimitPerPatient);
                List <long> documentNumList  = Documentms.GetChangedSinceDocumentNums(changedDocument, statementNumList);
                List <long> recallNumList    = Recallms.GetChangedSinceRecallNums(changedRecall);
                List <long> delPatNumList    = Patientms.GetPatNumsForDeletion();
                //List<DeletedObject> dO=DeletedObjects.GetDeletedSince(changedDeleted);dennis: delete this line later
                List <long> deletedObjectNumList = DeletedObjects.GetChangedSinceDeletedObjectNums(changedDeleted);
                totalCount = patNumList.Count + aptNumList.Count + rxNumList.Count + provNumList.Count + pharNumList.Count
                             + labPanelNumList.Count + labResultNumList.Count + medicationNumList.Count + medicationPatNumList.Count
                             + allergyDefNumList.Count + allergyNumList.Count + diseaseDefNumList.Count + diseaseNumList.Count + icd9NumList.Count
                             + statementNumList.Count + documentNumList.Count + recallNumList.Count
                             + deletedObjectNumList.Count;
                if (synchDelPat)
                {
                    totalCount += delPatNumList.Count;
                }
                double currentVal = 0;
                if (Application.OpenForms["FormProgress"] != null)               // without this line the following error is thrown: "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." or a null pointer exception is thrown when an automatic synch is done by the system.
                {
                    FormP.Invoke(new PassProgressDelegate(PassProgressToDialog),
                                 new object[] { currentVal, "?currentVal of ?maxVal records uploaded", totalCount, "" });
                }
                IsSynching = true;
                SynchGeneric(patNumList, SynchEntity.patient, totalCount, ref currentVal);
                SynchGeneric(aptNumList, SynchEntity.appointment, totalCount, ref currentVal);
                SynchGeneric(rxNumList, SynchEntity.prescription, totalCount, ref currentVal);
                SynchGeneric(provNumList, SynchEntity.provider, totalCount, ref currentVal);
                SynchGeneric(pharNumList, SynchEntity.pharmacy, totalCount, ref currentVal);
                //pat portal
                SynchGeneric(labPanelNumList, SynchEntity.labpanel, totalCount, ref currentVal);
                SynchGeneric(labResultNumList, SynchEntity.labresult, totalCount, ref currentVal);
                SynchGeneric(medicationNumList, SynchEntity.medication, totalCount, ref currentVal);
                SynchGeneric(medicationPatNumList, SynchEntity.medicationpat, totalCount, ref currentVal);
                SynchGeneric(allergyDefNumList, SynchEntity.allergydef, totalCount, ref currentVal);
                SynchGeneric(allergyNumList, SynchEntity.allergy, totalCount, ref currentVal);
                SynchGeneric(diseaseDefNumList, SynchEntity.diseasedef, totalCount, ref currentVal);
                SynchGeneric(diseaseNumList, SynchEntity.disease, totalCount, ref currentVal);
                SynchGeneric(icd9NumList, SynchEntity.icd9, totalCount, ref currentVal);
                SynchGeneric(statementNumList, SynchEntity.statement, totalCount, ref currentVal);
                SynchGeneric(documentNumList, SynchEntity.document, totalCount, ref currentVal);
                SynchGeneric(recallNumList, SynchEntity.recall, totalCount, ref currentVal);
                if (synchDelPat)
                {
                    SynchGeneric(delPatNumList, SynchEntity.patientdel, totalCount, ref currentVal);
                }
                //DeleteObjects(dO,totalCount,ref currentVal);// this has to be done at this end because objects may have been created and deleted between synchs. If this function is place above then the such a deleted object will not be deleted from the server.
                SynchGeneric(deletedObjectNumList, SynchEntity.deletedobject, totalCount, ref currentVal);             // this has to be done at this end because objects may have been created and deleted between synchs. If this function is place above then the such a deleted object will not be deleted from the server.
                if (!PrefC.GetBoolSilent(PrefName.MobileSynchNewTables79Done, true))
                {
                    Prefs.UpdateBool(PrefName.MobileSynchNewTables79Done, true);
                }
                if (!PrefC.GetBoolSilent(PrefName.MobileSynchNewTables112Done, true))
                {
                    Prefs.UpdateBool(PrefName.MobileSynchNewTables112Done, true);
                }
                if (!PrefC.GetBoolSilent(PrefName.MobileSynchNewTables121Done, true))
                {
                    Prefs.UpdateBool(PrefName.MobileSynchNewTables121Done, true);
                }
                Prefs.UpdateDateT(PrefName.MobileSyncDateTimeLastRun, timeSynchStarted);
                IsSynching = false;
            }
            catch (Exception e) {
                IsSynching = false;                                // this will ensure that the synch can start again. If this variable remains true due to an exception then a synch will never take place automatically.
                if (Application.OpenForms["FormProgress"] != null) // without this line the following error is thrown: "Invoke or BeginInvoke cannot be called on a control until the window handle has been created." or a null pointer exception is thrown when an automatic synch is done by the system.
                {
                    FormP.Invoke(new PassProgressDelegate(PassProgressToDialog),
                                 new object[] { 0, "?currentVal of ?maxVal records uploaded", totalCount, e.Message });
                }
            }
        }
예제 #11
0
        private void UpdatePreferenceChanges()
        {
            bool hasChanges = false;

            if (Prefs.UpdateBool(PrefName.AgingCalculatedMonthlyInsteadOfDaily, checkAgingMonthly.Checked)
                | Prefs.UpdateBool(PrefName.ApptSecondaryProviderConsiderOpOnly, checkUseOpHygProv.Checked)
                | Prefs.UpdateBool(PrefName.ApptsRequireProc, checkApptsRequireProcs.Checked)
                | Prefs.UpdateBool(PrefName.BillingShowSendProgress, checkBillingShowProgress.Checked)
                | Prefs.UpdateBool(PrefName.BillingShowTransSinceBalZero, checkBillShowTransSinceZero.Checked)
                | Prefs.UpdateBool(PrefName.ClaimReportReceivedByService, checkReceiveReportsService.Checked)
                | Prefs.UpdateBool(PrefName.CloneCreateSuperFamily, checkSuperFamCloneCreate.Checked)
                | Prefs.UpdateBool(PrefName.EnterpriseApptList, checkEnterpriseApptList.Checked)
                | Prefs.UpdateBool(PrefName.EnterpriseNoneApptViewDefaultDisabled, checkEnableNoneView.Checked)
                | Prefs.UpdateBool(PrefName.PasswordsMustBeStrong, checkPasswordsMustBeStrong.Checked)
                | Prefs.UpdateBool(PrefName.PasswordsStrongIncludeSpecial, checkPasswordsStrongIncludeSpecial.Checked)
                | Prefs.UpdateBool(PrefName.PasswordsWeakChangeToStrong, checkPasswordForceWeakToStrong.Checked)
                | Prefs.UpdateBool(PrefName.PaymentWindowDefaultHideSplits, checkHidePaysplits.Checked)
                | Prefs.UpdateBool(PrefName.PaymentsPromptForPayType, checkPaymentsPromptForPayType.Checked)
                | Prefs.UpdateBool(PrefName.SecurityLockIncludesAdmin, checkLockIncludesAdmin.Checked)
                | Prefs.UpdateBool(PrefName.ShowFeaturePatientClone, checkPatClone.Checked)
                | Prefs.UpdateBool(PrefName.ShowFeatureSuperfamilies, checkSuperFam.Checked)
                | Prefs.UpdateBool(PrefName.ShowFeeSchedGroups, checkShowFeeSchedGroups.Checked)
                | Prefs.UpdateBool(PrefName.UserNameManualEntry, checkUserNameManualEntry.Checked)
                | Prefs.UpdateInt(PrefName.BillingElectBatchMax, PIn.Int(textBillingElectBatchMax.Text))
                | Prefs.UpdateString(PrefName.ClaimIdPrefix, textClaimIdentifier.Text)
                | Prefs.UpdateInt(PrefName.ClaimReportReceiveInterval, PIn.Int(textReportCheckInterval.Text))
                | Prefs.UpdateDateT(PrefName.ClaimReportReceiveTime, PIn.DateT(textReportCheckTime.Text))
                | Prefs.UpdateLong(PrefName.ProcessSigsIntervalInSecs, PIn.Long(textSigInterval.Text))
                //SecurityLockDate and SecurityLockDays are handled in FormSecurityLock
                //| Prefs.UpdateString(PrefName.SecurityLockDate,POut.Date(PIn.Date(textDateLock.Text),false))
                //| Prefs.UpdateInt(PrefName.SecurityLockDays,PIn.Int(textDaysLock.Text))
                | Prefs.UpdateInt(PrefName.SecurityLogOffAfterMinutes, PIn.Int(textLogOffAfterMinutes.Text))
                | Prefs.UpdateLong(PrefName.SignalInactiveMinutes, PIn.Long(textInactiveSignal.Text))
                | Prefs.UpdateInt(PrefName.AutoSplitLogic, comboAutoSplitPref.SelectedIndex)
                | Prefs.UpdateInt(PrefName.PayPlansVersion, comboPayPlansVersion.SelectedIndex + 1)
                | Prefs.UpdateInt(PrefName.PaymentClinicSetting, comboPaymentClinicSetting.SelectedIndex)
                | Prefs.UpdateInt(PrefName.PatientSelectSearchMinChars, PIn.Int(textPatSelectMinChars.Text))
                | Prefs.UpdateInt(PrefName.PatientSelectSearchPauseMs, PIn.Int(textPatSelectPauseMs.Text))
                | Prefs.UpdateBool(PrefName.PatientSelectFilterRestrictedClinics, checkPatientSelectFilterRestrictedClinics.Checked)
                )
            {
                hasChanges = true;
            }
            if (checkPatSearchEmptyParams.CheckState != CheckState.Indeterminate)
            {
                hasChanges |= Prefs.UpdateInt(PrefName.PatientSelectSearchWithEmptyParams, (int)(checkPatSearchEmptyParams.Checked ? YN.Yes : YN.No));
            }
            if (checkUsePhoneNumTable.CheckState != CheckState.Indeterminate)
            {
                hasChanges |= Prefs.UpdateYN(PrefName.PatientPhoneUsePhonenumberTable, checkUsePhoneNumTable.Checked ? YN.Yes : YN.No);
            }
            int prefRigorousAccounting = PrefC.GetInt(PrefName.RigorousAccounting);

            //Copied logging for RigorousAccounting and RigorousAdjustments from FormModuleSetup.
            if (Prefs.UpdateInt(PrefName.RigorousAccounting, comboRigorousAccounting.SelectedIndex))
            {
                hasChanges = true;
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Rigorous accounting changed from " +
                                          ((RigorousAccounting)prefRigorousAccounting).GetDescription() + " to "
                                          + ((RigorousAccounting)comboRigorousAccounting.SelectedIndex).GetDescription() + ".");
            }
            int prefRigorousAdjustments = PrefC.GetInt(PrefName.RigorousAdjustments);

            if (Prefs.UpdateInt(PrefName.RigorousAdjustments, comboRigorousAdjustments.SelectedIndex))
            {
                hasChanges = true;
                SecurityLogs.MakeLogEntry(Permissions.Setup, 0, "Rigorous adjustments changed from " +
                                          ((RigorousAdjustments)prefRigorousAdjustments).GetDescription() + " to "
                                          + ((RigorousAdjustments)comboRigorousAdjustments.SelectedIndex).GetDescription() + ".");
            }
            hasChanges |= UpdateReportingServer();
            hasChanges |= UpdateClaimSnapshotRuntime();
            hasChanges |= UpdateClaimSnapshotTrigger();
            if (hasChanges)
            {
                DataValid.SetInvalid(InvalidType.Prefs);
            }
        }