upsscu
Works with Unified Procedure Steps on a UPS SCP: creates a step, reads it, claims it, updates it, completes or cancels it, asks for its cancellation, queries steps, and watches for their event reports.
When to use it
Use upsscu to drive a UPS worklist from a shell: to schedule a
post-processing or reporting task, to act as the performer that claims and
finishes it, to test a UPS SCP, or to watch what happens to steps. Each
action is one flag; one action per run.
| Flag | DIMSE | UPS SOP class |
|---|---|---|
-create | N‑CREATE, state SCHEDULED | Push |
-get UID | N‑GET, every attribute or those of -attrs | Pull |
-claim UID | N‑ACTION, to IN PROGRESS | Pull |
-set UID | N‑SET, the -json attributes | Pull |
-complete UID, -cancel UID | N‑ACTION, to COMPLETED or CANCELED | Pull |
-request-cancel UID | N‑ACTION, Request Cancellation | Push |
-query | C‑FIND | Query |
-watch UID|global | N‑ACTION subscribe, then N‑EVENT‑REPORT | Watch |
It does not run a UPS SCP; the library's network.UPSHandler is one. For
Modality Worklist and MPPS, use findscu -worklist and
mppsscu.
dcmtk has no UPS tool; pynetdicom does it in a script.
Examples
Schedule a step
go-dicom upsscu -aec UPSSCP -create -label 'CT chest reconstruction' -patient-name 'Doe^Jane' -patient-id PID1002 -priority HIGH -uid 1.2.826.0.1.3680043.10.511.6.1 pacs:11112Requesting Association with pacs:11112 (AE: UPSSCP)
N-CREATE Success (status 0x0000)
Procedure step 1.2.826.0.1.3680043.10.511.6.1 is SCHEDULEDWithout -uid the step's UID is generated. -start sets the scheduled
start (YYYYMMDDHHMMSS, default now); -json adds any other attributes.
Read it
go-dicom upsscu -aec UPSSCP -get 1.2.826.0.1.3680043.10.511.6.1 -attrs ProcedureStepState,PatientName,ScheduledProcedureStepPriority pacs:11112Requesting Association with pacs:11112 (AE: UPSSCP)
N-GET Success (status 0x0000)
Patient's Name Doe^Jane
Patient ID PID1002
…
Procedure Step State SCHEDULED
Scheduled Procedure Step Priority HIGH
Procedure Step Label CT chest reconstruction-attrs sends an Attribute Identifier List (tags or keywords, comma
separated); without it every attribute is asked for. What comes back is the
SCP's choice: the one here returned every attribute.
Claim it, report progress, complete it
go-dicom upsscu -aec UPSSCP -claim 1.2.826.0.1.3680043.10.511.6.1 pacs:11112Requesting Association with pacs:11112 (AE: UPSSCP)
N-ACTION Success (status 0x0000)
Procedure step 1.2.826.0.1.3680043.10.511.6.1 is IN PROGRESS
Transaction UID 2.25.68815721200213829336867860877277092901: give it to -set, -complete or -cancelgo-dicom upsscu -aec UPSSCP -set 1.2.826.0.1.3680043.10.511.6.1 -transaction 2.25.68815721200213829336867860877277092901 -json progress.json pacs:11112
go-dicom upsscu -aec UPSSCP -complete 1.2.826.0.1.3680043.10.511.6.1 -transaction 2.25.68815721200213829336867860877277092901 pacs:11112N-SET Success (status 0x0000)
Procedure step 1.2.826.0.1.3680043.10.511.6.1 is updated
…
N-ACTION Success (status 0x0000)
Procedure step 1.2.826.0.1.3680043.10.511.6.1 is COMPLETEDThe Transaction UID is the performer's proof of the claim (PS3.4 CC.1.1);
-set, -complete and -cancel refuse to run without it. -claim -transaction UID claims with a Transaction UID of your choosing.
Important
Keep the Transaction UID that -claim prints. Without it no one can
update, complete or cancel the step while it is IN PROGRESS.
Watch every step
go-dicom upsscu -aec UPSSCP -aet WATCHER -watch global -port 11115 -max-events 3 pacs:11112Receiving event reports for WATCHER on port 11115 as well
Requesting Association with pacs:11112 (AE: UPSSCP)
N-ACTION subscribe Success (status 0x0000)
Subscribed to 1.2.840.10008.5.1.4.34.5; waiting for event reports (interrupt to stop)
--- Event report 1: UPS Cancel Requested (2) for procedure step 1.2.826.0.1.3680043.10.511.6.2 ---
Reason for Cancellation Ordered twice
--- Event report 2: UPS State Report (1) for procedure step 1.2.826.0.1.3680043.10.511.6.2 ---
Procedure Step State IN PROGRESS
--- Event report 3: UPS State Report (1) for procedure step 1.2.826.0.1.3680043.10.511.6.2 ---
Procedure Step State CANCELED
Unsubscribed from 1.2.840.10008.5.1.4.34.5 after 3 event report(s)Meanwhile another performer ran -request-cancel … -reason 'Ordered twice',
-claim and -cancel on that step. -watch UID watches one step,
global every step (with -json keys, a filtered global subscription).
Many SCPs, the library's among them, send event reports on an association
they open to the watcher: -port listens for those, under the -aet
title, which the SCP must map to this machine's address. Without
-max-events the watch runs until interrupted, then unsubscribes.
-deletion-lock asks the SCP to keep finished steps until you unsubscribe.
Notes
-querysends a C-FIND with-patient-id,-stateand-jsonas keys; it needs an SCP that serves the UPS Query SOP class (the test peer used for these examples did not, so no example is shown).-request-cancelonly asks: the performer decides, and cancels with its own-cancel.- Exit status is 0 when the SCP answered Success, 1 on a refusal, a missing
-transaction, or a failed association. -vprints the data set sent.-timeoutis in seconds (default 30). The-tls…options are those of echoscu;-eventsrecords the association (Events).- See CONFORMANCE.md, Service classes.
See also
Options
mppsscu
Reports a Modality Performed Procedure Step to a peer: N-CREATE when a procedure starts (IN PROGRESS), and N-SET when it is COMPLETED or DISCONTINUED, with the series and images it made.
qrscp
Runs a small DICOM archive: it stores what it is sent (C-STORE), indexes it, answers C-FIND, C-MOVE and C-GET against what it holds, commits instances (Storage Commitment), and with -web serves the same store over DICOMweb.