Changing project, patient, session labels during development

54 views
Skip to first unread message

Michael Rohan

unread,
Sep 4, 2024, 5:37:29 PM9/4/24
to xnat_di...@googlegroups.com

Hi,

I've got a development xnat set up so I can test configurations before committing, and have a couple prearchive - routing - archive questions. 

 

Thanks Charlie Moore for an earlier answer, I'm more comfortable (as much as possible) with Regex now, and the typos were in the email only.

 

I'm not using the project, patient, session labels to represent those values because we are a research site and organize our data differently. I would like to route the data to a project, patient ID, and a session key though. I have some questions as I try things out that,; I'd appreciate it if any knows the answers.

1. I have unassigned data in prearchive. I'd like to change the routing rules and apply the new rules to that prearchive data so that it will be placed into the correct project. Just changing the routing doesn't seem to prompt a reevaluation of project assignment. Is there a way to do that?

 

2. I'd like to change my patient name and session choices. Is there any way to reassign / relabel data already in the archive? I'm not hopeful on this one, and assume to make a change like this I'll have to delete all the archived data, start over, and re-import data.

 

3. I'd like to form my session ID out of two DICOM fields. If we had planned this from the start we could, of course, enter the whole desired session ID into a given DICOM field but we are following site conventions as well as hoping to import legacy data. Does anyone have an idea for how to refer to 2 DICOM fields in the curtom routing rules? The desired session ID will be something like <patientID>_<accession>

 

Thanks for any thoughts,

 

Michael L Rohan Ph.D.

Chief Technology Officer/MRI Facility Director

Laureate Institute for Brain Research 

6655 S. Yale Ave.

Tulsa, OK  74136

(918) 502-5101

mro...@laureateinstitute.org

 

Laureate Institute for Brain Research

 

Tim Rosenow

unread,
Sep 13, 2024, 5:03:53 AM9/13/24
to xnat_discussion
Regarding your third question, I had this same problem was given a solution thanks to Charlie Moore.

Basically, I modified the DICOM field I wished to be used for routing as part of the site-wide anonymization script. Then, you have to tell xnat to perform the anonymization BEFORE it does the project routing. The instructions for this are below. Note that this may have other unintended consequences, e.g. you won't be able to use any of the xnat-specific details e.g. subject, etc in your anonymization script, but this wasn't a concern for me.

Good luck, Tim. Email from Charlie below:

Hi there,

You are correct that the custom routing option doesn't support compositions of tags, but it wouldn't help you anyway if you're using DQR [I'm presuming you are indeed using DQR based on getting data from a PACS]. DQR uses its own session label assignment from (0020,0010) instead. This is quite off the beaten path, so I'd highly recommend you make sure it acts as you need it to in a dev environment first, but... you can change the location of site-wide anonymization for SCP receivers using the "custom processing" option [and DQR already requires that option] from Swagger:
1. Administer > Miscellaneous > View the Swagger Page
2. Find archive-processor-instance-api
3. With the GET to /processors/site/enabled, find the default configured processor instance with "label": "Site Anonymization".
4. Update the location to "location": "AfterProjectSet".
5. Update it with the PUT to /processors/site/id/{instanceId}

Keep in mind that you probably won't be able to use the subject/session variables in DicomEdit after doing this as it's moving site anonymization earlier in the process than it would normally happen, but I was able to import a study with DQR that used a concatenation of patient ID + study description like this.

Documentation on archive processors: https://wiki.xnat.org/display/XNAT18/Adding+Custom+Image+Import+Processors

Hope that helps.
Thanks,
Charlie Moore

Tim Rosenow

unread,
Sep 17, 2024, 7:38:19 AM9/17/24
to xnat_discussion
Hm it appears that this has stopped working for me in 1.8.10 (was working in 1.8.9), so watch this space to see if we can figure it out: https://groups.google.com/g/xnat_discussion/c/LmFig9CNUgY
Reply all
Reply to author
Forward
0 new messages