feat: add Provider field to appointment form, drive AI claim automation
Adds an optional Provider (NPI) select to the Edit Appointment form, sourced from Settings > NPI Providers. The AI "Claim for Column" batch flow now prefers the appointment's own provider when resolving which provider Selenium should select on the insurance site (e.g. MassHealth rendering provider dropdown), falling back to the existing per-procedure selection, active claim, or first configured provider. Also resyncs packages/db's committed compiled schema/client artifacts with their .ts sources — they had drifted out of sync (some untouched since July), which was silently stripping the new npiProviderId field via stale .strict() zod schemas. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -162,6 +162,7 @@ exports.Prisma.AppointmentScalarFieldEnum = {
|
||||
patientId: 'patientId',
|
||||
userId: 'userId',
|
||||
staffId: 'staffId',
|
||||
npiProviderId: 'npiProviderId',
|
||||
title: 'title',
|
||||
date: 'date',
|
||||
startTime: 'startTime',
|
||||
|
||||
551
packages/db/generated/prisma/index.d.ts
vendored
551
packages/db/generated/prisma/index.d.ts
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "prisma-client-1397903f012032ff276557e7a077db07df8a7cae6f68fef0b7224d110a42b0e3",
|
||||
"name": "prisma-client-06444e98f8328a30442a56cbded54a265df02594192db5e428350bbd93cc975b",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"browser": "default.js",
|
||||
|
||||
@@ -103,6 +103,7 @@ model Appointment {
|
||||
patientId Int
|
||||
userId Int
|
||||
staffId Int
|
||||
npiProviderId Int?
|
||||
title String
|
||||
date DateTime @db.Date
|
||||
startTime String // Store time as "hh:mm"
|
||||
@@ -117,12 +118,13 @@ model Appointment {
|
||||
|
||||
eligibilityStatus PatientStatus @default(UNKNOWN)
|
||||
|
||||
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
staff Staff? @relation(fields: [staffId], references: [id])
|
||||
procedures AppointmentProcedure[]
|
||||
claims Claim[]
|
||||
files AppointmentFile[]
|
||||
patient Patient @relation(fields: [patientId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id])
|
||||
staff Staff? @relation(fields: [staffId], references: [id])
|
||||
npiProvider NpiProvider? @relation(fields: [npiProviderId], references: [id])
|
||||
procedures AppointmentProcedure[]
|
||||
claims Claim[]
|
||||
files AppointmentFile[]
|
||||
|
||||
@@index([patientId])
|
||||
@@index([date])
|
||||
@@ -166,6 +168,7 @@ model NpiProvider {
|
||||
payments Payment[]
|
||||
commissionBatches CommissionBatch[]
|
||||
appointmentProcedures AppointmentProcedure[]
|
||||
appointments Appointment[]
|
||||
|
||||
@@unique([userId, npiNumber])
|
||||
@@index([userId])
|
||||
|
||||
Reference in New Issue
Block a user