Ejemplo n.º 1
0
        private void Run(bool isCheck)
        {
            Cursor = Cursors.WaitCursor;
            bool          verbose = checkShow.Checked;
            StringBuilder strB    = new StringBuilder();

            strB.Append('-', 65);
            textLog.Text = DateTime.Now.ToString() + strB.ToString() + "\r\n";
            Application.DoEvents();
//#if DEBUG
//      textLog.Text+=DatabaseMaintenance.AppointmentSpecialCharactersInNotes(verbose,isCheck);
//      Application.DoEvents();
//      textLog.Text+=Lan.g("FormDatabaseMaintenance","Done");
//      SaveLogToFile();
//      Cursor=Cursors.Default;
//      return;
//#endif
            textLog.Text += DatabaseMaintenance.MySQLTables(verbose, isCheck);
            if (!DatabaseMaintenance.GetSuccess())
            {
                Cursor = Cursors.Default;
                return;
            }
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.DatesNoZeros(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.DecimalValues(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.SpecialCharactersInNotes(verbose, isCheck);
            Application.DoEvents();
            //Now, methods that apply to specific tables----------------------------------------------------------------------------
            textLog.Text += DatabaseMaintenance.AppointmentCompleteWithTpAttached(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AppointmentsNoPattern(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AppointmentsNoDateOrProcs(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AppointmentsNoPatients(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AppoitmentNoteTooManyNewLines(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AppointmentPlannedNoPlannedApt(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AppointmentScheduledWithCompletedProcs(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AutoCodeItemsWithNoAutoCode(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AutoCodesDeleteWithNoItems(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.AutomationTriggersWithNoSheetDefs(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.BillingTypesInvalid(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.CanadaCarriersCdaMissingInfo(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimDeleteWithNoClaimProcs(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimWithInvalidInsSubNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimWithInvalidPatNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimWriteoffSum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimPaymentCheckAmt(verbose, isCheck);         //also fixes resulting deposit misbalances.
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimPaymentDetachMissingDeposit(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcDateNotMatchCapComplete(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcDateNotMatchPayment(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcWithInvalidClaimNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcDeleteDuplicateEstimateForSameInsPlan(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcDeleteWithInvalidClaimNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcDeleteMismatchPatNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcDeleteEstimateWithInvalidProcNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcDeleteCapEstimateWithProcComplete(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcEstNoBillIns(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcEstWithInsPaidAmt(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcPatNumMissing(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcProvNumMissing(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcPreauthNotMatchClaim(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcStatusNotMatchClaim(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcWithInvalidClaimPaymentNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClaimProcWriteOffNegative(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ClockEventInFuture(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.DocumentWithNoCategory(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.EduResourceInvalidDiseaseDefNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.FeeDeleteDuplicates(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.GroupNoteWithInvalidAptNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.GroupNoteWithInvalidProcStatus(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.InsPlanInvalidCarrier(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.InsPlanNoClaimForm(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.InsPlanInvalidNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.InsSubInvalidSubscriber(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.InsSubNumMismatchPlanNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.JournalEntryInvalidAccountNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.LabCaseWithInvalidLaboratory(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.LaboratoryWithInvalidSlip(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.MedicationPatDeleteWithInvalidMedNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.MessageButtonDuplicateButtonIndex(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatFieldsDeleteDuplicates(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatientBadGuarantor(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatientBadGuarantorWithAnotherGuarantor(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatientDeletedWithClinicNumSet(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatientsNoClinicSet(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatientPriProvHidden(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatientPriProvMissing(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatientUnDeleteWithBalance(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatPlanDeleteWithInvalidInsSubNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatPlanDeleteWithInvalidPatNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatPlanOrdinalDuplicates(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatPlanOrdinalZeroToOne(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PatPlanOrdinalTwoToOne(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PaymentDetachMissingDeposit(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PaymentMissingPaySplit(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PayPlanChargeGuarantorMatch(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PayPlanChargeProvNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PayPlanSetGuarantorToPatForIns(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PaySplitWithInvalidPayNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PaySplitWithInvalidPayPlanNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PaySplitAttachedToPayPlan(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PerioMeasureWithInvalidIntTooth(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PreferenceAllergiesIndicateNone(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PreferenceDateDepositsStarted(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PreferenceMedicationsIndicateNone(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PreferenceProblemsIndicateNone(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PreferenceTimeCardOvertimeFirstDayOfWeek(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.PreferencePracticeProv(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcButtonItemsDeleteWithInvalidAutoCode(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurecodeCategoryNotSet(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogAttachedToApptWithProcStatusDeleted(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogAttachedToWrongAppts(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogAttachedToWrongApptDate(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogBaseUnitsZero(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogCodeNumInvalid(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogLabAttachedToDeletedProc(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogProvNumMissing(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogToothNums(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogTpAttachedToClaim(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogTpAttachedToCompleteLabFeesCanada(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProcedurelogUnitQtyZero(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProviderHiddenWithClaimPayments(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.ProviderWithInvalidFeeSched(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.RecallDuplicatesWarn(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.RecallTriggerDeleteBadCodeNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.RefAttachDeleteWithInvalidReferral(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.SchedulesDeleteHiddenProviders(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.SchedulesDeleteShort(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.SchedulesDeleteProvClosed(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.SignalInFuture(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.StatementDateRangeMax(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.TaskSubscriptionsInvalid(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.TimeCardRuleEmployeeNumInvalid(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.UserodDuplicateUser(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.UserodInvalidClinicNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += DatabaseMaintenance.UserodInvalidUserGroupNum(verbose, isCheck);
            Application.DoEvents();
            textLog.Text += Lan.g("FormDatabaseMaintenance", "Done");
            SaveLogToFile();
            Cursor = Cursors.Default;
        }