Query¶
Module for querying a DICOM SCU using the C-FIND service.
Classes:
| Name | Description |
|---|---|
DicomStatus |
|
QueryError |
Query exception |
QueryPacs |
Class to perform the actual query. |
Functions:
| Name | Description |
|---|---|
get_date_query |
Convert one of two datetime.date objects to a DICOM compatible date range. |
DicomStatus
¶
Bases: Enum
Attributes:
| Name | Type | Description |
|---|---|---|
CANCEL |
Matching terminated due to Cancel request |
|
DATASET_DOES_NOT_MATCH_SOP_CLASS |
Error Data Set does not match SOP Class |
|
OUT_OF_RESOURCES |
Refused Out of resources |
|
PENDING_0 |
Matches are continuing - Current Match is supplied and any |
|
PENDING_1 |
Matches are continuing - Warning that one or more |
|
SOP_CLASS_NOT_SUPPORTED |
Refused SOP Class not supported |
|
SUCCESS |
Matching is complete - No final Identifier is supplied. |
|
UNABLE_TO_PROCESS |
Failed Unable to process |
|
UNKNOWN |
Unknown |
DATASET_DOES_NOT_MATCH_SOP_CLASS
¶
Error Data Set does not match SOP Class
PENDING_0
¶
Matches are continuing - Current Match is supplied and any Optional Keys were supported in the same manner as Required Keys.
PENDING_1
¶
Matches are continuing - Warning that one or more Optional Keys were not supported for existence for this Identifier.
QueryPacs
¶
QueryPacs(pacs_config: PacsConfig)
Class to perform the actual query.
Methods:
| Name | Description |
|---|---|
get_modalities_for_accession_number |
Get modalities for matching the 'accession_number' in the search_terms. |
get_series |
Get the series matching the search_terms. |
get_series_for_study |
Get the series for 'study_uid', filtered by modalities (if specified). |
get_studies |
Get the studies matching the search_terms. |
get_studies_for_patient |
Get all studies matching the 'pat_name' in the search_terms. |
get_study |
Get the single study for the 'study_uid'. |
get_modalities_for_accession_number
¶
get_modalities_for_accession_number(
search_terms: SearchTerms,
) -> list[str]
Get modalities for matching the 'accession_number' in the search_terms.
get_series
¶
get_series(search_terms: SearchTerms) -> list[SeriesData]
Get the series matching the search_terms.
get_series_for_study
¶
get_series_for_study(
study_uid: str | UID,
modalities: Sequence[str] | None = None,
) -> list[SeriesData]
Get the series for 'study_uid', filtered by modalities (if specified).
get_studies
¶
get_studies(search_terms: SearchTerms) -> list[StudyData]
Get the studies matching the search_terms.
get_studies_for_patient
¶
get_studies_for_patient(
search_terms: SearchTerms,
) -> defaultdict[str, list[StudyData]]
Get all studies matching the 'pat_name' in the search_terms.