Hi all,
I need your help regarding C-FIND and key attributes. The software I am working on receives only a SOP instance UID from an external system. Based on the received SOP instance UID the software needs to retrieve the corresponding DICOM instance. For retrieval, study instance UID and series instance UID are mandatory parameters (C# fo-dicom library requires them), so first I need to perform C-FIND at IMAGE level with the received SOP instance UID and empty (zero-length) study instance UID and series instance UID. The problem I have is that what works for Orthanc does not work for dcm4chee and vice-versa.
C-FIND SCPs shall support existence and matching of all Required Keys defined by a Query/Retrieve Information Model. If a C-FIND SCP manages an entity with a Required Key of zero length, the value is considered unknown and all matching against the zero length Required Key shall be considered a successful match.
C.2.2 Attributes Definition
Universal matching – This is the most general matching type. If the attribute to be matched has zero length, it will match everything. For example, if we provide a blank patient name in our C-Find query, all patient names in the target archive will be matched. Essentially, universal matching means anything and is identical to using the asterisk (*).
Oleg S. Pianykh, Digital Imaging and Communications in Medicine, Second Edition, 2012
Orthanc performs the query when zero-length attributes are used, but fails if asterisks are used as values. On the other hand dcm4chee performs the query when asterisks are used, but fails when zero-length attributes are used. I am wondering if both systems only partially follow the standard in this regard or am I missing something and matching like that should not even be allowed?
The following was tested with dcmtk tools (v3.6.7).
Empty attributes:
ORTHANC:
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending Find Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0018) UI [1.2.840.10008.5.1.4.1.1.481.3.1577704327] # 40, 1 SOPInstanceUID
I: (0008,0052) CS [IMAGE] # 6, 1 QueryRetrieveLevel
I: (0010,0020) LO (no value available) # 0, 0 PatientID
I: (0020,000d) UI (no value available) # 0, 0 StudyInstanceUID
I: (0020,000e) UI (no value available) # 0, 0 SeriesInstanceUID
I: (0020,0013) IS (no value available) # 0, 0 InstanceNumber
I:
I: ---------------------------
I: Find Response: 1 (Pending)
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
I: (0008,0018) UI [1.2.840.10008.5.1.4.1.1.481.3.1577704327] # 40, 1 SOPInstanceUID
I: (0008,0052) CS [IMAGE ] # 6, 1 QueryRetrieveLevel
I: (0008,0054) AE [ORTHANC ] # 8, 1 RetrieveAETitle
I: (0010,0020) LO [4586A29B2 ] # 10, 1 PatientID
I: (0020,000d) UI [1.2.276.0.7230010.3.1.2.1263924744.880.1577705818.1536] # 54, 1 StudyInstanceUID
I: (0020,000e) UI [1.2.276.0.7230010.3.1.3.1263924744.880.1577705818.1543] # 54, 1 SeriesInstanceUID
I: (0020,0013) IS (no value available) # 0, 0 InstanceNumber
I:
I: Received Final Find Response (Success)
I: Releasing Association
DCM4CHEE
I: Requesting Association
I: Association Accepted (Max Send PDV: 16366)
I: Sending Find Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0018) UI [1.2.840.10008.5.1.4.1.1.481.3.1577704327] # 40, 1 SOPInstanceUID
I: (0008,0052) CS [IMAGE] # 6, 1 QueryRetrieveLevel
I: (0010,0020) LO (no value available) # 0, 0 PatientID
I: (0020,000d) UI (no value available) # 0, 0 StudyInstanceUID
I: (0020,000e) UI (no value available) # 0, 0 SeriesInstanceUID
I: (0020,0013) IS (no value available) # 0, 0 InstanceNumber
I:
I: Received Final Find Response (Error: DataSetDoesNotMatchSOPClass)
I: Releasing Association
Asterisks:
ORTHANC:
I: Requesting Association
I: Association Accepted (Max Send PDV: 16372)
I: Sending Find Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0018) UI [1.2.840.10008.5.1.4.1.1.481.3.1577704327] # 40, 1 SOPInstanceUID
I: (0008,0052) CS [IMAGE] # 6, 1 QueryRetrieveLevel
I: (0010,0020) LO [*] # 2, 1 PatientID
I: (0020,000d) UI [*] # 2, 1 StudyInstanceUID
I: (0020,000e) UI [*] # 2, 1 SeriesInstanceUID
I: (0020,0013) IS (no value available) # 0, 0 InstanceNumber
I:
I: Received Final Find Response (Failed: UnableToProcess)
I: Releasing Association
DCM4CHEE:
I: Requesting Association
I: Association Accepted (Max Send PDV: 16366)
I: Sending Find Request (MsgID 1)
I: Request Identifiers:
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Explicit
I: (0008,0018) UI [1.2.840.10008.5.1.4.1.1.481.3.1577704327] # 40, 1 SOPInstanceUID
I: (0008,0052) CS [IMAGE] # 6, 1 QueryRetrieveLevel
I: (0010,0020) LO [*] # 2, 1 PatientID
I: (0020,000d) UI [*] # 2, 1 StudyInstanceUID
I: (0020,000e) UI [*] # 2, 1 SeriesInstanceUID
I: (0020,0013) IS (no value available) # 0, 0 InstanceNumber
I:
I: ---------------------------
I: Find Response: 1 (Pending)
I:
I: # Dicom-Data-Set
I: # Used TransferSyntax: Little Endian Implicit
I: (0008,0005) CS [ISO_IR 100] # 10, 1 SpecificCharacterSet
I: (0008,0018) UI [1.2.840.10008.5.1.4.1.1.481.3.1577704327] # 40, 1 SOPInstanceUID
I: (0008,0052) CS [IMAGE ] # 6, 1 QueryRetrieveLevel
I: (0008,0054) AE [DCM4CHEE] # 8, 1 RetrieveAETitle
I: (0008,0056) CS [ONLINE] # 6, 1 InstanceAvailability
I: (0008,0201) SH (no value available) # 0, 0 TimezoneOffsetFromUTC
I: (0010,0020) LO [4586A29B2 ] # 10, 1 PatientID
I: (0020,000d) UI [1.2.276.0.7230010.3.1.2.1263924744.880.1577705818.1536] # 54, 1 StudyInstanceUID
I: (0020,000e) UI [1.2.276.0.7230010.3.1.3.1263924744.880.1577705818.1543] # 54, 1 SeriesInstanceUID
I: (0020,0013) IS (no value available) # 0, 0 InstanceNumber
I:
I: Received Final Find Response (Success)
I: Releasing Association
Best regards,
Aljaž Gerečnik