qido
Searches a DICOMweb service for studies, series or instances (QIDO-RS, PS3.18 10.6) and prints each match, as a table or as DICOM JSON.
When to use it
Use qido to find what a DICOMweb server holds: the HTTP counterpart of
findscu, for servers reached over HTTPS rather than DIMSE,
behind a proxy, or with a bearer token. Retrieve what you find with
wado.
It only searches. It does not query worklists (UPS-RS is not implemented).
dcmtk has no DICOMweb tools; in Python, dicomweb-client's search_for_studies
does the same job.
Examples
Every study
go-dicom qido http://localhost:8080/dicom-web--- Result 1 ---
(0008,0056) CS Instance Availability ONLINE
(0008,0061) CS Modalities in Study SR
(0008,1190) UR Retrieve URL http://localhost:8080/dicom-web/studies/1.2.276.0.7230010.3.1.4.2139363186.7819.982086466.2
(0010,0010) PN Patient's Name Test^S R
(0020,000D) UI Study Instance UID 1.2.276.0.7230010.3.1.4.2139363186.7819.982086466.2
(0020,1206) IS Number of Study Related Series 1
(0020,1208) IS Number of Study Related Instances 1
…
Found 4 result(s)The URL is the service root, the address its studies resource lives
under.
Match by name, and limit the answer
go-dicom qido -match 'PatientName=compressed*' -limit 2 http://localhost:8080/dicom-web--- Result 1 ---
(0008,0020) DA Study Date 20040119
…
(0010,0010) PN Patient's Name CompressedSamples^CT1
…
Found 2 result(s)-match takes a keyword or an eight-digit tag and a value, repeated for
more keys; the value may be a wildcard or a range. -limit and -offset
page through a long answer. -fuzzy asks the server for fuzzy name
matching, which it may not offer.
A date range, and an attribute returned as well
go-dicom qido -match StudyDate=20040101-20041231 -match ModalitiesInStudy=MR http://localhost:8080/dicom-web
go-dicom qido -match PatientID=1CT1 -include StudyDescription http://localhost:8080/dicom-webFound 1 result(s)
…
(0008,1030) LO Study Description e+1
…-include names an attribute to return beyond the server's default set, or
all.
Series of a study, instances of a series
go-dicom qido -level series -study 1.3.6.1.4.1.5962.1.2.1.20040119072730.12322 http://localhost:8080/dicom-web
go-dicom qido -level instance -study 1.3.6.1.4.1.5962.1.2.1.20040119072730.12322 -series 1.3.6.1.4.1.5962.1.3.1.1.20040119072730.12322 -json http://localhost:8080/dicom-web--- Result 1 ---
(0008,0060) CS Modality CT
…
(0020,000E) UI Series Instance UID 1.3.6.1.4.1.5962.1.3.1.1.20040119072730.12322
(0020,0011) IS Series Number 1
(0020,1209) IS Number of Series Related Instances 1
Found 1 result(s)
[
{
"00080005": {
"Value": [
"ISO_IR 192"
],
"vr": "CS"
},
"00080016": {
…-json prints the answer as the server sent it, DICOM JSON, for jq or
create.
With a token
DICOMWEB_TOKEN=s3cret go-dicom qido http://localhost:8080/dicom-webFound 6 result(s)Without the token such a server answers:
Error: qido: dicomweb: http://localhost:8080/dicom-web/studies answered 401 Unauthorized: this service needs a bearer tokenWarning
-token puts the token in the process list, where other users of the
machine can read it; set DICOMWEB_TOKEN instead. -tls-insecure skips
verifying the server's certificate: use it only for testing.
Notes
- No match prints
Found 0 result(s)and exits 0. An HTTP error, a refused connection or a bad answer exits 1. -user user:passsends HTTP Basic credentials;-header 'Name: value'adds a header to every request (repeatable).-tls-canames the CAs to verify an HTTPS server against.-timeoutis in seconds; by default there is no limit.- See CONFORMANCE.md, DICOMweb.
See also
Options
Search a DICOMweb service for studies, series or instances (QIDO-RS)
USAGE:
go-dicom qido [options] <url>
<url> is the service: the address its studies resource lives under, such
as https://pacs.example.org/dicom-web.
OPTIONS:
-level <level> What to search for: study (default), series or instance
-study <uid> Search within this study (series and instances)
-series <uid> Search within this series of -study (instances)
-match <A=value> An attribute to match, by keyword or eight-digit tag
(repeatable). The value may be a wildcard (Doe*) or a
range (20240101-20241231).
-include <A> An attribute to return as well, or 'all' (repeatable)
-limit <n> Return at most this many results
-offset <n> Skip this many results first
-fuzzy Ask for fuzzy matching of names
-json Print the results as DICOM JSON
-token <token> Bearer token to send. Better set in the environment as
DICOMWEB_TOKEN: an option is readable in the process list.
-user <user:pass> HTTP Basic credentials to send
-header <'N: v'> A header to send with every request (repeatable)
-tls-ca <file> PEM file of CAs to verify the server against, instead of
the system roots
-tls-insecure Do not verify the server's certificate (testing only)
-timeout <seconds> Give up after this long (default: no limit)
-h, --help Show this help
EXAMPLES:
go-dicom qido -match "PatientName=Doe*" https://pacs.example.org/dicom-web
go-dicom qido -match StudyDate=20240101-20241231 -match ModalitiesInStudy=CT -limit 20 <url>
go-dicom qido -level series -study 1.2.840.1 <url>
go-dicom qido -level instance -study 1.2.840.1 -series 1.2.840.2 -json <url>