Dimse.Scu.NAction (Dimse v0.8.7)

Copy Markdown View Source

N-ACTION SCU — DIMSE-N Action Service Class User.

Sends an N-ACTION-RQ to request an action on a managed SOP Instance.

DICOM Reference

  • PS3.7 Section 10.1.4 (N-ACTION Service)

Summary

Functions

build_command_set(sop_class_uid, sop_instance_uid, message_id, action_type_id, opts \\ [])

@spec build_command_set(String.t(), String.t(), integer(), integer(), keyword()) ::
  map()

Builds an N-ACTION-RQ command set.

Uses RequestedSOPClassUID (0000,0003), RequestedSOPInstanceUID (0000,1001), and ActionTypeID (0000,1008).

send(assoc, sop_class_uid, sop_instance_uid, action_type_id, data, opts \\ [])

@spec send(pid(), String.t(), String.t(), integer(), binary() | nil, keyword()) ::
  {:ok, integer(), binary() | nil}
  | {:error, {:status, integer(), binary() | nil} | term()}

Sends an N-ACTION-RQ with action info and waits for N-ACTION-RSP.

Returns {:ok, status, data} for successful or warning responses, {:error, {:status, status, data}} for DIMSE failure statuses, or {:error, reason} for transport/protocol failures.