claim pdf done

This commit is contained in:
2025-07-02 19:21:48 +05:30
parent 0b46fb0c99
commit 54f80db08a
2 changed files with 0 additions and 19 deletions

View File

@@ -153,14 +153,6 @@ router.post(
responseType: "arraybuffer", responseType: "arraybuffer",
}); });
// Temp savving the pdf incase, creatClaimPdf failed:
const tempDir = path.join(__dirname, "..", "..", "temp");
if (!fs.existsSync(tempDir)) {
fs.mkdirSync(tempDir, { recursive: true });
}
const filePath = path.join(tempDir, filename);
fs.writeFileSync(filePath, pdfResponse.data);
// saving at postgres db // saving at postgres db
await storage.createClaimPdf( await storage.createClaimPdf(
parsedPatientId, parsedPatientId,

View File

@@ -58,7 +58,6 @@ class AutomationMassHealth:
login_button = wait.until(EC.element_to_be_clickable((By.XPATH, "//input[@type='submit' and @value='Login']"))) login_button = wait.until(EC.element_to_be_clickable((By.XPATH, "//input[@type='submit' and @value='Login']")))
login_button.click() login_button.click()
print("Login submitted successfully.")
return "Success" return "Success"
except Exception as e: except Exception as e:
@@ -124,7 +123,6 @@ class AutomationMassHealth:
return "Success" return "Success"
except Exception as e: except Exception as e:
print(f"Error while step1 i.e Cheking the MemberId and DOB in: {e}") print(f"Error while step1 i.e Cheking the MemberId and DOB in: {e}")
return "ERROR:STEP1" return "ERROR:STEP1"
@@ -193,10 +191,6 @@ class AutomationMassHealth:
time.sleep(1) time.sleep(1)
print("Procedure codes submitted successfully.")
except Exception as e: except Exception as e:
print(f"Error while filling Procedure Codes: {e}") print(f"Error while filling Procedure Codes: {e}")
return "ERROR:PROCEDURE CODES" return "ERROR:PROCEDURE CODES"
@@ -295,7 +289,6 @@ class AutomationMassHealth:
alert = self.driver.switch_to.alert alert = self.driver.switch_to.alert
alert.accept() alert.accept()
print("Alert accepted.")
except TimeoutException: except TimeoutException:
print("No alert appeared after clicking the button.") print("No alert appeared after clicking the button.")
@@ -311,14 +304,10 @@ class AutomationMassHealth:
def reach_to_pdf(self): def reach_to_pdf(self):
wait = WebDriverWait(self.driver, 90) wait = WebDriverWait(self.driver, 90)
try: try:
print("Waiting for PDF link to appear on success page...")
pdf_link_element = wait.until( pdf_link_element = wait.until(
EC.element_to_be_clickable((By.XPATH, "//a[contains(@href, '.pdf')]")) EC.element_to_be_clickable((By.XPATH, "//a[contains(@href, '.pdf')]"))
) )
print("PDF link found.")
time.sleep(5) time.sleep(5)
pdf_relative_url = pdf_link_element.get_attribute("href") pdf_relative_url = pdf_link_element.get_attribute("href")
if not pdf_relative_url.startswith("http"): if not pdf_relative_url.startswith("http"):