fix: UnitedDH pre-auth number extraction, service lines saved, RCT combo buttons
- Pre-auth step9: scan all table cells alphanumeric-first (A0260616190876 format), URL extraction, body scan fallback with debug logging - Pre-auth route: save service lines (totalBilled) when creating PREAUTH claim record so claim page shows correct billed amount after selecting patient - Pre-auth processor: read pdf_path fallback alongside pdf_url from Selenium result - UnitedDH/SCO workers: billing entity selection via direct paymentGroupId click, Summit Dental Care first with fallback, Escape to close dropdown - Pre-auth form: remove Other Insurance step (not present on pre-auth page), file upload direct to hidden input without button click - Pre-auth step8: JS click + Submit Authorization in XPath, Continue via [last()] + JS click - RCT combo buttons added (pre-auth form only): RCT Ant/Post/Crown, PreM/Post/Crown, Mol/Post/Crown; claim form excludes these three combos Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -610,22 +610,34 @@ class AutomationUnitedDHClaimSubmit:
|
||||
print("[UnitedDH Claim] step1: Selecting Billing Entity...")
|
||||
billing_selected = False
|
||||
try:
|
||||
billing_ng = WebDriverWait(self.driver, 10).until(
|
||||
EC.element_to_be_clickable((By.XPATH,
|
||||
"//label[@for='paymentGroupId']/following-sibling::ng-select | "
|
||||
"//label[@for='paymentGroupId']/..//ng-select"
|
||||
))
|
||||
)
|
||||
self.driver.execute_script("arguments[0].scrollIntoView({block:'center'});", billing_ng)
|
||||
arrow = billing_ng.find_element(By.CSS_SELECTOR, ".ng-arrow-wrapper")
|
||||
arrow.click()
|
||||
first_option = WebDriverWait(self.driver, 5).until(
|
||||
EC.element_to_be_clickable((By.CSS_SELECTOR, ".ng-dropdown-panel .ng-option"))
|
||||
)
|
||||
option_text = first_option.text.strip()
|
||||
first_option.click()
|
||||
print(f"[UnitedDH Claim] step1: Selected Billing Entity: {option_text}")
|
||||
billing_selected = True
|
||||
taxonomy_input = self.driver.find_element(By.ID, "paymentGroupId")
|
||||
if taxonomy_input.is_displayed():
|
||||
self.driver.execute_script("arguments[0].scrollIntoView({block:'center'});", taxonomy_input)
|
||||
taxonomy_input.click()
|
||||
print("[UnitedDH Claim] step1: Clicked Billing Entity dropdown")
|
||||
time.sleep(1)
|
||||
try:
|
||||
summit_option = WebDriverWait(self.driver, 5).until(
|
||||
EC.element_to_be_clickable((By.XPATH,
|
||||
"//ng-dropdown-panel//div[contains(@class,'ng-option') and contains(.,'Summit Dental Care')]"
|
||||
))
|
||||
)
|
||||
summit_option.click()
|
||||
print("[UnitedDH Claim] step1: Selected Billing Entity: Summit Dental Care")
|
||||
billing_selected = True
|
||||
except TimeoutException:
|
||||
try:
|
||||
first_option = self.driver.find_element(By.XPATH,
|
||||
"//ng-dropdown-panel//div[contains(@class,'ng-option')]"
|
||||
)
|
||||
option_text = first_option.text.strip()
|
||||
first_option.click()
|
||||
print(f"[UnitedDH Claim] step1: Selected Billing Entity: {option_text}")
|
||||
billing_selected = True
|
||||
except Exception:
|
||||
print("[UnitedDH Claim] step1: No options available in Billing Entity dropdown")
|
||||
ActionChains(self.driver).send_keys(Keys.ESCAPE).perform()
|
||||
time.sleep(1)
|
||||
except Exception as e:
|
||||
print(f"[UnitedDH Claim] step1: Billing Entity selection failed: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user