Reports - Dental Days
Dental Days
| Path | /dental-days |
|---|---|
| Status | todo |
| Drill-down pages | — |
| Pop-ups | (+6 inline) |
| Tabs | — |
| API routes | /api/b2b/hubspot-owners/api/data/companies/api/data/dental-day-offices:x/api/data/dental-days/api/data/dental-days/:x/status/api/data/dental-days/conflicts/api/data/offices/api/data/van-routes/check/api/data/vans:x/api/dentrix/sync/dd-bookings-all |
Business rules
Written when this page is worked on (docs/BUSINESS-RULES.md).
Database tables & columns
| Table | Columns used |
|---|---|
bookings | app, calendar_id, date, dentrix_appointment_id, dentrix_office_id, hour, hubspot_id, id, operatory_id, patient_id, source, status |
calendar_operatory_splits | calendar_id, date, operatory_dentrix_id |
calendars | approved_at, approved_by, calendar_name, city, created_at, dentrix_office_id, hubspot_id, hubspot_object_id, id, requested_by, requested_by_email, requested_by_name, short_code, state, status, street_address, whitening_perk, zip_code |
companies | city, created_at, description, domain, hubspot_id, id, industry, logo_url, name, phone, postal_code, slug, state, street_address, timezone, website |
dd_cancel_requests | action, calendar_id, created_at, new_date |
dentrix_offices | active, app, dentrix_id, display_name, id, name, state, timezone |
dh_patients | date_of_birth, dentrix_id, first_name, insurance_eligible, last_name |
email_recipients | active, email, email_type, notify_types, phone |
email_sends | app, error, lang, provider, recipients, ref, sent_by, status, subject, subject_encrypted, template_key, to_email, to_email_encrypted, to_email_hash |
email_templates | active, bcc_emails, body_en, body_es, from_email, key, reply_to, subject_en, subject_es, to_emails |
equipment_repairs | (columns not named in the SQL) |
geocode_cache | address, found, latitude, longitude, provider |
operatories | active, app, dentrix_id, id, name, office_id, short_name, use_for_booking |
patients | app, dentrix_patient_id, dob_encrypted, email_encrypted, first_name_encrypted, hubspot_id, id, last_name_encrypted, legal_sex, patient_type, phone_encrypted, source |
route_leg_cache | drive_meters, drive_seconds, drive_seconds_static, found, from_lat, from_lng, polyline, provider, to_lat, to_lng |
schedules | arrival_datetime, calendar_id, capacity, date, end_hour, hubspot_id, primary_dentist, setup_datetime, start_hour, van_name |
van_drive_alerts | drive_meters, drive_minutes, from_calendar_id, from_date, to_calendar_id, to_date, van |
vans | active, color, created_at, id, name, notes, sort_order |
File structure
Its own files
- apps/
- web/
- src/
- pages/
- DentalDays.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
- TableLoading.tsx
- vans/
- VanDriveCheck.tsx
- MaskedDateTimeInput.tsx
- TablePagination.tsx
- reports/
- contexts/
- AuthContext.tsx
- hooks/
- useApi.ts
- useDebounce.ts
- lib/
- office.ts
- services/
- api.ts
- components/
- src/
- worker/
- src/
- db/
- index.ts
- routes/
- b2b.ts
- data.ts
- dentrix.ts
- services/
- dd-appointments.ts
- email-templates.ts
- phi-read.ts
- van-legs.ts
- utils/
- booking-status.ts
- crypto.ts
- email.ts
- office.ts
- sms.ts
- db/
- src/
- web/