fix: allow letters in insurance ID; add patient state (default MA)
- Backend insurance ID check now accepts letters + digits (BCBS IDs have a letter prefix), matching the frontend schema; create route validates the normalized body - Patient.state column (default "MA") with State select on the patient form; ADA claim form uses the patient's state instead of the office's - Rebuild stale packages/db compiled .js so the runtime schemas include new fields (state, office billing NPI fields, Telnyx settings) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,15 @@ import {
|
||||
import { z } from "zod";
|
||||
import { DateInputField } from "@/components/ui/dateInputField";
|
||||
|
||||
// New England first (most patients), then the remaining states alphabetically
|
||||
const US_STATES = [
|
||||
"MA", "NH", "RI", "CT", "VT", "ME",
|
||||
"AK", "AL", "AR", "AZ", "CA", "CO", "DC", "DE", "FL", "GA", "HI", "IA",
|
||||
"ID", "IL", "IN", "KS", "KY", "LA", "MD", "MI", "MN", "MO", "MS", "MT",
|
||||
"NC", "ND", "NE", "NJ", "NM", "NV", "NY", "OH", "OK", "OR", "PA", "SC",
|
||||
"SD", "TN", "TX", "UT", "VA", "WA", "WI", "WV", "WY",
|
||||
];
|
||||
|
||||
interface PatientFormProps {
|
||||
patient?: Patient;
|
||||
extractedInfo?: {
|
||||
@@ -102,6 +111,7 @@ export const PatientForm = forwardRef<PatientFormRef, PatientFormProps>(
|
||||
email: "",
|
||||
address: "",
|
||||
city: "",
|
||||
state: "MA",
|
||||
zipCode: "",
|
||||
insuranceProvider: "",
|
||||
insuranceId: extractedInfo?.insuranceId || "",
|
||||
@@ -366,6 +376,34 @@ export const PatientForm = forwardRef<PatientFormRef, PatientFormProps>(
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="state"
|
||||
render={({ field }) => (
|
||||
<FormItem>
|
||||
<FormLabel>State</FormLabel>
|
||||
<Select
|
||||
onValueChange={field.onChange}
|
||||
value={(field.value as string) || "MA"}
|
||||
>
|
||||
<FormControl>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Select state" />
|
||||
</SelectTrigger>
|
||||
</FormControl>
|
||||
<SelectContent>
|
||||
{US_STATES.map((st) => (
|
||||
<SelectItem key={st} value={st}>
|
||||
{st}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
<FormMessage />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="zipCode"
|
||||
|
||||
Reference in New Issue
Block a user