Methodology + reproducibility

Every number in Insights has a visible methodology. Here's how the 'How is this calculated?' modal works and why reproducibility matters.

Updated 2026-04-24 · Edit this page on GitHub


title: "Methodology + reproducibility" description: "Every number in Insights has a visible methodology. Here's how the 'How is this calculated?' modal works and why reproducibility matters." order: 3 category: "analytics" updated_at: "2026-04-24"

Every KPI in Insights is a query against your live data, not a pre-computed number. Each panel exposes its methodology via the "How is this calculated?" button (the ? icon next to the panel title).

Why reproducibility matters

When you quote "Q1 revenue was $487K" to a board or a CPA, you need to be able to answer:

  • Which status transitions counted?
  • What timezone was the window calculated in?
  • Were voided billables excluded?

Rounds answers all three by showing you the SQL pattern behind the number. You can reproduce it in the Supabase SQL editor or hand it to your CPA as documentation.

What the modal shows

Click "How is this calculated?" on any panel:

  • The SQL pattern — not the literal live query, but the canonical pattern with your current filter values substituted in
  • Window resolution — the explicit UTC start/end timestamps the panel resolved your filter into
  • Edge cases — timezone boundaries, mid-month filter edges, status transitions that do/don't count
  • ADR link — the architecture decision record where this math was locked (e.g., "YoY is a 365-day absolute shift, not weekday-aligned" per ADR)

Screenshot the modal and you have your audit trail.

Panel-specific methodology

Revenue Overview

  • Billed = SUM(charge_amount) WHERE submitted_at BETWEEN window_start AND window_end
  • Paid = SUM(charge_amount) WHERE paid_at BETWEEN window_start AND window_end — note: paid uses paid_at, not submitted_at, because cash-received and cash-expected are different questions
  • Denied = SUM(charge_amount) WHERE denied_at BETWEEN window_start AND window_end
  • Outstanding = SUM(charge_amount) WHERE status = 'submitted' AND submitted_at <= window_end
  • Voided billables always excluded from all four

YTD Billables

  • Submitted / Paid / Denied use the same status-respecting timestamp rules
  • Aging = SUM(charge_amount) WHERE status = 'submitted' AND submitted_at < now() - 30 days — independent of the current window (aging is always "right now")
  • Service-line count = COUNT(DISTINCT cpt_code) WHERE submitted_at IN window

YoY Comparison

  • Prior window = current window shifted back 365 days (leap-year aware via Date arithmetic)
  • Day-aligned, not weekday-aligned (so Q1 2026 compares to Q1 2025 by calendar, not by business-day count)
  • Returns {enough_history: false} when practice has less than 395 days of data to avoid partial-period fake growth numbers

Timezone resolution

All windows resolve against your practice timezone, set in /admin/settings. Default is America/New_York for VA-based practices.

Changing the timezone mid-window changes what "YTD" means — mostly relevant at year-end when a transaction at 11 PM Eastern on Dec 31 is 4 AM UTC Jan 1. Rounds does the right thing (uses your practice TZ, not UTC), but it's worth being explicit when comparing to other reports.

When numbers still don't match

If your Rounds numbers disagree with your EHR or clearinghouse:

  1. First check: same date range? Rounds QTD and EHR QTD use the same quarter boundaries?
  2. Same status scope? Rounds excludes voided; some EHR reports include them.
  3. Same timezone? If the EHR reports in UTC, there's a 5-hour drift vs your NY-zone practice.
  4. Same provider/payer filter? An EHR "all providers" report might include providers Rounds has never seen.

If you hit a problem

  • Numbers seem off but methodology modal is empty: that's a bug — email support + include the URL
  • Can't find the ADR a method references: GitHub may be behind a login; screenshot the modal instead
  • Other: support@ralthealth.com