pediatric-ai-scribe-v3/src
Daniel 059fbefa7e Add automatic ICD-10 and CPT billing code suggestions
New feature: after generating any clinical note, the app automatically
suggests relevant billing codes displayed as clickable chips below the output.

Backend (src/routes/billing.js):
- POST /api/suggest-codes endpoint analyzes note text
- Extracts diagnoses from Assessment section via regex
- Looks up ICD-10 codes: local common pediatric map (40+ conditions)
  first, then NLM Clinical Tables API for unknown terms
- Suggests CPT E/M codes based on note type, visit complexity,
  ROS/PE system counts, and MDM level estimation
- Supports: outpatient (new/established), well visit (age-based),
  ED, inpatient (admit/subsequent/discharge)

Frontend (public/js/app.js):
- suggestBillingCodes() renders collapsible card with ICD-10 and CPT chips
- Click any chip to copy the code to clipboard
- Shows E/M level assessment (diagnosis count, ROS, PE, MDM complexity)
- Disclaimer: "Suggestions only. Always verify codes."

Integration: called after note generation in all 6 tabs
(encounter, SOAP, sick visit, well visit, hospital course, chart review)
2026-04-11 01:50:17 +02:00
..
db v6.2: Session management, password change, audit logging, refine context, UI fixes 2026-04-08 20:27:45 +02:00
middleware v6.2: Session management, password change, audit logging, refine context, UI fixes 2026-04-08 20:27:45 +02:00
routes Add automatic ICD-10 and CPT billing code suggestions 2026-04-11 01:50:17 +02:00
utils v6.2: Session management, password change, audit logging, refine context, UI fixes 2026-04-08 20:27:45 +02:00