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:
ff
2026-07-20 23:07:10 -04:00
co-authored by Claude Sonnet 5
parent ca568de817
commit b1932fa3d6
1285 changed files with 21237 additions and 4432 deletions
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const AppointmentScalarFieldEnumSchema: z.ZodEnum<["id", "patientId", "userId", "staffId", "title", "date", "startTime", "endTime", "type", "notes", "procedureCodeNotes", "status", "createdAt", "eligibilityStatus"]>;
export declare const AppointmentScalarFieldEnumSchema: z.ZodEnum<["id", "patientId", "userId", "staffId", "npiProviderId", "title", "date", "startTime", "endTime", "type", "typeLocked", "notes", "procedureCodeNotes", "status", "movedByAi", "createdAt", "eligibilityStatus"]>;
export type AppointmentScalarFieldEnum = z.infer<typeof AppointmentScalarFieldEnumSchema>;
//# sourceMappingURL=AppointmentScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"AppointmentScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["AppointmentScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,iLAA+K,CAAA;AAE5N,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
{"version":3,"file":"AppointmentScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["AppointmentScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,6NAA2N,CAAA;AAExQ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -35,4 +35,4 @@ var __importStar = (this && this.__importStar) || (function () {
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppointmentScalarFieldEnumSchema = void 0;
const z = __importStar(require("zod"));
exports.AppointmentScalarFieldEnumSchema = z.enum(['id', 'patientId', 'userId', 'staffId', 'title', 'date', 'startTime', 'endTime', 'type', 'typeLocked', 'notes', 'procedureCodeNotes', 'status', 'movedByAi', 'createdAt', 'eligibilityStatus']);
exports.AppointmentScalarFieldEnumSchema = z.enum(['id', 'patientId', 'userId', 'staffId', 'npiProviderId', 'title', 'date', 'startTime', 'endTime', 'type', 'typeLocked', 'notes', 'procedureCodeNotes', 'status', 'movedByAi', 'createdAt', 'eligibilityStatus']);
@@ -1,5 +1,5 @@
import * as z from 'zod';
export const AppointmentScalarFieldEnumSchema = z.enum(['id', 'patientId', 'userId', 'staffId', 'title', 'date', 'startTime', 'endTime', 'type', 'typeLocked', 'notes', 'procedureCodeNotes', 'status', 'movedByAi', 'createdAt', 'eligibilityStatus'])
export const AppointmentScalarFieldEnumSchema = z.enum(['id', 'patientId', 'userId', 'staffId', 'npiProviderId', 'title', 'date', 'startTime', 'endTime', 'type', 'typeLocked', 'notes', 'procedureCodeNotes', 'status', 'movedByAi', 'createdAt', 'eligibilityStatus'])
export type AppointmentScalarFieldEnum = z.infer<typeof AppointmentScalarFieldEnumSchema>;
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const ClaimScalarFieldEnumSchema: z.ZodEnum<["id", "patientId", "appointmentId", "userId", "staffId", "patientName", "memberId", "dateOfBirth", "remarks", "missingTeethStatus", "missingTeeth", "serviceDate", "insuranceProvider", "createdAt", "updatedAt", "status", "claimNumber", "npiProviderId"]>;
export declare const ClaimScalarFieldEnumSchema: z.ZodEnum<["id", "patientId", "appointmentId", "userId", "staffId", "patientName", "memberId", "dateOfBirth", "remarks", "missingTeethStatus", "missingTeeth", "serviceDate", "insuranceProvider", "createdAt", "updatedAt", "status", "claimNumber", "preAuthNumber", "npiProviderId"]>;
export type ClaimScalarFieldEnum = z.infer<typeof ClaimScalarFieldEnumSchema>;
//# sourceMappingURL=ClaimScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"ClaimScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["ClaimScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,0BAA0B,yQAAuQ,CAAA;AAE9S,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
{"version":3,"file":"ClaimScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["ClaimScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,0BAA0B,0RAAwR,CAAA;AAE/T,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC"}
+1 -1
View File
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const ClaimStatusSchema: z.ZodEnum<["PENDING", "APPROVED", "CANCELLED", "REVIEW", "VOID"]>;
export declare const ClaimStatusSchema: z.ZodEnum<["PENDING", "APPROVED", "CANCELLED", "REVIEW", "VOID", "PREAUTH"]>;
export type ClaimStatus = z.infer<typeof ClaimStatusSchema>;
//# sourceMappingURL=ClaimStatus.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"ClaimStatus.schema.d.ts","sourceRoot":"","sources":["ClaimStatus.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,iBAAiB,mEAAiE,CAAA;AAE/F,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
{"version":3,"file":"ClaimStatus.schema.d.ts","sourceRoot":"","sources":["ClaimStatus.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,iBAAiB,8EAA4E,CAAA;AAE1G,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const CloudFolderScalarFieldEnumSchema: z.ZodEnum<["id", "userId", "name", "parentId", "createdAt", "updatedAt"]>;
export declare const CloudFolderScalarFieldEnumSchema: z.ZodEnum<["id", "userId", "name", "parentId", "patientId", "createdAt", "updatedAt"]>;
export type CloudFolderScalarFieldEnum = z.infer<typeof CloudFolderScalarFieldEnumSchema>;
//# sourceMappingURL=CloudFolderScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"CloudFolderScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["CloudFolderScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,2EAAyE,CAAA;AAEtH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
{"version":3,"file":"CloudFolderScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["CloudFolderScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,wFAAsF,CAAA;AAEnI,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -0,0 +1,38 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.LabRxTemplateScalarFieldEnumSchema = void 0;
const z = __importStar(require("zod"));
exports.LabRxTemplateScalarFieldEnumSchema = z.enum(['id', 'userId', 'name', 'labName', 'labPhone', 'labFax', 'labAddress', 'labAccount', 'caseType', 'material', 'instructions', 'sortOrder', 'createdAt', 'updatedAt']);
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const NpiProviderScalarFieldEnumSchema: z.ZodEnum<["id", "userId", "npiNumber", "providerName", "createdAt"]>;
export declare const NpiProviderScalarFieldEnumSchema: z.ZodEnum<["id", "userId", "npiNumber", "providerName", "sortOrder", "createdAt"]>;
export type NpiProviderScalarFieldEnum = z.infer<typeof NpiProviderScalarFieldEnumSchema>;
//# sourceMappingURL=NpiProviderScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"NpiProviderScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["NpiProviderScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,uEAAqE,CAAA;AAElH,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
{"version":3,"file":"NpiProviderScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["NpiProviderScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,oFAAkF,CAAA;AAE/H,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const PatientScalarFieldEnumSchema: z.ZodEnum<["id", "firstName", "lastName", "dateOfBirth", "gender", "phone", "email", "address", "city", "zipCode", "insuranceProvider", "insuranceId", "groupNumber", "policyHolder", "allergies", "medicalConditions", "status", "userId", "createdAt"]>;
export declare const PatientScalarFieldEnumSchema: z.ZodEnum<["id", "firstName", "lastName", "dateOfBirth", "gender", "phone", "email", "address", "city", "zipCode", "insuranceProvider", "insuranceId", "groupNumber", "policyHolder", "allergies", "medicalConditions", "preferredLanguage", "status", "userId", "createdAt", "updatedAt"]>;
export type PatientScalarFieldEnum = z.infer<typeof PatientScalarFieldEnumSchema>;
//# sourceMappingURL=PatientScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"PatientScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["PatientScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,4BAA4B,2PAAyP,CAAA;AAElS,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
{"version":3,"file":"PatientScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["PatientScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,4BAA4B,6RAA2R,CAAA;AAEpU,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const PaymentScalarFieldEnumSchema: z.ZodEnum<["id", "claimId", "patientId", "userId", "updatedById", "totalBilled", "totalPaid", "totalAdjusted", "totalDue", "status", "notes", "icn", "createdAt", "updatedAt"]>;
export declare const PaymentScalarFieldEnumSchema: z.ZodEnum<["id", "claimId", "patientId", "userId", "updatedById", "npiProviderId", "totalBilled", "totalPaid", "totalAdjusted", "totalDue", "mhPaidAmount", "copayment", "adjustment", "status", "notes", "icn", "createdAt", "updatedAt"]>;
export type PaymentScalarFieldEnum = z.infer<typeof PaymentScalarFieldEnumSchema>;
//# sourceMappingURL=PaymentScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"PaymentScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["PaymentScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,4BAA4B,iLAA+K,CAAA;AAExN,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
{"version":3,"file":"PaymentScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["PaymentScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,4BAA4B,6OAA2O,CAAA;AAEpR,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -0,0 +1,38 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.SeleniumSettingsScalarFieldEnumSchema = void 0;
const z = __importStar(require("zod"));
exports.SeleniumSettingsScalarFieldEnumSchema = z.enum(['id', 'userId', 'paymentGroupId']);
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const ServiceLineScalarFieldEnumSchema: z.ZodEnum<["id", "claimId", "paymentId", "procedureCode", "procedureDate", "quad", "arch", "toothNumber", "toothSurface", "totalBilled", "totalPaid", "totalAdjusted", "totalDue", "status"]>;
export declare const ServiceLineScalarFieldEnumSchema: z.ZodEnum<["id", "claimId", "paymentId", "procedureCode", "procedureDate", "quad", "arch", "toothNumber", "toothSurface", "icn", "paidCode", "allowedAmount", "totalBilled", "totalPaid", "totalAdjusted", "totalDue", "status"]>;
export type ServiceLineScalarFieldEnum = z.infer<typeof ServiceLineScalarFieldEnumSchema>;
//# sourceMappingURL=ServiceLineScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"ServiceLineScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["ServiceLineScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,+LAA6L,CAAA;AAE1O,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
{"version":3,"file":"ServiceLineScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["ServiceLineScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,gCAAgC,mOAAiO,CAAA;AAE9Q,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC"}
@@ -1,4 +1,4 @@
import * as z from 'zod';
export declare const UserScalarFieldEnumSchema: z.ZodEnum<["id", "username", "password", "autoBackupEnabled", "usbBackupEnabled"]>;
export declare const UserScalarFieldEnumSchema: z.ZodEnum<["id", "username", "password", "autoBackupEnabled", "autoBackupHour", "usbBackupEnabled", "usbBackupHour", "autoMhCheckEnabled", "autoMhCheckDayOfWeek", "autoMhCheckHour"]>;
export type UserScalarFieldEnum = z.infer<typeof UserScalarFieldEnumSchema>;
//# sourceMappingURL=UserScalarFieldEnum.schema.d.ts.map
@@ -1 +1 @@
{"version":3,"file":"UserScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["UserScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,yBAAyB,oFAAkF,CAAA;AAExH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
{"version":3,"file":"UserScalarFieldEnum.schema.d.ts","sourceRoot":"","sources":["UserScalarFieldEnum.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,yBAAyB,wLAAsL,CAAA;AAE5N,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}