Find-worklist requests send too many context

Hello, for the Orthanc worklist query request, I debugged and found that unlike the findscu execution, only FINDModalityWorklistInformationModel context was sent, but many other contexts were sent, causing it to be intercepted by the worklist server. The following is a comparison of the Orthanc worklist request log and the findscu log.





I0317 06:19:57.485377 DicomAssociation.cpp:275] (dicom) Opening a DICOM SCU connection without DICOM TLS from AET “USTCFQ-LOCAL” to AET “USTCFQ-LOCAL” on host 10.0.1.48:4242 (manufacturer: Generic, timeout: 10s)
T0317 06:19:57.485635 DicomAssociation.cpp:367] (dicom) Request Parameters:
====================== BEGIN A-ASSOCIATE-RQ =====================
Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.7
Our Implementation Version Name: OFFIS_DCMTK_367
Their Implementation Class UID:
Their Implementation Version Name:
Application Context Name: 1.2.840.10008.3.1.1.1
Calling Application Name: USTCFQ-LOCAL
Called Application Name: USTCFQ-LOCAL
Responding Application Name: USTCFQ-LOCAL
Our Max PDU Receive Size: 16384
Their Max PDU Receive Size: 0
Presentation Contexts:
Context ID: 1 (Proposed)
Abstract Syntax: =VerificationSOPClass
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 3 (Proposed)
Abstract Syntax: =FINDPatientRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 5 (Proposed)
Abstract Syntax: =MOVEPatientRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 7 (Proposed)
Abstract Syntax: =FINDStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 9 (Proposed)
Abstract Syntax: =MOVEStudyRootQueryRetrieveInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Context ID: 11 (Proposed)
Abstract Syntax: =FINDModalityWorklistInformationModel
Proposed SCP/SCU Role: Default
Proposed Transfer Syntax(es):
=LittleEndianImplicit
=LittleEndianExplicit
=BigEndianExplicit
Requested Extended Negotiation: none
Accepted Extended Negotiation: none
Requested User Identity Negotiation: none
User Identity Negotiation Response: none
======================= END A-ASSOCIATE-RQ ======================





S C:\Users\Administrator\Desktop\dcmtk\bin> .\findscu.exe -d -W -k 0010,0010=* -aec ARRCEN -aet USTCFQ-LOCAL 192.168.100.24 104
D: $dcmtk: findscu v3.6.5 2019-10-28 $
D:
D: Request Parameters:
D: ====================== BEGIN A-ASSOCIATE-RQ =====================
D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.5
D: Our Implementation Version Name: OFFIS_DCMTK_365
D: Their Implementation Class UID:
D: Their Implementation Version Name:
D: Application Context Name: 1.2.840.10008.3.1.1.1
D: Calling Application Name: USTCFQ-LOCAL
D: Called Application Name: ARRCEN
D: Responding Application Name: ARRCEN
D: Our Max PDU Receive Size: 16384
D: Their Max PDU Receive Size: 0
D: Presentation Contexts:
D: Context ID: 1 (Proposed)
D: Abstract Syntax: =FINDModalityWorklistInformationModel
D: Proposed SCP/SCU Role: Default
D: Proposed Transfer Syntax(es):
D: =LittleEndianExplicit
D: =BigEndianExplicit
D: =LittleEndianImplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation: none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response: none
D: ======================= END A-ASSOCIATE-RQ ======================
I: Requesting Association
D: setting network send timeout to 60 seconds
D: setting network receive timeout to 60 seconds
D: Constructing Associate RQ PDU
D: PDU Type: Associate Accept, PDU Length: 184 + 6 bytes PDU header
D: 02 00 00 00 00 b8 00 01 00 00 41 52 52 43 45 4e
D: 20 20 20 20 20 20 20 20 20 20 55 53 54 43 46 51
D: 2d 4c 4f 43 41 4c 20 20 20 20 00 00 00 00 00 00
D: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
D: 00 00 00 00 00 00 00 00 00 00 10 00 00 15 31 2e
D: 32 2e 38 34 30 2e 31 30 30 30 38 2e 33 2e 31 2e
D: 31 2e 31 21 00 00 19 01 00 00 00 40 00 00 11 31
D: 2e 32 2e 38 34 30 2e 31 30 30 30 38 2e 31 2e 32
D: 50 00 00 3a 51 00 00 04 00 00 40 00 52 00 00 1b
D: 31 2e 32 2e 32 37 36 2e 30 2e 37 32 33 30 30 31
D: 30 2e 33 2e 30 2e 33 2e 36 2e 35 55 00 00 0f 4f
D: 46 46 49 53 5f 44 43 4d 54 4b 5f 33 36 35
D: Parsing an A-ASSOCIATE PDU
D: Association Parameters Negotiated:
D: ====================== BEGIN A-ASSOCIATE-AC =====================
D: Our Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.5
D: Our Implementation Version Name: OFFIS_DCMTK_365
D: Their Implementation Class UID: 1.2.276.0.7230010.3.0.3.6.5
D: Their Implementation Version Name: OFFIS_DCMTK_365
D: Application Context Name: 1.2.840.10008.3.1.1.1
D: Calling Application Name: USTCFQ-LOCAL
D: Called Application Name: ARRCEN
D: Responding Application Name: ARRCEN
D: Our Max PDU Receive Size: 16384
D: Their Max PDU Receive Size: 16384
D: Presentation Contexts:
D: Context ID: 1 (Accepted)
D: Abstract Syntax: =FINDModalityWorklistInformationModel
D: Proposed SCP/SCU Role: Default
D: Accepted SCP/SCU Role: Default
D: Accepted Transfer Syntax: =LittleEndianImplicit
D: Requested Extended Negotiation: none
D: Accepted Extended Negotiation: none
D: Requested User Identity Negotiation: none
D: User Identity Negotiation Response: none
D: ======================= END A-ASSOCIATE-AC ======================
I: Association Accepted (Max Send PDV: 16372)
I: Sending Find Request
D: ===================== OUTGOING DIMSE MESSAGE ====================
D: Message Type : C-FIND RQ
D: Presentation Context ID : 1
D: Message ID : 1
D: Affected SOP Class UID : FINDModalityWorklistInformationModel
D: Data Set : present
D: Priority : medium
D: ======================= END DIMSE MESSAGE =======================
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0010,0010) PN [*] # 2, 1 PatientName
I:
D: DcmDataset::read() TransferSyntax=“Little Endian Implicit”
D: DcmDataset::read() TransferSyntax=“Little Endian Implicit”
I: Received Find Response 1
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type : C-FIND RSP
D: Message ID Being Responded To : 1
D: Affected SOP Class UID : FINDModalityWorklistInformationModel
D: Data Set : present
D: DIMSE Status : 0xff00: Pending
D: ======================= END DIMSE MESSAGE =======================
D: Response Identifiers:
D:
D: # Dicom-Data-Set
D: # Used TransferSyntax: Little Endian Implicit
D: (0010,0010) PN [李喜平] # 6, 1 PatientName
D:
D: DcmDataset::read() TransferSyntax=“Little Endian Implicit”
D: DcmDataset::read() TransferSyntax=“Little Endian Implicit”
I: Received Find Response 2
D: ===================== INCOMING DIMSE MESSAGE ====================
D: Message Type : C-FIND RSP
D: Message ID Being Responded To : 1
D: Affected SOP Class UID : FINDModalityWorklistInformationModel
D: Data Set : present
D: DIMSE Status : 0xff00: Pending
D: ======================= END DIMSE MESSAGE =======================
D: Response Identifiers:




Hope to get answers from the community, thank you

Hello,

If you expect support from this community, please provide a minimal working example so that other people can understand and independently reproduce your question.

Regards,
Sébastien-

Hi @Mars456

What version of Orthanc are you using ?

This change has been introduced in 1.12.6 and should solve your issue:

* DICOM negotiation:
  - When opening a DICOM SCU connection, Orthanc now only proposes the contexts that it is
    going to use in the connection, and not all the contexts as in previous versions
    (e.g., if performing a C-ECHO, Orthanc will not propose C-MOVE or C-FIND).

And only one context is proposed when executing curl -X POST http://localhost:8044/modalities/service/find-worklist -d '{"Full": false, "Query":{"ModalitiesInStudy": "CT"}}' :

I0318 21:37:51.023014           HTTP-0 DicomAssociation.cpp:272] (dicom) Opening a DICOM SCU connection without DICOM TLS from AET "ORTHANC4243" to AET "ORTHANC-SERV" on host 192.168.0.10:4242 (manufacturer: Generic, timeout: 10s)
T0318 21:37:51.023089           HTTP-0 DicomAssociation.cpp:370] (dicom) Request Parameters:
====================== BEGIN A-ASSOCIATE-RQ =====================
Our Implementation Class UID:      1.2.276.0.7230010.3.0.3.7.0
Our Implementation Version Name:   OFFIS_DCMTK_370
Their Implementation Class UID:    
Their Implementation Version Name: 
Application Context Name:    1.2.840.10008.3.1.1.1
Calling Application Name:    ORTHANC4243
Called Application Name:     ORTHANC-SERV
Responding Application Name: 
Our Max PDU Receive Size:    16384
Their Max PDU Receive Size:  0
Presentation Contexts:
  Context ID:        1 (Proposed)
    Abstract Syntax: =FINDModalityWorklistInformationModel
    Proposed SCP/SCU Role: Default
    Proposed Transfer Syntax(es):
      =LittleEndianExplicit
      =LittleEndianImplicit
      =BigEndianExplicit
Requested Extended Negotiation: none
Accepted Extended Negotiation:  none
Requested User Identity Negotiation: none
User Identity Negotiation Response:  none
======================= END A-ASSOCIATE-RQ ======================

Hope this helps,

Alain.

Thanks for your reply.my orthanc version is relatively old, let me try this version