Agora
Version 7.x

Administrator Documentation

  • 1. Server Requirements
  • 2. Installation using the Wizard
  • 3. Manual installation
  • 4. Installation on Kubernetes
  • 5. Post installation tasks
  • 6. Maintain Agora
  • 7. Backup
  • 8. Management Tasks
  • 9. Optimize Agora
  • 10. Administration Settings
  • 11. Appendix

User Documentation

  • 1. Introduction
  • 2. Getting Started
  • 3. Projects
  • 4. Agora Data Model
  • 5. Importing Data to Agora
  • 6. Data Download and Export
  • 7. Managing Data
  • 8. Viewer
  • 9. Database Search
    • 9.1. Quick Search
    • 9.2. Database Queries
      • 9.2.1. Basic Syntax
      • 9.2.2. Fields
      • 9.2.3. Comparison Operators
      • 9.2.4. Values
      • 9.2.5. Date Fields
      • 9.2.6. Count Queries
      • 9.2.7. Parameter Queries
      • 9.2.8. Examples
      • 9.2.9. Saved Queries
  • 10. Hosts
  • 11. Tasks
  • 12. Triggers
  • 13. Showcases
  • 14. User Profile and Settings

Developer Documentation

  • 1. Developer Manual
  • 2. REST API
  • 3. Python API Library
  • 4. Matlab API Library

About

  • Changelog
Agora
  • 9. Database Search

9. Database Search¶

9.1. Quick Search¶

By typing a search string in the quick search field in the main menu bar, you can search for Projects, Patients, Studies, Series, Datasets, Tags, and Tasks. Searches can be performed in the current project only or in all projects. Quick search will not find data in projects you are not member of. The results are displayed on a separate result page.

../../../_images/search.png

Quick search will search in the names and descriptions of the individual objects. Additionally you can search for file extensions and dataset types:

test

Will find all objects with the word “test” in name/description

Philips Raw

Will find all Philips raw datasets

.rec

Will find all files which have the “.rec” extension (Philips par/rec datasets)

brain .raw

Will find all raw datasets with the word brain in the name/description

GYRO30

Will find studies measured on the scanner GYRO30

9.2. Database Queries¶

The Database Queries view gives access to the Agora Query Language (AQL) — a structured query language for searching studies, series, datasets, and their parameters with precise conditions. Navigate to the Search and Queries view to open the query editor.

../../../_images/query_editor.png

9.2.1. Basic Syntax¶

A query consists of one or more conditions combined with logical operators:

field OPERATOR value
condition AND condition
condition OR condition
NOT condition
(condition OR condition) AND condition

Conditions can be grouped with parentheses. NOT has higher precedence than AND and OR.

9.2.2. Fields¶

Fields are written as object.attribute. The following objects are available:

Object

Example fields

exam

exam.name, exam.description, exam.scanner_name, exam.start_time

series

series.name, series.time

dataset

dataset.name, dataset.type

datafile

datafile.original_filename, datafile.size, datafile.type

patient

patient.name

parameter

parameter.ParameterName (see Parameter Queries below)

9.2.3. Comparison Operators¶

Operator

Meaning

=

Case-insensitive equality (strings); exact match (numbers and dates)

==

Case-sensitive exact equality

~

Case-insensitive substring match (contains)

~~

Regular expression match

> / >=

Greater than / greater than or equal

< / <=

Less than / less than or equal

9.2.4. Values¶

  • Strings — enclosed in double quotes: "brain"

  • Numbers — integer or decimal: 128, 3.14

  • Dates — in dd/mm/yyyy format: 15/03/2025

  • Booleans — true or false

  • Dataset type constants — e.g. DATASET_PHILIPS_PARREC, DATASET_DICOM, DATASET_NIFTI1

9.2.5. Date Fields¶

Date and time fields support sub-field extraction using dot notation:

exam.start_time.year = 2024
exam.start_time.month = 3
exam.start_time.day = 15

9.2.6. Count Queries¶

You can filter by the number of child objects using _count:

exam.series_count >= 3
series.dataset_count = 10
patient.exam_count > 5

9.2.7. Parameter Queries¶

Parameters are scalar values attached to datasets (e.g. MR acquisition parameters). Search them using the parameter. prefix:

parameter.ParameterName OPERATOR value

If the parameter name contains dots, enclose it in double quotes:

parameter."Param.With.Dots" = 42

Use the ? operator to check whether a parameter exists on a dataset:

parameter.FlipAngle ? true     -- dataset has a FlipAngle parameter
parameter.FlipAngle ? false    -- dataset does NOT have a FlipAngle parameter

9.2.8. Examples¶

Find studies by name:

exam.name = "brain"

Find studies on a specific scanner:

exam.scanner_name = "GYRO3T"

Find studies acquired in a specific year:

exam.start_time.year = 2024

Find studies acquired after a date:

exam.start_time > 01/01/2024

Find datasets of a specific type:

dataset.type = DATASET_DICOM

Find datasets whose filename matches a pattern:

datafile.original_filename ~~ "sub-[0-9]+_T1w"

Find datasets with a parameter value in a range:

parameter.FlipAngle >= 5 AND parameter.FlipAngle <= 15

Find studies with a specific patient name and at least two series:

patient.name = "Doe" AND exam.series_count >= 2

Combine OR and AND with grouping:

(exam.name ~ "brain" OR exam.name ~ "head") AND exam.start_time.year = 2024

Check parameter existence:

parameter.FlipAngle ? true AND parameter.RepetitionTime > 1000

9.2.9. Saved Queries¶

Queries can be saved and reused. Click Save in the query editor to store the current query under a name. Saved queries appear in the Queries list and can be attached to a folder in the project — any time you open that folder the query runs automatically and shows matching results alongside the folder contents.

Previous Next

© Copyright 2024, GyroTools LLC.

Built with Sphinx using a theme provided by Read the Docs.