feat: chat window, preferred language, insurance contact, and AI call eligibility

- Schedule: right-click Chat option opens floating SMS chat window
- Chat window: SMS template selector with appointment date/time pre-filled
- Chat window: office name and phone pulled from Settings > Office Contact
- Chat window: Preferred Language selector (English, Spanish, Portuguese,
  Mandarin, Cantonese, Arabic, Haitian Creole) with fully translated templates
  and locale-aware date/time formatting
- Patient form: Preferred Language field (add/edit), default English
- Settings > Office Contact: added Dental Office Name field
- Settings > Advanced: Insurance Contact page (CRUD — company name + phone)
- Prisma schema: preferredLanguage on Patient, officeName on OfficeContact,
  new InsuranceContact model
- Patient management: Upload Patient Document moved below Patient Records
- Insurance Eligibility: AI Call Insurance collapsible section; insurance
  company and phone auto-populated from saved Insurance Contacts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-05-07 16:42:37 -04:00
parent dd0df4a435
commit 16429320fa
16 changed files with 977 additions and 115 deletions

View File

@@ -42,6 +42,7 @@ model User {
officeHours OfficeHours?
officeContact OfficeContact?
procedureTimeslot ProcedureTimeslot?
insuranceContacts InsuranceContact[]
}
model Patient {
@@ -59,9 +60,10 @@ model Patient {
insuranceId String?
groupNumber String?
policyHolder String?
allergies String?
medicalConditions String?
status PatientStatus @default(UNKNOWN)
allergies String?
medicalConditions String?
preferredLanguage String? @default("English")
status PatientStatus @default(UNKNOWN)
userId Int
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@ -593,6 +595,7 @@ model OfficeHours {
model OfficeContact {
id Int @id @default(autoincrement())
userId Int @unique
officeName String?
receptionistName String?
dentistName String?
phoneNumber String?
@@ -604,6 +607,18 @@ model OfficeContact {
@@map("office_contact")
}
model InsuranceContact {
id Int @id @default(autoincrement())
userId Int
name String
phoneNumber String?
createdAt DateTime @default(now())
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
@@map("insurance_contact")
}
model ProcedureTimeslot {
id Int @id @default(autoincrement())
userId Int @unique