PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
series_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
17#pragma once
18
19#include <chrono>
20#include <cstdint>
21#include <optional>
22#include <string>
23
24namespace kcenon::pacs::storage {
25
34 int64_t pk{0};
35
37 int64_t study_pk{0};
38
40 std::string series_uid;
41
43 std::string modality;
44
46 std::optional<int> series_number;
47
49 std::string series_description;
50
52 std::string body_part_examined;
53
55 std::string station_name;
56
59
61 std::chrono::system_clock::time_point created_at;
62
64 std::chrono::system_clock::time_point updated_at;
65
71 [[nodiscard]] auto is_valid() const noexcept -> bool {
72 return !series_uid.empty();
73 }
74};
75
92 std::optional<std::string> study_uid;
93
95 std::optional<std::string> series_uid;
96
98 std::optional<std::string> modality;
99
101 std::optional<int> series_number;
102
104 std::optional<std::string> series_description;
105
107 std::optional<std::string> body_part_examined;
108
110 size_t limit{0};
111
113 size_t offset{0};
114
120 [[nodiscard]] auto has_criteria() const noexcept -> bool {
121 return study_uid.has_value() || series_uid.has_value() ||
122 modality.has_value() || series_number.has_value() ||
123 series_description.has_value() || body_part_examined.has_value();
124 }
125};
126
127} // namespace kcenon::pacs::storage
std::optional< std::string > body_part_examined
Body part examined (exact match)
size_t offset
Offset for pagination.
std::optional< std::string > series_description
Series description pattern (supports * wildcard)
size_t limit
Maximum number of results to return (0 = unlimited)
std::optional< std::string > study_uid
Study Instance UID for filtering by study (exact match)
std::optional< std::string > series_uid
Series Instance UID (exact match)
std::optional< int > series_number
Series number filter.
std::optional< std::string > modality
Modality filter (exact match, e.g., "CT", "MR")
auto has_criteria() const noexcept -> bool
Check if any filter criteria is set.
Series record from the database.
auto is_valid() const noexcept -> bool
Check if this record has valid data.
std::string series_description
Series Description - DICOM tag (0008,103E)
std::chrono::system_clock::time_point updated_at
Record last update timestamp.
std::optional< int > series_number
Series Number - DICOM tag (0020,0011)
int64_t study_pk
Foreign key to studies table.
std::string body_part_examined
Body Part Examined - DICOM tag (0018,0015)
std::chrono::system_clock::time_point created_at
Record creation timestamp.
int64_t pk
Primary key (auto-generated)
int num_instances
Number of instances in this series (denormalized)
std::string series_uid
Series Instance UID - DICOM tag (0020,000E)
std::string modality
Modality - DICOM tag (0008,0060)
std::string station_name
Station Name - DICOM tag (0008,1010)