Skip to Content
go-dicom(3)
Command line

findscu

Sends a C-FIND query to a peer and prints each match: patients, studies, series or instances from a Query/Retrieve SCP, or scheduled procedure steps from a Modality Worklist SCP.

When to use it

Use findscu to find what a PACS holds before retrieving it with movescu or getscu, to check that a study arrived, or to see what a worklist server offers a modality.

It only queries; it retrieves nothing. Over HTTP the same job is qido. For UPS worklists (Unified Procedure Step), use upsscu -query.

The closest tools are dcmtk's findscu and pynetdicom's python -m pynetdicom findscu. Where dcmtk takes -k keys, this command has -patient-name, -patient-id and -key GGGG,EEEE[=value].

Examples

Find studies by patient name

go-dicom findscu -aec QRSCP -patient-name 'Compressed*' pacs:11112
Querying pacs:11112 (level: STUDY)

--- Result 1 ---
  Study Date                               20040119
  Query/Retrieve Level                     STUDY
  Patient's Name                           CompressedSamples^CT1
  Patient ID                               1CT1
  Study Instance UID                       1.3.6.1.4.1.5962.1.2.1.20040119072730.12322
…
Found 3 result(s)

The query always asks for Patient's Name, Patient ID, Study Instance UID and Study Date. * and ? are wildcards. No match prints Found 0 result(s) and exits 0.

Series of one study, with more keys

go-dicom findscu -aec QRSCP -level SERIES -key 0020,000D=1.3.6.1.4.1.5962.1.2.1.20040119072730.12322 -key 0008,0060 -key 0020,000E pacs:11112
Querying pacs:11112 (level: SERIES)

--- Result 1 ---
  Study Date                               20040119
  Query/Retrieve Level                     SERIES
  Modality                                 CT
  Patient's Name                           CompressedSamples^CT1
  Patient ID                               1CT1
  Study Instance UID                       1.3.6.1.4.1.5962.1.2.1.20040119072730.12322
  Series Instance UID                      1.3.6.1.4.1.5962.1.3.1.1.20040119072730.12322

Found 1 result(s)

-key GGGG,EEEE=value matches on a value; -key GGGG,EEEE with no value asks for the attribute without matching on it. -level is PATIENT, STUDY (default), SERIES or IMAGE.

A date range

go-dicom findscu -aec QRSCP -key 0008,0020=20040801-20041231 pacs:11112
…
Found 2 result(s)

A modality worklist

go-dicom findscu -aec WLMSCP -worklist -modality MR -date 20261204 ris:11112
Querying ris:11112 (Modality Worklist)

--- Result 1 ---
  Accession Number                         ACC1001
  Referring Physician's Name
  Patient's Name                           Roe^Richard
  Patient ID                               PID1001
…
  Scheduled Procedure Step Sequence
    Item 1
      Modality                                 MR
      Scheduled Station AE Title               MR01
      Scheduled Procedure Step Start Date      20261204
      Scheduled Procedure Step Start Time      090000
…
  Requested Procedure ID                   RP1001

Found 1 result(s)

-worklist asks for the keys a modality needs: the patient, the order, the requested procedure and the Scheduled Procedure Step Sequence. -modality, -date (YYYYMMDD, a range, or today) and -station-aet match inside the scheduled step and need -worklist; -level is refused with it, since Basic Worklist has no levels.

Another information model

go-dicom findscu -aec QRSCP -sop-class 1.2.840.10008.5.1.4.1.2.1.1 pacs:11112

By default the command uses whichever of Patient Root, Study Root, Patient/Study Only or Modality Worklist the peer accepts. -sop-class names one, and is the only way to reach a model outside that set, such as Hanging Protocol.

Notes

  • Exit status is 0 when the query completed (whatever it found), 1 when the association or the query failed.
  • Values are printed as the peer sent them, padding included.
  • -timeout (seconds, default 30) bounds the whole query. -events records the association (Events); the -tls… options are those of echoscu.
  • How a go-dicom server matches is in CONFORMANCE.md, Matching in the archive.

See also

Options

On this page