Previous Medical Imaging in IDL: Using IDL DICOM Network Services Next

Querying a Remote Machine

The Query/Retrieve functionality of the DICOM Network Services utility is located on the Query Retrieve SCU tab. Once you have defined a Query SCP Application Entity for one or more file source devices (as described in Defining a Machine to Be Queried), you can query the remote machine. If you have also defined a Storage SCP service (defined in Configuring Your System to Receive Files), you can return requested files to a specified directory. This section covers topics related to configuring queries and retrieving files:

Configure Query SCU Service Properties

Before querying a remote machine, select an Application Entity that supports the Query SCU service type and define the number of responses to be returned.

  1. Open the DICOM Network Services utility by entering the following at the IDL command prompt:
  2. DICOMEX_NET  
    

     

  3. On the Configuration tab, modify settings in the Query Retrieve SCU Application Entity area:
    • Application Entity Name — select an Application Entity from the droplist. The default is IDL_AE_QUERY_SCU. If you have defined other Application Entities that use the Service Type of Query SCU, they will appear here.
    •  

    • Max Query Responses — enter the maximum number matches to return for a query. The default value is 100.

Query the Remote Node

To query a remote machine, complete the following steps:

  1. Open the DICOM Network Services utility if needed by entering:
  2. DICOMEX_NET  
    

     

  3. Click on the Query Retrieve SCU tab.
  4.  

  5. In the Query Node droplist, select the Application Entity name associated with the remote machine to be queried. If this droplist is blank, you need to define an Application Entity for the remote machine as described in Defining a Machine to Be Queried.
  6.  

  7. Select the query to be performed from the droplist:
    • All patients — the default patient-level query
    •  

    • Use current query — the last configured custom query. If you have not built a custom query, the default is a patient-level query.
    •  


      Note
      See Build or Modify a Custom Query if you want to change the default query.

     

  8. Click the Query button. All patient files located on the remote machine (up to the number of Max Query Responses defined on the Configuration tab) that match the query parameters will be returned.
  9.  

  10. View the query results in the Results section, described in Query Results. Status information appears in the Status window.
  11.  


    Note
    If you have a query error, you can use the Echo SCU functionality to test the connection. See Returning Connection Status with Echo.

Cancelling a Query Operation

To stop a query, click the Cancel button. This sends a cancel request to the remote machine and halts the return of file information.

Query Results

The results of any query are shown in the Results section of the Query Retrieve SCU tab. This area is divided into a navigation tree in the left pane and a table display in the right pane. A subset of the Results area is shown in the following figure.

Figure 2-5: Results Area of the Query Retrieve SCU Tab

Figure 2-5: Results Area of the Query Retrieve SCU Tab

The Navigation Tree area displays the patient-study-series-image hierarchy. The Table Display area displays selected patient, study, series or image information.

When you click on an item in the Navigation Tree, a sub-query returns child items. For example, clicking on a series will perform a sub-query to return all images associated with that series, up to the Maximum Query Responses value. Click the + symbol next to any previously selected item (or double-click the item) to see sub-items.


Note
For optimum performance, the initial query does not populate the Navigation Tree with all child items. Because these items are returned on request, there may be a slight delay in the display of sub-query results.


Note
Some remote machines do not return a patient ID with query results. When you perform a query by clicking the Query button, all results returned without a patient ID appear under "Unknown Patient ID" in the Navigation Tree window.

Build or Modify a Custom Query

You can create a custom query to return patient or study files that match specific patient-, study-, or series-level characteristics. To create a custom query, complete the following steps:

  1. Click the Build Query button on the Query Retrieve SCU tab to open the Query Fields dialog.
  2.  

  3. In the Query Model area, select Patient Root or Study Root. This indicates the highest level of information that can be retrieved. For instance, if you select Study Root, you cannot retrieve the study by selecting the associated patient. You must select a study, series or image to be retrieved.
  4.  


    Note
    To check what query models are supported by the remote node, use the Echo SCU service on the Configuration tab. Select the Query SCP entity in the droplist and click Echo. If the echo is successful, query model information is printed following echo results in the Status window.

     

  5. In the Query Level area, select Patient Level, Study Level or Series Level to define patient, study or series characteristics against which files are matched.
  6.  


    Note
    Changing the query model or query level makes some query fields active and others insensitive. Any values shown in insensitive fields are not applied to the current query.

     

  7. Click Apply to store the query or Ok to store the query and close the dialog. The specified query fields are applied to subsequent queries. If you select Clear, the query will be performed at the Query Model level. Select Cancel to clear changes and revert to the last used query. Click the Help button for information on using wildcards in attribute matching, and information on DICOM date formats.

Attribute Matching Using Wildcards

The implementation of the Query/Retrieve SCP service on the remote node determines the quality of attribute matching. All attribute matching is performed by the remote service. In addition to case sensitivity, matching can include one or more of the following:

Single Value Matching
Matches single values.
Wildcard Matching
Use * to match zero or more characters.
Use ? to match any single character.
For example, to return patients with a name beginning with HA, use HA*. To return a list of patients whose names vary by one or more instances of a single value, use the ? character to indicate the wildcard value as in M?NROE.
Range Matching
Use the - character in between date or time values to return any matches within that range. For example, to match any date in the first six months of the year, use 20050101-20050630.

The following table indicates the value representation (VR) and what wildcards are supported in each query field. A "·" in the column indicates the wildcard is supported.

Table 2-1: Wildcard Support for Query Fields

Table 2-1: Wildcard Support for Query Fields
Field
VR
*
?
-
Patient Name
PN
·
·
 
Family Name
PN
·
·
 
Given Name
PN
·
·
 
Middle Name
PN
·
·
 
Prefix
PN
·
·
 
Suffix
PN
·
·
 
Patient ID
LO
·
·
 
Study Date
DA
   
·
Study Time
TM
   
·
Accession Number
SH
·
·
 
Study ID
SH
·
·
 
Modality
CS
     

Retrieve Files from a Remote Node

The DICOM Network Services utility lets you retrieve selected DICOM data from a remote machine, and store the files in the directory you associated with the Storage SCP service. To retrieve data, complete the following steps:

  1. Click on the Query Retrieve SCU tab of the DICOM Network Services utility if it is not already selected.
  2.  

  3. Perform a query against a remote database. See Query the Remote Node for instructions.
  4.  

  5. In the Destination Node droplist, select the Application Entity name associated with the current Storage SCP service. If there is more than one Application Entity that supports Storage SCP, you can locate the name of the current entity on the Configuration tab in the grayed out Storage SCP Application Entity area.
  6.  

  7. In the Navigation Tree portion of the Results area, select the patient, study, series or image that you want to retrieve.
  8.  


    Note
    If you have selected Study Root in the Query Model area of the Query Fields dialog (described in Build or Modify a Custom Query), you cannot retrieve data at a patient level. You will need to select a study, series or image in the Navigation Tree.

     

  9. Click Retrieve to return the selected data. This retrieves all images associated with a selected patient, study or series, or retrieves the selected image. Files are stored in the directory you associated with the Storage SCP Application Entity. The directory location is shown in the grayed out Storage SCP Application Entity area on the Configuration tab. Retrieve status information is available in the Status window.
  10.  


    Note
    There is a Depot subdirectory located in the directory you specified when configuring the Storage SCP Application Entity. This directory is used in the process of file retrieval and can be ignored. See About the Depot Directory for details.

Existing files with duplicate names are overwritten. See About the Storage SCP Service for details.

Cancelling a Retrieval Operation

To halt the retrieval of data, click the Cancel button. This sends a cancel request to the remote node and halts file transfers.

Troubleshooting a Retrieval Operation

There are common configuration errors that can lead to retrieval problems. If one of the following errors appear in the Status window of the Query Retrieve SCU tab, consider the following possible resolutions:

Table 2-2: Troubleshooting Retrieval Errors

Table 2-2: Troubleshooting Retrieval Errors
Error
Resolution
Move destination unknown.
The remote machine does not recognize the retrieve Destination Node. Try these steps:
1. Make sure that your current Storage SCP Application Entity is selected in this droplist. This is described in Query the Remote Node.
2. Echo the Storage SCP Application Entity to verify valid network connection settings. See Returning Connection Status with Echo.
3. Try to send a file to the Storage SCP directory by selecting a local directory containing any DICOM file and sending it to yourself using the Storage SCU functionality. See Sending Files to a Remote Destination for details.
Unable to process error.
If all of the resolutions in the previous steps work correctly, the problem is likely with the configuration of the your Storage SCP Application Entity information on the remote machine. Check these settings on the machine you are attempting to query. See Defining a Machine to Be Queried for more information.
If you are running Windows XP service pack 2, the firewall that is automatically started is likely blocking incoming DICOM packets. See Allowing File Transfer with a Windows XP Firewall for ways to modify your firewall settings.
Files do not appear in the specified directory.
Restart the Storage SCP service. After making any changes to the configuration properties of a Storage SCP Application Entity while in system configuration mode (when the DICOM Network Services utility is started with DICOMEX_NET, /SYSTEM), you must stop and restart the Storage SCP Service. Use the Stop Service and the Start Service buttons on the Configuration tab. See Managing the Storage SCP Service for details.


Note
If you are unable to retrieve files, verify that virus scanning software is not blocking the transfer. If file transfers are extremely slow, you may want to disable any virus scanning software when performing query, retrieve or send operations.

Allowing File Transfer with a Windows XP Firewall

By default, Windows XP service pack 2 automatically starts a firewall. This blocks DIOCM file packet transfer until you either modify your firewall settings or disable the firewall.

To modify your firewall settings to include the port number associated with your IDL_AE_STOR_SCP Application Entity (as defined in Configuring Your System to Receive Files), complete the following steps.

  1. Select Start Control Panel Windows Firewall.
  2.  

  3. Click on the Exceptions tab and add the port number of entity associated with your Store SCP application entity. Select Add Port and enter a name identifying the port and the port number. If you accepted the default settings for the IDL_AE_STOR_SCP Application Entity, the port number is 2510.
  4.  

  5. Click OK to save the changes and OK to exit the dialog.

You also have the option to completely disable the firewall, although this should be done only if there is low risk of infection from viruses or other external attacks. To disable your firewall, select Start Control Panel Windows Firewall and choose Off. Click OK to save the changes and exit the dialog.

  IDL Online Help (March 06, 2007)