Exemplo n.º 1
0
        public static bool PRAP_NewClaimSearch(SHDocVw.InternetExplorer wb, SHDocVw.ShellWindows shells, string Dcn)
        {
            if (wb != null)
            {
                mshtml.HTMLDocument iePrapDoc = wb.Document;

                mshtml.HTMLInputElement prapDCNinput = null;

                iePrapDoc.getElementById("advancedSearch").click();

                while (IELib.IEGet(shells, "Advanced Search") == null)
                {
                }

                wb = IELib.IEGet(shells, "Advanced Search");
                IELib.IeWait(wb);
                iePrapDoc = wb.Document;

                int timeOutCounter = 0;
                while (prapDCNinput == null)
                {
                    prapDCNinput = iePrapDoc.getElementsByName("documentControlNumber").item(0);
                    timeOutCounter++;
                    if (timeOutCounter == 50)
                    {
                        PRAP_Functions.PRAP_CloseWindows(shells); return(false);
                    }
                }

                try { prapDCNinput.value = "0201" + Dcn; } catch (Exception) { PRAP_Functions.PRAP_CloseWindows(shells); return(false); }

                try { iePrapDoc.getElementById("searchButn").click(); } catch (Exception) { PRAP_Functions.PRAP_CloseWindows(shells); return(false); }

                while (IELib.IEGet(shells, "Search Results") == null)
                {
                }

                wb        = IELib.IEGet(shells, "Search Results");
                iePrapDoc = wb.Document;
                foreach (mshtml.IHTMLElement a in iePrapDoc.getElementsByTagName("a"))
                {
                    if (a.innerText == "0201" + Dcn)
                    {
                        a.click();
                    }
                }

                while (IELib.IEGet(shells, "Claim Inquiry Details") == null)
                {
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }
Exemplo n.º 2
0
 public static void PRAP_Login(SHDocVw.InternetExplorer wb, string p) //Start back here
 {
     mshtml.HTMLDocument      wbDoc = wb.Document;
     mshtml.HTMLButtonElement wbButton;
     wbDoc.getElementById("user-name").innerText = System.Environment.UserName;
     wbDoc.getElementById("password").innerText  = p;
     wbButton = wbDoc.getElementsByTagName("button").item(0);
     try { wbButton.click(); } catch (Exception) { }
     IELib.IeWait(wb);
 }
Exemplo n.º 3
0
 public static void PRAP_Begin(string DCN, string pass)
 {
     // Checks the IE shells and if Prap does not exist, it will open a new instance of the login screen. it then logs in
     SHDocVw.ShellWindows     shellWindows = new SHDocVw.ShellWindows();
     SHDocVw.InternetExplorer iePRAP       = IELib.IEGet(shellWindows, "Statistics Header");
     if (iePRAP == null)
     {
         iePRAP = IELib.IEGet(shellWindows, "");
         if (iePRAP == null)
         {
             IELib.NewBrowser(shellWindows, "", "");
             iePRAP = IELib.IEGet(shellWindows, "");
         }
         IELib.IeWait(iePRAP);
         PRAP_Login(iePRAP, pass);
     }
 }
Exemplo n.º 4
0
 public static void PRAP_ResetSearch(SHDocVw.InternetExplorer wb, SHDocVw.ShellWindows shells)
 {
     wb.Quit();
     foreach (SHDocVw.InternetExplorer ie in shells)
     {
         if (ie.LocationName == "Search Results")
         {
             wb = IELib.IEGet(shells, "Search Results");
             if (wb != null)
             {
                 mshtml.HTMLDocument wbDoc = wb.Document;
                 foreach (mshtml.IHTMLElement elem in wbDoc.getElementsByTagName("a"))
                 {
                     if (elem.innerText == "Return to Search")
                     {
                         elem.click();
                         IELib.IeWait(ie);
                     }
                 }
             }
         }
     }
 }
Exemplo n.º 5
0
        public PRAP_Functions()
        {
            ChromeOptions option = new ChromeOptions();
            //option.AddArgument("--headless");

            IWebDriver  driver = new ChromeDriver(option);
            IWebElement elem;
            ICollection <IWebElement> elemList;

            string url = "";

            driver.Navigate().GoToUrl(url);

            Console.WriteLine(driver.Title);
            if (driver.Title == "Enterprise Authentication and Authorication (\"EAA\") - Common Login Page")
            {
                elem = driver.FindElement(By.Name("USER"));
                elem.SendKeys(System.Environment.UserName);
                elem = driver.FindElement(By.Name("PASSWORD"));
                elem.SendKeys(Sessions.GuiSession.myPassword);
                elemList = driver.FindElements(By.TagName("input"));
                foreach (IWebElement e in elemList)
                {
                    if (e.GetAttribute("alt") == "Log In")
                    {
                        e.Click();
                        break;
                    }
                }
            }
            elem = driver.FindElement(By.Id("advancedSearch"));
            elem.Click();
            driver.Navigate().GoToUrl("");

            elem = driver.FindElement(By.Name("documentControlNumber"));
            elem.SendKeys("0201" + IndexedClaim.guiFuncDcn);
            elem = driver.FindElement(By.Id("searchButn"));
            elem.Click();

            elemList = driver.FindElements(By.TagName("a"));
            foreach (IWebElement e in elemList)
            {
                if (inString("0201" + IndexedClaim.guiFuncDcn, e.Text))
                {
                    e.Click();
                    break;
                }
            }

            Console.WriteLine(driver.Title);

            string BaseWindow = driver.CurrentWindowHandle;
            ReadOnlyCollection <string> handles = driver.WindowHandles;

            foreach (string handle in handles)
            {
                if (handle != BaseWindow)
                {
                    string title = driver.SwitchTo().Window(handle).Title;
                    driver.SwitchTo().Window(handle).Title.Equals(title);
                }
            }
            System.Threading.Thread.Sleep(3000);
            Console.WriteLine(driver.Title);


            ICollection <IWebElement> LosTables = driver.FindElements(By.ClassName("los"));

            prapAuthCode = PRAP_Chrome_FindElementInElement(LosTables, "Treatment Authorization Code:", "td");

            elem = driver.FindElement(By.Id("tab3"));
            elem.Click();

            onsetDate = PRAP_Chrome_FindElementInElement(LosTables, "Onset Date:", "td");


            //prapAuthCode = PRAP_Chrome_FindElementInList(driver, "Treatment Authorization Code:", "td");
            //onsetDate = PRAP_Chrome_FindElementInList(driver, "Onset Date:", "td");
            elem = driver.FindElement(By.Id("tab2"));
            elem.Click();

            string[] ElementsList = new string[]
            {
                "Rendering Provider NPI:",
                "Rendering Provider Name:",
                "Rendering Provider Number:",
                "Rendering Provider Address:",
                "Billing Provider NPI: ",
                "Service Facility Location Name: ",
                "Service Facility Location Address: ",
                "Billing Provider Number: ",
                "Billing Provider NPI: ",
                "Billing Provider Address: ",
                "Billing Provider Name: "
            };
            Console.WriteLine("1");
            //PRAP_Chrome_FindListElementsInElement(LosTables, ElementsList, "td");
            //PRAP_Chrome_FindListElements(driver, ElementsList, "td");
            elemList = driver.FindElements(By.Id("claimTab2"));

            prapRendProvNPI     = PRAP_Chrome_FindElementInElement(elemList, "Rendering Provider NPI:", "td");
            prapRenderingNPI    = prapRendProvNPI;
            prapRendProvName    = PRAP_Chrome_FindElementInElement(elemList, "Rendering Provider Name:", "td");
            prapRendProvPFIN    = PRAP_Chrome_FindElementInElement(elemList, "Rendering Provider Number:", "td");
            prapRendProvAddr    = PRAP_Chrome_FindElementInElement(elemList, "Rendering Provider Address:", "td");
            prapFacilityNPI     = PRAP_Chrome_FindElementInElement(elemList, "Billing Provider NPI:", "td");
            prapFacilityName    = PRAP_Chrome_FindElementInElement(elemList, "Service Facility Location Name:", "td");
            prapFacilityAddress = PRAP_Chrome_FindElementInElement(elemList, "Service Facility Location Address:", "td");
            prapBillingProvPFIN = PRAP_Chrome_FindElementInElement(elemList, "Billing Provider Number:", "td");
            prapBillingProvNPI  = PRAP_Chrome_FindElementInElement(elemList, "Billing Provider NPI:", "td");
            prapBillingProvAddr = PRAP_Chrome_FindElementInElement(elemList, "Billing Provider Address:", "td");
            prapBillingProvName = PRAP_Chrome_FindElementInElement(elemList, "Billing Provider Name:", "td");

            Console.WriteLine("2");

            /*
             * prapRendProvNPI = PRAP_Chrome_FindElementInList(driver, "Rendering Provider NPI:", "td");
             * prapRenderingNPI = prapRendProvNPI;
             * prapRendProvName = PRAP_Chrome_FindElementInList(driver, "Rendering Provider Name:", "td");
             * prapRendProvPFIN = PRAP_Chrome_FindElementInList(driver, "Rendering Provider Number:", "td");
             * prapRendProvAddr = PRAP_Chrome_FindElementInList(driver, "Rendering Provider Address:", "td");
             * prapFacilityNPI = PRAP_Chrome_FindElementInList(driver, "Billing Provider NPI: ", "td");
             * prapFacilityName = PRAP_Chrome_FindElementInList(driver, "Service Facility Location Name: ", "td");
             * prapFacilityAddress = PRAP_Chrome_FindElementInList(driver, "Service Facility Location Address: ", "td");
             * prapBillingProvPFIN = PRAP_Chrome_FindElementInList(driver, "Billing Provider Number: ", "td");
             * prapBillingProvNPI = PRAP_Chrome_FindElementInList(driver, "Billing Provider NPI: ", "td");
             * prapBillingProvAddr = PRAP_Chrome_FindElementInList(driver, "Billing Provider Address: ", "td");
             * prapBillingProvName = PRAP_Chrome_FindElementInList(driver, "Billing Provider Name: ", "td");
             */
            //prapOtherInsProvName = PRAP_Chrome_FindElementInList(driver, "Billing Provider Name: ", "td");

            driver.Close();
            return;

            //******************************Old**********************************
            SHDocVw.ShellWindows shells = new SHDocVw.ShellWindows();
            PRAP_Begin(IndexedClaim.guiFuncDcn, Sessions.GuiSession.myPassword);
            SHDocVw.InternetExplorer iePrap = IELib.IEGet(shells, "Statistics Header");
            while (iePrap == null)
            {
                iePrap = IELib.IEGet(shells, "Statistics Header");
                if (iePrap != null)
                {
                    break;
                }
            }
            IELib.IeWait(iePrap);
            Console.WriteLine("!!!: " + IndexedClaim.guiFuncDcn);
            PRAP_NewClaimSearch(iePrap, shells, IndexedClaim.guiFuncDcn);
            iePrap = IELib.IEGet(shells, "Claim Inquiry Details");
            if (iePrap != null)
            {
                prapAuthCode = PRAP_GetAuthCode(iePrap, shells);
                PRAP_GetOnsetDate(iePrap, shells);
                prapOtherInsProvName = PRAP_GetOtherInsurancePaymentName(iePrap, shells);
                prapAuthCode         = PRAP_GetAuthCode(iePrap, shells);
                prapRendProvNPI      = PRAP_GetProviderInfo(iePrap, shells, "Rendering Provider NPI:", "0201" + IndexedClaim.guiFuncDcn);
                prapRenderingNPI     = prapRendProvNPI;
                prapRendProvName     = PRAP_GetProviderInfo(iePrap, shells, "Rendering Provider Name:", "0201" + IndexedClaim.guiFuncDcn);
                prapFacilityNPI      = PRAP_GetProviderInfo(iePrap, shells, "Billing Provider NPI:", "0201" + IndexedClaim.guiFuncDcn);
                prapFacilityName     = PRAP_GetProviderInfo(iePrap, shells, "Service Facility Location Name:", "0201" + IndexedClaim.guiFuncDcn);
                prapFacilityAddress  = PRAP_GetProviderInfo(iePrap, shells, "Service Facility Location Address:", "0201" + IndexedClaim.guiFuncDcn);
                prapBillingProvPFIN  = PRAP_GetProviderInfo(iePrap, shells, "Billing Provider Number:", "0201" + IndexedClaim.guiFuncDcn);
                prapBillingProvNPI   = PRAP_GetProviderInfo(iePrap, shells, "Billing Provider NPI:", "0201" + IndexedClaim.guiFuncDcn);
                prapBillingProvAddr  = PRAP_GetProviderInfo(iePrap, shells, "Billing Provider Address:", "0201" + IndexedClaim.guiFuncDcn);
                prapBillingProvName  = PRAP_GetProviderInfo(iePrap, shells, "Billing Provider Name:", "0201" + IndexedClaim.guiFuncDcn);
                prapRendProvPFIN     = PRAP_GetProviderInfo(iePrap, shells, "Rendering Provider Number:", "0201" + IndexedClaim.guiFuncDcn);
                prapRendProvAddr     = PRAP_GetProviderInfo(iePrap, shells, "Rendering Provider Address:", "0201" + IndexedClaim.guiFuncDcn);
            }

            /*
             * if (PRAP_NewClaimSearch(iePrap, shells, IndexedClaim.guiFuncDcn) != false)
             * {
             *  iePrap = IELib.IEGet(shells, "Claim Inquiry Details");
             *  if (iePrap != null)
             *  {
             *      Console.WriteLine("PRAP 1");
             *      prapAuthCode = PRAP_GetAuthCode(iePrap, shells);
             *      PRAP_GetOnsetDate(iePrap, shells);
             *      Console.WriteLine("PRAP 2");
             *      PRAP_GetOtherInsurancePaymentBool(iePrap, shells); Console.WriteLine("PRAP 3");
             *  }
             * }
             */
            PRAP_CloseWindows(shells);
            PRAP_CloseWindows(shells);
        }