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

Worklist item record from the database. More...

#include <worklist_record.h>

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

Public Member Functions

auto is_valid () const noexcept -> bool
 Check if this record has valid data.
 
auto is_scheduled () const noexcept -> bool
 Check if this item is available for MWL query.
 
auto get_status () const -> std::optional< worklist_status >
 Get the status as enum.
 

Public Attributes

int64_t pk {0}
 Primary key (auto-generated)
 
std::string step_id
 Scheduled Procedure Step ID (required)
 
std::string step_status
 Current status of the procedure step.
 
std::string patient_id
 Patient ID (required)
 
std::string patient_name
 Patient's Name in DICOM PN format.
 
std::string birth_date
 Patient's Birth Date (YYYYMMDD format)
 
std::string sex
 Patient's Sex (M, F, O)
 
std::string accession_no
 Accession Number.
 
std::string requested_proc_id
 Requested Procedure ID.
 
std::string study_uid
 Study Instance UID (pre-assigned for the procedure)
 
std::string scheduled_datetime
 Scheduled Procedure Step Start Date/Time (YYYYMMDDHHMMSS format)
 
std::string station_ae
 Scheduled Station AE Title.
 
std::string station_name
 Scheduled Station Name.
 
std::string modality
 Modality (CT, MR, etc.) (required)
 
std::string procedure_desc
 Scheduled Procedure Step Description.
 
std::string protocol_code
 Protocol Code Sequence (JSON serialized)
 
std::string referring_phys
 Referring Physician's Name.
 
std::string referring_phys_id
 Referring Physician ID.
 
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

Worklist item record from the database.

Represents a single Scheduled Procedure Step item for Modality Worklist. Maps directly to the worklist table in the database.

MWL Workflow:

RIS/HIS creates worklist item (status = SCHEDULED)
┌─────────────────┐
│ SCHEDULED │ ◄── MWL C-FIND returns this
└────────┬────────┘
MPPS N-CREATE
┌─────────────────┐
│ STARTED │
└────────┬────────┘
MPPS N-SET (COMPLETED)
┌─────────────────┐
│ COMPLETED │
└─────────────────┘

Definition at line 106 of file worklist_record.h.

Member Function Documentation

◆ get_status()

auto kcenon::pacs::storage::worklist_item::get_status ( ) const -> std::optional<worklist_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/worklist_record.h.

Definition at line 193 of file worklist_record.h.

193 {
195 }
auto parse_worklist_status(std::string_view str) -> std::optional< worklist_status >
Parse string to worklist_status enum.
std::string step_status
Current status of the procedure step.

References kcenon::pacs::storage::parse_worklist_status(), and step_status.

Here is the call graph for this function:

◆ is_scheduled()

auto kcenon::pacs::storage::worklist_item::is_scheduled ( ) const -> bool
inlinenodiscardnoexcept

Check if this item is available for MWL query.

Only SCHEDULED items are returned in MWL C-FIND responses.

Returns
true if status is SCHEDULED
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/worklist_record.h.

Definition at line 184 of file worklist_record.h.

184 {
185 return step_status == "SCHEDULED" || step_status.empty();
186 }

References step_status.

◆ is_valid()

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

Check if this record has valid data.

Returns
true if required fields are not empty
Examples
/home/runner/work/pacs_system/pacs_system/include/kcenon/pacs/storage/worklist_record.h.

Definition at line 172 of file worklist_record.h.

172 {
173 return !step_id.empty() && !patient_id.empty() && !modality.empty() &&
174 !scheduled_datetime.empty();
175 }
std::string patient_id
Patient ID (required)
std::string scheduled_datetime
Scheduled Procedure Step Start Date/Time (YYYYMMDDHHMMSS format)
std::string step_id
Scheduled Procedure Step ID (required)
std::string modality
Modality (CT, MR, etc.) (required)

References modality, patient_id, scheduled_datetime, and step_id.

Member Data Documentation

◆ accession_no

std::string kcenon::pacs::storage::worklist_item::accession_no

◆ birth_date

std::string kcenon::pacs::storage::worklist_item::birth_date

Patient's Birth Date (YYYYMMDD format)

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

Definition at line 123 of file worklist_record.h.

◆ created_at

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

◆ modality

std::string kcenon::pacs::storage::worklist_item::modality

Modality (CT, MR, etc.) (required)

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

Definition at line 147 of file worklist_record.h.

Referenced by is_valid().

◆ patient_id

std::string kcenon::pacs::storage::worklist_item::patient_id

Patient ID (required)

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

Definition at line 117 of file worklist_record.h.

Referenced by is_valid().

◆ patient_name

std::string kcenon::pacs::storage::worklist_item::patient_name

Patient's Name in DICOM PN format.

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

Definition at line 120 of file worklist_record.h.

◆ pk

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

Primary key (auto-generated)

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

Definition at line 108 of file worklist_record.h.

108{0};

◆ procedure_desc

std::string kcenon::pacs::storage::worklist_item::procedure_desc

Scheduled Procedure Step Description.

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

Definition at line 150 of file worklist_record.h.

◆ protocol_code

std::string kcenon::pacs::storage::worklist_item::protocol_code

Protocol Code Sequence (JSON serialized)

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

Definition at line 153 of file worklist_record.h.

◆ referring_phys

std::string kcenon::pacs::storage::worklist_item::referring_phys

◆ referring_phys_id

std::string kcenon::pacs::storage::worklist_item::referring_phys_id

◆ requested_proc_id

std::string kcenon::pacs::storage::worklist_item::requested_proc_id

◆ scheduled_datetime

std::string kcenon::pacs::storage::worklist_item::scheduled_datetime

Scheduled Procedure Step Start Date/Time (YYYYMMDDHHMMSS format)

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

Definition at line 138 of file worklist_record.h.

Referenced by is_valid().

◆ sex

std::string kcenon::pacs::storage::worklist_item::sex

◆ station_ae

std::string kcenon::pacs::storage::worklist_item::station_ae

◆ station_name

std::string kcenon::pacs::storage::worklist_item::station_name

◆ step_id

std::string kcenon::pacs::storage::worklist_item::step_id

Scheduled Procedure Step ID (required)

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

Definition at line 111 of file worklist_record.h.

Referenced by is_valid().

◆ step_status

std::string kcenon::pacs::storage::worklist_item::step_status

Current status of the procedure step.

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

Definition at line 114 of file worklist_record.h.

Referenced by get_status(), and is_scheduled().

◆ study_uid

std::string kcenon::pacs::storage::worklist_item::study_uid

Study Instance UID (pre-assigned for the procedure)

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

Definition at line 135 of file worklist_record.h.

◆ updated_at

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

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