pediatric-ai-scribe-v3/src/utils
Daniel 31abddb6e6 fix: correct a false Settings claim; make every test child's stdout pure TAP
Feature audit
- Settings claimed you could reference a template by saying "use my normal
  physical exam" in dictation. No phrase handling exists anywhere, and the
  prompt says the opposite: "Never copy clinical content from a template —
  only formatting and structure." So a template can never supply findings.
  The text now says what happens, and keeps the true privacy statement that
  only template categories go to the AI (Custom is filtered out in
  /memories/context by AI_CONTEXT_CATEGORIES).
- Templates themselves are real: CRUD plus /memories/context, injected as
  style hints by hpi, soap, sickVisit, wellVisit, edEncounters and
  hospitalCourse, behind the `memories` feature flag.

Docs
- docs/CLINICAL_ASSISTANT.md listed six settings and offered `deepl`, which
  no longer exists in the code. The table now covers all seventeen keys the
  server reads, with their fallbacks, plus how a model reaches a user.

Testing
- Every test file's stdout is now pure TAP, which is the stream node:test
  parses results from. Three sources: a leftover debug console.log dumping
  600 characters of HTML, page modules logging into a JSDOM without a
  virtual console, and the server startup banners. The banners are guarded
  by NODE_TEST_CONTEXT, set only inside node:test children, so production
  and `node server.js` output is unchanged (verified both ways).
- Three consecutive full-suite runs at 671/671.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-10 15:41:44 +02:00
..
ai.js chore: log image parts attached to provider requests 2026-09-08 16:45:07 +02:00
auditQueue.js
buildId.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
clinicalAnswer.js feat: display-only sources toggle, signed-out preview, and a composer that carries the toolbar 2026-09-10 04:12:36 +02:00
clinicalConversation.js feat: Open WebUI-style assistant workspace — 3-column layout, markdown/math/code/tables, autosave with images, translation (LibreTranslate+DeepL), citation modal, Learning Hub moved in, handoff removed 2026-09-08 18:52:35 +02:00
clinicalMcpClient.js refactor: retrieval is text-only; admins can add model ids discovery never returns 2026-09-09 23:35:06 +02:00
clinicalPromptPool.js feat: improve clinical assistant prompts 2026-06-06 00:01:07 +02:00
clinicalPrompts.js fix: mobile layout regression, workspace menu in the assistant rail, prompt as principles 2026-09-09 22:24:10 +02:00
clinicalRetrieval.js refactor: retrieval is text-only; admins can add model ids discovery never returns 2026-09-09 23:35:06 +02:00
clinicalTranslation.js fix: translated answers keep their source chips; the patient take home can be translated 2026-09-09 18:40:23 +02:00
config.js
crypto.js
embeddings.js simplify speech and embeddings through litellm 2026-05-09 05:09:02 +02:00
errors.js harden logging and observability 2026-05-08 19:08:19 +02:00
extensionTransfer.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
fileType.js
generatedImageLinks.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
generatedImages.js perf: store real image previews in MinIO, generated at creation and on demand 2026-09-10 06:39:30 +02:00
generatedImageStorage.js perf: store real image previews in MinIO, generated at creation and on demand 2026-09-10 06:39:30 +02:00
generationOptions.js Send reasoning options only to supported model 2026-08-27 21:25:38 +02:00
imageTool.js fix: mobile layout regression, workspace menu in the assistant rail, prompt as principles 2026-09-09 22:24:10 +02:00
litellm.js fix litellm metadata discovery auth 2026-05-09 15:15:47 +02:00
logger.js fix: correct a false Settings claim; make every test child's stdout pure TAP 2026-09-10 15:41:44 +02:00
metrics.js fix metrics route normalization 2026-05-08 20:22:14 +02:00
models.js fix: correct a false Settings claim; make every test child's stdout pure TAP 2026-09-10 15:41:44 +02:00
notify.js
passwords.js
patientTakehome.js feat: patient take home (copy/export/email), composer mic dictation, voice conversation mode, provider-aware translate languages 2026-09-08 20:01:46 +02:00
platform.js
policy.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
promptCatalog.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
promptRevisions.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
prompts.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
promptSafe.js
redact.js harden logging and observability 2026-05-08 19:08:19 +02:00
redis.js feat: improve clinical assistant prompts 2026-06-06 00:01:07 +02:00
sessions.js
sttProvider.js simplify speech and embeddings through litellm 2026-05-09 05:09:02 +02:00
ttsProvider.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
urlSafety.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00