Skip to content

Preserve source subject/session labels (#10))#11

Merged
kelseym merged 2 commits into
mainfrom
reimport-with-optional-subject-session-id
Jun 30, 2026
Merged

Preserve source subject/session labels (#10))#11
kelseym merged 2 commits into
mainfrom
reimport-with-optional-subject-session-id

Conversation

@kelseym

@kelseym kelseym commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Reimport can now carry the source's XNAT subject and session labels through to the importer instead of letting the destination derive them from DICOM tags (e.g. PatientName/PatientID).

Two independent, default-on checkboxes in the Reimport panel select which labels to preserve. The flags flow through the request: BatchTransfer/TransferRequest -> TransferItemRequest (JMS) -> importExperiment, which sets the importer "subject"/"session" overrides (SUBJECT_ID/EXPT_LABEL). If a chosen label is blank or missing, the item fails rather than silently falling back to DICOM-derived labels. Null/absent flags preserve nothing.

Reimport can now carry the source's XNAT subject and session labels through
to the importer instead of letting the destination derive them from DICOM
tags (e.g. PatientName/PatientID).

Two independent, default-on checkboxes in the Reimport panel select which
labels to preserve. The flags flow through the request:
BatchTransfer/TransferRequest -> TransferItemRequest (JMS) -> importExperiment,
which sets the importer "subject"/"session" overrides (SUBJECT_ID/EXPT_LABEL).
If a chosen label is blank or missing, the item fails rather than silently
falling back to DICOM-derived labels. Null/absent flags preserve nothing.
@kelseym kelseym self-assigned this Jun 30, 2026
var id = $(this).data('id');
if (id) {
items.push({
var item = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: prefer const to var (though I see var is used elsewhere so perhaps not the time to change)

Comment thread build.gradle Outdated
buildscript {
ext {
vXnat = "1.9.3.3"
vXnat = "1.9.3.5"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't object to this change, just want to mention: Out of necessity (a.k.a., not wanting to update every plugin on every release), we've often kept the vXnat for plugins at the minimum necessary, only incrementing it when a new/changed API necessitates compiling/running against a newer version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good policy - the vXnat update is not needed for this update and is unrelated to the goal anyway.

XNAT 1.9.3.5 works fine, but is not required.
@kelseym kelseym merged commit c05050c into main Jun 30, 2026
1 check passed
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.

2 participants