示例#1
0
        private void FillObjects()
        {
            textResults.Text = "";
            Application.DoEvents();
            Cursor = Cursors.WaitCursor;
            if (!DatabaseTools.SetDbConnection("canadatest"))             //if database doesn't exist
            //MessageBox.Show("Database canadatest does not exist.");
            {
                DatabaseTools.SetDbConnection("");
                textResults.Text += DatabaseTools.FreshFromDump();              //this also sets database to be unittest.
            }
            else
            {
                textResults.Text += DatabaseTools.ClearDb();
            }
            Prefs.RefreshCache();
            List <Userod> listUsers = Userods.GetAll();

            Security.CurUser  = listUsers[0];
            textResults.Text += ProviderTC.SetInitialProviders();
            Application.DoEvents();
            textResults.Text += CarrierTC.SetInitialCarriers();
            Application.DoEvents();
            textResults.Text += PatientTC.SetInitialPatients();
            Application.DoEvents();
            textResults.Text += ClaimTC.CreateAllClaims();
            Application.DoEvents();
            textResults.Text += PredeterminationTC.CreateAllPredeterminations();
            Application.DoEvents();
        }
示例#2
0
        private void butScripts_Click(object sender, EventArgs e)
        {
            if (textSingleScript.Text == "")
            {
                MessageBox.Show("Please enter a script number first.");
                return;
            }
            int singleScript = 0;

            try{
                singleScript = PIn.Int(textSingleScript.Text);
                if (singleScript == 0)
                {
                    MessageBox.Show("Invalid number.");
                    return;
                }
            }
            catch {
                MessageBox.Show("Invalid number.");
                return;
            }
            int checkedCount = 0;

            if (checkEligibility.Checked)
            {
                checkedCount++;
            }
            if (checkClaims.Checked)
            {
                checkedCount++;
            }
            if (checkClaimReversals.Checked)
            {
                checkedCount++;
            }
            if (checkOutstanding.Checked)
            {
                checkedCount++;
            }
            if (checkPredeterm.Checked)
            {
                checkedCount++;
            }
            if (checkPayReconcil.Checked)
            {
                checkedCount++;
            }
            if (checkSumReconcil.Checked)
            {
                checkedCount++;
            }
            if (checkedCount == 0)
            {
                MessageBox.Show("Please select a category.");
                return;
            }
            FillObjects();
            textResults.Text += "---------------------------------------\r\n";
            Application.DoEvents();
            if (checkEligibility.Checked)
            {
                if (singleScript == 1)
                {
                    textResults.Text += Eligibility.RunOne(checkShowForms.Checked);
                }
                else if (singleScript == 2)
                {
                    textResults.Text += Eligibility.RunTwo(checkShowForms.Checked);
                }
                else if (singleScript == 3)
                {
                    textResults.Text += Eligibility.RunThree(checkShowForms.Checked);
                }
                else if (singleScript == 4)
                {
                    textResults.Text += Eligibility.RunFour(checkShowForms.Checked);
                }
                else if (singleScript == 5)
                {
                    textResults.Text += Eligibility.RunFive(checkShowForms.Checked);
                }
                else if (singleScript == 6)
                {
                    textResults.Text += Eligibility.RunSix(checkShowForms.Checked);
                }
                else
                {
                    MessageBox.Show("Script number not found.");
                    return;
                }
            }
            if (checkClaims.Checked)
            {
                if (singleScript == 1)
                {
                    textResults.Text += ClaimTC.RunOne(checkShowForms.Checked);
                }
                else if (singleScript == 2)
                {
                    textResults.Text += ClaimTC.RunTwo(checkShowForms.Checked);
                }
                else if (singleScript == 3)
                {
                    textResults.Text += ClaimTC.RunThree(checkShowForms.Checked);
                }
                else if (singleScript == 4)
                {
                    textResults.Text += ClaimTC.RunFour(checkShowForms.Checked);
                }
                else if (singleScript == 5)
                {
                    textResults.Text += ClaimTC.RunFive(checkShowForms.Checked);
                }
                else if (singleScript == 6)
                {
                    textResults.Text += ClaimTC.RunSix(checkShowForms.Checked);
                }
                else if (singleScript == 7)
                {
                    textResults.Text += ClaimTC.RunSeven(checkShowForms.Checked);
                }
                else if (singleScript == 8)
                {
                    textResults.Text += ClaimTC.RunEight(checkShowForms.Checked);
                }
                else if (singleScript == 9)
                {
                    textResults.Text += ClaimTC.RunNine(checkShowForms.Checked);
                }
                else if (singleScript == 10)
                {
                    textResults.Text += ClaimTC.RunTen(checkShowForms.Checked);
                }
                else if (singleScript == 11)
                {
                    textResults.Text += ClaimTC.RunEleven(checkShowForms.Checked);
                }
                else if (singleScript == 12)
                {
                    textResults.Text += ClaimTC.RunTwelve(checkShowForms.Checked);
                }
                else
                {
                    MessageBox.Show("Script number not found (not implemented yet).");
                    return;
                }
            }
            if (checkClaimReversals.Checked)
            {
                if (singleScript == 1)
                {
                    textResults.Text += Reversal.RunOne();
                }
                else if (singleScript == 2)
                {
                    textResults.Text += Reversal.RunTwo();
                }
                else if (singleScript == 3)
                {
                    textResults.Text += Reversal.RunThree();
                }
                else if (singleScript == 4)
                {
                    textResults.Text += Reversal.RunFour();
                }
                else
                {
                    MessageBox.Show("Script number not found (not implemented yet).");
                    return;
                }
            }
            if (checkOutstanding.Checked)
            {
                if (singleScript == 1)
                {
                    textResults.Text += OutstandingTrans.RunOne();
                }
                else if (singleScript == 2)
                {
                    textResults.Text += OutstandingTrans.RunTwo();
                }
                else if (singleScript == 3)
                {
                    textResults.Text += OutstandingTrans.RunThree();
                }
                else
                {
                    MessageBox.Show("Script number not found (not implemented yet).");
                    return;
                }
            }
            if (checkPredeterm.Checked)
            {
                if (singleScript == 1)
                {
                    textResults.Text += PredeterminationTC.RunOne(checkShowForms.Checked);
                }
                else if (singleScript == 2)
                {
                    textResults.Text += PredeterminationTC.RunTwo(checkShowForms.Checked);
                }
                else if (singleScript == 3)
                {
                    textResults.Text += PredeterminationTC.RunThree(checkShowForms.Checked);
                }
                else if (singleScript == 4)
                {
                    textResults.Text += PredeterminationTC.RunFour(checkShowForms.Checked);
                }
                else if (singleScript == 5)
                {
                    textResults.Text += PredeterminationTC.RunFive(checkShowForms.Checked);
                }
                else if (singleScript == 6)
                {
                    textResults.Text += PredeterminationTC.RunSix(checkShowForms.Checked);
                }
                else if (singleScript == 7)
                {
                    textResults.Text += PredeterminationTC.RunSeven(checkShowForms.Checked);
                }
                else if (singleScript == 8)
                {
                    textResults.Text += PredeterminationTC.RunEight(checkShowForms.Checked);
                }
                else
                {
                    MessageBox.Show("Script number not found (not implemented yet).");
                    return;
                }
            }
            if (checkPayReconcil.Checked)
            {
                if (singleScript == 1)
                {
                    textResults.Text += PaymentReconciliation.RunOne();
                }
                else if (singleScript == 2)
                {
                    textResults.Text += PaymentReconciliation.RunTwo();
                }
                else if (singleScript == 3)
                {
                    textResults.Text += PaymentReconciliation.RunThree();
                }
                else
                {
                    MessageBox.Show("Script number not found (not implemented yet).");
                    return;
                }
            }
            if (checkSumReconcil.Checked)
            {
                if (singleScript == 1)
                {
                    textResults.Text += SummaryReconciliation.RunOne();
                }
                else if (singleScript == 2)
                {
                    textResults.Text += SummaryReconciliation.RunTwo();
                }
                else if (singleScript == 3)
                {
                    textResults.Text += SummaryReconciliation.RunThree();
                }
                else
                {
                    MessageBox.Show("Script number not found (not implemented yet).");
                    return;
                }
            }
            textResults.Text += "Done.";
            Cursor            = Cursors.Default;
        }