Case Study
How a Wellness Clinic Cut Monthly Payroll from Three Hours to Under Ten Minutes.
Payroll processing fell from about three hours to under 10 minutes. Staff drag and drop reports from their clinic management system into the dashboard, where AI prepares a payroll draft for review. Calculations, invoicing, and account records follow in the same workflow.
- Payroll processing, down from about three hours
- <10 Min
- Spreadsheets in the previous process
- ~20
- Calculation checks matched to the cent
- 34 / 34
The Challenge
One Changed Number Could Reopen the Whole Month.
The first calculation was only part of the job. The process also needed to handle everything that changed afterward.
The Business Context
A chiropractic and wellness clinic worked with several types of practitioners, each with a tiered commission plan. Some practitioners also led teams and earned commission on their members’ work. Each month, the clinic invoiced practitioners for its share of their billings, plus GST.
The monthly run depended on a separate spreadsheet for each practitioner, additional calculations for team leads, and invoices prepared and emailed separately. A changed figure meant tracing its effect through other sheets and, sometimes, repeating work after invoices had already been sent.
- Two sets of inputs per practitioner were entered by hand into sheets with their own lookup tables and tier formulas.
- Team-lead commissions were calculated separately, then deducted from the lead’s invoice by hand.
- Invoices were built, attached, and emailed individually, with no reliable record of which version each practitioner received.
What We Delivered
We built a payroll and invoicing module inside the clinic’s genius office operations dashboard. Staff drag and drop reports from their existing clinic management system into the platform, where AI processes them and prepares a payroll draft. The same workflow brings together review, commission calculations, invoice delivery, corrections, payment locks, and a receivables ledger. We also built a reporting layer on top of the payroll and invoicing records, giving the clinic a way to review the work after each run.
The Solution
Three Problems, and What We Built for Each.
01 / 03
Around 20 spreadsheets, one for each practitioner The Problem
Every Month Started with a Pile of Spreadsheets
Figures were typed by hand into a separate sheet for each practitioner, each with its own lookup tables and tier formulas.
- billing-report.pdf
- schedule-report.pdf
Payroll draft
- Practitioner
- Commission
- Clinic share
Reviewed by staff before processing
What We Built
Drop in the Reports, and Review a Draft
Staff drag and drop reports from the clinic system they already use. AI prepares a payroll draft, and staff check it before anything is processed.
How We Built It
- 01
Clinic ReportsExported from the clinic management system the team already uses
Reading the ReportsAzure AI Document IntelligenceExtracts the text and figures from each uploaded file
Preparing the DraftClaude APITurns those figures into a payroll draft for staff to review
A module inside the clinic’s dashboard, built in React with a Python API behind it.
02 / 03
One figure changes
- The practitioner’s sheet
- The team lead’s sheet
- The invoice already sent
The Problem
One Changed Number Could Reopen the Whole Month
Team-lead commissions were worked out separately and deducted by hand, so a correction had to be traced through other sheets.
Commission rules, in one place
- Practitioner type
- Commission tiers
- Team-lead share
34 of 34 checks matched to the cent
What We Built
Every Commission Rule in One Place
Practitioner types, tiers, and team-lead shares are managed in the dashboard. Change a record and the linked team-lead figure recalculates with it.
How We Built It
- 01
One Set of RulesPractitioners, commission tiers, and team-lead assignments held in one database
One CalculationPythonEvery figure is worked out in the same place, the same way, each month
- 03
Proven Against the SpreadsheetsChecked against three real months. All 34 checks matched to the cent
The calculation code is version-controlled in GitHub. Each month also keeps a snapshot of its rates, so later changes do not rewrite past payroll.
03 / 03
Which version did each practitioner receive? The Problem
Invoices Were Built and Emailed One by One
Each invoice was prepared, attached, and sent separately, with no reliable record of which version a practitioner received.
Every invoice, numbered and tracked
- INV-0142Paid · locked
- INV-0143Replaces INV-0139
- INV-0144Sent
What We Built
Numbered Invoices, Tracked from Sent to Paid
Processing creates a numbered PDF and can email it. A correction issues a new invoice that names the one it replaces. Paid invoices stay locked.
How We Built It
- 01
Invoices from the Confirmed RunA branded PDF with a sequential number for each practitioner
- 02
Corrections Kept in a ChainA new invoice records which earlier ones it replaces
- 03
A Ledger behind Every InvoiceIssued, replaced, and paid invoices post to each practitioner’s account
Hosted on Azure App Service, with the environment written as code in Terraform.
How the Monthly Run Works Now
Before: A Chain of Separate Steps
- Monthly Figures, Typed In by Hand
A Spreadsheet for Each Practitioner
Team-Lead Commissions Worked Out Separately
Invoices Built and Emailed One by One
Corrections had to be carried into team-lead calculations, separate invoices, and individual emails.
Monthly Payroll RunAbout 3 Hours
After: A Connected Dashboard Process
- 01
Clinic Staff
Drop in Clinic Reports
Reports exported from the existing clinic management system
02 · AI
AI Prepares the Draft
Uploaded reports are processed into a payroll draft
03 · Clinic Staff
Review and Confirm
Staff check the draft and calculated figures before processing
- 04
The Dashboard
Issue Invoices and Track Accounts
PDFs, email delivery, invoice history, and reporting
Corrections update the linked records and invoice history. Paid invoices stay locked.
Monthly Payroll RunUnder 10 Minutes
Technologies Used
React
Frontend
Python
API
Microsoft Azure
Cloud Infrastructure
Azure App Service
Application & API Hosting
Azure AI Document Intelligence
Document Text Extraction - OCR
GitHub
Version Control
Terraform
Infrastructure as Code
Claude API
Report Processing & Payroll Drafts
How the System Was Built
- 01
Turn Clinic Reports into a Payroll Draft
Staff export reports from the system they already use to manage the clinic, then drag and drop them into the platform. AI processes the uploaded reports and creates a payroll draft for staff to review.
Technical Detail: Turn Clinic Reports into a Payroll Draft
The React frontend supports report upload and draft review. In the Azure implementation, Azure AI Document Intelligence provides OCR to extract text from the uploaded reports. Azure App Service hosts the application and Python API. The Python API connects the workflow with the Claude API for report processing and payroll-draft preparation. Terraform defines the Azure infrastructure, while GitHub holds the versioned application and configuration. The commission calculation engine remains in the API, and staff review the draft before confirming the run.
- 02
Manage Practitioner Plans in One Place
Practitioners, their types, commission tiers, and team-lead assignments are managed in the dashboard. The clinic no longer maintains a separate set of formulas for each person.
Technical Detail: Manage Practitioner Plans in One Place
One database model holds the practitioner records, progressive commission plans, and lead assignments. Each monthly record snapshots the plan tiers, rates, and names so later configuration changes do not rewrite historical calculations.
- 03
Prove the Calculations Before Replacing the Sheets
We checked the new engine against three real months of spreadsheets supplied by the clinic. All 34 checks matched to the cent, including the treatment of GST and team-lead earnings.
Technical Detail: Prove the Calculations Before Replacing the Sheets
The engine reproduces the existing progressive bracket calculations. All calculation logic runs in the API; the dashboard displays the returned results rather than calculating a second set of figures in the browser.
- 04
Guide Staff through the Monthly Run
Staff select a month, review the payroll draft prepared from their uploaded reports, check the calculated preview, and confirm. Team-lead earnings are calculated and deducted from the lead’s invoice automatically.
Technical Detail: Guide Staff through the Monthly Run
The payroll records cover billed amounts, GST collected, and deductions for each of two semi-monthly periods. Updating a member’s record recalculates the linked lead record for the same month, subject to the paid-invoice lock.
- 05
Keep Invoice Delivery and Corrections Together
Processing creates a branded PDF with a sequential invoice number. Staff can enable email delivery for each practitioner. Correcting an unpaid record issues a new invoice that identifies the numbers it replaces and resends it if the earlier invoice was emailed.
Technical Detail: Keep Invoice Delivery and Corrections Together
The system records the invoice version issued and preserves the supersession chain. Paid invoices cannot be changed or reissued. That restriction is enforced by the system rather than by a file name or an instruction to staff.
- 06
Give Accounting a Ledger behind Every Invoice
Issued, superseded, voided, and paid invoices post to each practitioner’s receivable account. The clinic can produce a statement for a practitioner and date range from the same records.
Technical Detail: Give Accounting a Ledger behind Every Invoice
Invoice lifecycle events are reflected in a per-practitioner receivables ledger. Statements reconcile to the invoice records without a separately maintained spreadsheet.
- 07
Build Reporting on the Same Records
We added a reporting layer on top of the payroll and invoicing data. The clinic can review payroll and invoicing activity using the records created by the workflow.
Technical Detail: Build Reporting on the Same Records
Reporting is built on the platform’s payroll and invoicing records. The receivables ledger and practitioner statements provide the account history behind the invoices.
The Results
From Three Hours to Under 10 Minutes.
Payroll Processing Time
- Previous monthly payroll process
- ~3 Hours
- Payroll processing in the dashboard
- <10 Min
From Separate Spreadsheets to One Reviewed Run
Staff upload clinic reports, review the AI-prepared payroll draft, and confirm processing. The project team reports a reduction from about three hours to under 10 minutes.
What Was Delivered
Reports exported from the clinic management system now become an AI-prepared payroll draft in the dashboard. Staff review and confirm the run, with monthly calculations, team-lead adjustments, PDF invoices, and email delivery connected to it. Corrections update dependent records and preserve invoice history. A reporting layer gives the clinic visibility into payroll and invoicing activity. Accounting has a receivables ledger, and paid invoices are permanently locked.
What the Team Reported
The previous monthly process took about three hours across roughly 20 spreadsheets. The project team reports that payroll can now be processed in under 10 minutes, with report upload, draft review, and processing brought into the dashboard.
The processing times are supplied by the project team. Separately, all 34 calculation checks matched three months of source spreadsheets to the cent. Those checks validate the commission calculations, not AI report-processing accuracy. The Azure services describe the requested equivalent architecture; the reported results refer to the project workflow, not an Azure-specific benchmark.
What Changed for the People Doing the Work
- The Person Running Payroll
- Drop in reports from the clinic system and review an AI-prepared payroll draft, without maintaining lookup tables or copying results between sheets.
- Team Leads
- Earnings follow the linked member records. Corrections recalculate the relevant lead record instead of requiring a separate spreadsheet update.
- Practitioners
- Receive a numbered invoice for the month. A corrected invoice clearly identifies the invoice numbers it replaces.
- Accounting
- Review payroll and invoicing through the reporting layer, with a ledger and practitioner statements that reconcile to the invoices.
What This Project Reinforced
Start with the Reports the Business Already Uses
The clinic keeps its existing management system. Its exported reports become the starting point for an AI-prepared draft, with staff review built into the monthly workflow.
Check the Details against Real Records
Three months of source spreadsheets provided a practical way to verify the rules and show the clinic that the replacement produced the same numbers.
Keep Historical Records Stable
Saved plan and rate snapshots protect earlier calculations. Permanent paid-invoice locks protect records that should no longer change.
Design for the Correction
A useful replacement has to handle the changed figure, the dependent commission, and the invoice already received, as well as the first calculation.
Calculate Once, Display Consistently
Keeping calculations in the API gives the dashboard one set of results to display and the team one place to maintain the rules.

