PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
kcenon::pacs::workflow::prefetch_service_config Struct Reference

Configuration for the auto prefetch service. More...

#include <prefetch_config.h>

Collaboration diagram for kcenon::pacs::workflow::prefetch_service_config:
Collaboration graph

Public Types

using cycle_complete_callback
 Callback for prefetch cycle completion.
 
using prefetch_complete_callback
 Callback for individual prefetch completion.
 
using error_callback
 Callback for prefetch errors.
 

Public Member Functions

auto is_valid () const noexcept -> bool
 Check if configuration is valid.
 

Public Attributes

bool enabled {true}
 Enable/disable the prefetch service.
 
std::chrono::seconds prefetch_interval {300}
 Interval between prefetch cycles (default: 5 minutes)
 
std::size_t max_concurrent_prefetches {4}
 Maximum concurrent prefetch operations.
 
bool auto_start {false}
 Whether to start automatically on construction.
 
std::vector< remote_pacs_configremote_pacs
 Remote PACS configurations (can prefetch from multiple sources)
 
prefetch_criteria criteria
 Selection criteria for prior studies.
 
std::size_t rate_limit_per_minute {0}
 Rate limit: maximum prefetches per minute (0 = unlimited)
 
bool retry_on_failure {true}
 Retry failed prefetches.
 
std::size_t max_retry_attempts {3}
 Maximum retry attempts.
 
std::chrono::seconds retry_delay {60}
 Delay between retries.
 
cycle_complete_callback on_cycle_complete
 
prefetch_complete_callback on_prefetch_complete
 
error_callback on_prefetch_error
 

Detailed Description

Configuration for the auto prefetch service.

Comprehensive configuration for controlling automatic prefetching of prior studies based on worklist queries.

Definition at line 202 of file prefetch_config.h.

Member Typedef Documentation

◆ cycle_complete_callback

Initial value:
std::function<void(const prefetch_result& result)>

Callback for prefetch cycle completion.

Definition at line 234 of file prefetch_config.h.

◆ error_callback

Initial value:
std::function<void(const std::string& patient_id,
const std::string& study_uid,
const std::string& error)>

Callback for prefetch errors.

Definition at line 247 of file prefetch_config.h.

◆ prefetch_complete_callback

Initial value:
std::function<void(const std::string& patient_id,
const prior_study_info& study,
bool success,
const std::string& error_message)>

Callback for individual prefetch completion.

Definition at line 239 of file prefetch_config.h.

Member Function Documentation

◆ is_valid()

auto kcenon::pacs::workflow::prefetch_service_config::is_valid ( ) const -> bool
inlinenodiscardnoexcept

Check if configuration is valid.

Returns
true if configuration is valid for operation

Definition at line 257 of file prefetch_config.h.

257 {
258 if (!enabled) {
259 return true; // Disabled config is always valid
260 }
261 // Must have at least one valid remote PACS
262 for (const auto& pacs : remote_pacs) {
263 if (pacs.is_valid()) {
264 return true;
265 }
266 }
267 return false;
268 }
bool enabled
Enable/disable the prefetch service.
std::vector< remote_pacs_config > remote_pacs
Remote PACS configurations (can prefetch from multiple sources)

References enabled, and remote_pacs.

Member Data Documentation

◆ auto_start

bool kcenon::pacs::workflow::prefetch_service_config::auto_start {false}

◆ criteria

prefetch_criteria kcenon::pacs::workflow::prefetch_service_config::criteria

◆ enabled

bool kcenon::pacs::workflow::prefetch_service_config::enabled {true}

◆ max_concurrent_prefetches

std::size_t kcenon::pacs::workflow::prefetch_service_config::max_concurrent_prefetches {4}

Maximum concurrent prefetch operations.

Definition at line 210 of file prefetch_config.h.

210{4};

Referenced by kcenon::pacs::workflow::auto_prefetch_service::start().

◆ max_retry_attempts

std::size_t kcenon::pacs::workflow::prefetch_service_config::max_retry_attempts {3}

Maximum retry attempts.

Definition at line 228 of file prefetch_config.h.

228{3};

◆ on_cycle_complete

cycle_complete_callback kcenon::pacs::workflow::prefetch_service_config::on_cycle_complete

◆ on_prefetch_complete

prefetch_complete_callback kcenon::pacs::workflow::prefetch_service_config::on_prefetch_complete

Definition at line 244 of file prefetch_config.h.

◆ on_prefetch_error

error_callback kcenon::pacs::workflow::prefetch_service_config::on_prefetch_error

◆ prefetch_interval

std::chrono::seconds kcenon::pacs::workflow::prefetch_service_config::prefetch_interval {300}

◆ rate_limit_per_minute

std::size_t kcenon::pacs::workflow::prefetch_service_config::rate_limit_per_minute {0}

Rate limit: maximum prefetches per minute (0 = unlimited)

Definition at line 222 of file prefetch_config.h.

222{0};

◆ remote_pacs

std::vector<remote_pacs_config> kcenon::pacs::workflow::prefetch_service_config::remote_pacs

Remote PACS configurations (can prefetch from multiple sources)

Definition at line 216 of file prefetch_config.h.

Referenced by is_valid().

◆ retry_delay

std::chrono::seconds kcenon::pacs::workflow::prefetch_service_config::retry_delay {60}

Delay between retries.

Definition at line 231 of file prefetch_config.h.

231{60};

◆ retry_on_failure

bool kcenon::pacs::workflow::prefetch_service_config::retry_on_failure {true}

Retry failed prefetches.

Definition at line 225 of file prefetch_config.h.

225{true};

The documentation for this struct was generated from the following file: