Study Query using SeriesDate

Hi,

I am new to Orthanc and dicom, so I wanted to ask people with more experience.

I have an Orthanc server running with some data, and I wanted to understand its current behavior.

I can query the server without issues using dcmtk:

findscu.exe -P -v IP -aet AET -aec AEC -k “QueryRetrieveLevel=Study” -k “SeriesDate=”

This query returns 18 (study) responses as expected.

This is an example of one of the responses:

Find Response: 18 (Pending)
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
I: (0008,0021) DA [20190902] # 8, 1 SeriesDate
I: (0008,0052) CS [Study ] # 6, 1 QueryRetrieveLevel
I: (0008,0054) AE [ORTHANC ] # 8, 1 RetrieveAETitle

Clearly there exists a study containing a series with SeriesDate=20190902.

I will then try a similar query that filters on the SeriesDate:

findscu.exe -P -v IP -aet AET -aec AEC -k “QueryRetrieveLevel=Study” -k “SeriesDate=20190902”

I expect this query to return 1 (study) response.

I thought that it might have to do with the fact that a study can contain multiple series, but the study in question contains only one series.

I also tried to just get every study with a SeriesDate before today:
findscu.exe -P -v IP -aet AET -aec AEC -k “QueryRetrieveLevel=Study” -k “SeriesDate=-20240307”

This query should return the same 18 responses as the first query with no SeriesDate filter, since all of the studies and series have older dates.

I turned on trace in the logs and looked at them.
For the query with SeriesDate=-20240307, I see the following lines in the logs:

I0308 02:24:19.141962 OrthancFindRequestHandler.cpp:400] (dicom) DICOM C-Find request at level: Study
I0308 02:24:19.141962 OrthancFindRequestHandler.cpp:406] (dicom) (0008,0021) SeriesDate = *** POTENTIAL PHI ***
I0308 02:24:19.141962 OrthancFindRequestHandler.cpp:406] (dicom) (0008,0052) QueryRetrieveLevel = Study
I0308 02:24:19.141962 ServerContext.cpp:1459] Number of candidate resources after fast DB filtering on main DICOM tags: 18
I0308 02:24:19.141962 ServerContext.cpp:1607] Number of matching resources: 0
I0308 02:24:19.345101 CommandDispatcher.cpp:931] (dicom) Finishing association with AET MYDCMSTORE_CLO on IP 10.222.91.36: DUL Peer Requested Release
I0308 02:24:19.345101 CommandDispatcher.cpp:939] (dicom) Association Release with AET MYDCMSTORE_CLO on IP 10.222.91.36

It looks like the number of candidate resources is correct, but something goes wrong when matching resources.

Thanks

Hi,

SeriesDate is a series level tag while you are searching at Study level. I would not expect Orthanc to work in that case → either search on StudyDate at Study level or at SeriesDate at Series level.

HTH,

Alain.