pediatric-ai-scribe-v3/src/utils
Daniel 50e640149a feat: ED encounters + notes model selector; remove AI corrections; fix notes framing
Four changes batched:

1. ED Encounters tab (new) — multi-stage emergency note with don't-miss
   tooltips and 2023 E/M MDM finalize. New route /api/ed-encounters
   (generate per-stage + finalize MDM), new ed-encounters.js owning all
   client logic, new ed-encounter.html component, new template_ed memory
   category. Persists draft to localStorage every keystroke and to
   saved_encounters on stage advance. encounters.js touched only to
   register the new tab in sessionStorage restore + tabMap (save and
   idempotency code untouched).

2. Notes model selector — /notes/from-voice now accepts a client-supplied
   model (validated by the existing callAI allow-list); falls back to the
   admin default. Added <select class="tab-model-select"> to notes.html
   so the existing app.js populator handles options + default.

3. Remove AI-learning-from-corrections — deleted correctionTracker.js,
   POST /memories/correction, the corrections branch in
   /memories/context, the settings UI section, the FAQ entry, and all
   dead trackAIOutput/saveCorrection guards in callers. Legacy
   correction_* DB rows are filtered (NOT LIKE) rather than dropped, so
   no destructive migration.

4. Fix notes AI framing — /notes/from-voice prompt no longer assumes
   "physician dictation". Plain notes (shopping lists, reminders,
   ideas) now match the dictation tone instead of being forced into
   clinical structure.

All 46 tests pass.
2026-04-28 03:09:38 +02:00
..
ai.js fix: auth/API logging to Loki, TTS voice auto-detection, STT ElevenLabs support 2026-04-19 21:26:49 +02:00
auditQueue.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
config.js Feat: admin CMS, save/resume encounters, user templates, SSHADESS, well visit notes, sick visit, ROS/PE checklists, ICD-10 diagnoses 2026-03-22 16:43:39 -04:00
crypto.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
embeddings.js feat: Add model search, testing, and TTS/STT/embedding management to admin 2026-04-03 19:55:11 +00:00
errors.js feat: neonatal calculator, DOCX/PPTX/ODT/EPUB support, gateway-agnostic URL helper, TTS/STT fixes 2026-04-19 02:17:06 +02:00
fileType.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
logger.js fix(security): timing-safe forgot-password + redact log file writer 2026-04-22 01:01:00 +02:00
models.js Enforce server-side LLM model whitelist + scope idle timeout to writes 2026-04-14 05:15:55 +02:00
notify.js Add biometric auth, ntfy push notifications, mobile improvements 2026-04-11 02:35:07 +02:00
passwords.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
platform.js Sliding 24h idle timeout (web) + persistent mobile + 2FA backup codes 2026-04-14 04:24:54 +02:00
prompts.js feat: ED encounters + notes model selector; remove AI corrections; fix notes framing 2026-04-28 03:09:38 +02:00
promptSafe.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
redact.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
sessions.js Add node-pg-migrate for versioned schema changes + better mobile UA labels 2026-04-14 05:06:19 +02:00
transcribeAWS.js Revert chunk size to 8KB — larger sizes cause AWS deserialization errors 2026-03-29 01:21:43 +00:00
transcribeGoogle.js Add per-user voice preferences (STT model + TTS voice selection) 2026-03-31 14:47:00 +00:00
transcribeLocal.js v10: Local Whisper transcription, bigger text areas, flexible AI memory 2026-03-28 22:00:30 +00:00
ttsGoogle.js Add per-user voice preferences (STT model + TTS voice selection) 2026-03-31 14:47:00 +00:00