- Patient: new secondaryInsuranceProvider / secondaryInsuranceId (form section, Patient Details, merge fill) - MassHealth check on an SCO patient (Tufts SCO / United SCO primary), matched by MassHealth ID on file as secondary or by the single SCO patient with the same DOB (name must share a word when the portal returns one): MassHealth saved as secondary, primary plan/ID/status unchanged, MassHealth history not imported, PDF still saved to Eligibility documents. Prevents the name+DOB fallback from overwriting the SCO ID - United SCO check: a MassHealth patient moved to United SCO keeps the old MassHealth ID as secondary; reads Dental Hub Service History and saves it - Service history saves drop duplicate identical lines - Chatbot: bare 100… member ID + DOB with no patient/insurance defaults to MassHealth Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
43 lines
1.5 KiB
TypeScript
43 lines
1.5 KiB
TypeScript
import * as z from 'zod';
|
|
export const PatientUpdateResultSchema = z.nullable(z.object({
|
|
id: z.number().int(),
|
|
firstName: z.string(),
|
|
lastName: z.string(),
|
|
dateOfBirth: z.date().optional(),
|
|
gender: z.string(),
|
|
phone: z.string(),
|
|
email: z.string().optional(),
|
|
address: z.string().optional(),
|
|
city: z.string().optional(),
|
|
state: z.string().optional(),
|
|
zipCode: z.string().optional(),
|
|
insuranceProvider: z.string().optional(),
|
|
insuranceId: z.string().optional(),
|
|
groupNumber: z.string().optional(),
|
|
policyHolder: z.string().optional(),
|
|
policyHolderPatientId: z.number().int().optional(),
|
|
policyHolderRelationship: z.string().optional(),
|
|
secondaryInsuranceProvider: z.string().optional(),
|
|
secondaryInsuranceId: z.string().optional(),
|
|
allergies: z.string().optional(),
|
|
medicalConditions: z.string().optional(),
|
|
preferredLanguage: z.string().optional(),
|
|
status: z.unknown(),
|
|
remainingBenefit: z.string().optional(),
|
|
thirdPartyInsurance: z.string().optional(),
|
|
userId: z.number().int(),
|
|
createdAt: z.date(),
|
|
updatedAt: z.date(),
|
|
user: z.unknown(),
|
|
appointments: z.array(z.unknown()),
|
|
procedures: z.array(z.unknown()),
|
|
claims: z.array(z.unknown()),
|
|
groups: z.array(z.unknown()),
|
|
payment: z.array(z.unknown()),
|
|
communications: z.array(z.unknown()),
|
|
documents: z.array(z.unknown()),
|
|
conversation: z.unknown().optional(),
|
|
cloudFolders: z.array(z.unknown()),
|
|
serviceHistory: z.array(z.unknown()),
|
|
preauthHistory: z.array(z.unknown())
|
|
})); |