Working demo · Google Sheets + Apps Script

Clinic Admin Autopilot

Weekly billing, bookkeeping and logs for a small practice that runs on Excel and Google Drive. Staff keep entering data the way they do today. Every Monday at 7am the script checks the week, builds the summaries and emails the office manager what needs attention.

All names, IDs and amounts on this page are fictional sample data ("Lakeside Family Clinic"). No real patient information is used. Real data stays in the clinic's own Google account.

Run one week

Input: the week of Nov 16–20, 2026 as staff would export it: visit rows, bank deposits and 5 daily close-out logs. Press the button to run the same steps the scheduled script runs.

In the clinic's Google Sheets this runs by itself every Monday at 7am.
Waiting. Nothing has run yet.

How it runs in the clinic's Google account

  1. Staff keep using the same Excel/Sheets files in a shared Drive folder.
  2. A time-based trigger runs the script every Monday at 7am (and on demand from a custom menu).
  3. The script writes the results into a "Weekly Review" tab and emails the office manager.
  4. Rules (fee schedule, payers, alert thresholds) live in a "Settings" tab staff can edit without code.
  5. Acceptance test: run it on a past week the team already did by hand. Totals must match to the cent.
// Apps Script (excerpt): weekly trigger + duplicate check
function installWeeklyTrigger() {
  ScriptApp.newTrigger('runWeeklyReview')
    .timeBased().onWeekDay(ScriptApp.WeekDay.MONDAY)
    .atHour(7).create();
}

function findDuplicates(rows) {
  const seen = new Map(), dups = [];
  rows.forEach(r => {
    const key = [r.patientId, r.date, r.cpt].join('|');
    if (seen.has(key)) dups.push(r); else seen.set(key, r);
  });
  return dups;
}

function runWeeklyReview() {
  const ss = SpreadsheetApp.getActive();
  const visits = readTable(ss.getSheetByName('Visits'));
  const fees = readSettings(ss.getSheetByName('Settings'));
  const issues = [...findDuplicates(visits),
                  ...checkCodesAndFees(visits, fees)];
  writeReview(ss, visits, issues);
  MailApp.sendEmail(fees.managerEmail,
    'Weekly billing review', buildSummary(visits, issues));
}