feat: DentaQuest eligibility — PLAN_NOT_ACCEPTED status, DOB save, no retries
- Add PLAN_NOT_ACCEPTED to PatientStatus enum (prisma schema + db push) - Selenium: return "plan not accepted" eligibility text instead of collapsing to inactive - Backend processor: map "plan not accepted" → PLAN_NOT_ACCEPTED, fix insuranceProvider label - _shared.ts: save DOB for existing patients when field is currently empty - Frontend: show amber "Plan Not Accepted" badge in patient table and detail panel - patient-form.tsx: display "Plan Not Accepted" label in status dropdown - BullMQ: set attempts=1 (no retry on selenium failure) - DDMA: remove first/last name from search (member ID + DOB only) - patient-types.ts: allow alphanumeric insurance IDs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -48,8 +48,10 @@ function getVisuals(status: PatientStatus): { label: string; bg: string } {
|
||||
case "ACTIVE":
|
||||
return { label: "Active", bg: "#16A34A" }; // MEDICAL GREEN (not same as staff green)
|
||||
case "INACTIVE":
|
||||
return { label: "Inactive", bg: "#DC2626" }; // ALERT RED (distinct from card red)
|
||||
return { label: "Inactive", bg: "#DC2626" };
|
||||
case "PLAN_NOT_ACCEPTED":
|
||||
return { label: "Plan Not Accepted", bg: "#F59E0B" }; // amber
|
||||
default:
|
||||
return { label: "Unknown", bg: "#6B7280" }; // solid gray
|
||||
return { label: "Unknown", bg: "#6B7280" };
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,8 +303,10 @@ export const PatientForm = forwardRef<PatientFormRef, PatientFormProps>(
|
||||
const options = Object.values(
|
||||
patientStatusOptions,
|
||||
) as PatientStatus[]; // ['ACTIVE','INACTIVE','UNKNOWN']
|
||||
const toLabel = (v: PatientStatus) =>
|
||||
v[0] + v.slice(1).toLowerCase(); // ACTIVE -> Active
|
||||
const toLabel = (v: PatientStatus) => {
|
||||
if (v === "PLAN_NOT_ACCEPTED") return "Plan Not Accepted";
|
||||
return v[0] + v.slice(1).toLowerCase();
|
||||
};
|
||||
|
||||
return (
|
||||
<FormItem>
|
||||
|
||||
@@ -1071,6 +1071,12 @@ export function PatientTable({
|
||||
Unknown
|
||||
</span>
|
||||
)}
|
||||
|
||||
{patient.status === "PLAN_NOT_ACCEPTED" && (
|
||||
<span className="inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-amber-100 text-amber-800">
|
||||
Plan Not Accepted
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</TableCell>
|
||||
|
||||
@@ -1201,14 +1207,18 @@ export function PatientTable({
|
||||
? "text-green-600"
|
||||
: currentPatient.status === "INACTIVE"
|
||||
? "text-red-600"
|
||||
: "text-gray-600", // UNKNOWN or fallback
|
||||
: currentPatient.status === "PLAN_NOT_ACCEPTED"
|
||||
? "text-amber-600"
|
||||
: "text-gray-600",
|
||||
"font-medium"
|
||||
)}
|
||||
>
|
||||
{currentPatient.status
|
||||
? currentPatient.status.charAt(0).toUpperCase() +
|
||||
currentPatient.status.slice(1).toLowerCase()
|
||||
: "Unknown"}
|
||||
{currentPatient.status === "PLAN_NOT_ACCEPTED"
|
||||
? "Plan Not Accepted"
|
||||
: currentPatient.status
|
||||
? currentPatient.status.charAt(0).toUpperCase() +
|
||||
currentPatient.status.slice(1).toLowerCase()
|
||||
: "Unknown"}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user