Skip to content

Feat/exportlinks - #548

Open
emelalkim wants to merge 10 commits into
developfrom
feat/exportlinks
Open

Feat/exportlinks#548
emelalkim wants to merge 10 commits into
developfrom
feat/exportlinks

Conversation

@emelalkim

Copy link
Copy Markdown
Contributor

No description provided.

emelalkim and others added 10 commits August 23, 2026 17:46
Enables optional chaining (?.) and nullish coalescing (??) which are
supported by Node >= 16 but blocked by the previous ecmaVersion: 2018.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e links

Accepts a list of {subject, study, aimuid} pairs and returns per-study
AES-256-CBC encrypted URLs along with AIM comment and optionally study
description (studyDesc query param, default false). Output format is
text (tab-separated) or json via outputType param. Includes tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…d, use narrative comment

- Change method from POST to PUT
- Make aimuid optional; comment and name default to empty string when omitted
- Add name field (ImageAnnotation.name.value) to output
- Use the narrative part of comment (after ~~) instead of the DICOM metadata prefix

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… coercion

- Add reply.sent guard so the handler exits immediately if the rights
  check already sent an unauthorized response
- Accept both boolean true and string "true" for studyDesc query param
  to handle Fastify query string coercion edge cases

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Query params

getPatientStudiesInternal expects filter to be an array or undefined;
passing {} caused filter.join to throw since objects have no join method.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…y access

requestQuery.filterDSO is accessed without a null guard in
getPatientStudiesInternal, so undefined caused a crash. Empty object
is the correct no-op value; undefined is still correct for filter.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…criptions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
All seven reply.send() calls inside epadThickRightsCheck now throw so
errors bubble up to the auth hook's single res.send(err), preventing
the "reply already sent" error from Fastify seeing multiple responses.
The inner catch re-throws for the same reason, and the unused reply
parameter is removed from the function signature.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Filter out empty/null values before joining with tabs so that missing
study_desc, name, or comment fields don't produce stray tab characters
in the plain-text response.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Wrap the CouchDB AIM fetch in a try/catch so any failure (missing doc,
DB unavailable, unexpected shape) leaves name and comment empty instead
of crashing the whole request.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant