PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
key_image_record.h
Go to the documentation of this file.
1// BSD 3-Clause License
2// Copyright (c) 2021-2025, 🍀☀🌕🌥 🌊
3// See the LICENSE file in the project root for full license information.
4
21#pragma once
22
23#include <chrono>
24#include <optional>
25#include <string>
26
27namespace kcenon::pacs::storage {
28
40 int64_t pk{0};
41
43 std::string key_image_id;
44
46 std::string study_uid;
47
49 std::string sop_instance_uid;
50
52 std::optional<int> frame_number;
53
55 std::string user_id;
56
58 std::string reason;
59
61 std::string document_title;
62
64 std::chrono::system_clock::time_point created_at;
65
71 [[nodiscard]] auto is_valid() const noexcept -> bool {
72 return !key_image_id.empty() && !study_uid.empty() &&
73 !sop_instance_uid.empty();
74 }
75};
76
92 std::optional<std::string> study_uid;
93
95 std::optional<std::string> sop_instance_uid;
96
98 std::optional<std::string> user_id;
99
101 size_t limit{0};
102
104 size_t offset{0};
105
111 [[nodiscard]] auto has_criteria() const noexcept -> bool {
112 return study_uid.has_value() || sop_instance_uid.has_value() ||
113 user_id.has_value();
114 }
115};
116
117} // namespace kcenon::pacs::storage
auto has_criteria() const noexcept -> bool
Check if any filter criteria is set.
size_t limit
Maximum number of results to return (0 = unlimited)
std::optional< std::string > sop_instance_uid
SOP Instance UID filter.
std::optional< std::string > user_id
User ID filter.
size_t offset
Offset for pagination.
std::optional< std::string > study_uid
Study Instance UID filter.
Key image record from the database.
std::chrono::system_clock::time_point created_at
Record creation timestamp.
std::optional< int > frame_number
Frame number for multi-frame images (1-based)
std::string user_id
User who marked the key image.
int64_t pk
Primary key (auto-generated)
std::string study_uid
Study Instance UID - DICOM tag (0020,000D)
std::string sop_instance_uid
SOP Instance UID - DICOM tag (0008,0018)
std::string key_image_id
Unique key image identifier (UUID)
auto is_valid() const noexcept -> bool
Check if this record has valid data.
std::string document_title
Document title for Key Object Selection.
std::string reason
Reason for marking as key image.