Assign a project to incoming data

59 views
Skip to first unread message

M.R. Dijkhuizen

unread,
Nov 22, 2021, 5:37:26 PM11/22/21
to xnat_discussion
Hi all,

We are trying to migrate data from a pacs to Xnat using  dicom send from the pacs to a Xnat scp receiver port. 

What we are trying to accomplish are the following things:
1) Assign a project when there is a match on a Patientname. Included is part of a ctp script as an example. The reason why we cannot use CTP because the subjects in the pacs contain segmentation data. CTP can't read segmentation dicom files.

<script>
  <e en="T" t="00324000" n="StudyComments">@always()@if(PatientName,contains,"A"){Project:ProjectA;Subject:@contents(PatientName);Session:@contents(PatientID)}
{
@if(PatientName,contains,"B"){Project:ProjectB;Subject:@contents(PatientName);Session:@contents(PatientID)-@hash(SeriesInstanceUID,2)}
}
}
</e>
</script>

2) One research project on the pacs has spaces in de patientname. We would like to replace the spaces with a _ and then assign a project to the data. 

With kind regards.

Martin Dijkhuizen
Xnat admin
University of Groningen

Moore, Charlie

unread,
Nov 22, 2021, 6:04:42 PM11/22/21
to xnat_di...@googlegroups.com
Hi Martin,

I can't claim I'm exactly following what you mean, but it sounds too complicated for the built-in custom routing. I think the only real choice would be writing a custom DICOM object identifier in a plugin. We don't have any documentation on this, but I can point you at an example: https://bitbucket.org/xnatdev/dicom-query-retrieve/src/304a7ab7f0e41f6885fb4eda879393bc6d535efe/src/main/java/org/nrg/xnatx/dqr/DicomQueryRetrievePlugin.java#lines-75 . Hopefully that helps a bit.

Thanks,
Charlie

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of M.R. Dijkhuizen <m.r.dij...@rug.nl>
Sent: Monday, November 22, 2021 4:37 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Assign a project to incoming data
 

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/6e2d777f-eee6-45bf-8cb4-41f3cec163acn%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

M.R. Dijkhuizen

unread,
Nov 23, 2021, 2:56:22 AM11/23/21
to xnat_discussion
Hi Charlie,

Thank you for your reply. What we would like to automate is the following. When a dicom session is send to xnat it is automatically put in the pre-archive. 
In the pre-archive you can attach a project to the dicom session.

For one project we need to get rid of the spaces in the patientname dicom header before we attach a xnat project. 

With kind regards,

Martin
Message has been deleted

P Summers

unread,
Nov 26, 2021, 5:39:04 AM11/26/21
to xnat_discussion
Hi Martin,
 if it might help for the elimination of spaces in patient names, 
 the following lines in a dicom edit script (.das) seem to work in replacing spaces and slashes with _ 

tempId := (0010,1001)
(0010,1001) := replace[ replace[ tempId, " ", "_" ], "/", "_" ]

it will probably also work as a one-liner:
(0010,1001) := replace[ replace[ (0010,1001), " ", "_" ], "/", "_" ]
but I haven't verified that.

Paul S

M.R. Dijkhuizen

unread,
Nov 30, 2021, 3:15:11 AM11/30/21
to xnat_discussion
Hi Paul,

Thank you for your reply.

We added this line in Project Routing (Site Wide) section.

(0010,0010):.*(?i)(project1).*:1 t:(?i)project1 r:pr1

In the Subject Routing (Site Wide) section
The code below changes the space into a _
(0010,0020):ROBINSCA\s.* t:\s r:_ 

With kind regards,

Martin


Reply all
Reply to author
Forward
0 new messages