コード例 #1
0
        private void getCPTsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            myexcelfile1 = new excelfile(addressofexcelfile);
            int l = 1;

            while (l <= myexcelfile1.getlastrow())
            {
                string orcode = myexcelfile1.GetCellValue(string.Concat("h", l));
                {
                    string cptcode = "";
                    switch (orcode)
                    {
                    case ("1670"):
                        cptcode = "61140";
                        break;

                    case ("1134"):
                        cptcode = "61313";
                        break;

                    case ("1133"):
                        cptcode = "62140";
                        break;

                    case ("1132"):
                        cptcode = "61697";     //this is Leurssen, Bollo not available
                        break;

                    case ("1022"):
                        cptcode = "61312";
                        break;

                    case ("1346"):
                        cptcode = "61510";
                        break;

                    case ("1200"):
                        cptcode = "63081";
                        break;

                    case ("1775"):
                        cptcode = "22548";
                        break;

                    case ("1469"):
                        cptcode = "22600";
                        break;

                    case ("1202"):
                        cptcode = "61548";
                        break;

                    case ("1279"):
                        cptcode = "61885";
                        break;

                    case ("1163"):
                        cptcode = "63001";
                        break;

                    case ("1434"):
                        cptcode = "22808";
                        break;

                    case ("2008"):
                        cptcode = "22612";
                        break;

                    case ("1199"):
                        cptcode = "63005";
                        break;

                    case ("1501"):
                        cptcode = "62161";
                        break;

                    case ("1164"):
                        cptcode = "62223";
                        break;

                    case ("1402"):
                        cptcode = "61312";
                        break;

                    case ("1158"):
                        cptcode = "31600";
                        break;

                    case ("1165"):
                        cptcode = "62200";
                        break;
                    }
                    myexcelfile1.WriteCell(string.Concat("j", l), cptcode);
                    l++;
                }
            }
            myexcelfile1.closefile();
            MessageBox.Show("CPT Codes updated");
        }
コード例 #2
0
        private void submitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //            HtmlDocument acgmedocument = acgmeWebBrowser.Document;
            //            HtmlElement submitbutton = acgmedocument.GetElementById("submitButton");
            if (j == 0)
            {
                myexcelfile2 = new excelfile(addressofexcelfile);
            }

            else if (j == totalnumberofcases)
            {
                myexcelfile2.closefile();
                MessageBox.Show("Done");
                return;
            }

            j = j + 1;
            //              submitbutton.InvokeMember("click");
            label1.Visible = true;
            label1.Text    = j + " / " + totalnumberofcases.ToString();

            HtmlDocument acgmedocument = acgmeWebBrowser.Document;
            HtmlElement  institution   = acgmedocument.GetElementById("Institutions");
            HtmlElement  attending     = acgmedocument.GetElementById("Attendings");
            HtmlElement  adultorped    = acgmedocument.GetElementById("PatientTypes");
            HtmlElement  gender        = acgmedocument.GetElementById("Genders");
            HtmlElement  date          = acgmedocument.GetElementById("ProcedureDate");
            HtmlElement  residentroles = acgmedocument.GetElementById("ResidentRoles");
            HtmlElement  comments      = acgmedocument.GetElementById("Comments");
            HtmlElement  patientid     = acgmedocument.GetElementById("PatientId");
            HtmlElement  residentyear  = acgmedocument.GetElementById("ProcedureYear");
            HtmlElement  cptid         = acgmedocument.GetElementById("Code");

            institution.SetAttribute("value", "13233");
            //              attending.SetAttribute("value", "26518");
            adultorped.SetAttribute("value", "69");
            residentyear.SetAttribute("value", residentpgyyear);
            residentroles.SetAttribute("value", residentrole);


            double   d_date = double.Parse(myexcelfile2.GetCellValue("a" + j.ToString()));
            DateTime conv   = DateTime.FromOADate(d_date);

            date.SetAttribute("value", conv.ToShortDateString());
            gender.SetAttribute("value", myexcelfile2.GetCellValue("f" + j.ToString()));
            comments.SetAttribute("value", myexcelfile2.GetCellValue("g" + j.ToString()));
            patientid.SetAttribute("value", myexcelfile2.GetCellValue("d" + j.ToString()));
            cptid.SetAttribute("value", myexcelfile2.GetCellValue("j" + j.ToString()));
            string attendingsurgeon = myexcelfile2.GetCellValue("i" + j.ToString());
            string attendingcode    = "26518";

            switch (attendingsurgeon)
            {
            case ("Jea"):
                attendingcode = "6149";
                break;

            case ("Dauser"):
                attendingcode = "49221";
                break;

            case ("Whitehead"):
                attendingcode = "28279";
                break;

            case ("Bollo"):
                attendingcode = "165100";         //this is Leurssen, Bollo not available
                break;

            case ("Curry"):
                attendingcode = "19065";
                break;

            case ("Yoshor"):
                attendingcode = "17692";
                break;

            case ("Ehni"):
                attendingcode = "60345";
                break;

            case ("Gopinath"):
                attendingcode = "26518";
                break;

            case ("Patel"):
                attendingcode = "359394";
                break;

            case ("Fuentes"):
                attendingcode = "353465";
                break;

            case ("Ropper"):
                attendingcode = "385016";
                break;
            }
            attending.SetAttribute("value", attendingcode);
            cptid.SetAttribute("value", myexcelfile2.GetCellValue("j" + j.ToString()));
            acgmedocument.GetElementById("searchByCodeButton").InvokeMember("click");
            findelementbytextname("Code", acgmedocument).InvokeMember("click");

            //Sen Mode Activated
            if (issenmodeactivated)
            {
                whereami          = "addingcptcode";
                newtimer          = new System.Windows.Forms.Timer();
                newtimer.Interval = 1000;
                newtimer.Start();
                newtimer.Tick += new EventHandler(newtimer_Tick);
            }
        }