19#ifndef PACS_SERVICES_MPPS_SCU_HPP
20#define PACS_SERVICES_MPPS_SCU_HPP
152 return (
status & 0xF000) == 0xB000;
265 explicit mpps_scu(std::shared_ptr<di::ILogger> logger =
nullptr);
274 std::shared_ptr<di::ILogger> logger =
nullptr);
332 std::string_view mpps_uid,
333 const std::vector<performed_series_info>& performed_series);
348 std::string_view mpps_uid,
349 std::string_view reason =
"");
DICOM Association management per PS3.8.
size_t sets_performed() const noexcept
Get the number of N-SET operations performed.
network::Result< mpps_result > create(network::association &assoc, const mpps_create_data &data)
Create a new MPPS instance (N-CREATE)
mpps_scu(const mpps_scu &)=delete
core::dicom_dataset build_create_dataset(const mpps_create_data &data) const
Build DICOM dataset for N-CREATE request.
void reset_statistics() noexcept
Reset statistics counters to zero.
std::shared_ptr< di::ILogger > logger_
Logger instance.
std::atomic< uint16_t > message_id_counter_
Message ID counter.
mpps_scu_config config_
Configuration.
size_t creates_performed() const noexcept
Get the number of N-CREATE operations performed.
network::Result< mpps_result > discontinue(network::association &assoc, std::string_view mpps_uid, std::string_view reason="")
Discontinue an MPPS instance (convenience method)
core::dicom_dataset build_set_dataset(const mpps_set_data &data) const
Build DICOM dataset for N-SET request.
mpps_scu(std::shared_ptr< di::ILogger > logger=nullptr)
Construct MPPS SCU with default configuration.
mpps_scu & operator=(mpps_scu &&)=delete
network::Result< mpps_result > set(network::association &assoc, const mpps_set_data &data)
Update an existing MPPS instance (N-SET)
std::string get_current_time() const
Get current time in DICOM TM format (HHMMSS)
std::atomic< size_t > creates_performed_
Statistics: N-CREATE operations performed.
std::atomic< size_t > sets_performed_
Statistics: N-SET operations performed.
mpps_scu(mpps_scu &&)=delete
mpps_scu & operator=(const mpps_scu &)=delete
std::string get_current_date() const
Get current date in DICOM DA format (YYYYMMDD)
uint16_t next_message_id() noexcept
Get the next message ID for DIMSE operations.
std::string generate_mpps_uid() const
Generate a unique MPPS SOP Instance UID.
network::Result< mpps_result > complete(network::association &assoc, std::string_view mpps_uid, const std::vector< performed_series_info > &performed_series)
Complete an MPPS instance (convenience method)
DICOM Dataset - ordered collection of Data Elements.
DIMSE message encoding and decoding.
Logger interface for dependency injection.
DICOM MPPS (Modality Performed Procedure Step) SCP service.
mpps_status
MPPS status enumeration.
@ completed
Procedure completed successfully.
Data for N-CREATE operation (start procedure)
std::string accession_number
std::string procedure_step_start_date
DICOM DA format (YYYYMMDD)
std::string procedure_step_start_time
DICOM TM format (HHMMSS)
std::string scheduled_procedure_step_id
std::string patient_birth_date
std::string station_ae_title
std::string performing_physician
std::string mpps_sop_instance_uid
Generated if empty.
std::string procedure_description
std::string operator_name
std::string study_instance_uid
Result of an MPPS operation.
std::chrono::milliseconds elapsed
Time taken for the operation.
bool is_success() const noexcept
Check if the operation was successful.
bool is_error() const noexcept
Check if this was an error status.
uint16_t status
DIMSE status code (0x0000 = success)
std::string mpps_sop_instance_uid
MPPS SOP Instance UID.
std::string error_comment
Error comment from the SCP (if any)
bool is_warning() const noexcept
Check if this was a warning status.
Configuration for MPPS SCU service.
std::chrono::milliseconds timeout
Timeout for receiving DIMSE response.
bool auto_generate_uid
Auto-generate MPPS UID if not provided.
Data for N-SET operation (update/complete procedure)
mpps_status status
New status (COMPLETED or DISCONTINUED)
std::string procedure_step_end_date
Procedure Step End Date (required for COMPLETED/DISCONTINUED)
std::string discontinuation_reason
Discontinuation reason (for DISCONTINUED status)
std::vector< performed_series_info > performed_series
Performed Series Sequence (for COMPLETED status)
std::string procedure_step_end_time
Procedure Step End Time (required for COMPLETED/DISCONTINUED)
std::string mpps_sop_instance_uid
MPPS SOP Instance UID (required)