21#ifndef PACS_SERVICES_WORKLIST_SCU_HPP
22#define PACS_SERVICES_WORKLIST_SCU_HPP
368 explicit worklist_scu(std::shared_ptr<di::ILogger> logger =
nullptr);
377 std::shared_ptr<di::ILogger> logger =
nullptr);
436 std::string_view station_ae,
437 std::string_view modality =
"");
453 std::string_view start_date,
454 std::string_view end_date,
455 std::string_view modality =
"");
468 std::string_view patient_id);
503 uint16_t message_id);
553 const core::dicom_dataset& ds) const;
570 network::association& assoc,
571 const core::dicom_dataset& query_keys,
572 uint16_t message_id);
DICOM Association management per PS3.8.
void reset_statistics() noexcept
Reset statistics counters to zero.
worklist_scu(std::shared_ptr< di::ILogger > logger=nullptr)
Construct a Worklist SCU with default configuration.
std::atomic< size_t > total_items_
Statistics: total number of items received.
network::Result< worklist_result > query_impl(network::association &assoc, const core::dicom_dataset &query_keys, uint16_t message_id)
Internal query implementation.
std::atomic< uint16_t > message_id_counter_
Message ID counter.
size_t queries_performed() const noexcept
Get the number of queries performed since construction.
std::shared_ptr< di::ILogger > logger_
Logger instance for service logging.
worklist_scu & operator=(const worklist_scu &)=delete
network::Result< worklist_result > query_patient(network::association &assoc, std::string_view patient_id)
Query worklist by patient ID.
network::Result< std::monostate > cancel(network::association &assoc, uint16_t message_id)
Send a C-CANCEL request to stop an ongoing query.
uint16_t next_message_id() noexcept
Get the next message ID for DIMSE operations.
const worklist_scu_config & config() const noexcept
Get the current configuration.
network::Result< worklist_result > query(network::association &assoc, const worklist_query_keys &keys)
Perform a MWL C-FIND query with typed keys.
static std::string get_today_date()
Get today's date in DICOM format (YYYYMMDD)
std::atomic< size_t > queries_performed_
Statistics: number of queries performed.
core::dicom_dataset build_query_dataset(const worklist_query_keys &keys) const
Build query dataset from typed keys.
worklist_scu & operator=(worklist_scu &&)=delete
worklist_scu_config config_
Configuration.
worklist_scu(const worklist_scu &)=delete
void set_config(const worklist_scu_config &config)
Update the SCU configuration.
size_t total_items() const noexcept
Get the total number of items received since construction.
worklist_item parse_worklist_item(const core::dicom_dataset &ds) const
Parse a worklist item from a response dataset.
network::Result< size_t > query_streaming(network::association &assoc, const worklist_query_keys &keys, worklist_streaming_callback callback)
Perform a streaming MWL query for large worklists.
network::Result< worklist_result > query_date_range(network::association &assoc, std::string_view start_date, std::string_view end_date, std::string_view modality="")
Query worklist by date range.
network::Result< worklist_result > query_today(network::association &assoc, std::string_view station_ae, std::string_view modality="")
Query today's worklist for a station.
worklist_scu(worklist_scu &&)=delete
DICOM Dataset - ordered collection of Data Elements.
Logger interface for dependency injection.
std::function< bool(const worklist_item &)> worklist_streaming_callback
Callback type for streaming worklist query results.
Parsed worklist item from MWL query response.
std::string institution
Institution Name (0008,0080)
std::string patient_id
Patient ID (0010,0020)
std::string scheduled_date
Scheduled Procedure Step Start Date (0040,0002)
std::string scheduled_procedure_step_id
Scheduled Procedure Step ID (0040,0009)
std::string study_instance_uid
Study Instance UID (0020,000D) - Pre-assigned Study UID.
std::string requested_procedure_description
Requested Procedure Description (0032,1060)
std::string scheduled_station_ae
Scheduled Station AE Title (0040,0001)
std::string patient_name
Patient's Name (0010,0010)
std::string requested_procedure_id
Requested Procedure ID (0040,1001)
std::string patient_birth_date
Patient's Birth Date (0010,0030)
std::string scheduled_procedure_step_description
Scheduled Procedure Step Description (0040,0007)
std::string referring_physician
Referring Physician's Name (0008,0090)
std::string modality
Modality (0008,0060)
std::string patient_sex
Patient's Sex (0010,0040)
std::string scheduled_time
Scheduled Procedure Step Start Time (0040,0003)
std::string accession_number
Accession Number (0008,0050)
core::dicom_dataset dataset
Original dataset for full access to all attributes.
Typed query keys for Modality Worklist queries.
std::string scheduled_station_ae
Scheduled Station AE Title (0040,0001)
std::string institution
Institution Name (0008,0080)
std::string scheduled_date
Scheduled Procedure Step Start Date (0040,0002) - YYYYMMDD or range.
std::string modality
Modality (0008,0060) - e.g., CT, MR, US, XR.
std::string requested_procedure_id
Requested Procedure ID (0040,1001)
std::string patient_sex
Patient's Sex (0010,0040) - M, F, O.
std::string scheduled_physician
Scheduled Performing Physician's Name (0040,0006)
std::string referring_physician
Referring Physician's Name (0008,0090)
std::string accession_number
Accession Number (0008,0050)
std::string requested_procedure_description
Requested Procedure Description (0032,1060)
std::string patient_name
Patient's Name (0010,0010) - supports wildcards (* ?)
std::string patient_id
Patient ID (0010,0020)
std::string scheduled_procedure_step_id
Scheduled Procedure Step ID (0040,0009)
std::string patient_birth_date
Patient's Birth Date (0010,0030)
std::string scheduled_time
Scheduled Procedure Step Start Time (0040,0003) - HHMMSS or range.
Result of a Modality Worklist query operation.
std::vector< worklist_item > items
Parsed worklist items from the query.
bool is_success() const noexcept
Check if the query was successful.
std::chrono::milliseconds elapsed
Query execution time.
size_t total_pending
Total pending responses received (may differ from items.size() if max_results was enforced)
bool is_cancelled() const noexcept
Check if the query was cancelled.
uint16_t status
Final DIMSE status code (0x0000 = success)
Configuration for Worklist SCU service.
std::chrono::milliseconds timeout
Timeout for receiving query responses (milliseconds)
size_t max_results
Maximum number of results to return (0 = unlimited)
bool cancel_on_max
Send C-CANCEL when max_results is reached.