Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
datastore.h
Go to the documentation of this file.
1#pragma once
2
3#include "interval.h"
4#include "poco.h"
5
6#include <optional>
7#include <vector>
8
9namespace hgps::core {
10
14class Datastore {
15 public:
17 virtual ~Datastore() = default;
18
21 virtual std::vector<Country> get_countries() const = 0;
22
26 virtual Country get_country(const std::string &alpha) const = 0;
27
32 virtual std::vector<PopulationItem>
33 get_population(const Country &country, std::function<bool(unsigned int)> time_filter) const = 0;
34
39 virtual std::vector<MortalityItem>
40 get_mortality(const Country &country, std::function<bool(unsigned int)> time_filter) const = 0;
41
44 virtual std::vector<DiseaseInfo> get_diseases() const = 0;
45
49 virtual DiseaseInfo get_disease_info(const Identifier &code) const = 0;
50
55 virtual DiseaseEntity get_disease(const DiseaseInfo &info, const Country &country) const = 0;
56
62 virtual std::optional<RelativeRiskEntity>
63 get_relative_risk_to_disease(const DiseaseInfo &source, const DiseaseInfo &target) const = 0;
64
70 virtual std::optional<RelativeRiskEntity>
72 const Identifier &risk_factor_key) const = 0;
73
79 const Country &country) const = 0;
80
84 virtual DiseaseAnalysisEntity get_disease_analysis(const Country &country) const = 0;
85
90 virtual std::vector<BirthItem>
92 std::function<bool(unsigned int)> time_filter) const = 0;
93
96 virtual std::vector<LmsDataRow> get_lms_parameters() const = 0;
97};
98
99} // namespace hgps::core
Defines the Health-GPS back-end data store interface for all implementations.
Definition datastore.h:14
virtual DiseaseInfo get_disease_info(const Identifier &code) const =0
Gets a single disease information by identifier.
virtual std::vector< MortalityItem > get_mortality(const Country &country, std::function< bool(unsigned int)> time_filter) const =0
Gets the population mortality trend for a country filtered by time.
virtual DiseaseAnalysisEntity get_disease_analysis(const Country &country) const =0
Gets the Burden of Diseases (BoD) analysis dataset for a country.
virtual std::vector< Country > get_countries() const =0
Gets the full collection of countries in the store.
virtual std::vector< LmsDataRow > get_lms_parameters() const =0
Gets the LMS (lambda-mu-sigma) parameters for childhood growth charts.
virtual DiseaseEntity get_disease(const DiseaseInfo &info, const Country &country) const =0
Gets a disease full definition by identifier for a country.
virtual Country get_country(const std::string &alpha) const =0
Gets a single country by the alpha code.
virtual std::optional< RelativeRiskEntity > get_relative_risk_to_disease(const DiseaseInfo &source, const DiseaseInfo &target) const =0
Gets the relative risk effects for disease to disease interactions.
virtual std::vector< PopulationItem > get_population(const Country &country, std::function< bool(unsigned int)> time_filter) const =0
Gets the population growth trend for a country filtered by time.
virtual std::optional< RelativeRiskEntity > get_relative_risk_to_risk_factor(const DiseaseInfo &source, Gender gender, const Identifier &risk_factor_key) const =0
Gets the relative risk effects for risk factor to disease interactions.
virtual ~Datastore()=default
Destroys a Datastore instance.
virtual std::vector< DiseaseInfo > get_diseases() const =0
Gets the collection of diseases information in the store.
virtual std::vector< BirthItem > get_birth_indicators(const Country &country, std::function< bool(unsigned int)> time_filter) const =0
Gets the population birth indicators for a country filtered by time.
virtual CancerParameterEntity get_disease_parameter(const DiseaseInfo &info, const Country &country) const =0
Gets the parameters required by cancer type diseases for a country.
Top-level namespace for Health-GPS Core C++ API.
Definition analysis.h:7
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