100 Commits
Author SHA1 Message Date
GiteadandClaude Opus 5.5 c87ab6c6aa feat: Take Screenshot in claim form uploads; Claim Again sends only the form's attachments
- Shared screenshot crop dialog (useScreenshotAttach) used by appointment
  attachments and the claim form's upload zone (allowScreenshot).
- Claim Again no longer merges appointment files into the submit or relinks
  them to the claim, so an attachment removed in the form stays removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:26:24 -05:00
GiteadandClaude Opus 5.5 599c88d34a fix: Claim Again updates the original claim so the new claim number replaces the old one
Resubmitting via Claim Again now PUTs to the source claim (old number kept in
remarks, unpaid payment billed amount resynced) instead of creating a duplicate
claim and payment. Preauth sources and preauth requests still create a new record.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-01 10:26:24 -05:00
GiteadandClaude Opus 5.5 432150b7a7 feat: Check DDMA Payments reads Plan Pays from DDMA claim status, fills app payments and saves a PDF
Adds a Check DDMA Payments card (date range, Go, auto-check schedule) above
Check MH Payments. Go logs into DDMA (with OTP), searches Check Claim Status by
service date range, reads claim numbers and Plan Pays across pages, matches
them to app claims to fill the paid amount, creates patient + payment for
unmatched paid claims, and saves the results page as a PDF in
uploads/DDMAPayment.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 22:11:36 -05:00
GiteadandClaude Opus 5.5 2ee45f1b13 feat: Claim Again button in Claim/Preauth Details reopens the claim form prefilled from that claim
Copies service date, procedure lines, remarks, missing teeth, staff, NPI provider,
insurance type and attachments; submitting through an insurance button creates a
new claim. MH/CCA routes read carried attachments from disk by ClaimFile id.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:52:31 -05:00
GiteadandClaude Opus 5.5 3410a2a0c4 fix: schedule AI claim keeps per-tooth procedure groups on one patient
Notes like "#6 post, crown, #7 rct, post, crown" now give each procedure the
tooth number it follows, and claim groups the AI splits per tooth for the same
patient are merged back into a single claim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:51:59 -05:00
GiteadandClaude Opus 5.5 b951524fcc fix: DDMA claim selects tooth number via row's ToothNumber{i} combobox
Tooth numbers on later treatment rows were skipped (element not interactable)
because the trigger was picked positionally from all 'filtrable' spans. Now
targets #ToothNumber{i}_input and its #ToothNumber{i}-ul listbox, and closes
the procedure-code suggestion list before opening the tooth dropdown.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 12:28:28 -05:00
GiteadandClaude Opus 5.5 dc19b15240 feat: United SCO Check PreAuth searches DentalHub by authorization number and saves the summary PDF
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 00:06:33 -05:00
GiteadandClaude Opus 5.5 db1aef5ccf fix: DentaQuest eligibility marked Inactive members as active
"active" substring matched "inactive" (and "eligible" matched "not eligible"); check negative statuses first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-23 23:18:35 -05:00
GiteadandClaude Opus 5.5 a99aa32463 feat: chat member ID/DOB eligibility defaults to DDMA, MassHealth moved to end of insurance dropdown
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 22:07:23 -05:00
GiteadandClaude Opus 5.5 5d7a35bdc9 feat: shorten MH eligibility button and move it with PDF viewer toggle below Delta IL/Others row
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:24:12 -05:00
GiteadandClaude Opus 5.5 b95196f4c8 feat: Check PreAuth sets claim Approved/Denied from portal status, Tufts SCO denied preauth PDF
- Add DENIED claim status (migration) and show it in claims list, view and edit
- Check PreAuth updates the claim status from the portal result and refreshes the claims list
- Tufts SCO: read Status column from any cell type, sturdier click into the
  pre-auth detail page (JS fallback, new tab), procedure section optional,
  status in the saved PDF filename, log failures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 11:44:53 -05:00
GiteadandClaude Opus 5.5 108c72e570 feat: chat ID/DOB with Subscriber #/month-name DOB, partial denture and amalgam CDT codes
- Chat bot detects "Subscriber #: ... Patient date of birth: Jul 31, 1982 Age: 44"
  (subscriber/member # labels, month-name dates, age ignored)
- Partial dentures coded by arch and material regardless of tooth numbers
  (D5211-D5214, D5225/D5226), plus repairs (D5611-D5622), relines (D5740-D5761)
  and per-tooth work (D5630, D5640, D5650, D5660)
- Amalgam fillings use D2140/D2150/D2160/D2161 by surface count instead of composite codes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 23:40:46 -05:00
GiteadandClaude Opus 5.5 6c98f7f985 feat: Tufts SCO service/preauth history, chat clear archives history, labeled ID/DOB detection
- AI chat Clear empties the chat box but archives the conversation in the per-user JSON file
- Chat bot detects Member ID/DOB pasted with labels ("Date of Birth ... Member ID ...")
- Tufts SCO (DentaQuest) eligibility saves the member's service history
- Tufts SCO Check PreAuth saves procedure lines (code, tooth, plan payment, status) to a
  new PatientPreauthHistory table, shown as Preauth History in Patient Details

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 22:34:27 -05:00
GiteadandClaude Opus 5.5 2352922089 fix: CCA claim includes appointment attachments in Selenium upload
The CCA claim route only forwarded files uploaded in the current request,
so attachments already saved on the appointment never reached the portal.
Merge them like the MassHealth and CCA Pre-Auth routes do, and save new
uploads to the patient folder instead of recording filenames only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 10:44:15 -05:00
GiteadandClaude Opus 5.5 0db69a34b6 feat: CCA Check Preauth approval PDF, merge patients, attachment picker across records
- CCA Check Preauth: searches Authorization Search by auth number, clicks View Auth on the
  result row and saves the PortalAuthReport PDF to the patient's Approval folder
- Merge Patients button above the eligibility page search (admin only): moves appointments,
  claims, payments, PDFs, documents and Cloud Storage folders onto the kept record, fills its
  blank fields, deletes the other records, all in one transaction
- Appointment attachment picker lists files from all of the patient's folders and from the
  patient's other records (same first + last name), labeled by record

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 09:58:57 -05:00
GiteadandClaude Opus 5.5 1968e3bfcc feat: MH claim 15-digit claim number check, procedure code retry, copy/paste appointment
- MassHealth claim: pick the visible typeahead option for procedure codes,
  verify the code stuck (retry), re-check all lines before submit
- MassHealth claim: only an exact 15-digit claim number counts as submitted;
  otherwise fail with ERROR:CLAIM_NOT_SUBMITTED
- Appointments: right-click "Copy the appointment" and "Paste the appointment"
  on an empty slot

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 17:38:12 -05:00
GiteadandClaude Opus 5.5 4cd780e9b2 feat: Check Preauth from claim details, Tufts SCO approval PDF, all-folder appointment picker
- Same patient may be booked at the same time in different columns (appointment + preauth)
- New preauths save service lines and attachments so the details view shows them
- Claim/Preauth Details: renamed, Check Preauth button picks the worker from the claim's
  insurance (MassHealth, United SCO, Tufts SCO, CCA); OTP popup survives closing the window,
  window closes after a successful check
- Tufts SCO Check Preauth: searches Submitted by pre-auth number, saves the detail page PDF
  to the patient's new Approval folder (PdfTitleKey PREAUTH_APPROVAL migration)
- Appointment attachment picker lists files from all of the patient's folders

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-06 23:01:20 -05:00
GiteadandClaude Opus 5.5 33bea3822c feat: MassHealth service history extraction, shown in Patient Details
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 08:38:13 -05:00
GiteadandClaude Opus 5.5 1ee3b0cfc9 feat: Tufts SCO (DentaQuest) eligibility extracts member address
- Read the address from the Member's information block on the member details
  page and save street, city, state and zip to the patient
- The portal prints no comma between street and city, so split on street
  words and unit markers; when no boundary is found the whole text stays in
  the street field with city blank
- Poll up to 10s for the details to load; ignore the office address in the
  page header

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-04 11:58:27 -05:00
GiteadandClaude Opus 5.5 9f3a3080ff feat: Delta Dental of Washington (DDWA) eligibility check
Copies the DDMA flow: persistent Chrome profile, OTP from app or browser,
queued job, credentials under site key DDWA, and a real Delta WA button in
place of the placeholder. Login follows the WA portal: provider page, header
Sign in, then username + CONTINUE before the password page. Password, OTP,
dashboard and search selectors are still DDMA's and unverified on this portal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 23:29:59 -05:00
GiteadandClaude Opus 5.5 ebc5fba2c9 feat: MassHealth member detail demographics, wait for name/plan before PDF
- Extract gender, address (street/city/state/zip) and home phone from the
  MassHealth Member Detail page and save to the patient; phone is only
  filled when the patient has none
- Shared extract_eligibility_row polls up to 30s until the matching results
  row has both name and plan before the PDF is printed (AngularJS fills cell
  text after the rows appear); used by all three MH eligibility workers
- Fall back to the Member Detail heading for the name when the results table
  never filled it in

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-30 15:53:34 -04:00
GiteadandClaude Opus 5.5 13be6e97d5 feat: BCBS MA persistent session, Expand All fix, address/gender extraction
- Persistent Chrome profile (bcbs_ma_browser_manager) reused across patients;
  login probes /myportal/ to skip login + OTP while the session is active
- Expand All: JS-click the expandCollapseViews span, verify sections opened,
  and unclip fixed-height result tables so the PDF includes every row
- Extract patient address and gender from the results page and save to patient
- Uppercase member IDs (XXA...), matching older lowercase records
- Add /clear-bcbs-ma-session endpoint

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 18:27:46 -04:00
GiteadandClaude Opus 5.5 011869f641 fix: baby tooth (A-T) composites and extractions get correct CDT codes
Composite parsing accepts primary tooth letters: A, B, I, J, K, L, S, T
are back teeth (D2391-D2394), C-H and M-R front (D2330-D2335).
Simple extraction on a primary tooth maps to D7111 unless D7140 is typed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 12:38:29 -04:00
GiteadandClaude Opus 5.5 d600d94497 fix: United Ucard claim advances past Upload Documents
Fill the required Provider Narrative (claim remarks with shorthand expanded,
or a plain-language summary of the procedures), find the Review and Sign
button by its navy pill instead of the sidebar step, and verify each step
is actually visible since every step lives in the DOM at once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 23:38:36 -04:00
GiteadandClaude Opus 5.5 36eba7c9d2 fix: Tufts SCO location select, simple ext → D7140, sanitize custom CDT aliases
- Tufts SCO claim/preauth: robust location dropdown selection (multiple
  option selectors, retries, keyboard fallback, HTML dump on failure)
- CDT lookup: map ext/extraction/simple ext to D7140; ignore dangling
  "on/of/for/at" left after stripping tooth number
- Custom CDT aliases: keep only the Dxxxx code ("D7140 #25" → "D7140") and
  drop tooth numbers from phrases, on save and at lookup — fixes $0 fee
  from code "D7140#25"

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 22:55:30 -04:00
GiteadandClaude Opus 5.5 59a75a4d6b feat: group schedule toolbar; add Consent, New Patient Form Link, Consent Templates placeholders
- Schedule page: toolbar grouped into Appointment, Consent, Eligibility,
  Claim, Communication and Download sections; new Consent button (stub)
- Patients page: New Patient Form Link button (stub)
- Settings: Consent Templates sidebar entry and placeholder section

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:00:25 -04:00
GiteadandClaude Opus 5.5 aa5d3bf2d5 fix: Deltains claim tooth surface multi-select
Open the toothSurfaces MUI listbox (retrying if it doesn't appear), check
each surface letter by option text via JS and verify it ends up selected,
then close the popover with Escape or a backdrop click so its overlay no
longer blocks the fee field. Waits for the tooth-number listbox to close
first so its options aren't misread.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:13:36 -04:00
GiteadandClaude Opus 5.5 0082b7bd53 feat: Delta Indiv eligibility on coversme portal and ADA paper claim/preauth
Eligibility: rebuilt the Delta Indiv worker for my.deltadentalcoversme.com —
Dentist tab -> Universal Delta Sign In -> username/Next -> password -> SIGN IN,
confirmation-code (MFA) page detected by URL so the app's OTP popup shows,
then Search for Patient -> Last Name + DOB -> Submit. On the "Benefits for"
details page it reads the patient name, Subscriber # and Eligible through
(active while that date is today or later) and saves the PDF downloaded by
the Print link. Session persists: login is skipped while Search for Patient
is reachable, and Delta Indiv cookies are no longer wiped on agent startup.
The button needs Last Name + DOB (member ID optional; backend falls back to
the scraped Subscriber #). Chatbot gains a Delta Indiv option and aliases.

Claims: Delta Indiv uses the same 2024 ADA form as BCBS with the payer
address Delta Dental, P.O. Box 103, Stevens Point, WI 54481-0103. Adds Delta
Indiv Claim/PreAuth (ADA Form) buttons, Claim All and AI queue routing, Print
ADA Form in the claim viewer, a Delta Indiv fee schedule (copied from BCBS),
and Delta Indiv as its own insurance type so it is no longer treated as
Deltains.

Also renames eligibility buttons: Delta Indiv (Last name, DOB or ID),
Metlife Dental (ID or SSN), Altus (ID, First name, DOB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 22:03:30 -04:00
GiteadandClaude Opus 5.5 a5beeb7ba9 feat: MetLife Dental claim submission via ClaimConnect; MetLife fee schedule
Reuses the MetLife eligibility login (persistent profile, email MFA, OTP
from app or browser), then Submit Claims -> ClaimConnect -> DentalXChange
Single Claim: billing/rendering provider, member ID, last name, payer
Metlife 65978, patient picked by DOB/name, signature on file Yes, one
claim item per CDT code (date, code, tooth, surfaces, fee; Add Claim Item
past 3), Finish, Submit Claim, then Back to Claim to read the Claim ID and
save the page as PDF. Waits out Wicket ajax/veil before each click.

MetLife now has its own fee schedule (seeded from DDMA) instead of falling
back to MassHealth prices.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 00:01:39 -04:00
GiteadandClaude Opus 5.5 db7d74a13b feat: Altus Dental eligibility check and ADA paper claim/preauth
Eligibility (no OTP, fresh browser per run like MH): logs in, opens Benefits &
Claims Information, searches by Subscriber ID (or Subscriber Last Name via
"Click Here"), First Name and DOB, picks the matching row from the patient list,
sets ACTIVE/INACTIVE from the Coverage range, reads Group Number into the
patient's Group Number, opens View Details for the last name and plan name,
and saves the details page PDF to the patient's Eligibility folder. A patient
switching plans is matched by name + DOB so Altus overwrites the old insurance
instead of creating a duplicate.

Claims: Altus uses the same 2024 ADA form as BCBS with the Altus payer address
(P.O. Box 1557, Providence, RI 02901-1557). Adds Altus Claim/PreAuth (ADA Form)
buttons, Claim All and AI queue routing, Print ADA Form in the claim viewer, and
an Altus fee schedule (copied from BCBS).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:47:01 -04:00
GiteadandClaude Opus 5.5 fa6c55421c feat: picking a policy holder copies their insurance, address and status
Selecting a policy holder from the patient search fills the dependent's
insurance type, member ID, group number, status, address, city, state and
zip from the holder's record. Dependents may now share the holder's
insurance ID without the duplicate-ID check blocking the save.
Also teach the AI CDT lookup that "PNAO" is a typo of "pano" (D0330).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 23:13:27 -04:00
GiteadandClaude Opus 5.5 db7ea8ef2f feat: MetLife Dental eligibility check with persistent session
Mirrors the DDMA flow: persistent Chrome profile + credential-change logout,
PingOne login with email MFA selection and OTP from app or browser,
Eligibility & Plan Details search (masked Subscriber ID/SSN), family member
picked by DOB and re-verified on the plan details page, PDF saved to the
patient's Eligibility folder and status set ACTIVE/INACTIVE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 00:29:28 -04:00
GiteadandClaude Opus 5.5 143319909f fix: AI claims/preauths keep all codes past 10; reuse CCA/DentalHub Chrome
- Claim form: AI claim/preauth prefill adds rows beyond the initial 10
  instead of dropping codes 11+
- CDT lookup: "D6010 #5, 9, 11, 12" expands to one line per tooth, and
  the chat graph rebuilds such lists from the message if the LLM drops items
- Eligibility: match an existing patient by name+DOB when the insurance ID
  changed (e.g. MassHealth → CCA) instead of creating a duplicate patient
- CCA PreAuth: services grid scrolls to reach rows 11+
- CCA and Tufts SCO PreAuth: tentative service date = today + 3 days
- CCA (eligibility/claim/preauth) and DentalHub (claim/preauth): keep Chrome
  open, blank and minimized, after a job so the next job reuses it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 01:27:28 -04:00
GiteadandClaude Opus 5.5 8937a3390c fix: CCA claim fills tooth surfaces into SURFACE1-5 inputs
- Use ServicesSURFACE{n} editor ids (matching header mapping names);
  keep ServicesSURF{n} as a one-try fallback
- Derive missing surface columns from TOOTH+n when headers lack names
- Treat a failed surface fill as an error so the claim is not submitted

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 00:22:39 -04:00
GiteadandClaude Opus 5.5 2ca42bb15f feat: BCBS preauth via ADA form; preauth shows dark gray; claim/preauth download
- Preauth column: BCBS appointments fill the 2024 ADA form with box 1
  "Request for Predetermination/Preauthorization" (claim saved as PREAUTH),
  saved to Documents > PreAuth as ADA_PreAuth_*.pdf, then back to schedule
- Claim form PreAuth tab: "BCBS PreAuth (ADA Form)" button
- Preauth forms list procedure dates 6 days after the preauth date
- PREAUTH claims create no payment; saved BCBS preauths count as preauthorized
- Schedule: appointments with a completed preauth show dark gray
- "Download Filled Claim/Preauth Form" also zips the BCBS preauth forms

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 23:51:27 -04:00
GiteadandClaude Opus 5.5 44a1a41efa feat: Preauth column for AI claims; searchable policy holder + ADA box 18; 2PA fix
- Schedule: last column is the Preauth column; "Claim for Column with AI" is now
  "Claim/Preauth for Column with AI" — that column's appointments go to PreAuth
  (MH, CCA, Tufts SCO, United/DentalHub; other insurances are skipped), the rest
  to Claim. Preauthorized appointments (hasPreauth) aren't resubmitted
- PreAuth payloads carry appointmentId; appointment X-rays/attachments are sent
  with MH/CCA/UnitedDH/Tufts preauths (shared appendAppointmentFiles helper)
- Patient form: policy holder is searchable from patients in the DB, plus
  "Relationship to Policy Holder/Subscriber" (Self, Spouse, Dependent Child,
  Other). New Patient columns policyHolderPatientId, policyHolderRelationship;
  browser-side schema updated so the fields aren't stripped on save
- ADA form: box 12-14 filled from the linked policy holder's record; box 18
  ticks the relationship (Self when the patient is the holder)
- AI notes: a bare "2PA" is an image count, not tooth #2 — restored before CDT
  lookup so it maps to D0220 #8 / D0230 #24

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 21:09:51 -04:00
GiteadandClaude Opus 5.5 c3efdc7f8e feat: Download Filled Claim Form; BCBS AI claim returns to schedule date
- "Download Claim PDF for Column" -> "Download Filled Claim Form": ZIP of the
  ADA forms the app filled (e.g. BCBS) for appointments on the selected
  schedule date, all columns; Selenium-submitted claims are not included
  (GET /api/claims/filled-forms replaces /batch-pdf)
- After a BCBS claim from "Claim for column with AI", go back to the
  schedule even when the queue is finished
- Schedule remembers the selected date for the tab, so returning from the
  claims page keeps the working date instead of jumping to today

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 10:39:01 -04:00
GiteadandClaude Opus 5.5 f55e8c114b feat: BCBS AI column claim fills ADA form, saves to Documents; form fixes
- Claim for column with AI: BCBS patients auto-generate the 2024 ADA form
  (no tab) and save it to the patient's Documents > Claims folder; the
  manual BCBS button saves there too (new POST /api/claims/:id/ada-form)
- Saved BCBS form sets the claim to REVIEW; appointments with a claim
  number or REVIEW/APPROVED status show as claimed (dark gray)
- CDT lookup: "comp on #18 O, 20 O, 21 O" applies composite to every tooth
- BCBS fee schedule (procedureCodesBCBS.json, copied from DDMA prices)
- Office Contact: Legal Name field; "Dental Office Name (DBA)" label
- ADA form: 48 = legal name, DBA, address; 56 = address only; 53 date =
  claim date; 23 and 26 left blank; 43 = No unless appointment notes say
  a prosthesis is replaced (then Yes, with 44 prior date when given)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 23:14:51 -04:00
GiteadandClaude Opus 5.5 65f14b5e61 fix: pontic code matches crown material (D2740 crowns -> D6245 pontic)
Pontic previously fell through to keyword search and always hit D6241.
Now an explicit material on the pontic wins; otherwise it follows the
crowns in the same request, defaulting to D6245. Also drop 'not for
united' from the D6245 description.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-09 23:18:29 -04:00
GiteadandClaude Opus 5.5 1abc2c705d 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>
2026-10-08 23:29:27 -04:00
GiteadandClaude Opus 5.5 2c0c595af5 feat: BCBS MA paper claim — fill 2024 ADA claim form; office NPI setting
- New GET /api/claims/:id/ada-form fills the 2024 ADA Dental Claim Form
  (J43024) with payer address, patient/subscriber, CDT lines, fees,
  missing teeth, billing (office) NPI and treating NPI; signatures blank
- "BCBS Claim (ADA Form)" button saves the claim and opens the PDF;
  Claim All routes BCBS patients to it; "Print ADA Form" in claim view
- Settings > NPI Providers: "Add Office NPI" (billing name, NPI, license,
  TIN) and optional per-provider license number
- Migration: office_contact billing fields, NpiProvider.licenseNumber

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-07 22:41:44 -04:00
GiteadandClaude Opus 5.5 d67e68c957 docs: LAN HTTPS Step 4 — paste the existing Cloudflare token; creating a new one is the fallback
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:33:21 -04:00
GiteadandClaude Opus 5.5 d3a658462f docs: step-by-step Cloudflare API token setup for LAN HTTPS, with token check and 6003 error fix
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 22:12:09 -04:00
GiteadandClaude Sonnet 5 75658aea9c docs: add runbook for renaming an office's subdomain (local-summit -> local-centrestreetsmiles example)
Covers the scoped sudoers grant, updating the three per-office config files, reissuing the LAN cert, deploying nginx, repointing the Cloudflare Tunnel, the manual LAN DNS step, updating Twilio/Telnyx webhooks, and keeping per-office config out of git with skip-worktree.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-05 23:05:03 -04:00
GiteadandClaude Sonnet 5 6148cfa848 feat: age overrides notes text for prophy code (D1110/D1120)
Patient's actual age now decides adult vs child prophylaxis instead of
trusting literal "adult prophy"/"child prophy" wording in notes. Applies
bidirectionally (corrects both D1110-on-a-child and D1120-on-an-adult) and
also resolves ambiguous bare "prophy"/"cleaning" input purely from age.
Wired into all single- and batch-claim chat flows.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-05 21:58:21 -04:00
GiteadandClaude Opus 5.5 d235845ea2 fix: rclone PC-to-PC sync — serve backups, chat-history, uploads via filters; save source before Sync Now
The WebDAV server was narrowed to serve only backups/ (to stop exposing
.env), but the receiver still pulls /backups, /chat-history and /uploads,
so every sync failed with "directory not found". Serve the app root
filtered with --include to just those three folders; everything else
(.env, source, config/key files) returns 404.

Sync Now now saves the typed source IP/port before pulling, since the
pull reads the saved config.

stop-app.sh also frees port 8080: kill -9 on the backend orphans the
rclone child, which then keeps the port with stale settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-05 21:47:46 -04:00
GiteadandClaude Opus 5.5 036e26c5d8 docs: add one-time git credential setup to Quick Install
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:46:44 -04:00
GiteadandClaude Opus 5.5 d67aa75c42 docs: add Quick Install (VS Code, Claude Code extension, install-all.sh); add install-all.sh fresh-machine setup script
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 23:41:01 -04:00
GiteadandClaude Sonnet 5 d357edd4a6 feat: add Delta Dental Individual (DeltaIndiv) eligibility check flow; fix CCA eligibility false-positive error
CCA step1 was treating the harmless "password set to expire" banner as a
fatal error, closing the browser before the eligibility popup/report
could be captured. Now it short-circuits to success once the patient
popup renders and ignores password-expiration notices.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-02 15:37:55 -04:00
GiteadandClaude Sonnet 5 a5a15d86bc feat: CCA pre-auth — select first member in multi-record popup, retry code/tooth/billed fills, stop instead of submitting incomplete lines
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-27 00:56:36 -04:00
GiteadandClaude Sonnet 5 8c0fcb4267 feat: CCA claim — select first member in multi-record popup, retry grid cell fills, pick latest claim by DOB, faster submit confirmation
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-26 00:53:51 -04:00
GiteadandClaude Sonnet 5 ef919a2a2f perf: shorten fixed waits in MassHealth claim submit worker
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-25 23:52:03 -04:00
GiteadandClaude Sonnet 5 90f587ac9d feat: CCA multi-record popup — save popup as PDF and read green/red status badge
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-24 12:20:40 -04:00
GiteadandClaude Sonnet 5 eb731dcbd6 feat: add BCBS MA option to AI chat eligibility flow
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-23 15:10:44 -04:00
GiteadandClaude Sonnet 5 df5d2267cd feat: map upper/lower partial denture phrases to D5211/D5212 in CDT lookup
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-21 11:41:11 -04:00
GiteadandClaude Sonnet 5 c719b20dd0 feat: United Ucard claim searches by name+DOB and fills tooth number/surface when provided
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 23:40:50 -04:00
GiteadandClaude Sonnet 5 7ec82902d9 feat: United Ucard name+DOB eligibility search via chat, duplicate-record handling, Product ID as member ID
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 22:30:01 -04:00
GiteadandClaude Sonnet 5 ce25cdd2a2 fix: DDMA claim checkbox, eligibility patient name, and ID+DOB patient lookup
- Claim step2: robust member checkbox selection with page-wide fallback
- Eligibility: take patient name from 'Benefits for' heading, not subscriber name
- Processor: update the patient just created/matched by ID+DOB, not first ID match

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-20 15:56:03 -04:00
Gitead dcf2ff536a fix: close browser window after Deltains claim completes
Session still persists via the Chrome profile/saved cookies, so
closing the window doesn't force a re-login or OTP next time.
2026-09-18 14:51:56 -04:00
GiteadandClaude Sonnet 5 7b8a7af5d7 fix: update DDMA claim worker for new provider portal
DDMA redesigned their claims-submission flow, so the worker now navigates
via the dashboard's "Submit Claims" quick link, the "Member Search" and
"Claim Detail" sidebar sections, checkbox-based member selection, indexed
treatment-row fields, a multi-file upload input, and the new confirmation
page layout.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-18 14:36:14 -04:00
Gitead d91e74c959 fix: Deltains claim selectors and dedicated fee schedule
Fixes the transaction-type radio button (was matching nothing; now
targets the real data-testid), and adds a Deltains fee schedule
(seeded from DDMA's prices) so Deltains claims stop falling back to
MassHealth pricing.
2026-09-17 21:00:07 -04:00
Gitead 37695130d3 feat: add Deltains claim submission flow
Adds a full "Deltains Claim" button next to Delta MA Claim, mirroring
the DDMA claim flow across frontend, backend queue/routes, and a new
Selenium worker. Reuses the existing Deltains eligibility login/OTP
code and was iteratively wired against the live portal (patient roster
search, per-service-line fields, tooth number/surface selects, review
and submit). Also fixes chatbot/insurance-alias carrier recognition so
"deltains" resolves correctly instead of falling back to MassHealth.
2026-09-17 13:11:58 -04:00
GiteadandClaude Sonnet 5 8cbdba092d fix: handle no-history single-match case in United Ucard claim search
Only two paths now: click the radio in the last history row when a
table is shown, or click the Member Details link directly when no
history/radio appears at all (single unambiguous match, as seen for
patient Nassim). Removes the first-row retry fallback.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 23:23:48 -04:00
GiteadandClaude Sonnet 5 865b754ae1 fix: complete United Ucard claim flow and remember OTP device
- Click the first visible 'Next' button on the Patient Information step
  instead of a stale hidden one, so the wizard advances after member select
- Read procedure fee from totalBilled/billedAmount (matching every other
  claim worker) instead of a fee key the frontend never sends
- Implement claim confirmation PDF capture + claim number extraction
- Check "Remember this device" on the OTP page so future logins skip OTP

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 22:45:05 -04:00
GiteadandClaude Sonnet 5 d7015270a8 fix: auto-refresh patient table after eligibility checks
Remaining benefit amount didn't show until a manual page reload
because invalidateQueries was placed after an early return (chatbot
claim flow) for MH checks, and was missing entirely from the 7
other-provider eligibility buttons.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 13:37:56 -04:00
GiteadandClaude Sonnet 5 765368216f fix: route United Ucard claims correctly and add fee schedule
- AI-column auto-submit and manual "Claim All" dispatchers in claim-form.tsx
  had no United Ucard branch, so United Ucard claims silently fell through
  to the MassHealth (MH) submit handler instead of opening the United Ucard
  site.
- Added a United Ucard fee schedule (copied from United SCO as a starting
  point) and wired it into the frontend price-mapping/mismatch-check code
  and the backend fee-schedule update route, which previously had no
  schedule for United Ucard and fell back to MassHealth's prices.
- Selenium claim worker: when the member search returns multiple coverage
  records, it now tries the last row first (existing default) and falls
  back to the first row only if the "Member Details" link never appears
  (i.e. the last row was an inactive record), instead of only ever trying
  one or the other.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-15 13:21:53 -04:00
GiteadandClaude Sonnet 5 af62bf151e fix: poll longer for Status & History table to load in preauth worker
Status & History page loads results asynchronously; a single 20s wait
was giving up before the row appeared, so the pre-auth number was
never captured. Now polls up to 75s for a populated row.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 23:38:06 -04:00
GiteadandClaude Sonnet 5 e570a0aa13 feat: add United Ucard claim worker and fix batch-column site-key routing
Adds a "United Ucard Claim" button (claims/preauth insurance form) that
submits through a full Selenium pipeline mirroring the Tufts SCO claim
worker: frontend handler -> backend route/queue processor -> Python
agent, reusing the persistent login/OTP session from the existing
United Ucard eligibility check. Implements the UHC Dental claim wizard
end-to-end (Provider Information, Patient Information search/select,
Claim Information procedures + questions, Upload Documents, Review and
Sign, Submit); the final confirmation-page PDF/claim-number capture is
still a TODO stub pending that page's DOM.

Also wires United Ucard into the AI chatbot's eligibility flow
(insuranceAliases.json, siteKeyToAutoCheck, clarification options), and
fixes a bug where the AI-column batch claim feature silently defaulted
United Ucard patients to MassHealth because batchColumnDeriveSiteKey
had no matching branch and no job-dispatch case for UNITED_UCARD.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-14 23:27:39 -04:00
GiteadandClaude Sonnet 5 f30016e674 feat: add United Ucard eligibility check with OTP + persistent session
Adds a full login/OTP/search/capture flow for United Ucard (OneHealthcareID
-> UHC Dental provider portal), mirroring the United SCO/DDMA pattern:
persistent Chrome profile, OTP polling, member eligibility search, and PDF
capture saved to the patient's Eligibility folder.

Also fixes a validation bug in the browser-safe patient schema where
email/address/city/zipCode/gender/phone were optional but not nullable,
rejecting patient records with null values on those fields during edits
(e.g. "Expected string, received null").

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-13 22:44:43 -04:00
GiteadandClaude Sonnet 5 e8889c0ff8 fix: auto-price CDT codes and fix crown/recement code mismatches
- Auto-fill service line price when a recognized CDT code is typed
  (e.g. D2740), instead of requiring a separate "Map Price" click
- Fix chatbot preauth prefill using an empty DOB for price lookup,
  causing age-tiered codes (D2740) to price as $0
- Re-apply fee-schedule pricing with the loaded patient DOB before
  MassHealth preauth auto-submit
- Add a "Recement Crown" (D2920) combo button distinct from "Crown"
  (D2740) to avoid picking the wrong code/price
- Fix AI note parsing to prioritize "recement" over "crown" regardless
  of word order or tooth-number format (e.g. "#7 crown recement")

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-12 23:29:43 -04:00
GiteadandClaude Sonnet 5 00a81b3fda fix: correctly suppress PDF popup for last claim in AI-column batch
closeClaim() was clearing chatbotAutoSubmitSiteKey synchronously right
after the selenium job kicked off, before the job's async completion
handler could check it. This was masked for all but the last claim in
the batch because closeClaim() also navigated away (unmounting the
page) whenever more claims were queued. On the last claim the page
stayed mounted, so the completion handler read a stale cleared value
and let the PDF preview popup through. Track the site key in a ref
that survives closeClaim() and is cleared only after the job's own
completion handler consumes it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-09 08:56:52 -04:00
GiteadandClaude Sonnet 5 fd2d1e6aba fix: default tooth # for 2PA and skip PDF popup for AI chat claims
- 2PA with no explicit tooth numbers now defaults to D0220 #8 / D0230 #24
- Claims submitted via the AI chat column no longer auto-open the PDF preview modal

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 15:52:31 -04:00
GiteadandClaude Sonnet 5 d35efe7366 fix: reliability fixes for UHC SCO and CMSP eligibility checks
- unitedSCOEligibilityProcessor: overwrite patient's stored insuranceId when
  the eligibility page reports a different (updated) Member ID than the one
  searched with.
- CMSP worker: add AngularJS late-binding retry to results-table extraction
  (ported from the MH worker's a0417653 fix), since every patient now routes
  through this worker for the accumulator check.
- cmspEligibilityHistoryRemainingProcessor: stop forcing patient status to
  UNKNOWN when extraction fails; a failed run landing after a successful one
  was clobbering a correct ACTIVE/INACTIVE status.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-05 13:11:58 -04:00
GiteadandClaude Sonnet 5 74d5c7c7ff feat: wire up mic/speaker and Google Translate backend for live translation
Frontend uses the Web Speech API for speech-to-text and text-to-speech
(no key needed). Adds POST /api/translate backed by Google Cloud
Translation API v2, gated on GOOGLE_TRANSLATE_API_KEY (placeholder
added to .env/.env.example, unset by default).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 21:28:57 -04:00
GiteadandClaude Sonnet 5 616ca5f259 feat: add live translation UI section above dial pad
Google Translate-style side-by-side layout with per-side language
pickers on the patient connection page. UI shell only for now, no
translation provider wired up yet.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 16:05:30 -04:00
GiteadandClaude Sonnet 5 8f9fd13208 fix: update hardcoded folder name from DentalManagementMH07 to DentalManagement09
Scripts still referenced the old project folder name after the rename,
which broke the desktop shortcuts and start/stop scripts.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 15:51:17 -04:00
GiteadandClaude Sonnet 5 79ac6aaa31 feat: migrate SMS/voice to Telnyx (TeXML), keep browser dial pad on Twilio
Twilio now handles only the in-browser dial pad (Access Token + browser-Device
outbound TwiML); Telnyx takes over SMS, inbound voicemail, the AI voice
conversation loop, and staff-triggered outbound calls via TeXML. Adds
TelnyxSettings model, Communication.provider discriminator, new comms/routes
modules, and a real Telnyx Settings page.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-03 15:39:43 -04:00
Gitead b899659e13 docs: add ngrok vs Cloudflare Tunnel comparison for Twilio tunneling 2026-09-02 22:59:25 -04:00
GiteadandClaude Sonnet 5 52ddfd9f57 feat: add Remaining/Third Party columns, toggle PDF viewer, retire CMSP as separate insurance type
- Add remainingBenefit and thirdPartyInsurance columns to Patient; extract both
  from the MassHealth accumulator/member-detail pages during the eligibility
  check and surface them in the eligibility table
- Add an updated-date display and a toggle to suppress the post-check PDF
  viewer popup (default off) on the insurance eligibility page
- Rename CMSP-prefixed PDF filenames and UI copy to MH, since CMSP and MH now
  share the same worker
- Fold CMSP into MassHealth/MH across patient/claim insurance-type dropdowns
  and the chatbot's eligibility routing, since they're the same insurance
- Remove auto-download of saved eligibility PDFs; downloading is now manual

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-02 22:32:43 -04:00
GiteadandClaude Sonnet 5 f8235787db fix: handle DDMA site redesign in eligibility check flow
DDMA now often skips the family-members results table and navigates
straight to the single-patient detail page, and labels the patient's
name "Subscriber name:" instead of "Name:". Update step1/step2 to
detect the detail-page URL correctly (it's nested under the search
path, so a plain substring check couldn't tell them apart), extract
the name from the new label, and fall back to parsing "Coverage is:"
for eligibility status when there's no results row to read it from.
Also fix a status-text substring bug ("active" matching inside
"inactive") and stop the backend from collapsing an unknown
eligibility result into INACTIVE. Skip name extraction entirely when
the caller already knows the patient (existing-patient recheck).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-01 21:20:38 -04:00
GiteadandClaude Sonnet 5 b860fd213f fix: allow chatbot auto-scheduling when eligibility status is UNKNOWN
Only block appointment creation on explicit INACTIVE status, since
scrapes for some plan types (e.g. MassHealth Child Medicaid) can land
on UNKNOWN without actually finding an ineligible record.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-01 20:39:57 -04:00
Gitead 116889dd4e perf: reduce fixed sleeps in MassHealth click_plus_button
Cuts unconditional delay when adding a service line from ~7s to ~3s
as a first pass at speeding up MassHealth claim submission.
2026-08-20 00:37:14 -04:00
GiteadandClaude Sonnet 5 ad9d311a99 fix: tolerate single-letter typos in CDT code text matching
Adds Levenshtein-based fuzzy word matching to lookupCdtCodes so
misspellings like "comprehensiv exam" resolve the same as
"comprehensive exam". Both the AI chat bot and the AI claim column
share this matcher, so the fix applies to both.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-20 00:01:41 -04:00
GiteadandClaude Sonnet 5 374f96399e docs: add fallback keyring-disable steps for when apt purge isn't enough
D-Bus service activation can respawn gnome-keyring-daemon even after
the package is removed and PAM/autostart hooks are disabled.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 23:45:06 -04:00
GiteadandClaude Sonnet 5 e934d6bce5 chore: gitignore GCP service account key in PaymentOCRService
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 23:43:15 -04:00
GiteadandClaude Sonnet 5 304441d95a fix: nginx proxy_pass uses 127.0.0.1 instead of localhost
localhost resolves to ::1 first; backend/Vite only bind IPv4, causing
intermittent 502s when nginx tried the IPv6 loopback address.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 23:41:10 -04:00
GiteadandClaude Fable 5 5044fecb07 fix: UnitedDH selenium duplicated first attachment (multi-file input appends on send_keys)
DentalHub's upload input is a multi-file input; chromedriver send_keys
appends to the existing selection instead of replacing it, so the second
iteration re-uploaded the first file (2 attachments became 3). Clear the
input value before each send_keys and skip duplicate filePaths.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-14 00:08:30 -04:00
GiteadandClaude Fable 5 efb85d0b92 feat: auto-confirm option for AI column claims (manual toggle + implied by Auto Claim)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-08 00:07:30 -04:00
GiteadandClaude Fable 5 ff79cd1643 fix: earliest patient record wins when duplicates share a phone (inbound SMS/voice)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 23:11:55 -04:00
Gitead 55d798b45f docs: add Google Cloud Vision setup section to root README
Fresh-machine setup guide didn't cover the Payment OCR Service's Google
Vision credentials — add it as its own section (enable API, create
service-account key, install as google_credentials.json, verify).
2026-07-30 23:52:37 -04:00
Gitead 9efa8f6e0a docs+perf: document Google Vision key setup, consolidate OCR calls per screenshot
- README: step-by-step Google Cloud Vision API key creation and setup
  (enable API, create service-account key, place as google_credentials.json)
- ocrLocate: split into getOcrWords()/matchWordsForText() so a screenshot is
  OCR'd once and matched locally against multiple text targets, instead of a
  separate billed Vision API call per target (patient-row and Exam steps each
  cut from 2-3 calls down to 1)
2026-07-30 23:27:33 -04:00
Gitead 5cdd3452f2 fix: use Google Vision OCR instead of AI-vision estimates for Windows Type Agent clicks
Claude vision's self-reported text coordinates had a small but consistent bias,
causing the patient-row double-click to land above the name and the Exam-column
divider count to occasionally miscount and hard-fail. Swap patient-row, Exam,
and Save button targeting to exact OCR bounding boxes (Google Vision via the
existing PaymentOCRService) instead of AI-estimated ratios.
2026-07-30 23:14:02 -04:00
Gitead 76bd99f7ff fix: Tufts SCO claim file attach — send_keys directly, skip button click
Clicking "Add a file" triggers input.click() which opens the OS-native
file picker that WebDriver can't control, causing send_keys on the
underlying input to fail with a message-less exception. The input is
already present in the DOM (display:none) so send_keys can target it
directly without the click.
2026-07-29 23:57:39 -04:00
Gitead 44c6d2f833 fix: Tufts SCO claim combobox selects matching option instead of first
_fill_combobox typed the value then used a single unioned XPath
(match-by-text | option[1]) to pick the dropdown option. Selenium's
find_element on a multi-match XPath returns the first node in
document order, not the first union alternative, so option[1] (e.g.
tooth "1") was always clicked regardless of what was typed (e.g. "22").
Split into a value-match wait with a separate fallback wait for
option[1] only when no match is found.
2026-07-29 23:19:18 -04:00
GiteadandClaude Sonnet 5 6d0838446b fix: cascade-delete stale ClaimFile rows and sync claim attachments
Deleting/replacing an appointment attachment left an orphaned ClaimFile
copy behind (auto-linked earlier by autoLinkAppointmentFiles), causing
the Selenium claim automation to upload extra files beyond what's
currently attached to the appointment. Claim PUT was also append-only
for claimFiles, so removing an attachment in the UI never persisted.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 22:57:21 -04:00
GiteadandClaude Sonnet 5 65dc795eb2 fix: locate patient row by real text position, drop unreliable AI row-verify
Row selection previously computed the target row's y arithmetically
(header.y + rowHeight * rowIndex), which drifted further off-row the
deeper the target patient was in the filtered list, and an AI
"onTarget" verification step added to catch drift instead confirmed a
click point that was visibly in blank space below the grid.

locateAllOnScreenshot now reports each text match's top/bottom edges
instead of a self-estimated center, and the patient row step locates
the target's first and last name directly, pairing whichever
occurrences land on the same row instead of trusting arithmetic or a
qualitative AI judgment call.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-29 21:53:12 -04:00
GiteadandClaude Sonnet 5 ad2e15ec62 feat: window-diff-based Type Agent locating for Open Dental appointment flow
Replaces fragile whole-screen text matching with a screenshot-diff step that
finds each dialog's actual pixel bounds, then restricts every subsequent AI
locate/click to that cropped region — eliminating false matches from text
elsewhere on screen (title bars, side panels). Adds column-boundary and
row-height detection so the patient row and Exam procedure click positions
are computed geometrically instead of relying on repeated fuzzy AI guesses
for visually similar neighbors. Also adds per-run screenshot/debug-crop
backups and a structured run.log for diagnosing failed runs, plus a
cmd:move primitive on the Windows agent for pre-click confirmation crops.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-27 08:50:47 -04:00
GiteadandClaude Sonnet 5 59f064583a feat: AI Type Agent - vision-based Open Dental automation via Windows agent
Adds a Windows-side agent (screenshot/click/type over HTTP) plus backend
services to locate UI elements via vision and drive an existing-patient
appointment flow in Open Dental, wired into the Copy/Type Agent page and
socket progress updates.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-25 17:24:27 -04:00
Gitead ae961781ac fix: CCA preauth status stays Submitted (not Approved) and screenshot mime type
- ccaPreAuthProcessor: keep claim status as PREAUTH after successful
  submission instead of jumping straight to APPROVED, matching the
  Tufts SCO/UnitedDH/MassHealth preauth flows; also tag PNG fallback
  screenshots with image/png instead of the default application/pdf
  so they render in the Documents preview modal.
- claims-recent-table: add a PREAUTH status case so it displays as
  "Submitted" instead of falling through to the raw enum value.
2026-07-25 10:15:35 -04:00
Gitead f457d6282a fix: CCA claim submission grid targeting, retry, and dashboard claim-number lookup
- Fix NameError (col_idx vs col_expr) that silently corrupted grid-fill logs
- Poll for new grid rows to render before clicking, instead of failing immediately
- Abort submission with a clear error if code/tooth/billed amount fail to fill,
  instead of silently submitting an incomplete claim
- Compute grid column positions live from header metadata instead of stale
  hardcoded indices; billed amount was landing on a hidden helper column
  (TAB_FROM_CODE_CELL) via td[last()] instead of the real Billed Amt column
- Read claim/encounter number from the top (newest) dashboard row instead
  of the bottom row
2026-07-25 09:49:53 -04:00