Modifying DICOM metadata before creating a session from PACS

73 views
Skip to first unread message

Tim Rosenow

unread,
Jun 12, 2023, 4:34:23 AM6/12/23
to xnat_discussion
Hi there.

I was wondering if it's possible to modify DICOM tags prior to the session being created when receiving data over PACS. I was hoping to combine two labels (StudyDescription and PatientID) into a single session ID (e.g. PatientID_StudyDescription) to set as our session name. I'm not aware of it being possible to do so with the dicom routing rules (at least it's not documented). I was hoping to use the Site-Wide Anonymization process to do so (concatenate two tags into a combined one, basically), but XNAT seems to apply the session logic *before* the Anonymization logic.

Is it possible to do this relatively straightforwardly, or should I just cave in and write a custom plugin that overwrites the import functionality?

Charlie Moore

unread,
Jun 12, 2023, 10:42:10 AM6/12/23
to xnat_discussion
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.


Hope that helps.
Thanks,
Charlie Moore

Tim Rosenow

unread,
Jun 12, 2023, 10:43:02 PM6/12/23
to xnat_discussion
Thanks Charlie, very useful (as always), I really appreciate it.

For background and in case you're wondering why I have such a cursed setup, it's because I am working with a (Bruker) preclinical MRI system and as such its support of DICOM metadata is somewhat basic. The positive side is that actual anonymization is unneccessary!

Thanks again!

Reply all
Reply to author
Forward
0 new messages