PACS System 0.1.0
PACS DICOM system library
Loading...
Searching...
No Matches
role.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
14#pragma once
15
16#include <string>
17#include <string_view>
18#include <optional>
19
20namespace kcenon::pacs::security {
21
25enum class Role {
26 Viewer,
30 System
31};
32
36constexpr std::string_view to_string(Role role) {
37 switch (role) {
38 case Role::Viewer: return "Viewer";
39 case Role::Technologist: return "Technologist";
40 case Role::Radiologist: return "Radiologist";
41 case Role::Administrator: return "Administrator";
42 case Role::System: return "System";
43 }
44 return "Unknown";
45}
46
50inline std::optional<Role> parse_role(std::string_view str) {
51 if (str == "Viewer") return Role::Viewer;
52 if (str == "Technologist") return Role::Technologist;
53 if (str == "Radiologist") return Role::Radiologist;
54 if (str == "Administrator") return Role::Administrator;
55 if (str == "System") return Role::System;
56 return std::nullopt;
57}
58
59} // namespace kcenon::pacs::security
Role
User roles in the PACS system.
Definition role.h:25
@ Technologist
Can upload/modify studies, but not delete.
@ Administrator
User management, system config.
@ System
Internal system operations.
@ Radiologist
Full clinical access (includes verification)
@ Viewer
Read-only access to studies.
std::optional< Role > parse_role(std::string_view str)
Parse Role from string.
Definition role.h:50
constexpr auto to_string(anonymization_profile profile) noexcept -> std::string_view
Convert profile enum to string representation.
@ System
System configuration and services.