Reports - Dental Days

Dental Days

Path/dental-days
Statustodo
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

TableColumns used
bookingsapp, calendar_id, date, dentrix_appointment_id, dentrix_office_id, hour, hubspot_id, id, operatory_id, patient_id, source, status
calendar_operatory_splitscalendar_id, date, operatory_dentrix_id
calendarsapproved_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
companiescity, created_at, description, domain, hubspot_id, id, industry, logo_url, name, phone, postal_code, slug, state, street_address, timezone, website
dd_cancel_requestsaction, calendar_id, created_at, new_date
dentrix_officesactive, app, dentrix_id, display_name, id, name, state, timezone
dh_patientsdate_of_birth, dentrix_id, first_name, insurance_eligible, last_name
email_recipientsactive, email, email_type, notify_types, phone
email_sendsapp, error, lang, provider, recipients, ref, sent_by, status, subject, subject_encrypted, template_key, to_email, to_email_encrypted, to_email_hash
email_templatesactive, 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_cacheaddress, found, latitude, longitude, provider
operatoriesactive, app, dentrix_id, id, name, office_id, short_name, use_for_booking
patientsapp, 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_cachedrive_meters, drive_seconds, drive_seconds_static, found, from_lat, from_lng, polyline, provider, to_lat, to_lng
schedulesarrival_datetime, calendar_id, capacity, date, end_hour, hubspot_id, primary_dentist, setup_datetime, start_hour, van_name
van_drive_alertsdrive_meters, drive_minutes, from_calendar_id, from_date, to_calendar_id, to_date, van
vansactive, color, created_at, id, name, notes, sort_order

File structure

Its own files

  • apps/
    • web/
      • src/
        • pages/
          • DentalDays.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
            • ReportHeader.tsx
            • TableLoading.tsx
          • vans/
            • VanDriveCheck.tsx
          • MaskedDateTimeInput.tsx
          • TablePagination.tsx
        • contexts/
          • AuthContext.tsx
        • hooks/
          • useApi.ts
          • useDebounce.ts
        • lib/
          • office.ts
        • services/
          • api.ts
    • 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