Payment Plans

Payment Plan Report

Path/payment-plan-report
Statustodo
Drill-down pages—
Pop-ups(+4 inline)
Tabs—
API routes/api/data/offices
/api/reports/payment-plans
/api/reports/payment-plans/${encodeURIComponent
/api/reports/payment-plans/${plan

Business rules

Written when this page is worked on (docs/BUSINESS-RULES.md).

Database tables & columns

TableColumns used
agent_payment_plan_transactionsguarantor_name, office_name
agent_payment_planscard_expiration, card_last4, dentrix_id, each_payment, guarantor_name, last_payment_date, last_payment_status, office_name, payment_count, payment_frequency, plan_amount, plan_key, plan_start_date, remaining_balance, synced_at
dentrix_officesactive, name
payment_plan_cardscard_brand, card_last4, exp_month, exp_year, plan_key, updated_at

File structure

Its own files

  • apps/
    • web/
      • src/
        • pages/
          • PaymentPlanReport.tsx

Shared code it uses (followed through its imports and the helpers its API calls; sign-in/access plumbing and UI primitives left out)

  • apps/
    • web/
      • src/
        • components/
          • reports/
            • DentrixSourceNote.tsx
            • HowItWorksNote.tsx
            • TableLoading.tsx
        • hooks/
          • useApi.ts
        • services/
          • api.ts
    • worker/
      • src/
        • db/
          • index.ts
        • routes/
          • data.ts
          • reports.ts
        • services/
          • phi-read.ts
        • utils/
          • crypto.ts
          • office.ts
          • phi-access.ts
          • phi-crypto.ts
          • timestamps.ts