WorklistQuery ( C-FIND) returns C-Find 响应 [2]:不支持可选键

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

针对特定 PACS returns "Optional Keys Not Supported" 和 returns 没有数据的 C-Find(请求工作列表)。我还尝试使用空字符串 "" 而不是空字符串来表示患者 ID、现有患者 ID 等,结果相同。 该请求适用于其他 PACS。

这是怎么回事,如何解决?

请求代码(使用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);                
}

这是日志。

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 

所以我解决了,"optional keys not supported"是信息报文,实际收到数据

        request.OnResponseReceived += (req, rp) =>
        {
            if (rp.HasDataset)
            {
                dslist.Add(rp.Dataset);
            }

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

只是添加状态的含义:它告诉您您的请求指定了 Worklist-SCP 不支持的匹配键。这意味着您可能会在响应中收到与您的查询条件不匹配且应该已被 SCP 过滤掉的工作列表记录。