コード例 #1
0
ファイル: FormTestCanada.cs プロジェクト: royedwards/DRDNet
        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
ファイル: FormTestCanada.cs プロジェクト: royedwards/DRDNet
 private void butNewDb_Click(object sender, EventArgs e)
 {
     textResults.Text = "";
     Application.DoEvents();
     Cursor = Cursors.WaitCursor;
     if (!DatabaseTools.SetDbConnection(""))
     {
         MessageBox.Show("Could not connect");
         return;
     }
     DatabaseTools.FreshFromDump();
     textResults.Text += "Fresh database loaded from sql dump.";
     Cursor            = Cursors.Default;
 }
コード例 #3
0
ファイル: FormTestCanada.cs プロジェクト: royedwards/DRDNet
 private void butClear_Click(object sender, EventArgs e)
 {
     textResults.Text = "";
     Application.DoEvents();
     Cursor = Cursors.WaitCursor;
     if (!DatabaseTools.SetDbConnection(dbname))             //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.
     }
     textResults.Text += DatabaseTools.ClearDb();
     textResults.Text += "Done.";
     Cursor            = Cursors.Default;
 }
コード例 #4
0
ファイル: FormTestCanada.cs プロジェクト: royedwards/DRDNet
        private void butShowEtrans_Click(object sender, EventArgs e)
        {
            if (!checkClaims.Checked)
            {
                MessageBox.Show("Only works for claims right now.");
                return;
            }
            //In case the form was just opened
            DatabaseTools.SetDbConnection(dbname);
            int    scriptNum = PIn.Int(textSingleScript.Text);
            long   patNum    = 0;
            double claimFee  = 0;
            string predeterm = "";

            switch (scriptNum)
            {
            case 1:
                patNum   = Patients.GetPatNumByNameAndBirthday("Fête", "Lisa", new DateTime(1960, 4, 12));
                claimFee = 222.35;
                break;

            case 2:
                patNum   = Patients.GetPatNumByNameAndBirthday("Fête", "Lisa", new DateTime(1960, 4, 12));
                claimFee = 1254.85;
                break;

            case 3:
                patNum   = Patients.GetPatNumByNameAndBirthday("Smith", "John", new DateTime(1948, 3, 2));
                claimFee = 439.55;
                break;

            case 4:
                patNum   = Patients.GetPatNumByNameAndBirthday("Smith", "John", new DateTime(1988, 11, 2));
                claimFee = 222.35;
                break;

            case 5:
                patNum   = Patients.GetPatNumByNameAndBirthday("Howard", "Bob", new DateTime(1964, 5, 16));
                claimFee = 222.35;
                break;

            case 6:
                patNum   = Patients.GetPatNumByNameAndBirthday("Howard", "Bob", new DateTime(1964, 5, 16));
                claimFee = 232.35;
                break;

            case 7:
                patNum    = Patients.GetPatNumByNameAndBirthday("Howard", "Bob", new DateTime(1964, 5, 16));
                claimFee  = 232.35;
                predeterm = "PD78901234";
                break;

            case 8:
                patNum   = Patients.GetPatNumByNameAndBirthday("West", "Martha", new DateTime(1954, 12, 25));
                claimFee = 565.35;
                break;

            case 9:
                patNum   = Patients.GetPatNumByNameAndBirthday("Arpège", "Madeleine", new DateTime(1940, 5, 1));
                claimFee = 527.35;
                break;
            }
            List <Claim> claimList = Claims.Refresh(patNum);
            Claim        claim     = null;

            for (int i = 0; i < claimList.Count; i++)
            {
                if (claimList[i].ClaimFee == claimFee && claimList[i].PreAuthString == predeterm)
                {
                    claim = claimList[i];
                }
            }
            if (claim == null)
            {
                MessageBox.Show("Claim not found.");
                return;
            }
            List <Etrans> etransList = Etranss.GetHistoryOneClaim(claim.ClaimNum);

            if (etransList.Count == 0)
            {
                MessageBox.Show("No history found of sent e-claim.");
                return;
            }
            FormEtransEdit FormE = new FormEtransEdit();

            FormE.EtransCur = etransList[0];
            FormE.ShowDialog();
        }