Read the story

Architecture

Flags patients whose billing and notes disagree.On Cloud Run since June 16.

Staff upload a day's schedule, ledger and clinical notes from Eaglesoft or Denticon, and a pure Python engine lines them up by patient id. Only the patients whose billing, notes or doctor disagree come back, on a dashboard and by email.

8.75 hours

from the first commit, a design spec at 5:23 AM, to the first live revision

85 false flags

from one Monday run with Friday's notes. A date check now warns before anyone chases them

Same day

from a reviewer writing down the no exam rule on July 24 to it running live at 4:52 PM

8 of 8

patients a reviewer said were wrongly passed on one Rochester day, all flagged from v1.10.0

New York --:-- simulated

A day's exports
Reconciliation Staff upload a day's schedule, ledger and clinical notes from Eaglesoft or Denticon, and a pure Python engine lines them up by patient id. Only the patients whose billing, notes or doctor disagree come back, on a dashboard and by email. Billing team two practices Google sign in 2 domains, allowlist Gemini matcher built, not wired Practice systems Eaglesoft, Denticon Dashboard upload, cards, popups Reconciliation app FastAPI on Cloud Run Source adapters columns by name Reconcile engine pure Python, no clock Gmail report email Firestore users, saved runs Doctor registry nicknames, typo bounds exports upload session files temp files typed rows who signed planned saved runs report GCP hybridge-ledger-verifier, us-central1

Hover a part to trace what it touches. Click it for its notes.

  • Built by me
  • Managed by Google
  • Outside system
  • Planned, not live
  • Main data path
  • On demand
  • Credentials cross

When it breaks

What each failure does, and what it does not do.

  1. Notes from another day

    A Monday run with Friday's notes once showed 85 patients as billed with no note. The engine now compares the dates inside both files and warns on the report and in the email subject.

    engine/reconcile.py:295

  2. The wrong report uploaded

    The Denticon reader looks for its header row. When it is missing, the error names the report to export instead of guessing.

    engine/denticon.py:36

  3. The email does not send

    A mail failure never blocks the result. The report still shows, with the email error on it.

    app/main.py:215

What I tuned

Small choices that keep it fast and cheap.

  1. Time passed in

    The engine takes the run time as an argument instead of reading the clock, so the same three files give identical output.

    engine/reconcile.py:317

  2. Split notes stitched back

    Eaglesoft leaves line breaks in note text unquoted, so long notes split across rows. Rejoining them cleared 4 false flags on one test day and cut provider mismatches from 21 to 13.

    engine/parsing.py:85

  3. Columns by name

    Eaglesoft repeats a header and Denticon moves it below title rows, so every adapter finds columns by name, never by position.

    engine/parsing.py:28

Guards

Rules the code enforces, not rules people remember.

  1. Patient id, never the name

    Every file joins on patient id, read from the end of the notes' sort name where there is no id column. An appointment with no id goes to a person to confirm.

    engine/matching.py:44

  2. Domain plus allowlist

    Only the two practice domains can sign in, and only people an admin added get past the pending page.

    app/auth/routes.py:124

  3. Email stays on the domain

    An extra recipient must be an address on an allowed domain, checked before any file is read.

    app/main.py:191