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>
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>
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>
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>
- 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>
- 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>
- 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>
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>
- 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>
- 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>
- 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>
- 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>
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>
- 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>
- 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>
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>
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>
- 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>
- 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>
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>
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>
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>
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>
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>
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>
- 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>
- 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>
- 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>
- 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>
- "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>
- 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>
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>
- 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>
- 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>
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>
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>
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>
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>
- 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>
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>
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.
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.
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>
- 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>
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>
- 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>
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>
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>
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>
- 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>
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>
- 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>
- 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>
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>
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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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).
- 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)
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.
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.
_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.
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>
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>
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>
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>
- 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.
- 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
skipAppointmentAttachmentMerge was blanket-set for any autoSubmit path
(chatbot, Claim with AI batch automation, insurance-status auto-check),
so screenshots/files attached directly on the appointment were silently
dropped from the MassHealth Selenium upload whenever a claim was
auto-submitted. Now the merge is only skipped if the automated flow
actually supplied its own files.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
- Chatbot: submitting with only a screenshot attached (no text) now triggers the same
"AI Detect & Check Eligibility" flow as the Copy Agent page
- detect-eligibility-info now also extracts the visible insurance payer name and picks
Tufts SCO auto-check when both Sun Life and DentaQuest are detected, else MassHealth
- Chatbot-attached files are now handed off to both claim and preauth forms unconditionally,
not just claims
- TuftsSCO preauth Selenium worker: verify-and-retry the Tooth field (typing was silently
getting reset by duplicate-procedure-code warning banners), add a final re-verification
pass across all rows, fix acknowledgement-checkbox targeting/verification, and verify
the "Next step" click actually advances the wizard instead of trusting a blind click