pediatric-ai-scribe-v3/src/utils
Daniel af2e09c1de
Some checks failed
Forgejo Android APK / Root app tests (push) Successful in 1m7s
Forgejo Docker Build / Root app tests (push) Successful in 47s
Forgejo Android APK / Build signed APK (push) Successful in 2m16s
Forgejo Docker Build / Build Docker image (push) Successful in 16s
Forgejo Docker Build / Deploy to the host (push) Failing after 0s
feat: a slide can be drawn from primitives when the named layouts have no word for it
The nine layouts are a fixed vocabulary and a good default, but "lay the three
severity levels out left to right with arrows between them" had no expression in
them at all. A "custom" slide now carries a list of shapes: positioned text,
eight autoshape families, lines, images, tables, and native PowerPoint charts —
column, bar, line, pie, doughnut.

Coordinates are percentages of the slide rather than EMU, because a model
reasons about "the left half" and not about 12192000. Shapes draw in array
order, so a later one sits on top.

The model never emits Python. It names shapes and the renderer draws them:
running model-authored code to lay out a slide would be an enormous amount of
trust to buy a feature, on a server holding clinical data and secrets.

Validation lives beside the text that teaches the vocabulary, in one file, so
what the model is told about is exactly what is accepted. Kinds are an
allowlist, colours must be six hex digits, coordinates are clamped inside the
slide — a shape at x=95 w=30 is cut to the edge rather than drawn half off it —
counts are capped, a pie is held to one series, and anything that cannot be
understood is dropped. A custom slide that loses every shape becomes a plain one
rather than a heading over an empty frame, and one bad shape is caught in the
renderer so it cannot cost the slide it sits on.

A figure on a custom slide is requested through an image shape, drawn by the
same path as any other, and attached by job id. Word renders a custom slide as
its words in reading order with its tables and figures — lossy, and better than
dropping the slide.

Verified live end to end: asked to "lay the three severity levels out left to
right as coloured boxes with arrows between them", the model produced
[rect arrow rect arrow rect], chose green/amber/red itself, and the rendered
slide was looked at. A column chart beside its commentary renders with real axes
and gridlines.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Dv6sqaY6Vq3ChZHMem3cnU
2026-09-11 22:12:26 +02:00
..
adminLockdown.js feat: admin lockdown, so several admins do not all get to change everything 2026-09-10 23:20:29 +02:00
ai.js refactor: Google models go through LiteLLM; the Vertex SDK is gone 2026-09-11 13:51:22 +02:00
audioBackupStore.js refactor: one place decides which bucket, on which S3, with which credentials 2026-09-10 17:09:13 +02:00
auditQueue.js Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
buildId.js feat: ship reviewed prompt history, conversation limits and account protections 2026-09-07 04:01:01 +02:00
citationAudit.js fix: recordings that produced nothing, and the boxes that zoomed on iOS 2026-09-11 00:16:19 +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: ped-ai calls clinical_semantic_search only 2026-09-10 17:22:40 +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 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
deckBuild.js feat: a slide can be drawn from primitives when the named layouts have no word for it 2026-09-11 22:12:26 +02:00
deckReview.js feat: a vision model looks at the rendered deck and fixes the layout 2026-09-11 21:38:18 +02:00
deckSchema.js feat: a slide can be drawn from primitives when the named layouts have no word for it 2026-09-11 22:12:26 +02:00
docSpec.js feat: a slide can be drawn from primitives when the named layouts have no word for it 2026-09-11 22:12:26 +02:00
documentExport.js feat: a slide can be drawn from primitives when the named layouts have no word for it 2026-09-11 22:12:26 +02:00
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 Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
generatedImageLinks.js feat: integrate durable image jobs/private assets into current core 2026-09-07 16:53:42 +02:00
generatedImages.js feat: PubMed search for My Resources, and an image tool that actually fires 2026-09-11 16:47:08 +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
learningRetrieval.js feat: Learning resources can be grounded in the clinical corpus 2026-09-11 14:03:05 +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
loginCodes.js feat: sign in with a code emailed to you, offered beside the password 2026-09-11 20:12:03 +02:00
metrics.js fix metrics route normalization 2026-05-08 20:22:14 +02:00
models.js refactor: Google models go through LiteLLM; the Vertex SDK is gone 2026-09-11 13:51:22 +02:00
notify.js Add biometric auth, ntfy push notifications, mobile improvements 2026-04-11 02:35:07 +02:00
objectStorage.js refactor: one place decides which bucket, on which S3, with which credentials 2026-09-10 17:09:13 +02:00
passwords.js Security hardening: PHI encryption, argon2, DOMPurify, SRI 2026-04-14 02:49:38 +02:00
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 Sliding 24h idle timeout (web) + persistent mobile + 2FA backup codes 2026-04-14 04:24:54 +02:00
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 Batch of security + scale fixes 2026-04-14 05:24:40 +02:00
pubmedSearch.js feat: My Resources says what it is, offers its sources in one place, and Modify gets them too 2026-09-11 18:54:17 +02:00
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
registrationInvites.js fix: expired invitations can be cleared too, revoked ones still cannot 2026-09-11 20:41:18 +02:00
resourceImages.js feat: a resource can have several illustrations, on its own path 2026-09-11 19:19:22 +02:00
sessions.js Add node-pg-migrate for versioned schema changes + better mobile UA labels 2026-04-14 05:06:19 +02:00
slideShapes.js feat: a slide can be drawn from primitives when the named layouts have no word for it 2026-09-11 22:12:26 +02:00
slideSpec.js feat: decks are built with python-pptx instead of pandoc, and carry their figures 2026-09-11 19:34:26 +02:00
sttProvider.js fix: patch nodemailer; Settings offers STT models the gateway really has 2026-09-10 15:54:57 +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
webSearch.js feat: PubMed search for My Resources, and an image tool that actually fires 2026-09-11 16:47:08 +02:00