feat: MassHealth service history extraction, shown in Patient Details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-05 08:38:13 -05:00
co-authored by Claude Opus 5.5
parent 1ee3b0cfc9
commit 33bea3822c
172 changed files with 4044 additions and 127 deletions
@@ -11,6 +11,7 @@ import base64
from mh_eligibility_results import extract_eligibility_row
from mh_member_details import extract_member_demographics
from mh_service_history import extract_service_history
class AutomationCMSPEligibilityHistoryRemainingCheck:
@@ -351,6 +352,10 @@ class AutomationCMSPEligibilityHistoryRemainingCheck:
wait.until(lambda d: d.execute_script("return document.readyState") == "complete")
time.sleep(3)
service_history = extract_service_history(self.driver)
if service_history:
self.extracted_data["service_history"] = service_history
safe_member = "".join(c for c in str(self.memberId) if c.isalnum() or c in "-_.")
pdf_filename = f"mh_history_{safe_member}.pdf"
pdf_data = self.driver.execute_cdp_cmd("Page.printToPDF", {"printBackground": True})