diff --git a/apps/Frontend/src/App.tsx b/apps/Frontend/src/App.tsx index 1a0d7ed..3e9ccc8 100644 --- a/apps/Frontend/src/App.tsx +++ b/apps/Frontend/src/App.tsx @@ -17,8 +17,8 @@ const PatientsPage = lazy(() => import("./pages/patients-page")); const SettingsPage = lazy(() => import("./pages/settings-page")); const ClaimsPage = lazy(() => import("./pages/claims-page")); const PaymentsPage = lazy(() => import("./pages/payments-page")); -const InsuranceEligibilityPage = lazy( - () => import("./pages/insurance-eligibility-page") +const EligibilityClaimStatusPage = lazy( + () => import("./pages/eligibility-claim-status-page") ); const DocumentPage = lazy(() => import("./pages/documents-page")); const DatabaseManagementPage = lazy( @@ -41,8 +41,8 @@ function Router() { } /> } /> } + path="/eligibility-claim-status" + component={() => } /> } /> } /> diff --git a/apps/Frontend/src/components/layout/sidebar.tsx b/apps/Frontend/src/components/layout/sidebar.tsx index e733157..8cd143b 100644 --- a/apps/Frontend/src/components/layout/sidebar.tsx +++ b/apps/Frontend/src/components/layout/sidebar.tsx @@ -37,8 +37,8 @@ export function Sidebar() { icon: , }, { - name: "Insurance Eligibility", - path: "/insurance-eligibility", + name: "Eligibility/Claim Status", + path: "/eligibility-claim-status", icon: , }, { diff --git a/apps/Frontend/src/components/ui/dateInput.tsx b/apps/Frontend/src/components/ui/dateInput.tsx index 5ed2b05..d5e2624 100644 --- a/apps/Frontend/src/components/ui/dateInput.tsx +++ b/apps/Frontend/src/components/ui/dateInput.tsx @@ -1,4 +1,4 @@ -import { useState } from "react"; +import { useEffect, useState } from "react"; import { format } from "date-fns"; import { Calendar } from "@/components/ui/calendar"; import { @@ -21,7 +21,6 @@ interface DateInputProps { // THIS COMPONENT IS MADE FOR GENERAL FIELD IN PAGE. // Here, User can input/paste date in certain format, and also select via calendar - export function DateInput({ label, value, @@ -32,6 +31,19 @@ export function DateInput({ const [inputValue, setInputValue] = useState( value ? format(value, "MM/dd/yyyy") : "" ); + const [open, setOpen] = useState(false); + + // Keep inputValue in sync when parent 'value' changes. + // Only overwrite if different to avoid stomping an in-progress user edit. + useEffect(() => { + if (value) { + const formatted = format(value, "MM/dd/yyyy"); + setInputValue((prev) => (prev !== formatted ? formatted : prev)); + } else { + // parent cleared the value + setInputValue(""); + } + }, [value]); const handleInputChange = (e: React.ChangeEvent) => { let val = e.target.value.replace(/\D/g, ""); @@ -62,7 +74,7 @@ export function DateInput({ value={inputValue} onChange={handleInputChange} /> - + @@ -304,8 +295,6 @@ export default function InsuranceEligibilityPage() { allowCheckbox={true} allowEdit={true} onSelectPatient={setSelectedPatient} - onPageChange={setCurrentTablePage} - onSearchChange={setCurrentTableSearchTerm} /> diff --git a/apps/SeleniumService/selenium_eligibilityCheckWorker.py b/apps/SeleniumService/selenium_eligibilityCheckWorker.py index 584a16f..20b8e09 100644 --- a/apps/SeleniumService/selenium_eligibilityCheckWorker.py +++ b/apps/SeleniumService/selenium_eligibilityCheckWorker.py @@ -121,7 +121,6 @@ class AutomationMassHealthEligibilityCheck: def step2(self): wait = WebDriverWait(self.driver, 90) - def wait_for_pdf_download(timeout=60): for _ in range(timeout): files = [f for f in os.listdir(self.download_dir) if f.endswith(".pdf")] @@ -135,8 +134,11 @@ class AutomationMassHealthEligibilityCheck: f"//table[@id='Table3']//tr[td[contains(text(), '{self.memberId}')]]/td[3]"))) eligibilityText = eligibilityElement.text - report_link = wait.until(EC.element_to_be_clickable((By.XPATH, "//a[contains(text(), 'Click here')]"))) - report_link.click() + txReportElement = wait.until(EC.element_to_be_clickable((By.XPATH, + f"//table[@id='Table3']//tr[td[contains(text(), '{self.memberId}')]]//input[@value='Tx Report']" + ))) + + txReportElement.click() pdf_path = wait_for_pdf_download() print("PDF downloaded at:", pdf_path)