feat: Select Procedures flow, batch-column NPI provider fix, auto PDF save

- Add 'Select Procedures' right-click option on appointment page (separate from Claims/PreAuth)
- Select Procedures form saves CDT codes + NPI provider to AppointmentProcedure storage
- Remove Save button from insurance claim form; Claims/PreAuth opens for insurance submission only
- Claims/PreAuth auto-prefills from saved procedures including NPI provider
- Batch-column: procedures npiProviderId takes priority over stale claim npiProviderId
- Batch-column: auto-save PDF to patient Documents after successful submission (no socket needed)
- Add npiProviderId column to AppointmentProcedure table (prisma db push)
- Fix 'invalid db creation invocation': guard staffId, npiProviderId, procedureDate as Date object, totalBilled NaN guard
- Add full error logging to batch-column catch block

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-04-27 00:25:24 -04:00
parent a279a3e7c1
commit 3e899376c3
838 changed files with 28488 additions and 773 deletions

View File

@@ -11,6 +11,7 @@ import { NullableStringFieldUpdateOperationsInputObjectSchema as NullableStringF
import { PatientUpdateOneRequiredWithoutClaimsNestedInputObjectSchema as PatientUpdateOneRequiredWithoutClaimsNestedInputObjectSchema } from './PatientUpdateOneRequiredWithoutClaimsNestedInput.schema';
import { AppointmentUpdateOneRequiredWithoutClaimsNestedInputObjectSchema as AppointmentUpdateOneRequiredWithoutClaimsNestedInputObjectSchema } from './AppointmentUpdateOneRequiredWithoutClaimsNestedInput.schema';
import { StaffUpdateOneWithoutClaimsNestedInputObjectSchema as StaffUpdateOneWithoutClaimsNestedInputObjectSchema } from './StaffUpdateOneWithoutClaimsNestedInput.schema';
import { NpiProviderUpdateOneWithoutClaimsNestedInputObjectSchema as NpiProviderUpdateOneWithoutClaimsNestedInputObjectSchema } from './NpiProviderUpdateOneWithoutClaimsNestedInput.schema';
import { ServiceLineUpdateManyWithoutClaimNestedInputObjectSchema as ServiceLineUpdateManyWithoutClaimNestedInputObjectSchema } from './ServiceLineUpdateManyWithoutClaimNestedInput.schema';
import { ClaimFileUpdateManyWithoutClaimNestedInputObjectSchema as ClaimFileUpdateManyWithoutClaimNestedInputObjectSchema } from './ClaimFileUpdateManyWithoutClaimNestedInput.schema';
import { PaymentUpdateOneWithoutClaimNestedInputObjectSchema as PaymentUpdateOneWithoutClaimNestedInputObjectSchema } from './PaymentUpdateOneWithoutClaimNestedInput.schema'
@@ -33,6 +34,7 @@ const makeSchema = () => z.object({
patient: z.lazy(() => PatientUpdateOneRequiredWithoutClaimsNestedInputObjectSchema).optional(),
appointment: z.lazy(() => AppointmentUpdateOneRequiredWithoutClaimsNestedInputObjectSchema).optional(),
staff: z.lazy(() => StaffUpdateOneWithoutClaimsNestedInputObjectSchema).optional(),
npiProvider: z.lazy(() => NpiProviderUpdateOneWithoutClaimsNestedInputObjectSchema).optional(),
serviceLines: z.lazy(() => ServiceLineUpdateManyWithoutClaimNestedInputObjectSchema).optional(),
claimFiles: z.lazy(() => ClaimFileUpdateManyWithoutClaimNestedInputObjectSchema).optional(),
payment: z.lazy(() => PaymentUpdateOneWithoutClaimNestedInputObjectSchema).optional()