DICOM routing rule for sessions with multiple DICOM fields

95 views
Skip to first unread message

Vincent Finnerty

unread,
Oct 2, 2023, 11:13:52 AM10/2/23
to xnat_discussion
Dear XNAT Community,

I am working on setting up a DICOM SCP Receiver for transferring already anonymized data. My objective is to create a custom site-wide DICOM routing rule for sessions. Specifically, I aim to:

Use the Study ID as the Project ID
Use the Patient ID as the Subject ID
Generate a Session ID based on a combination of Patient ID, Modality, and Study Date

For points 1 and 2, I've successfully implemented routing by using the regular expressions (0020,0010):(.+) for the Project ID and (0010,0020):(.+) for the Subject ID. However, I'm encountering difficulty when it comes to generating a Session ID based on multiple DICOM fields.

I've tried various combinations, such as (0010,0020)_(0008,0060)_(0008,0020):(+), (0010,0020):(+)_(0008,0060):(+)_(0008,0020):(+)  and format["{0}_{1}_{2}", (0010,0020), (0008,0060), (0008,0020)], but all attempts have resulted only using the first field or  errors that stop the DICOM transfer completely.

Could anyone guide me on how to correctly implement this? Any insights or references would be greatly appreciated.

Thank you in advance for your time and expertise.

Best regards,
Vincent

Charlie Moore

unread,
Oct 2, 2023, 11:21:30 AM10/2/23
to xnat_discussion
Hi there Vincent,

Great question; thank you for the details provided. Unfortunately, the answer is that this just isn't a supported feature yet. We have a feature request for it here https://radiologics.atlassian.net/browse/XNAT-6941 but it hasn't made its way onto the roadmap yet. The only workaround I'm aware of is to use a custom DicomObjectIdentifier in a plugin, at least until the feature gets done.

Thanks,
Charlie Moore

Vincent Finnerty

unread,
Oct 2, 2023, 1:17:51 PM10/2/23
to xnat_discussion
Ok good to know, there is a built-in solution eventually on the way.

I couldn't find a plugin on the XNAT marketplace, have you developed a plugin yourself?

Vincent Finnerty

Charlie Moore

unread,
Oct 2, 2023, 4:51:32 PM10/2/23
to xnat_discussion
Hi Vincent,

I haven't written something to do this, no. If you search the discussion group for "DicomObjectIdentifier" you'll find some threads that I hope will be useful, like maybe this one https://groups.google.com/g/xnat_discussion/c/DJ-1Y-bXk9Y/m/htHB562TAQAJ . I will say that attempting to build a session label from a modality is dangerous without some pretty strict assumptions on exactly the type of data you're working with. It's a series level element, so I wouldn't expect it to be consistent for an entire study.

Thanks,
Charlie Moore

Vincent Finnerty

unread,
Oct 4, 2023, 8:52:17 AM10/4/23
to xnat_discussion
Thank you for your response,

The goal is to differentiate studies on the same day but from different department. For example, we have multiple research projects where patients have a MR and US on the same day. 

You are right that Modality is variable from one series to another, especially in PET/CT or PET/MR exams, but also most studies contain SR or secondary captures or any other modality values. I'm currently setting up my first XNAT server and exploring possibilities. I was hoping along the way to find a XNAT variable that represents the Modality such as used to attribute the session type. But all of this is useless if I can't use multiple tags in the Session ID.

Anyway, I was looking into your suggestion to use a plugin, couldn't find one. 
I got down the Rabbit hole of designing my own, and got lost in java, groovy, gradle, maven and then stopped. I dont want to learn a whole new way of programming just to setup a one variable. I'll wait for that feature to be part of the software.

In the meantime, I will use the DQR plugin with a CSV list of my studies to retrieve for the entire project and use excel to generate the session ID from the patient ID, date and modality.

Thanks again,
Vincent.

Reply all
Reply to author
Forward
0 new messages