14#ifndef PACS_SERVICES_UPS_PUSH_SCP_HPP
15#define PACS_SERVICES_UPS_PUSH_SCP_HPP
35 "1.2.840.10008.5.1.4.34.6.1";
73 const std::string& workitem_uid,
85 const std::string& workitem_uid)>;
98 const std::string& workitem_uid,
99 const std::string& new_state,
100 const std::string& transaction_uid)>;
112 const std::string& workitem_uid,
113 const std::string& reason)>;
207 [[nodiscard]] std::string_view
service_name() const noexcept override;
228 network::association& assoc,
230 const network::dimse::dimse_message& request);
233 network::association& assoc,
235 const network::dimse::dimse_message& request);
238 network::association& assoc,
240 const network::dimse::dimse_message& request);
243 network::association& assoc,
245 const network::dimse::dimse_message& request);
248 network::association& assoc,
251 const std::
string& sop_instance_uid,
252 network::dimse::status_code status);
255 network::association& assoc,
258 const std::
string& sop_instance_uid,
259 network::dimse::status_code status);
262 network::association& assoc,
265 const std::
string& sop_instance_uid,
266 network::dimse::status_code status,
267 core::dicom_dataset* dataset =
nullptr);
270 network::association& assoc,
273 const std::
string& sop_instance_uid,
274 uint16_t action_type_id,
275 network::dimse::status_code status);
const std::shared_ptr< di::ILogger > & logger() const noexcept
Get the current logger instance.
~ups_push_scp() override=default
network::Result< std::monostate > send_n_get_response(network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, network::dimse::status_code status, core::dicom_dataset *dataset=nullptr)
network::Result< std::monostate > handle_n_set(network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request)
size_t creates_processed() const noexcept
network::Result< std::monostate > send_n_set_response(network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, network::dimse::status_code status)
network::Result< std::monostate > handle_n_create(network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request)
std::atomic< size_t > state_changes_
std::atomic< size_t > cancel_requests_
void set_create_handler(ups_create_handler handler)
ups_request_cancel_handler request_cancel_handler_
size_t state_changes() const noexcept
std::vector< std::string > supported_sop_classes() const override
Get the list of SOP Class UIDs supported by this service.
std::string_view service_name() const noexcept override
Get the service name for logging/debugging.
ups_set_handler set_handler_
void reset_statistics() noexcept
void set_request_cancel_handler(ups_request_cancel_handler handler)
size_t gets_processed() const noexcept
size_t cancel_requests() const noexcept
ups_get_handler get_handler_
size_t actions_processed() const noexcept
std::atomic< size_t > actions_processed_
std::atomic< size_t > creates_processed_
void set_get_handler(ups_get_handler handler)
ups_push_scp(std::shared_ptr< di::ILogger > logger=nullptr)
Construct UPS Push SCP with optional logger.
ups_create_handler create_handler_
std::atomic< size_t > gets_processed_
void set_set_handler(ups_set_handler handler)
network::Result< std::monostate > send_n_action_response(network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, uint16_t action_type_id, network::dimse::status_code status)
size_t sets_processed() const noexcept
std::atomic< size_t > sets_processed_
ups_change_state_handler change_state_handler_
network::Result< std::monostate > handle_n_action(network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request)
network::Result< std::monostate > handle_n_get(network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request)
void set_change_state_handler(ups_change_state_handler handler)
network::Result< std::monostate > send_n_create_response(network::association &assoc, uint8_t context_id, uint16_t message_id, const std::string &sop_instance_uid, network::dimse::status_code status)
network::Result< std::monostate > handle_message(network::association &assoc, uint8_t context_id, const network::dimse::dimse_message &request) override
Handle an incoming DIMSE message.
std::function< network::Result< storage::ups_workitem >( const std::string &workitem_uid)> ups_get_handler
N-GET handler function type.
std::function< network::Result< std::monostate >( const std::string &workitem_uid, const core::dicom_dataset &modifications)> ups_set_handler
N-SET handler function type.
std::function< network::Result< std::monostate >( const storage::ups_workitem &workitem)> ups_create_handler
N-CREATE handler function type.
constexpr std::string_view ups_push_sop_class_uid
UPS Push SOP Class UID (PS3.4 Table CC.2-1)
constexpr uint16_t ups_action_change_state
N-ACTION Type 1: Change UPS State (PS3.4 CC.2.4)
constexpr uint16_t ups_action_request_cancel
N-ACTION Type 3: Request Cancellation (PS3.4 CC.2.5)
std::function< network::Result< std::monostate >( const std::string &workitem_uid, const std::string &reason)> ups_request_cancel_handler
N-ACTION Type 3 handler: Request Cancellation.
std::function< network::Result< std::monostate >( const std::string &workitem_uid, const std::string &new_state, const std::string &transaction_uid)> ups_change_state_handler
N-ACTION Type 1 handler: Change UPS State.
Base class for DICOM SCP (Service Class Provider) services.
UPS workitem record from the database.
Unified Procedure Step (UPS) workitem data structures.