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

UPS workitem record from the database. More...

#include <ups_workitem.h>

Collaboration diagram for kcenon::pacs::storage::ups_workitem:
Collaboration graph

Public Member Functions

auto is_valid () const noexcept -> bool
 Check if this record has valid data.
 
auto is_final () const noexcept -> bool
 Check if this workitem is in a final state.
 
auto get_state () const -> std::optional< ups_state >
 Get the state as enum.
 
auto get_priority () const -> std::optional< ups_priority >
 Get the priority as enum.
 

Public Attributes

int64_t pk {0}
 Primary key (auto-generated)
 
std::string workitem_uid
 UPS SOP Instance UID - unique identifier for this workitem.
 
std::string state
 Current state of the workitem.
 
std::string procedure_step_label
 Procedure Step Label (human-readable description)
 
std::string worklist_label
 Worklist Label (for grouping workitems)
 
std::string priority
 Priority (LOW, MEDIUM, HIGH)
 
std::string scheduled_start_datetime
 Scheduled Procedure Step Start DateTime (DICOM DT format)
 
std::string expected_completion_datetime
 Expected Completion DateTime (DICOM DT format)
 
std::string scheduled_station_name
 Scheduled Station Name Code Sequence (JSON serialized)
 
std::string scheduled_station_class
 Scheduled Station Class Code Sequence (JSON serialized)
 
std::string scheduled_station_geographic
 Scheduled Station Geographic Location Code Sequence (JSON serialized)
 
std::string scheduled_human_performers
 Scheduled Human Performers Sequence (JSON serialized)
 
std::string input_information
 Input Information Sequence (JSON serialized references to input data)
 
std::string performing_ae
 Performing AE Title (set when claimed)
 
std::string progress_description
 Procedure Step State (progress description text)
 
int progress_percent {0}
 Procedure Step Progress (0-100 percentage)
 
std::string output_information
 Output Information Sequence (JSON serialized references to output data)
 
std::string transaction_uid
 Transaction UID (set when state changes to IN PROGRESS)
 
std::chrono::system_clock::time_point created_at
 Record creation timestamp.
 
std::chrono::system_clock::time_point updated_at
 Record last update timestamp.
 

Detailed Description

UPS workitem record from the database.

Represents a single Unified Procedure Step workitem record. Maps directly to the ups_workitems table in the database.

UPS State Machine (PS3.4 Table CC.1.1-2):

N-CREATE (state = "SCHEDULED")
┌─────────────────┐
│ SCHEDULED │
└────────┬────────┘
┌───────────┼───────────┐
│ N-ACTION │ N-ACTION │
│ (claim) │ (cancel) │
▼ │ ▼
┌───────────┐ │ ┌──────────┐
│IN PROGRESS│ │ │ CANCELED │
└─────┬─────┘ │ └──────────┘
│ │
┌───┼──────────┘
│ │ N-ACTION
│ │ (cancel)
│ ▼
│ ┌──────────┐
│ │ CANCELED │
│ └──────────┘
│ N-SET (final state)
┌───────────┐
│ COMPLETED │
└───────────┘
Note: COMPLETED and CANCELED are final states
std::string state
Current state of the workitem.

Definition at line 175 of file ups_workitem.h.

Member Function Documentation

◆ get_priority()

auto kcenon::pacs::storage::ups_workitem::get_priority ( ) const -> std::optional<ups_priority>
inlinenodiscard

Get the priority as enum.

Returns
Optional containing the priority enum if valid
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 268 of file ups_workitem.h.

268 {
270 }
auto parse_ups_priority(std::string_view str) -> std::optional< ups_priority >
Parse string to ups_priority enum.
std::string priority
Priority (LOW, MEDIUM, HIGH)

References kcenon::pacs::storage::parse_ups_priority(), and priority.

Here is the call graph for this function:

◆ get_state()

auto kcenon::pacs::storage::ups_workitem::get_state ( ) const -> std::optional<ups_state>
inlinenodiscard

Get the state as enum.

Returns
Optional containing the state enum if valid
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 259 of file ups_workitem.h.

259 {
260 return parse_ups_state(state);
261 }
auto parse_ups_state(std::string_view str) -> std::optional< ups_state >
Parse string to ups_state enum.

References kcenon::pacs::storage::parse_ups_state(), and state.

Here is the call graph for this function:

◆ is_final()

auto kcenon::pacs::storage::ups_workitem::is_final ( ) const -> bool
inlinenodiscardnoexcept

Check if this workitem is in a final state.

Returns
true if state is COMPLETED or CANCELED
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 250 of file ups_workitem.h.

250 {
251 return state == "COMPLETED" || state == "CANCELED";
252 }

References state.

◆ is_valid()

auto kcenon::pacs::storage::ups_workitem::is_valid ( ) const -> bool
inlinenodiscardnoexcept

Check if this record has valid data.

Returns
true if workitem_uid is not empty
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 241 of file ups_workitem.h.

241 {
242 return !workitem_uid.empty();
243 }
std::string workitem_uid
UPS SOP Instance UID - unique identifier for this workitem.

References workitem_uid.

Member Data Documentation

◆ created_at

std::chrono::system_clock::time_point kcenon::pacs::storage::ups_workitem::created_at

Record creation timestamp.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 231 of file ups_workitem.h.

◆ expected_completion_datetime

std::string kcenon::pacs::storage::ups_workitem::expected_completion_datetime

Expected Completion DateTime (DICOM DT format)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 198 of file ups_workitem.h.

◆ input_information

std::string kcenon::pacs::storage::ups_workitem::input_information

Input Information Sequence (JSON serialized references to input data)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 213 of file ups_workitem.h.

◆ output_information

std::string kcenon::pacs::storage::ups_workitem::output_information

Output Information Sequence (JSON serialized references to output data)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 225 of file ups_workitem.h.

◆ performing_ae

std::string kcenon::pacs::storage::ups_workitem::performing_ae

Performing AE Title (set when claimed)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 216 of file ups_workitem.h.

◆ pk

int64_t kcenon::pacs::storage::ups_workitem::pk {0}

Primary key (auto-generated)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 177 of file ups_workitem.h.

177{0};

◆ priority

std::string kcenon::pacs::storage::ups_workitem::priority

◆ procedure_step_label

std::string kcenon::pacs::storage::ups_workitem::procedure_step_label

Procedure Step Label (human-readable description)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 186 of file ups_workitem.h.

Referenced by kcenon::pacs::services::ups_push_scp::handle_n_create().

◆ progress_description

std::string kcenon::pacs::storage::ups_workitem::progress_description

Procedure Step State (progress description text)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 219 of file ups_workitem.h.

◆ progress_percent

int kcenon::pacs::storage::ups_workitem::progress_percent {0}

Procedure Step Progress (0-100 percentage)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 222 of file ups_workitem.h.

222{0};

◆ scheduled_human_performers

std::string kcenon::pacs::storage::ups_workitem::scheduled_human_performers

Scheduled Human Performers Sequence (JSON serialized)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 210 of file ups_workitem.h.

◆ scheduled_start_datetime

std::string kcenon::pacs::storage::ups_workitem::scheduled_start_datetime

Scheduled Procedure Step Start DateTime (DICOM DT format)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 195 of file ups_workitem.h.

◆ scheduled_station_class

std::string kcenon::pacs::storage::ups_workitem::scheduled_station_class

Scheduled Station Class Code Sequence (JSON serialized)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 204 of file ups_workitem.h.

◆ scheduled_station_geographic

std::string kcenon::pacs::storage::ups_workitem::scheduled_station_geographic

Scheduled Station Geographic Location Code Sequence (JSON serialized)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 207 of file ups_workitem.h.

◆ scheduled_station_name

std::string kcenon::pacs::storage::ups_workitem::scheduled_station_name

Scheduled Station Name Code Sequence (JSON serialized)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 201 of file ups_workitem.h.

◆ state

std::string kcenon::pacs::storage::ups_workitem::state

◆ transaction_uid

std::string kcenon::pacs::storage::ups_workitem::transaction_uid

Transaction UID (set when state changes to IN PROGRESS)

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 228 of file ups_workitem.h.

◆ updated_at

std::chrono::system_clock::time_point kcenon::pacs::storage::ups_workitem::updated_at

Record last update timestamp.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 234 of file ups_workitem.h.

◆ workitem_uid

std::string kcenon::pacs::storage::ups_workitem::workitem_uid

UPS SOP Instance UID - unique identifier for this workitem.

Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/ups_workitem.h.

Definition at line 180 of file ups_workitem.h.

Referenced by kcenon::pacs::services::ups_push_scp::handle_n_create(), and is_valid().

◆ worklist_label

std::string kcenon::pacs::storage::ups_workitem::worklist_label

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