claim pdf done
This commit is contained in:
@@ -153,14 +153,6 @@ router.post(
|
||||
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
|
||||
await storage.createClaimPdf(
|
||||
parsedPatientId,
|
||||
|
||||
@@ -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.click()
|
||||
|
||||
print("Login submitted successfully.")
|
||||
return "Success"
|
||||
|
||||
except Exception as e:
|
||||
@@ -124,7 +123,6 @@ class AutomationMassHealth:
|
||||
|
||||
return "Success"
|
||||
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error while step1 i.e Cheking the MemberId and DOB in: {e}")
|
||||
return "ERROR:STEP1"
|
||||
@@ -193,10 +191,6 @@ class AutomationMassHealth:
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
|
||||
print("Procedure codes submitted successfully.")
|
||||
|
||||
|
||||
except Exception as e:
|
||||
print(f"Error while filling Procedure Codes: {e}")
|
||||
return "ERROR:PROCEDURE CODES"
|
||||
@@ -295,7 +289,6 @@ class AutomationMassHealth:
|
||||
|
||||
alert = self.driver.switch_to.alert
|
||||
alert.accept()
|
||||
print("Alert accepted.")
|
||||
except TimeoutException:
|
||||
print("No alert appeared after clicking the button.")
|
||||
|
||||
@@ -311,14 +304,10 @@ class AutomationMassHealth:
|
||||
def reach_to_pdf(self):
|
||||
wait = WebDriverWait(self.driver, 90)
|
||||
try:
|
||||
print("Waiting for PDF link to appear on success page...")
|
||||
pdf_link_element = wait.until(
|
||||
EC.element_to_be_clickable((By.XPATH, "//a[contains(@href, '.pdf')]"))
|
||||
)
|
||||
print("PDF link found.")
|
||||
|
||||
time.sleep(5)
|
||||
|
||||
pdf_relative_url = pdf_link_element.get_attribute("href")
|
||||
|
||||
if not pdf_relative_url.startswith("http"):
|
||||
|
||||
Reference in New Issue
Block a user