feat: add Procedure Duration/Time Slot settings and custom appointment type
- Add Settings > Advanced > Procedure Duration/Time Slot page with three sections: 1. Procedure Duration: CDT codes with durations (editable table, save per section) 2. Doctor Time Slot: drag-to-block visual grid (A/B/C columns, 8 AM–9 PM, edit/delete slots) 3. Hygienist Time Slot: procedure descriptions with durations - Backend: ProcedureTimeslot Prisma model, storage, and GET/PUT /api/procedure-timeslot route - DB migration: procedure_timeslot table - Appointment form: when type is "Other", show a free-text input for custom description; saved as other:<description> and decoded for display on the schedule card Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
CREATE TABLE "procedure_timeslot" (
|
||||
"id" SERIAL NOT NULL,
|
||||
"userId" INTEGER NOT NULL,
|
||||
"data" JSONB NOT NULL,
|
||||
CONSTRAINT "procedure_timeslot_pkey" PRIMARY KEY ("id")
|
||||
);
|
||||
|
||||
ALTER TABLE "procedure_timeslot" ADD CONSTRAINT "procedure_timeslot_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
CREATE UNIQUE INDEX "procedure_timeslot_userId_key" ON "procedure_timeslot"("userId");
|
||||
@@ -41,6 +41,7 @@ model User {
|
||||
aiSettings AiSettings?
|
||||
officeHours OfficeHours?
|
||||
officeContact OfficeContact?
|
||||
procedureTimeslot ProcedureTimeslot?
|
||||
}
|
||||
|
||||
model Patient {
|
||||
@@ -596,3 +597,13 @@ model OfficeContact {
|
||||
|
||||
@@map("office_contact")
|
||||
}
|
||||
|
||||
model ProcedureTimeslot {
|
||||
id Int @id @default(autoincrement())
|
||||
userId Int @unique
|
||||
data Json
|
||||
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@map("procedure_timeslot")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user