Dimse.Scu.NCreate (Dimse v0.8.7)

Copy Markdown View Source

N-CREATE SCU — DIMSE-N Create Service Class User.

Sends an N-CREATE-RQ to create a new managed SOP Instance.

DICOM Reference

  • PS3.7 Section 10.1.5 (N-CREATE Service)

Summary

Functions

Sends an N-CREATE-RQ with attribute data and waits for N-CREATE-RSP.

Functions

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

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

Builds an N-CREATE-RQ command set.

Uses AffectedSOPClassUID (0000,0002). N-CREATE is the exception among N-GET/N-SET/N-ACTION/N-DELETE — it uses Affected, not Requested tags.

Options

  • :sop_instance_uid — optional AffectedSOPInstanceUID to propose
  • :data_set_present — whether an Attribute List accompanies the request (default: true)

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

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

Sends an N-CREATE-RQ with attribute data and waits for N-CREATE-RSP.

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