FINDSCU - how to limit results by hour?

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
jason.hamrick
Posts: 3
Joined: Wed, 2022-05-04, 08:16

FINDSCU - how to limit results by hour?

#1 Post by jason.hamrick »

Hi, I'm trying to figure out how to execute FINDSCU to query for studies performed in a single hour.
the system i'm querying is very busy and a single day by modality exceeds what it's willing to return of a max of 500 records.

I'm currently trying the following query which is returning the max of 500 but I'm sure there is far more for the criteria.

findscu -S -k 0008,0020="20160101" -k 0008,0052="STUDY" -k 0008,0060="CT" -k 0020,000D -k 0010,0010 -k 0010,0020 -k 0008,1030 -k 0010,0030 -k 0010,0030 -k 0010,0040 -k 0008,0050 -k 0008,0020 -k 0008,0030 -aec EA_ARCH1 -aet DATAFIRST 10.44.194.16 104 -od c:\cfind -X


I've tried adding in 0008,0030="0900 - 0959" but this returns hours outside of those hours and maxes out the query.

I've also tried 0008,0030="0900" but only returns an exam performed at exactly 0900 and nothing else.

what would be the appropriate way to get a range of hours?

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: FINDSCU - how to limit results by hour?

#2 Post by Michael Onken »

Hi,

the tag you look for is the Scheduled Procedure Step Start Time (0040,0003)​, which lives (in worklist) inside the Scheduled Procedure Step Sequence (0040,0100)​. That time is the time the examination is scheduled for that patient. The server must support a filter request on that attribute.

In order to query for it, you must send above sequence with a single item in it, and that item must contain the Scheduled Procedure Step Start Time you want to to filter for. So use:

Code: Select all

findscu ... -k "0040,0100[0].0040,0003=0900-1000" ...
Do not use spaces around the "-". You could also try

Code: Select all

 -k "0040,0100[0].0040,0003=090000-100000" 
or even

Code: Select all

 -k "0040,0100[0].0040,0003=09-10" 
if the server is picky on the time format (all those are legal in DICOM). Let me know whether this works for you.

You can also use tag names instead of tags, by the way, which makes things more readable, e.g.

Code: Select all

findscu ... -k PatientName -k PatientID...
Best regards,
Michael

jason.hamrick
Posts: 3
Joined: Wed, 2022-05-04, 08:16

Re: FINDSCU - how to limit results by hour?

#3 Post by jason.hamrick »

Thank you for the quick reply, but that doesn't appear to be working either still getting returned times of like 185845 and 132151
when I'm expecting something between 0900 and 1000

using the following:
C:\dcmtk-3.6.6-win64-dynamic\dcmtk-3.6.6-win64-dynamic\bin>findscu -P -k "0008,0052=STUDY" -k "0008,0020=20160101" -k PatientID -k "0008,0030" -k "0040,0100[0].0040,0003=090000-100000" -aec A_ARCH1 -aet MY_AE 10.44.194.16 104 -od c:\cfind -X

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: FINDSCU - how to limit results by hour?

#4 Post by Michael Onken »

Hi,

You can try just querying for PatientID and the time to exclude other error sources.

However I think that you just have an uncompliant DICOM server.

Maybe you find another useful tag for limiting the number of responses :/

Best regards,
Michael

jason.hamrick
Posts: 3
Joined: Wed, 2022-05-04, 08:16

Re: FINDSCU - how to limit results by hour?

#5 Post by jason.hamrick »

Yeah, I'm more confused on why between dates work but between times do not...

I tried limiting by modality, but CR and CT both have in excess of 500 procedures a day.
and not knowing all of the patient ID's, procedure descriptions, station names, etc that could be used makes limiting difficult. That is why I wanted to query by the hour of the day.

as far as hours go with DCMTK I have to get an extact time of the study for it to return anything... that is really confusing

Michael Onken
DCMTK Developer
Posts: 2048
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

Re: FINDSCU - how to limit results by hour?

#6 Post by Michael Onken »

Hi,

note that there are two times that are easily confused with each other:
  • Study Time: The time, the DICOM study has been started, i.e. the time the first DICOM image in that Study has been created. This attribute is on main dataset level in the worklist.
  • Scheduled Procedure Step Start Time: The time, the current procedure on the modality is planned for. If the Study is brand new, this might be identical to Study Time (though probably then the server will not provide a Study Time at all then). This attribute is nested within the Scheduled Procedure Step Sequence in worklist, as described earlier.
I hope you find a smart way to work around the current limitations of the server.

Best regards,
Michael

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Google [Bot] and 1 guest