Hi Dennis,
I have been able to reproduce the same behaviour here. I have 16 studies with MR and only 14 are returned.
However, this happens because I have a very weird data set in which I have 3 studies with the same StudyInstanceUID. Could you have the same kind of issue ? By adding more search criteria like a filter on the PatientName, I’m able to isolate them. If you don’t have such a weird data set, any chance you could share an anonymized dataset for us to reproduce ?
First filter without PatientName → return only 1 “random” study out of the 3 duplicates
C:\Users\Alain>findscu -S -k QueryRetrieveLevel=Study -k StudyInstanceUID=1.3.12.2.1107.5.2.43.166083.30000021090217112999000000001 -k PatientID -k PatientName=* -k ModalitiesInStudy=MR localhost 4242
I: ---------------------------
I: Find Response: 1 (Pending)
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
I: (0008,0052) CS [Study ] # 6, 1 QueryRetrieveLevel
I: (0008,0054) AE [ORTHANC ] # 8, 1 RetrieveAETitle
I: (0008,0061) CS [MR] # 2, 1 ModalitiesInStudy
I: (0010,0010) PN [alert(0)] # 8, 1 PatientName
I: (0010,0020) LO [alert(0)] # 8, 1 PatientID
I: (0020,000d) UI [1.3.12.2.1107.5.2.43.166083.30000021090217112999000000001 ] # 58, 1 StudyInstanceUID
I:
Second filter with a PatientName filter → return the right study out of the 3 duplicates
C:\Users\Alain>findscu -S -k QueryRetrieveLevel=Study -k StudyInstanceUID=1.3.12.2.1107.5.2.43.166083.30000021090217112999000000001 -k PatientID -k PatientName=s* -k ModalitiesInStudy=MR localhost 4242
I: ---------------------------
I: Find Response: 1 (Pending)
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
I: (0008,0052) CS [Study ] # 6, 1 QueryRetrieveLevel
I: (0008,0054) AE [ORTHANC ] # 8, 1 RetrieveAETitle
I: (0008,0061) CS [MR] # 2, 1 ModalitiesInStudy
I: (0010,0010) PN [single ’ quote] # 14, 1 PatientName
I: (0010,0020) LO [single ’ quote] # 14, 1 PatientID
I: (0020,000d) UI [1.3.12.2.1107.5.2.43.166083.30000021090217112999000000001 ] # 58, 1 StudyInstanceUID
I:
Third filter with a PatientName filter → return the right study out of the 3 duplicates
C:\Users\Alain>findscu -S -k QueryRetrieveLevel=Study -k StudyInstanceUID=1.3.12.2.1107.5.2.43.166083.30000021090217112999000000001 -k PatientID -k PatientName=D -k ModalitiesInStudy=MR localhost 4242
I: ---------------------------
I: Find Response: 1 (Pending)
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
I: (0008,0052) CS [Study ] # 6, 1 QueryRetrieveLevel
I: (0008,0054) AE [ORTHANC ] # 8, 1 RetrieveAETitle
I: (0008,0061) CS [MR] # 2, 1 ModalitiesInStudy
I: (0010,0010) PN [; DROP table *; ] # 16, 1 PatientName
I: (0010,0020) LO [; DROP table *; ] # 16, 1 PatientID
I: (0020,000d) UI [1.3.12.2.1107.5.2.43.166083.30000021090217112999000000001 ] # 58, 1 StudyInstanceUID
I:
And, indeed with Orthanc, searching for OT\SR\US will return all studies with at least one modality amongst these 3. If this is not the expected behaviour, could you point me to a reference of the DICOM standard that says so ? And, is this actually a problem ?
Best regards,
Alain.