Preserve source subject/session labels (#10))#11
Merged
Conversation
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.
kathrynalpert
approved these changes
Jun 30, 2026
| var id = $(this).data('id'); | ||
| if (id) { | ||
| items.push({ | ||
| var item = { |
There was a problem hiding this comment.
Nit: prefer const to var (though I see var is used elsewhere so perhaps not the time to change)
| buildscript { | ||
| ext { | ||
| vXnat = "1.9.3.3" | ||
| vXnat = "1.9.3.5" |
There was a problem hiding this comment.
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.
Contributor
Author
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.