fix: D0140 claim sync, schedule column prefill, multi-appt, DentaQuest OTP session
- Fix Express route ordering in appointments-procedures so /prefill-from-appointment is matched before /:id (D0140 and other codes now always reach the claim) - claim-form: always fetch AppointmentProcedure records when an existing claim loads so post-save procedure edits (e.g. adding D0140) are reflected immediately - appointments-page: replace sessionStorage with React state (newApptPrefill) for slot-click prefill so columns B-F correctly carry their staffId into the form - add-appointment-modal / appointment-form: thread prefillData prop; add NewAppointmentPrefill interface; useEffect applies values via setValue - appointments upsert: remove per-patient dedup so the same patient can have multiple appointments on the same day in the same column - DentaQuest / TuftsSCO: navigate to about:blank and minimize instead of quit_driver after each run — session cookie stays in memory so OTP is only required once per app startup, not on every eligibility or claim check Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -296,13 +296,20 @@ async def start_tuftssco_claim_run(sid: str, data: dict, url: str):
|
||||
s["result"] = result
|
||||
s["message"] = "completed"
|
||||
|
||||
# Close browser window (session preserved in profile)
|
||||
# Navigate away and minimize — keeps session cookie in memory so next
|
||||
# eligibility check or claim run skips OTP entirely.
|
||||
try:
|
||||
from dentaquest_browser_manager import get_browser_manager as _gbm
|
||||
_gbm().quit_driver()
|
||||
print("[TuftsSCO Claim] Browser closed - session preserved in profile")
|
||||
bot.driver.get("about:blank")
|
||||
try:
|
||||
bot.driver.minimize_window()
|
||||
except Exception:
|
||||
try:
|
||||
bot.driver.set_window_position(-10000, -10000)
|
||||
except Exception:
|
||||
pass
|
||||
print("[TuftsSCO Claim] Browser minimized - session preserved for next run")
|
||||
except Exception as close_err:
|
||||
print(f"[TuftsSCO Claim] Could not close browser (non-fatal): {close_err}")
|
||||
print(f"[TuftsSCO Claim] Could not minimize browser (non-fatal): {close_err}")
|
||||
|
||||
asyncio.create_task(_remove_session_later(sid, 60))
|
||||
return result
|
||||
|
||||
@@ -694,13 +694,21 @@ class AutomationDentaQuestEligibilityCheck:
|
||||
f.write(pdf_data)
|
||||
print(f"[DentaQuest step2] PDF saved: {pdf_path}")
|
||||
|
||||
# Close browser after PDF (session preserved in profile)
|
||||
# Navigate away and minimize — keeps session cookie in memory so next
|
||||
# run detects ALREADY_LOGGED_IN and skips OTP entirely.
|
||||
# (OTP is only needed once per app startup, not on every check.)
|
||||
try:
|
||||
from dentaquest_browser_manager import get_browser_manager
|
||||
get_browser_manager().quit_driver()
|
||||
print("[DentaQuest step2] Browser closed")
|
||||
self.driver.get("about:blank")
|
||||
try:
|
||||
self.driver.minimize_window()
|
||||
except Exception:
|
||||
try:
|
||||
self.driver.set_window_position(-10000, -10000)
|
||||
except Exception:
|
||||
pass
|
||||
print("[DentaQuest step2] Browser minimized - session preserved for next run")
|
||||
except Exception as e:
|
||||
print(f"[DentaQuest step2] Error closing browser: {e}")
|
||||
print(f"[DentaQuest step2] Error minimizing browser (non-fatal): {e}")
|
||||
|
||||
output = {
|
||||
"status": "success",
|
||||
|
||||
Reference in New Issue
Block a user