30#include <condition_variable>
124 [[nodiscard]]
auto uptime() const -> std::chrono::seconds {
125 return std::chrono::duration_cast<std::chrono::seconds>(
126 std::chrono::system_clock::now() -
start_time);
226 [[nodiscard]]
bool start();
242 [[nodiscard]]
bool is_running() const noexcept;
252 void on_image_received(std::function<
void(const events::image_received_event&)> handler);
258 void on_query_executed(std::function<
void(const events::query_executed_event&)> handler);
270 void on_access_denied(std::function<
void(const events::access_denied_event&)> handler);
291 [[nodiscard]] monitoring::health_status
get_health() const;
349 std::shared_ptr<monitoring::pacs_metrics>
metrics_;
352 std::vector<std::function<
void(const events::image_received_event&)>>
image_handlers_;
353 std::vector<std::function<
void(const events::query_executed_event&)>>
query_handlers_;
DICOM de-identification/anonymization per PS3.15 Annex E.
bool is_running() const noexcept
Check if server is running.
void setup_anonymization()
void dispatch_image_received(const events::image_received_event &event)
production_pacs & operator=(const production_pacs &)=delete
production_pacs(const production_pacs &)=delete
void dispatch_query_executed(const events::query_executed_event &event)
std::atomic< bool > running_
void setup_event_handlers()
production_statistics stats_
std::mutex handlers_mutex_
void on_access_denied(std::function< void(const events::access_denied_event &)> handler)
Register handler for access denied events.
production_pacs(const production_config &config)
Construct Production PACS with configuration.
std::unique_ptr< web::rest_server > rest_server_
std::shared_ptr< monitoring::pacs_metrics > metrics_
void print_status() const
Print server status to stdout.
~production_pacs()
Destructor - ensures clean shutdown.
void dispatch_access_denied(const events::access_denied_event &event)
std::shared_ptr< monitoring::health_checker > health_checker_
void on_query_executed(std::function< void(const events::query_executed_event &)> handler)
Register handler for query executed events.
void dispatch_association_event(const events::association_event &event)
void wait()
Block until server shutdown.
std::condition_variable shutdown_cv_
const production_statistics & statistics() const noexcept
Get current statistics.
std::vector< std::function< void(const events::query_executed_event &)> > query_handlers_
std::vector< std::function< void(const events::association_event &)> > association_handlers_
void on_association_event(std::function< void(const events::association_event &)> handler)
Register handler for association events.
std::unique_ptr< mini_pacs > pacs_
production_config config_
const production_config & config() const noexcept
Get the configuration.
bool start()
Start the production PACS server.
void on_image_received(std::function< void(const events::image_received_event &)> handler)
Register handler for image received events.
std::mutex shutdown_mutex_
std::vector< std::function< void(const events::image_received_event &)> > image_handlers_
std::vector< std::function< void(const events::access_denied_event &)> > access_denied_handlers_
production_pacs(production_pacs &&)=delete
production_pacs & operator=(production_pacs &&)=delete
void stop()
Stop the production PACS server.
std::unique_ptr< security::anonymizer > anonymizer_
monitoring::health_status get_health() const
Get health status.
void export_statistics(const std::filesystem::path &path) const
Export statistics to JSON file.
std::shared_ptr< security::access_control_manager > access_control_
YAML configuration loader for Production PACS.
Health check service for PACS system components.
std::shared_mutex mutex
Mutex for thread-safe access.
Mini PACS class integrating all DICOM services.
Operation metrics collection for PACS DICOM services.
REST API server for PACS administration.
Event fired when access is denied.
std::chrono::system_clock::time_point timestamp
Event fired for association lifecycle events.
std::chrono::system_clock::time_point timestamp
Event fired when an image is received and stored.
std::chrono::system_clock::time_point timestamp
std::string sop_instance_uid
std::string sop_class_uid
std::string study_instance_uid
Event fired when a query is executed.
std::chrono::milliseconds duration
std::chrono::system_clock::time_point timestamp
Complete production PACS configuration.
Extended statistics for production PACS.
std::atomic< std::uint64_t > images_stored
Total images stored.
std::atomic< std::uint64_t > images_anonymized
Total images anonymized.
std::atomic< std::uint64_t > rest_requests
Total REST API requests.
std::chrono::system_clock::time_point start_time
Server uptime start.
std::atomic< std::uint64_t > queries_executed
Total queries executed.
std::atomic< std::uint64_t > access_denied_count
Total access denied events.
auto uptime() const -> std::chrono::seconds
Get uptime duration.
std::atomic< std::uint32_t > active_associations
Current active DICOM associations.