query_studies
Query DICOM studies using search criteria such as patient ID, date range, modality, or study description. Retrieve matching study results with customizable attributes.
Instructions
Query studies matching the specified criteria from the DICOM node.
This tool performs a DICOM C-FIND operation at the STUDY level to find studies matching the provided search criteria. All search parameters are optional and can be combined for more specific queries.
Args: patient_id: Patient ID to search for (supports wildcards), e.g., "12345678" or "123" patient_sex: Patient sex (F, M, O) patient_birth_date: Patient birth date or range in DICOM format: - Single date: "19700101" - Date range: "19700101-19801231" study_date: Study date or date range in DICOM format: - Single date: "20230101" - Date range: "20230101-20230131" modality_in_study: Filter by modalities present in study, e.g., "CT" or "MR" study_description: Study description text with wildcards. IMPORTANT: Use wildcards on BOTH sides for substring matching, e.g., "CHEST" to find "CT CHEST W CONTRAST". Using "CHEST*" only matches descriptions starting with "CHEST". accession_number: Medical record accession number (supports wildcards) study_instance_uid: Unique identifier for a specific study limit: Maximum number of results to return (None = no limit) attribute_preset: Controls which attributes to include in results: - "none": No attributes, use with additional_attributes (default) - "custom": Our custom attributes additional_attributes: List of specific DICOM attributes to include beyond the preset exclude_attributes: List of DICOM attributes to exclude from the results filters: Dictionary of DICOM tag names to filter values. Use this to filter by any DICOM attribute not in the standard parameters. Supports wildcards. Example: {"RequestedProcedureDescription": "CHESTANGIO*"}
Returns: Dictionary containing query results and status metadata. The results list includes entries like: { "StudyInstanceUID": "1.2.840.113619.2.1.1.322.1600364094.412.1009", "StudyDate": "20230215", "StudyDescription": "CHEST CT", "PatientID": "12345", "ModalitiesInStudy": "CT" }
Notes: Returns success False if the query fails.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | No | ||
| patient_sex | No | ||
| patient_birth_date | No | ||
| study_date | No | ||
| modality_in_study | No | ||
| study_description | No | ||
| accession_number | No | ||
| study_instance_uid | No | ||
| limit | No | ||
| attribute_preset | No | none | |
| additional_attributes | No | ||
| exclude_attributes | No | ||
| filters | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |