fix: United SCO Check PreAuth sets Approved/Denied from procedure Determination Status
The search row and summary heading only say "Processed", so the claim status never changed. Read each procedure's Determination Status on the summary page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -231,6 +231,19 @@ class AutomationUnitedSCOPreAuthCheck(AutomationUnitedSCOEligibilityCheck):
|
||||
pass
|
||||
time.sleep(2) # let the procedure section finish rendering
|
||||
|
||||
# The row/heading status is only "Processed"; the decision is each procedure's
|
||||
# "Determination Status" (Approved/Denied). Any approved line -> Approved, else Denied.
|
||||
try:
|
||||
body_text = self.driver.find_element(By.TAG_NAME, "body").text
|
||||
determinations = [d.lower() for d in re.findall(r"Determination Status\s+([A-Za-z]+)", body_text)]
|
||||
print(f"[UnitedSCO PreAuthCheck step2] Determination statuses: {determinations}")
|
||||
if any(d.startswith("approv") for d in determinations):
|
||||
status = "Approved"
|
||||
elif any(d.startswith("deni") or d.startswith("reject") for d in determinations):
|
||||
status = "Denied"
|
||||
except Exception as e:
|
||||
print(f"[UnitedSCO PreAuthCheck step2] Reading determination status failed: {e}")
|
||||
|
||||
# 4) Save the page as a PDF (the Print button opens Chrome's dialog, which Selenium can't drive)
|
||||
pdf = self.driver.execute_cdp_cmd("Page.printToPDF", {
|
||||
"printBackground": True,
|
||||
|
||||
Reference in New Issue
Block a user