Accounts Receivable
Payments
| Path | /payments |
|---|---|
| Status | todo |
| Drill-down pages | — |
| Pop-ups | (+2 inline) |
| Tabs | — |
| API routes | /api/payment-requests/api/payment-requests/:x/cancel/api/payment-requests/offices/api/payment-requests/patients/api/payment-requests/patients/:x/items |
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, amount, description, id, location_id, patient_id, service_date, status |
dentrix_offices | dentrix_id, name |
dh_claim_procedures | claim_state, is_active, patient_portion, primary_insurance_portion, procedure_id, secondary_insurance_portion |
dh_ledger_distributions | applied_amount, charge_id, is_active, transaction_id |
dh_ledger_transactions | is_active, ledger_type, patient_procedure_id, transaction_id |
dh_patient_procedures | read through the view dh_procedures_current |
dh_patients | chart_number, date_of_birth, dentrix_id, email, email_encrypted, first_name, id, last_name, 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 |
payment_requests | amount_cents, cancelled_at, cancelled_by, channels, created_at, created_by, emailed_at, expires_at, id, items, note, office_dentrix_id, paid_amount_cents, paid_at, patient_id, sent_to_email, sent_to_phone, status, stripe_payment_intent_id, token_hash |
File structure
Its own files
- apps/
- web/
- src/
- pages/
- Payments.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
- reports/
- hooks/
- useApi.ts
- services/
- api.ts
- components/
- src/
- worker/
- src/
- db/
- index.ts
- routes/
- payment-requests.ts
- services/
- email-templates.ts
- utils/
- crypto.ts
- email.ts
- office.ts
- phi-access.ts
- phi-crypto.ts
- db/
- src/
- web/