20#ifndef ORES_DQ_SERVICE_CODING_SCHEME_SERVICE_HPP
21#define ORES_DQ_SERVICE_CODING_SCHEME_SERVICE_HPP
26#include "ores.logging/make_logger.hpp"
27#include "ores.database/domain/context.hpp"
28#include "ores.dq/domain/coding_scheme.hpp"
29#include "ores.dq/domain/coding_scheme_authority_type.hpp"
30#include "ores.dq/repository/coding_scheme_repository.hpp"
31#include "ores.dq/repository/coding_scheme_authority_type_repository.hpp"
33namespace ores::dq::service {
44 inline static std::string_view logger_name =
45 "ores.dq.service.coding_scheme_service";
47 [[nodiscard]]
static auto& lg() {
49 static auto instance = make_logger(logger_name);
75 std::vector<domain::coding_scheme>
81 std::vector<domain::coding_scheme>
92 std::optional<domain::coding_scheme>
115 std::vector<domain::coding_scheme>
130 std::optional<domain::coding_scheme_authority_type>
154 std::vector<domain::coding_scheme_authority_type>
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Context for the operations on a postgres database.
Definition context.hpp:30
Defines a coding or identification standard used to identify entities.
Definition coding_scheme.hpp:36
Classifies coding schemes by the type of authority that defines them.
Definition coding_scheme_authority_type.hpp:40
Reads and writes coding_scheme_authority_types to data storage.
Definition coding_scheme_authority_type_repository.hpp:35
Reads and writes coding_schemes to data storage.
Definition coding_scheme_repository.hpp:35
Service for managing coding schemes.
Definition coding_scheme_service.hpp:42
std::vector< domain::coding_scheme_authority_type > get_authority_type_history(const std::string &code)
Gets the version history for a coding scheme authority type.
Definition coding_scheme_service.cpp:130
std::vector< domain::coding_scheme > list_coding_schemes()
Lists all coding schemes.
Definition coding_scheme_service.cpp:35
std::vector< domain::coding_scheme > list_coding_schemes_by_authority_type(const std::string &authority_type)
Lists coding schemes for a specific authority type.
Definition coding_scheme_service.cpp:49
std::uint32_t get_coding_scheme_count()
Gets the total count of active coding schemes.
Definition coding_scheme_service.cpp:56
void save_coding_scheme(const domain::coding_scheme &scheme)
Saves a coding scheme (creates or updates).
Definition coding_scheme_service.cpp:70
std::optional< domain::coding_scheme_authority_type > find_authority_type(const std::string &code)
Finds a coding scheme authority type by its code.
Definition coding_scheme_service.cpp:102
void save_authority_type(const domain::coding_scheme_authority_type &authority_type)
Saves a coding scheme authority type (creates or updates).
Definition coding_scheme_service.cpp:111
void remove_authority_type(const std::string &code)
Removes a coding scheme authority type.
Definition coding_scheme_service.cpp:123
std::optional< domain::coding_scheme > find_coding_scheme(const std::string &code)
Finds a coding scheme by its code.
Definition coding_scheme_service.cpp:61
std::vector< domain::coding_scheme > get_coding_scheme_history(const std::string &code)
Gets the version history for a coding scheme.
Definition coding_scheme_service.cpp:86
std::vector< domain::coding_scheme_authority_type > list_authority_types()
Lists all coding scheme authority types.
Definition coding_scheme_service.cpp:96
void remove_coding_scheme(const std::string &code)
Removes a coding scheme.
Definition coding_scheme_service.cpp:79