Muhammad Rayyan
← All work

Accounts Receivable · Automation

Payer-Claim Aging Report Automation

A desktop workflow that downloads provider aging exports from a reporting portal and builds a multi-sheet Excel workbook with bucket-level accounts-receivable analysis.

Role
Data Reporting Analyst — design, build, and maintain operational automation
Duration
Iterative build over several months
Data Scale
One CSV export per provider per reporting cycle; UTF-16 tab-delimited portal exports
Stack
  • Python
  • Playwright
  • pandas
  • openpyxl
  • Tkinter

Impact

3hours

Saved per reporting cycle on the download stage

Vs. manual per-provider CSV export from the enterprise reporting portal per aging run

30%

Improvement in download-stage throughput

Vs. prior manual per-provider report download workflow before browser automation

Problem

Groups in this position run payer-claim aging through a web reporting portal. Aging means open balances split by age — for example 0–30 days, 31–60 days, and older — so billing staff know which claims to chase first.

The portal exports one CSV at a time, filtered by provider, and every file arrives with the same default name. At mid-sized multi-specialty scale, that means dozens of the same clicks per cycle: log in, set the dates, pick the provider, wait, export, rename, repeat.

A full roster can take most of a morning before anyone opens Excel. It is easy to pick the wrong provider, overwrite the last file, or skip a name on the roster. Each mistake slows the review that should follow.

Approach

I built a two-stage pipeline behind a small desktop UI: a download stage and an Excel stage. They can run together or apart.

Download stage. Playwright drives a real browser against the portal. The portal does not behave well in a hidden browser, so the window stays visible. On each run the tool reads a provider list, applies the date range, and walks the list one by one: open the filter, select the name, wait for export, save the CSV, rename it to the provider name, move on. A second export can run once at the end with optional procedure-code filters.

Two connection modes cover different browser limits: launch a fresh browser, or reuse an already signed-in session. Internal network and login details are left out of this public write-up.

Excel stage. The tool scans the download folder, reads each file as UTF-16 tab-delimited data, adds a provider name from the filename, and builds one aging data sheet. It groups bucket columns by provider on an analysis sheet, adds a grand total, and writes extra sheets when that second export is present. Formatting — titles, number formats, freeze panes — is applied so the file is ready to review.

Bucket labels follow the source export: Current, 31–60, 61–90, 91–120, and over 120 days. I kept the portal's layout rather than forcing a different set of buckets at export time.

# Rename-on-save: the CSV filename becomes the provider key later.
safe_name = re.sub(r"[^\w\s\-]", "", provider_name).strip()
dest = download_dir / f"{safe_name}.csv"

What I found

The download stage was the bottleneck worth fixing first. Against the prior manual per-provider export workflow, the automation saved roughly three hours per reporting cycle on download alone and improved download-stage throughput by about thirty percent — mostly by cutting wait-and-click loops and rename mistakes.

Human error also dropped in ways that are harder to put in one number: fewer overwritten files, fewer skipped providers, and a naming scheme the Excel stage can trust. Staff could start a full run, step away, and come back to a complete download folder.

Separating "download" from "build Excel" also helped when a run stopped mid-list. The workbook can rebuild from whatever CSVs are already on disk without logging back into the portal.

What I'd do differently

The automation is tightly tied to the portal's page layout. A change to the provider filter or export menu breaks the script until someone updates the selectors. I would add a small health check that logs in, confirms the report page loads, and exits — run before each production cycle.

I would also move provider-list and filter paths into config instead of UI defaults, and add clearer run logs so a failed provider is easy to find. If this needed to run overnight on a server, I would ask the portal vendor for a supported export API rather than fighting a hidden browser.

Illustrative AR aging mix

Share of open balance by bucket — synthetic sample

0–30 Days42%
31–60 Days28%
61–90 Days18%
90+ Days12%
Illustrative synthetic sample — not client or patient data. Parameterised for demonstration only.

Dr. John Doe — Provider AR Aging Breakdown

Sample Excel-style aging breakdown — illustrative synthetic provider

Dr. John Doe — Provider AR Aging Breakdown. Illustrative synthetic sample — not client or patient data. Parameterised for demonstration only.
BucketBalancePercentage
0 – 30 Days$7,854.0042%
31 – 60 Days$5,236.0028%
61 – 90 Days$3,366.0018%
90 + Days$2,244.0012%
Total$18,700.00100%

Illustrative synthetic sample — not client or patient data. Parameterised for demonstration only. Balances reconcile to the chart mix (42% / 28% / 18% / 12%) on an illustrative $18,700.00 total.

Illustrative payer-claim aging mix across four buckets — synthetically generated sample data parameterised from published benchmark bands, not client data.

Built on synthetically generated claims data, parameterised from published industry benchmarks. No client or patient data was used.