7#include <nlohmann/json.hpp>
34 explicit DataManager(std::filesystem::path data_path,
43 std::vector<PopulationItem>
45 std::function<
bool(
unsigned int)> time_filter)
const override;
49 std::vector<MortalityItem>
51 std::function<
bool(
unsigned int)> time_filter)
const override;
59 std::optional<RelativeRiskEntity>
63 std::optional<RelativeRiskEntity>
70 const Country &country)
const override;
76 std::vector<BirthItem>
78 std::function<
bool(
unsigned int)> time_filter)
const override;
88 const nlohmann::json &pif_config)
const;
92 const std::filesystem::path &
get_root_path() const noexcept {
return root_; }
95 std::filesystem::path root_;
97 nlohmann::json index_;
99 std::map<int, std::map<Gender, double>>
100 load_cost_of_diseases(
const Country &country,
const nlohmann::json &node,
101 const std::filesystem::path &parent_path)
const;
103 std::vector<LifeExpectancyItem> load_life_expectancy(
const Country &country)
const;
105 static std::string replace_string_tokens(
const std::string &source,
106 const std::vector<std::string> &tokens);
108 static std::map<std::string, std::size_t>
109 create_fields_index_mapping(
const std::vector<std::string> &column_names,
110 const std::vector<std::string> &fields);
112 void notify_warning(std::string_view message)
const;
117 PIFTable load_pif_from_csv(
const std::filesystem::path &filepath)
const;
123 std::filesystem::path construct_pif_path(
const std::string &disease_code,
124 const nlohmann::json &pif_config)
const;
129 std::string expand_environment_variables(
const std::string &path)
const;
Defines the Health-GPS back-end data store interface for all implementations.
Definition datastore.h:14
Top-level namespace for Health-GPS Core C++ API.
Definition analysis.h:7
VerboseMode
Verbosity mode enumeration.
Definition forward_type.h:9
Gender
Enumerates gender types.
Definition forward_type.h:18
@ info
General notification and progress message.
Cancer disease parameters per country data structure.
Definition disease.h:86
Country ISO-3166 definition data structure.
Definition country.h:7
Burden of Diseases (BoD) analysis for a country data structure.
Definition analysis.h:25
Disease full definition data structure.
Definition disease.h:54
Disease information structure.
Definition disease.h:14
Entity unique identifier data type.
Definition identifier.h:20