You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DICOM Query/Retrieve (QR) service allows an SCU (client) to send a service request to an SCP (server). There are three types of requests:
C-FIND: Send a query and have the QR SCP reply with matching values to the query keys only.
C-MOVE: Send a query and have the QR SCP send matching SOP instances (datasets) to a different Storage SCP over a new association. C-MOVE has good support amongst PACS providers but requires the QR SCP be configured with the details of the Storage SCP.
C-GET: Send a query and have the QR SCP send matching SOP instances (datasets) to the SCU over the same association. C-GET has poor support amongst PACS providers but requires no extra configuration of the QR SCP.
Common Problems
All
QR SCP responds with Success but no matches: Triple check your Identifier (query) dataset and do print(identifier) to confirm the values are correct. Check the DICOM standard to confirm that your query is valid. Check the QR SCP's DICOM conformance statement to confirm it supports the query keys.
C-MOVE
QR SCP responded with 0xA801: 0xA801 is Move Destination Unknown. Check that the QR SCP has been configured with the AE title, IP address and port number of the destination Storage SCP.
Troubleshooting
Before you do anything else, add the following and check the output:
frompynetdicomimportdebug_loggerdebug_logger()
# Rest of your code goes here
Test 1: Confirm that you can associate and echo
frompynetdicomimportAE, debug_loggerfrompynetdicom.sop_classimportVerificationSOPClassdebug_logger()
ae=AE()
ae.add_requested_context(VerificationSOPClass)
# qr_addr: the IP address of the QR SCP, as `str`# qr_port: the port that the QR SCP is listening on as `int`assoc=ae.associate(qr_addr, qr_port)
ifassoc.is_established:
status=assoc.send_c_echo()
assoc.release()
Result
Received Echo Response (Status: Success), move on to Test 2.
Received Echo Response (Status: 0xXXXX), you have successfully associated with the QR SCP but the C-ECHO request failed. Move on to Test 2.
No accepted presentation contexts, you have successfully associated with the QR SCP but the Verification service is not supported. Move on to Test 2.
TCP Initialisation Error: Connection refused: check the QR SCPs IP and port are correct and check any firewall settings.
Association Rejected (Called AE title not recognised): the QR SCP doesn't recognise your AE title and has rejected the association request. Either configure the QR SCP with your AE title or change your AE title to one that is recognised
Association Rejected (other reason): the QR SCP has rejected the association request. You'll need to determine the reason why and fix it before you can continue.
Test 2: Confirm acceptance of the QR presentation contexts
If the result for the context you want to use is Accepted then continue to Test 3.
If the result is Rejected - Abstract Syntax Not Supported then check the QR SCPs DICOM conformance statement and see what abstract syntaxes are supported.
If the result is Rejected - Transfer Syntax Not Supported then check the QR SCPs DICOM conformance statement and see what transfer syntaxes are supported.
Test 3: Check your Identifier query dataset
The test below is for C-FIND but can be C-MOVE or C-GET instead. You may need to use a different SOP Class than PatientRootQueryRetrieveInformationModelFind
frompydicom.datasetimportDatasetfrompynetdicomimportAE, debug_logger, QueryRetrievePresentationContextsfrompynetdicom.sop_classimportPatientRootQueryRetrieveInformationModelFinddebug_logger()
identifier=Dataset()
# patient_id: the Patient ID as `str`identifier.PatientID=patient_ididentifier.QueryRetrieveLevel='PATIENT'print(identifier)
ae=AE()
ae.requested_contexts=QueryRetrievePresentationContextsassoc=ae.associate(qr_addr, qr_port)
ifassoc.is_established:
for (status, ds) inassoc.send_c_find(identifier, PatientRootQueryRetrieveInformationModelFind):
passassoc.release()
Result
If you received an 0x0000 status and no 0xFF00 statuses then the QR SCP has received your query but found no matches. Triple check that your identifier dataset contains correct values and types and doesn't contain extra characters. Always do print(identifier) to confirm the query.
C-MOVE only: If you received an 0xA801 status then the QR SCP needs to be configured with the AE title, IP address and port of the Storage SCP.
If you received an 0x0000 status and one or more 0xFF00 status values then the QR SCP has received your query and found matches.
If your problem is with C-FIND and still occurs then create a new issue.
If your problem is with C-MOVE or C-GET, move on to Test 4.
Test 4a: (C-MOVE) Confirm the Storage SCP is available
Ensure the destination Storage SCP (either your own or a third party SCP) is up and running and then attempt to associate with it:
frompynetdicomimportAE, debug_logger, StoragePresentationContextsfrompynetdicom.sop_classimportVerificationSOPClassdebug_logger()
ae=AE()
ae.requested_contexts=StoragePresentationContexts[:127]
ae.add_requested_context(VerificationSOPClass)
# storage_addr: the IP address of the Storage SCP as `str`# storage_port: the port of the Storage SCP as `int`assoc=ae.associate(storage_addr, storage_port)
ifassoc.is_established:
assoc.send_c_echo()
assoc.release()
Result
Similar to those in Test 1, only with the Storage SCP instead of the QR SCP.
Confirm that the presentation contexts have been accepted for the storage SOP classes you want to transfer. If they're accepted then create a new issue.
Test 4b: (C-GET) Confirm the role selection for the storage presentation contexts
Introduction
The DICOM Query/Retrieve (QR) service allows an SCU (client) to send a service request to an SCP (server). There are three types of requests:
Common Problems
All
print(identifier)
to confirm the values are correct. Check the DICOM standard to confirm that your query is valid. Check the QR SCP's DICOM conformance statement to confirm it supports the query keys.C-MOVE
0xA801
is Move Destination Unknown. Check that the QR SCP has been configured with the AE title, IP address and port number of the destination Storage SCP.Troubleshooting
Before you do anything else, add the following and check the output:
Test 1: Confirm that you can associate and echo
Result
Received Echo Response (Status: Success)
, move on to Test 2.Received Echo Response (Status: 0xXXXX)
, you have successfully associated with the QR SCP but the C-ECHO request failed. Move on to Test 2.No accepted presentation contexts
, you have successfully associated with the QR SCP but the Verification service is not supported. Move on to Test 2.TCP Initialisation Error: Connection refused
: check the QR SCPs IP and port are correct and check any firewall settings.Association Rejected (Called AE title not recognised)
: the QR SCP doesn't recognise your AE title and has rejected the association request. Either configure the QR SCP with your AE title or change your AE title to one that is recognisedAssociation Rejected (other reason)
: the QR SCP has rejected the association request. You'll need to determine the reason why and fix it before you can continue.Test 2: Confirm acceptance of the QR presentation contexts
Result
In the A-ASSOCIATE-AC section of the log, look for entries similar to:
Accepted
then continue to Test 3.Rejected - Abstract Syntax Not Supported
then check the QR SCPs DICOM conformance statement and see what abstract syntaxes are supported.Rejected - Transfer Syntax Not Supported
then check the QR SCPs DICOM conformance statement and see what transfer syntaxes are supported.Test 3: Check your Identifier query dataset
The test below is for C-FIND but can be C-MOVE or C-GET instead. You may need to use a different SOP Class than
PatientRootQueryRetrieveInformationModelFind
Result
0x0000
status and no0xFF00
statuses then the QR SCP has received your query but found no matches. Triple check that your identifier dataset contains correct values and types and doesn't contain extra characters. Always doprint(identifier)
to confirm the query.0xA801
status then the QR SCP needs to be configured with the AE title, IP address and port of the Storage SCP.0x0000
status and one or more0xFF00
status values then the QR SCP has received your query and found matches.Test 4a: (C-MOVE) Confirm the Storage SCP is available
Ensure the destination Storage SCP (either your own or a third party SCP) is up and running and then attempt to associate with it:
Result
Test 4b: (C-GET) Confirm the role selection for the storage presentation contexts
Result
Accepted SCP/SCU Role:
isSCP
for the storage context you're interested in then create a new issue.The text was updated successfully, but these errors were encountered: