C-FIND Study by patient-ID and date

1k views Asked by At

I would like to download the chest x-ray file which matches a specified Patient ID and a Study Date from PACS.
If I specify the date in the C-FIND-Request, I can't get any matched result.
Could you suggest what's wrong with my query?
Thank you very much~

  • I use pynetdicom to interact with GE's PACS.
  • The example records in PACS are:
     Study Date Modality Patient ID Online
     -------------------------------------------------------
     2021/08/21 XA   12345678 Y
     2021/08/19 US   12345678 Y
     2021/08/11 US   12345678 Y
     2021/08/09 US   12345678 Y
     2021/08/02 US   12345678 Y
     2021/07/16 CR   12345678 Y
     The records from 2021/08/02 to 2021/08/21 are related study.
     My target is the one taken on 2021/07/16.
  • Start with C-ECHO, then send C-FIND, low priority
    I have tried
    (1) C-FIND under patient root, patient level
    (2) C-FIND under study root, study level
    And if I specify the date(StudyDate = "20210716"), I can't get any matched result.
  • Following are the log of pynetdicom for C-FIND under patient root, patient level.

(1) Case: condition only on Patient ID

I: Requesting Association
D: Request Parameters:
D: ======================= OUTGOING A-ASSOCIATE-RQ PDU ========================
D: Our Implementation Class UID:      1.2.826.0.1.3680043.9.3811.1.5.7
D: Our Implementation Version Name:   PYNETDICOM_157
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    <hidden My desktop>
D: Called Application Name:     <hidden GE PACS>
D: Our Max PDU Receive Size:    16382
D: Presentation Contexts:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =Verification SOP Class
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntaxes:
D:       =Implicit VR Little Endian
D:       =Explicit VR Little Endian
D:       =Deflated Explicit VR Little Endian
D:       =Explicit VR Big Endian
D:   Context ID:        3 (Proposed)
D:     Abstract Syntax: =Patient Root Query/Retrieve Information Model - FIND
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntaxes:
D:       =Implicit VR Little Endian
D:       =Explicit VR Little Endian
D:       =Deflated Explicit VR Little Endian
D:       =Explicit VR Big Endian
D:   Context ID:        5 (Proposed)
D:     Abstract Syntax: =Computed Radiography Image Storage
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntaxes:
D:       =Implicit VR Little Endian
D:       =Explicit VR Little Endian
D:       =Deflated Explicit VR Little Endian
D:       =Explicit VR Big Endian
D: Requested Extended Negotiation: None
D: Requested Common Extended Negotiation: None
D: Requested Asynchronous Operations Window Negotiation: None
D: Requested User Identity Negotiation: None
D: ========================== END A-ASSOCIATE-RQ PDU ==========================
D: Accept Parameters:
D: ======================= INCOMING A-ASSOCIATE-AC PDU ========================
D: Their Implementation Class UID:    1.2.528.1.1001.2.20060808.1
D: Their Implementation Version Name: GEHC_DCM06_1
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    <hidden My desktop>
D: Called Application Name:     <hidden GE PACS>
D: Their Max PDU Receive Size:  16384
D: Presentation Contexts:
D:   Context ID:        1 (Accepted)
D:     Abstract Syntax: =Verification SOP Class
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =Explicit VR Little Endian
D:   Context ID:        3 (Accepted)
D:     Abstract Syntax: =Patient Root Query/Retrieve Information Model - FIND
D:     Accepted SCP/SCU Role: SCU
D:     Accepted Transfer Syntax: =Explicit VR Little Endian
D:   Context ID:        5 (Accepted)
D:     Abstract Syntax: =Computed Radiography Image Storage
D:     Accepted SCP/SCU Role: SCU
D:     Accepted Transfer Syntax: =Explicit VR Big Endian
D: Accepted Extended Negotiation: None
D: Accepted Asynchronous Operations Window Negotiation: None
D: User Identity Negotiation Response: None
D: ========================== END A-ASSOCIATE-AC PDU ==========================
I: Association Accepted
I: Sending Echo Request: MsgID 1
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
I: Received Echo Response (Status: Success)
Association established with ECHO SCP
I: Sending Find Request: MsgID 1
I:
I: # Request Identifier
I: (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I: (0010,0020) LO [12345678]                               # 1 PatientID
I:
D: ========================== OUTGOING DIMSE MESSAGE ==========================
D: Message Type                  : C-FIND RQ
D: Presentation Context ID       : 3
D: Message ID                    : 1
D: Affected SOP Class UID        : Patient Root Query/Retrieve Information Model - FIND
D: Identifier                    : Present
D: Priority                      : Low
D: ============================ END DIMSE MESSAGE =============================
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
D:
I: Find SCP Response: 1 - 0xFF01 (Pending)
D: pydicom.read_dataset() TransferSyntax="Little Endian Explicit"
I:
I: # Response Identifier
I: (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I: (0008,0054) AE [<hidden GE PACS>]                       # 1 RetrieveAETitle
I: (0008,0056) CS [ONLINE]                                 # 1 InstanceAvailability
I: (0010,0010) PN [<hidden>]                               # 1 PatientName
I: (0010,0020) LO [12345678]                               # 1 PatientID
I: (0010,0021) LO (no value available)                     # 0 IssuerOfPatientID
I: (0010,0030) DA [<hidden>]                               # 1 PatientBirthDate
I: (0010,0040) CS [<hidden>]                               # 1 PatientSex
I: (0010,1000) LO (no value available)                     # 0 OtherPatientIDs
I: (3109,0010) LO [Applicare/RadWorks/Version 5.0]         # 1
I: (3109,1035) SQ (Sequence with 5 items)                  # 5
I:   (Sequence item #1)
I:     (0008,0020) DA [20210821]                               # 1 StudyDate
I:     (0008,0030) TM [092037]                                 # 1 StudyTime
I:     (0008,0050) SH [Z56257VHMH11]                           # 1 AccessionNumber
I:     (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I:     (0008,0061) CS [OT]                                     # 1 ModalitiesInStudy
I:     (0008,0080) LO [<hidden>]                               # 1 InstitutionName
I:     (0008,0090) PN (no value available)                     # 0 ReferringPhysicianName
I:     (0008,1010) SH [Allura FD10/10]                         # 1 StationName
I:     (0008,1030) LO [AV shunt]                               # 1 StudyDescription
I:     (0008,1040) LO [Cardiology]                             # 1 InstitutionalDepartmentName
I:     (0008,1050) PN (no value available)                     # 0 PerformingPhysicianName
I:     (0008,1060) PN (no value available)                     # 0 NameOfPhysiciansReadingStudy
I:     (0010,0010) PN [<hidden>]                               # 1 PatientName
I:     (0010,0020) LO [12345678]                               # 1 PatientID
I:     (0010,0021) LO (no value available)                     # 0 IssuerOfPatientID
I:     (0010,0030) DA [<hidden>]                               # 1 PatientBirthDate
I:     (0010,0040) CS [<hidden>]                               # 1 PatientSex
I:     (0010,1000) LO (no value available)                     # 0 OtherPatientIDs
I:     (0018,0015) CS (no value available)                     # 0 BodyPartExamined
I:     (0018,1030) LO [PTA]                                    # 1 ProtocolName
I:     (0020,000D) UI [1.2.124.113532.172.16.32.11.20210821.92007.20440484] # 1 StudyInstanceUID
I:     (0020,0010) SH [Z56257VHMH11]                           # 1 StudyID
I:     (0020,1206) IS [27]                                     # 1 NumberOfStudyRelatedSeries
I:     (0020,1208) IS [28]                                     # 1 NumberOfStudyRelatedInstances
I:     (0032,000A) CS (no value available)                     # 0 StudyStatusID
I:     (0032,1030) LO (no value available)                     # 0 ReasonForStudy
I:     (3109,0010) LO [Applicare/RadWorks/Version 5.0]         # 1
I:     (3109,1001) ST [<hidden>\database\local\general\1.2.528.1.1001.200.10.1285.3181.1.20210826011907678] # 1
I:     (3109,1002) SH [NEW]                                    # 1
I:     (3109,1003) CS (no value available)                     # 0
I:     (3109,1008) LO [<hidden>]                               # 1
I:     (3109,1009) LO [General]                                # 1
I:     (3109,100A) DA [20210826]                               # 1
I:     (3109,100B) TM [091904]                                 # 1
I:     (3109,102C) LO (no value available)                     # 0
I:     (3109,1043) CS (no value available)                     # 0
I:   (Sequence item #2)
I:     (0008,0020) DA [20210819]                               # 1 StudyDate
I:     (0008,0030) TM [084248]                                 # 1 StudyTime
I:     (0008,0050) SH [Z51707VHGH12]                           # 1 AccessionNumber
I:     (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I:     (0008,0061) CS [US]                                     # 1 ModalitiesInStudy
I:     (0008,0080) LO [<hidden>]                               # 1 InstitutionName
I:     (0008,0090) PN (no value available)                     # 0 ReferringPhysicianName
I:     (0008,1010) SH [US16]                                   # 1 StationName
I:     (0008,1030) LO [Dupplex color scan , vein]              # 1 StudyDescription
I:     (0008,1040) LO (no value available)                     # 0 InstitutionalDepartmentName
I:     (0008,1050) PN (no value available)                     # 0 PerformingPhysicianName
I:     (0008,1060) PN (no value available)                     # 0 NameOfPhysiciansReadingStudy
I:     (0010,0010) PN [<hidden>]                               # 1 PatientName
I:     (0010,0020) LO [12345678]                               # 1 PatientID
I:     (0010,0021) LO (no value available)                     # 0 IssuerOfPatientID
I:     (0010,0030) DA [<hidden>]                               # 1 PatientBirthDate
I:     (0010,0040) CS [<hidden>]                               # 1 PatientSex
I:     (0010,1000) LO (no value available)                     # 0 OtherPatientIDs
I:     (0018,0015) CS (no value available)                     # 0 BodyPartExamined
I:     (0018,1030) LO [Free Form]                              # 1 ProtocolName
I:     (0020,000D) UI [1.2.124.113532.172.16.32.11.20210819.83334.20431534] # 1 StudyInstanceUID
I:     (0020,0010) SH [Z51707VHGH12]                           # 1 StudyID
I:     (0020,1206) IS [1]                                      # 1 NumberOfStudyRelatedSeries
I:     (0020,1208) IS [1]                                      # 1 NumberOfStudyRelatedInstances
I:     (0032,000A) CS (no value available)                     # 0 StudyStatusID
I:     (0032,1030) LO (no value available)                     # 0 ReasonForStudy
I:     (3109,0010) LO [Applicare/RadWorks/Version 5.0]         # 1
I:     (3109,1001) ST [<hidden>\database\local\general\1.2.528.1.1001.200.10.2257.3685.1.20210819010407790] # 1
I:     (3109,1002) SH [NEW]                                    # 1
I:     (3109,1003) CS (no value available)                     # 0
I:     (3109,1008) LO [<hidden>]                               # 1
I:     (3109,1009) LO [General]                                # 1
I:     (3109,100A) DA [20210819]                               # 1
I:     (3109,100B) TM [090407]                                 # 1
I:     (3109,102C) LO (no value available)                     # 0
I:     (3109,1043) CS (no value available)                     # 0
I:   (Sequence item #3)
I:     (0008,0020) DA [20210811]                               # 1 StudyDate
I:     (0008,0030) TM [091102]                                 # 1 StudyTime
I:     (0008,0050) SH [Z13886VHBS01]                           # 1 AccessionNumber
I:     (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I:     (0008,0061) CS [US]                                     # 1 ModalitiesInStudy
I:     (0008,0080) LO [<hidden>]                               # 1 InstitutionName
I:     (0008,0090) PN (no value available)                     # 0 ReferringPhysicianName
I:     (0008,1010) SH (no value available)                     # 0 StationName
I:     (0008,1030) LO [Abdomen]                                # 1 StudyDescription
I:     (0008,1040) LO (no value available)                     # 0 InstitutionalDepartmentName
I:     (0008,1050) PN (no value available)                     # 0 PerformingPhysicianName
I:     (0008,1060) PN (no value available)                     # 0 NameOfPhysiciansReadingStudy
I:     (0010,0010) PN [<hidden>]                               # 1 PatientName
I:     (0010,0020) LO [12345678]                               # 1 PatientID
I:     (0010,0021) LO (no value available)                     # 0 IssuerOfPatientID
I:     (0010,0030) DA [<hidden>]                               # 1 PatientBirthDate
I:     (0010,0040) CS [<hidden>]                               # 1 PatientSex
I:     (0010,1000) LO (no value available)                     # 0 OtherPatientIDs
I:     (0018,0015) CS (no value available)                     # 0 BodyPartExamined
I:     (0018,1030) LO (no value available)                     # 0 ProtocolName
I:     (0020,000D) UI [1.2.124.113532.172.16.32.11.20210811.91142.20401578] # 1 StudyInstanceUID
I:     (0020,0010) SH [1]                                      # 1 StudyID
I:     (0020,1206) IS [1]                                      # 1 NumberOfStudyRelatedSeries
I:     (0020,1208) IS [17]                                     # 1 NumberOfStudyRelatedInstances
I:     (0032,000A) CS [SCHEDULED]                              # 1 StudyStatusID
I:     (0032,1030) LO (no value available)                     # 0 ReasonForStudy
I:     (3109,0010) LO [Applicare/RadWorks/Version 5.0]         # 1
I:     (3109,1001) ST [<hidden>\database\local\general\1.2.528.1.1001.200.10.2453.5805.1.20210811013833715] # 1
I:     (3109,1002) SH [NEW]                                    # 1
I:     (3109,1003) CS (no value available)                     # 0
I:     (3109,1008) LO [<hidden>]                               # 1
I:     (3109,1009) LO [General]                                # 1
I:     (3109,100A) DA [20210811]                               # 1
I:     (3109,100B) TM [093831]                                 # 1
I:     (3109,102C) LO (no value available)                     # 0
I:     (3109,1043) CS (no value available)                     # 0
I:   (Sequence item #4)
I:     (0008,0020) DA [20210809]                               # 1 StudyDate
I:     (0008,0030) TM [141122]                                 # 1 StudyTime
I:     (0008,0050) SH [Z13862VH9S01]                           # 1 AccessionNumber
I:     (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I:     (0008,0061) CS [US]                                     # 1 ModalitiesInStudy
I:     (0008,0080) LO [<hidden>]                               # 1 InstitutionName
I:     (0008,0090) PN [f]                                      # 1 ReferringPhysicianName
I:     (0008,1010) SH [CGW1]                                   # 1 StationName
I:     (0008,1030) LO [Abdominal Sonograph]                    # 1 StudyDescription
I:     (0008,1040) LO [Department]                             # 1 InstitutionalDepartmentName
I:     (0008,1050) PN [7311]                                   # 1 PerformingPhysicianName
I:     (0008,1060) PN (no value available)                     # 0 NameOfPhysiciansReadingStudy
I:     (0010,0010) PN [<hidden>]                               # 1 PatientName
I:     (0010,0020) LO [12345678]                               # 1 PatientID
I:     (0010,0021) LO (no value available)                     # 0 IssuerOfPatientID
I:     (0010,0030) DA [<hidden>]                               # 1 PatientBirthDate
I:     (0010,0040) CS [<hidden>]                               # 1 PatientSex
I:     (0010,1000) LO (no value available)                     # 0 OtherPatientIDs
I:     (0018,0015) CS (no value available)                     # 0 BodyPartExamined
I:     (0018,1030) LO [Abdomen]                                # 1 ProtocolName
I:     (0020,000D) UI [1.2.124.113532.172.16.32.11.20210809.133505.20394899] # 1 StudyInstanceUID
I:     (0020,0010) SH [Z13862VH9S01]                           # 1 StudyID
I:     (0020,1206) IS [1]                                      # 1 NumberOfStudyRelatedSeries
I:     (0020,1208) IS [26]                                     # 1 NumberOfStudyRelatedInstances
I:     (0032,000A) CS (no value available)                     # 0 StudyStatusID
I:     (0032,1030) LO (no value available)                     # 0 ReasonForStudy
I:     (3109,0010) LO [Applicare/RadWorks/Version 5.0]         # 1
I:     (3109,1001) ST [<hidden>\database\local\general\1.2.528.1.1001.200.10.2641.4309.1.20210809063956240] # 1
I:     (3109,1002) SH [NEW]                                    # 1
I:     (3109,1003) CS (no value available)                     # 0
I:     (3109,1008) LO [<hidden>]                               # 1
I:     (3109,1009) LO [General]                                # 1
I:     (3109,100A) DA [20210809]                               # 1
I:     (3109,100B) TM [143953]                                 # 1
I:     (3109,102C) LO (no value available)                     # 0
I:     (3109,1043) CS (no value available)                     # 0
I:   (Sequence item #5)
I:     (0008,0020) DA [20210802]                               # 1 StudyDate
I:     (0008,0030) TM [135220]                                 # 1 StudyTime
I:     (0008,0050) SH [Z13803VH2S01]                           # 1 AccessionNumber
I:     (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I:     (0008,0061) CS [US]                                     # 1 ModalitiesInStudy
I:     (0008,0080) LO [660A]                                   # 1 InstitutionName
I:     (0008,0090) PN (no value available)                     # 0 ReferringPhysicianName
I:     (0008,1010) SH (no value available)                     # 0 StationName
I:     (0008,1030) LO [Abdomen]                                # 1 StudyDescription
I:     (0008,1040) LO (no value available)                     # 0 InstitutionalDepartmentName
I:     (0008,1050) PN (no value available)                     # 0 PerformingPhysicianName
I:     (0008,1060) PN (no value available)                     # 0 NameOfPhysiciansReadingStudy
I:     (0010,0010) PN [<hidden>]                               # 1 PatientName
I:     (0010,0020) LO [12345678]                               # 1 PatientID
I:     (0010,0021) LO (no value available)                     # 0 IssuerOfPatientID
I:     (0010,0030) DA [<hidden>]                               # 1 PatientBirthDate
I:     (0010,0040) CS [<hidden>]                               # 1 PatientSex
I:     (0010,1000) LO (no value available)                     # 0 OtherPatientIDs
I:     (0018,0015) CS (no value available)                     # 0 BodyPartExamined
I:     (0018,1030) LO (no value available)                     # 0 ProtocolName
I:     (0020,000D) UI [1.2.124.113532.172.16.32.11.20210802.134424.20372610] # 1 StudyInstanceUID
I:     (0020,0010) SH [1]                                      # 1 StudyID
I:     (0020,1206) IS [1]                                      # 1 NumberOfStudyRelatedSeries
I:     (0020,1208) IS [10]                                     # 1 NumberOfStudyRelatedInstances
I:     (0032,000A) CS [SCHEDULED]                              # 1 StudyStatusID
I:     (0032,1030) LO (no value available)                     # 0 ReasonForStudy
I:     (3109,0010) LO [Applicare/RadWorks/Version 5.0]         # 1
I:     (3109,1001) ST [<hidden>\database\local\general\1.2.528.1.1001.200.10.2621.4477.1.20210802060904628] # 1
I:     (3109,1002) SH [NEW]                                    # 1
I:     (3109,1003) CS (no value available)                     # 0
I:     (3109,1008) LO [<hidden>]                               # 1
I:     (3109,1009) LO [General]                                # 1
I:     (3109,100A) DA [20210802]                               # 1
I:     (3109,100B) TM [140903]                                 # 1
I:     (3109,102C) LO (no value available)                     # 0
I:     (3109,1043) CS (no value available)                     # 0
I:
(0000, 0900) Status                              US: 65281D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
 D: ========================== INCOMING DIMSE MESSAGE ==========================
D: Message Type                  : C-FIND RSP

D: Message ID Being Responded To : 1
D: Affected SOP Class UID        : Patient Root Query/Retrieve Information Model - FIND
D: Identifier                    : None
D: Status                        : 0x0000
D: ============================ END DIMSE MESSAGE =============================
D:
I: Find SCP Result: 0x0000 (Success)
(0000, 0900) Status                              US: 0 None
I: Releasing Association

(2) Case: condition on Patient ID and StudyDate = "20210716"

I: Requesting Association
D: Request Parameters:
D: ======================= OUTGOING A-ASSOCIATE-RQ PDU ========================
D: Our Implementation Class UID:      1.2.826.0.1.3680043.9.3811.1.5.7
D: Our Implementation Version Name:   PYNETDICOM_157
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    <hidden my desktop>
D: Called Application Name:     <hidden GE PACS>
D: Our Max PDU Receive Size:    16382
D: Presentation Contexts:
D:   Context ID:        1 (Proposed)
D:     Abstract Syntax: =Verification SOP Class
D:     Proposed SCP/SCU Role: Default
D:     Proposed Transfer Syntaxes:
D:       =Implicit VR Little Endian
D:       =Explicit VR Little Endian
D:       =Deflated Explicit VR Little Endian
D:       =Explicit VR Big Endian
D:   Context ID:        3 (Proposed)
D:     Abstract Syntax: =Patient Root Query/Retrieve Information Model - FIND
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntaxes:
D:       =Implicit VR Little Endian
D:       =Explicit VR Little Endian
D:       =Deflated Explicit VR Little Endian
D:       =Explicit VR Big Endian
D:   Context ID:        5 (Proposed)
D:     Abstract Syntax: =Computed Radiography Image Storage
D:     Proposed SCP/SCU Role: SCU
D:     Proposed Transfer Syntaxes:
D:       =Implicit VR Little Endian
D:       =Explicit VR Little Endian
D:       =Deflated Explicit VR Little Endian
D:       =Explicit VR Big Endian
D: Requested Extended Negotiation: None
D: Requested Common Extended Negotiation: None
D: Requested Asynchronous Operations Window Negotiation: None
D: Requested User Identity Negotiation: None
D: ========================== END A-ASSOCIATE-RQ PDU ==========================
D: Accept Parameters:
D: ======================= INCOMING A-ASSOCIATE-AC PDU ========================
D: Their Implementation Class UID:    1.2.528.1.1001.2.20060808.1
D: Their Implementation Version Name: GEHC_DCM06_1
D: Application Context Name:    1.2.840.10008.3.1.1.1
D: Calling Application Name:    <hidden my desktop>
D: Called Application Name:     <hidden PACS>
D: Their Max PDU Receive Size:  16384
D: Presentation Contexts:
D:   Context ID:        1 (Accepted)
D:     Abstract Syntax: =Verification SOP Class
D:     Accepted SCP/SCU Role: Default
D:     Accepted Transfer Syntax: =Explicit VR Little Endian
D:   Context ID:        3 (Accepted)
D:     Abstract Syntax: =Patient Root Query/Retrieve Information Model - FIND
D:     Accepted SCP/SCU Role: SCU
D:     Accepted Transfer Syntax: =Explicit VR Little Endian
D:   Context ID:        5 (Accepted)
D:     Abstract Syntax: =Computed Radiography Image Storage
D:     Accepted SCP/SCU Role: SCU
D:     Accepted Transfer Syntax: =Explicit VR Big Endian
D: Accepted Extended Negotiation: None
D: Accepted Asynchronous Operations Window Negotiation: None
D: User Identity Negotiation Response: None
D: ========================== END A-ASSOCIATE-AC PDU ==========================
I: Association Accepted
I: Sending Echo Request: MsgID 1
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
I: Received Echo Response (Status: Success)
Association established with ECHO SCP
I: Sending Find Request: MsgID 1
I:
I: # Request Identifier
I: (0008,0020) DA [20210716]                               # 1 StudyDate
I: (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I: (0010,0020) LO [12345678]                               # 1 PatientID
I:
D: ========================== OUTGOING DIMSE MESSAGE ==========================
D: Message Type                  : C-FIND RQ
D: Presentation Context ID       : 3
D: Message ID                    : 1
D: Affected SOP Class UID        : Patient Root Query/Retrieve Information Model - FIND
D: Identifier                    : Present
D: Priority                      : Medium
D: ============================ END DIMSE MESSAGE =============================
D: pydicom.read_dataset() TransferSyntax="Little Endian Implicit"
D: ========================== INCOMING DIMSE MESSAGE ==========================
D: Message Type                  : C-FIND RSP
D: Message ID Being Responded To : 1
D: Affected SOP Class UID        : Patient Root Query/Retrieve Information Model - FIND
D: Identifier                    : None
D: Status                        : 0x0000
D: ============================ END DIMSE MESSAGE =============================
D:
I: Find SCP Result: 0x0000 (Success)
(0000, 0900) Status                              US: 0
I: Releasing Association
1

There are 1 answers

0
Markus Sabin On BEST ANSWER

(2) C-FIND under study root, study level

I: (0008,0020) DA [20210716]                               # 1 StudyDate
I: (0008,0052) CS [PATIENT]                                # 1 QueryRetrieveLevel
I: (0010,0020) LO [12345678]                               # 1 PatientID

This is a malformed request. It is not the STUDY Level (that's obvious). If Q/R Level is PATIENT, you may only query for Patient-Level keys. Try this:

(0008,0020) DA [20210716]                               # 1 StudyDate
(0008,0052) CS [STUDY]                                # 1 QueryRetrieveLevel
(0010,0020) LO [12345678]                               # 1 PatientID
(0020,000d) UI []                                       # 1 StudyInstanceUID

This will give you a list of Study Instance UIDs for Studies belonging to Patient ID 12345678 matching the criterion "Study Date = 2021-07-16". You can add other empty attributes from the STUDY-Level (and no other level!) to obtain useful additional info (e.g. Study Description, Referring Physician, Modalities in Study, ...)