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

MPPS record from the database. More...

#include <mpps_record.h>

Collaboration diagram for kcenon::pacs::storage::mpps_record:
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 MPPS is in a final state.
 
auto get_status () const -> std::optional< mpps_status >
 Get the status as enum.
 

Public Attributes

int64_t pk {0}
 Primary key (auto-generated)
 
std::string mpps_uid
 SOP Instance UID - unique identifier for this MPPS.
 
std::string status
 Current status of the procedure step.
 
std::string start_datetime
 Start date/time of the procedure (DICOM DT format: YYYYMMDDHHMMSS)
 
std::string end_datetime
 End date/time of the procedure (set when completed/discontinued)
 
std::string station_ae
 Performing station AE Title.
 
std::string station_name
 Performing station name.
 
std::string modality
 Modality type (CT, MR, etc.)
 
std::string study_uid
 Related Study Instance UID.
 
std::string accession_no
 Accession number.
 
std::string scheduled_step_id
 Scheduled Procedure Step ID (from worklist)
 
std::string requested_proc_id
 Requested Procedure ID.
 
std::string performed_series
 Performed series information (JSON serialized)
 
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

MPPS record from the database.

Represents a single Modality Performed Procedure Step record. Maps directly to the mpps table in the database.

MPPS State Machine:

N-CREATE (status = "IN PROGRESS")
┌─────────────────┐
│ IN PROGRESS │
└────────┬────────┘
┌───────────┼───────────┐
│ N-SET │ N-SET │
│ COMPLETED │ DISCONTINUED
▼ ▼ ▼
┌───────────┐ ┌──────────────┐
│ COMPLETED │ │ DISCONTINUED │
└───────────┘ └──────────────┘
Note: COMPLETED and DISCONTINUED are final states
std::string status
Current status of the procedure step.

Definition at line 115 of file mpps_record.h.

Member Function Documentation

◆ get_status()

auto kcenon::pacs::storage::mpps_record::get_status ( ) const -> std::optional<mpps_status>
inlinenodiscard

Get the status as enum.

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

Definition at line 184 of file mpps_record.h.

184 {
186 }
auto parse_mpps_status(std::string_view str) -> std::optional< mpps_status >
Parse string to mpps_status enum.
Definition mpps_record.h:64

References kcenon::pacs::storage::parse_mpps_status(), and status.

Here is the call graph for this function:

◆ is_final()

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

Check if this MPPS is in a final state.

Returns
true if status is COMPLETED or DISCONTINUED
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/mpps_record.h.

Definition at line 175 of file mpps_record.h.

175 {
176 return status == "COMPLETED" || status == "DISCONTINUED";
177 }

References status.

◆ is_valid()

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

Check if this record has valid data.

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

Definition at line 166 of file mpps_record.h.

166 {
167 return !mpps_uid.empty();
168 }
std::string mpps_uid
SOP Instance UID - unique identifier for this MPPS.

References mpps_uid.

Member Data Documentation

◆ accession_no

std::string kcenon::pacs::storage::mpps_record::accession_no

◆ created_at

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

Record creation timestamp.

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

Definition at line 156 of file mpps_record.h.

◆ end_datetime

std::string kcenon::pacs::storage::mpps_record::end_datetime

End date/time of the procedure (set when completed/discontinued)

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

Definition at line 129 of file mpps_record.h.

◆ modality

std::string kcenon::pacs::storage::mpps_record::modality

Modality type (CT, MR, etc.)

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

Definition at line 138 of file mpps_record.h.

◆ mpps_uid

std::string kcenon::pacs::storage::mpps_record::mpps_uid

SOP Instance UID - unique identifier for this MPPS.

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

Definition at line 120 of file mpps_record.h.

Referenced by is_valid().

◆ performed_series

std::string kcenon::pacs::storage::mpps_record::performed_series

Performed series information (JSON serialized)

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

Definition at line 153 of file mpps_record.h.

◆ pk

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

Primary key (auto-generated)

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

Definition at line 117 of file mpps_record.h.

117{0};

◆ requested_proc_id

std::string kcenon::pacs::storage::mpps_record::requested_proc_id

◆ scheduled_step_id

std::string kcenon::pacs::storage::mpps_record::scheduled_step_id

Scheduled Procedure Step ID (from worklist)

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

Definition at line 147 of file mpps_record.h.

◆ start_datetime

std::string kcenon::pacs::storage::mpps_record::start_datetime

Start date/time of the procedure (DICOM DT format: YYYYMMDDHHMMSS)

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

Definition at line 126 of file mpps_record.h.

◆ station_ae

std::string kcenon::pacs::storage::mpps_record::station_ae

Performing station AE Title.

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

Definition at line 132 of file mpps_record.h.

◆ station_name

std::string kcenon::pacs::storage::mpps_record::station_name

Performing station name.

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

Definition at line 135 of file mpps_record.h.

◆ status

std::string kcenon::pacs::storage::mpps_record::status

Current status of the procedure step.

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

Definition at line 123 of file mpps_record.h.

Referenced by get_status(), and is_final().

◆ study_uid

std::string kcenon::pacs::storage::mpps_record::study_uid

Related Study Instance UID.

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

Definition at line 141 of file mpps_record.h.

◆ updated_at

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

Record last update timestamp.

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

Definition at line 159 of file mpps_record.h.


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