Reports - Marketing
Klaviyo Report
| Path | /klaviyo-report |
|---|---|
| Status | todo |
| Drill-down pages | — |
| Pop-ups | (+2 inline) |
| Tabs | — |
| API routes | /api/reports/klaviyo |
Business rules
Written when this page is worked on (docs/BUSINESS-RULES.md).
Database tables & columns
| Table | Columns used |
|---|---|
dh_procedures_current view | ada_code, category, patient_id, status |
bookings | app, patient_id |
dentrix_offices | dentrix_id, display_name, name |
dh_appointments | patient_id, start_time, status |
dh_dcode_categories | ada_code, ada_code_range_end, ada_code_range_start, category |
dh_patient_procedures | read through the view dh_procedures_current |
dh_patients | dentrix_id, email, email_hash, first_name, id, insurance_eligible, last_name, patient_status, phone, preferred_location_id, primary_source |
patients | dentrix_patient_id, id |
File structure
Its own files
- apps/
- web/
- src/
- pages/
- KlaviyoReport.tsx
- pages/
- src/
- web/
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
- ReportHeader.tsx
- LastSynced.tsx
- TablePagination.tsx
- reports/
- hooks/
- useApi.ts
- components/
- src/
- worker/
- src/
- db/
- index.ts
- routes/
- reports.ts
- services/
- phi-read-dh.ts
- phi-read.ts
- utils/
- crypto.ts
- phi-access.ts
- phi-crypto.ts
- db/
- src/
- web/