Search code examples
c#dicomfo-dicom

WorklistQuery ( C-FIND) returns C-Find response [2]: Optional Keys Not Supported


C-Find (Request Worklist) for a specific PACS returns "Optional Keys Not Supported" and returns no data. I have also tried with empty string "" instead of null for patient id, existing patientid and so one with the same result. The request works for other PACS.

What is going on here and how can this be resolved?

The request code (using Fellow Oak DICOM fo-dicom):

var cfind = DicomCFindRequest.CreateWorklistQuery();

List<Dicom.DicomDataset> dslist = new List<Dicom.DicomDataset>();

cfind.OnResponseReceived = (DicomCFindRequest rq, DicomCFindResponse rp) =>
{

    if (rp.Status != DicomStatus.Pending)
    {                 
        return;
    }           

    dslist.Add(rp.Dataset);
};

var client = new DicomClient();
client.AddRequest(cfind);

try
{                
    await client.SendAsync(destip, port, useTLS, callingAE, calledAE);
}
catch (Exception e)
{
    logger.Error(e);                
}

This is the log.

2019-02-09 09:49:01.6540 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL -> Association request:

Calling AE Title:       XXXXXXXXX

Called AE Title:        TEST_01WL

Remote host:            XXX.29.51.XXX

Remote port:            9895

Implementation Class:   Implementation Class UID [1.3.6.1.4.1.30071.8]

Implementation Version: fo-dicom 4.0.0

Maximum PDU Length:     16384

Async Ops Invoked:      1

Async Ops Performed:    1

Presentation Contexts:  1

  Presentation Context:  1 [Proposed]

       Abstract Syntax:  Modality Worklist Information Model - FIND

       Transfer Syntax:  Implicit VR Little Endian: Default Transfer Syntax for 
DICOM 

2019-02-09 09:49:01.6540 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- Association accept:

Calling AE Title:       XXXXXXXXX

Called AE Title:        TEST_01WL

Remote host:            XXX.29.51.XXX

Remote port:            9895

Implementation Class:   Unknown [1.2.752.24.3.3.25.7]

Implementation Version: WIMWLSCP_20_1

Maximum PDU Length:     28672

Async Ops Invoked:      1

Async Ops Performed:    1

Presentation Contexts:  1

  Presentation Context:  1 [Accept]

       Abstract Syntax:  Modality Worklist Information Model - FIND

       Transfer Syntax:  Implicit VR Little Endian: Default Transfer Syntax for 
DICOM 

2019-02-09 09:49:01.7580 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL -> C-Find request [2] 

2019-02-09 09:49:01.8240 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- C-Find response [2]: Optional Keys Not Supported 

2019-02-09 09:49:01.8240 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- C-Find response [2]: Optional Keys Not Supported 

2019-02-09 09:49:01.8240 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- C-Find response [2]: Optional Keys Not Supported 

2019-02-09 09:49:01.8240 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- C-Find response [2]: Optional Keys Not Supported 

2019-02-09 09:49:01.8240 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- C-Find response [2]: Optional Keys Not Supported 

2019-02-09 09:49:01.8240 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- C-Find response [2]: Success 

2019-02-09 09:49:01.8830 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL -> Association release request 

2019-02-09 09:49:01.8830 INFO Dicom.Log.NLogManager+NLogger.Log TEST_01WL <- Association release response 

2019-02-09 09:49:01.8830 INFO Dicom.Log.NLogManager+NLogger.Log Connection closed 

Solution

  • Just to add what the status means: It tells you that your request specified matching keys which were not supported by the Worklist-SCP. This means that you might receive worklist records in the response which do not match your query criteria and should have been filtered out by the SCP.