feat: United/DentalHub claim submission automation and patient list sync

- Add full Selenium automation for United/DentalHub claim submission
  (steps 1-8: login, OTP, patient search, practitioner page, code entry,
  other coverage No, attachments, submit, Status & History PDF)
- Consolidate UnitedDH siteKey to UNITED_SCO throughout app
- Fix procedure date overwrite with Ctrl+A+Delete before typing service date
- Fix OTP popup reliability: emit every poll (no throttle)
- Fix Chrome session persistence: only clear cookies on startup
- Add touchPatient() to storage: claim submission now pushes patient to
  top of list across eligibility, claims, and documents pages

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gitead
2026-05-25 00:29:04 -04:00
parent cd1381e9c6
commit 1e581c193c
14 changed files with 2100 additions and 95 deletions

View File

@@ -15,6 +15,7 @@ export interface IStorage {
getPatientsByIds(ids: number[]): Promise<Patient[]>;
createPatient(patient: InsertPatient): Promise<Patient>;
updatePatient(id: number, patient: UpdatePatient): Promise<Patient>;
touchPatient(id: number): Promise<void>;
deletePatient(id: number): Promise<void>;
searchPatients(args: {
filters: any;
@@ -105,6 +106,15 @@ export const patientsStorage: IStorage = {
}
},
async touchPatient(id: number): Promise<void> {
try {
await db.patient.update({
where: { id },
data: { updatedAt: new Date() },
});
} catch (_) {}
},
async deletePatient(id: number): Promise<void> {
try {
await db.patient.delete({ where: { id } });