我想从 PACS 下载与指定患者 ID 和研究日期匹配的胸部 X 光文件。
如果我在 C-FIND-Request 中指定日期,我将无法获得任何匹配的结果。
你能建议我的查询有什么问题吗?
非常感谢~
- 我使用 pynetdicom 与 GE 的 PACS 进行交互。
- PACS 中的示例记录为:
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
2021/08/02 至 2021/08/21 的记录为相关研究。
我的目标是 2021/07/16 采取的目标。 - 从 C-ECHO 开始,然后发送 C-FIND,低优先级
我尝试过
(1) C-FIND 在患者根下,患者级别
(2) C-FIND 在研究根下,研究级别
如果我指定日期(StudyDate = “20210716”),我无法得到任何匹配的结果。 - 以下是患者根、患者级别下 C-FIND 的 pynetdicom 日志。
(1) 案例:仅以患者 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) 案例:Patient ID 和 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