Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Implements Health-GPS back-end data store interface using a file-based storage. More...
#include <datamanager.h>
Public Member Functions | |
DataManager ()=delete | |
DataManager (const std::filesystem::path root_directory, VerboseMode verbosity=VerboseMode::none) | |
Initialises a new instance of the hgps::data::DataManager class. More... | |
std::vector< Country > | get_countries () const override |
Gets the full collection of countries in the store. More... | |
std::optional< Country > | get_country (std::string alpha) const override |
Gets a single country by the alpha code. More... | |
std::vector< PopulationItem > | get_population (Country country) const |
std::vector< PopulationItem > | get_population (Country country, const std::function< bool(const unsigned int &)> time_filter) const override |
Gets the population growth trend for a country filtered by time. More... | |
std::vector< MortalityItem > | get_mortality (Country country) const |
std::vector< MortalityItem > | get_mortality (Country country, const std::function< bool(const unsigned int &)> time_filter) const override |
Gets the population mortality trend for a country filtered by time. More... | |
std::vector< DiseaseInfo > | get_diseases () const override |
Gets the collection of diseases information in the store. More... | |
std::optional< DiseaseInfo > | get_disease_info (core::Identifier code) const override |
Gets a single disease information by identifier. More... | |
DiseaseEntity | get_disease (DiseaseInfo code, Country country) const override |
Gets a disease full definition by identifier for a country. More... | |
RelativeRiskEntity | get_relative_risk_to_disease (DiseaseInfo source, DiseaseInfo target) const override |
Gets the relative risk effects for disease to disease interactions. More... | |
RelativeRiskEntity | get_relative_risk_to_risk_factor (DiseaseInfo source, Gender gender, core::Identifier risk_factor_key) const override |
Gets the relative risk effects for risk factor to disease interactions. More... | |
CancerParameterEntity | get_disease_parameter (DiseaseInfo info, Country country) const override |
Gets the parameters required by cancer type diseases for a country. More... | |
DiseaseAnalysisEntity | get_disease_analysis (const Country country) const override |
Gets the Burden of Diseases (BoD) analysis dataset for a country. More... | |
std::vector< BirthItem > | get_birth_indicators (const Country country) const |
std::vector< BirthItem > | get_birth_indicators (const Country country, const std::function< bool(const unsigned int &)> time_filter) const override |
Gets the population birth indicators for a country filtered by time. More... | |
std::vector< LmsDataRow > | get_lms_parameters () const override |
Gets the LMS (lambda-mu-sigma) parameters for childhood growth charts. More... | |
![]() | |
virtual | ~Datastore ()=default |
Destroys a Datastore instance. More... | |
Implements Health-GPS back-end data store interface using a file-based storage.
The storage is based on a folder structure and indexed by a file, index.json
, with a versioned schema defining the storage sub-folders structure, file names, data limits, metadata, and rules for accessing the stored contents.
default value
representing no relative risk effect, the default value
is defined in the index file, and the respective dataset populated at run-time with the default value
when the an associated file does not exists in the store.Data Model
details.
|
delete |
|
explicit |
Initialises a new instance of the hgps::data::DataManager class.
root_directory | The store root folder containing the index.json file. |
verbosity | The terminal logging verbosity mode to use. |
std::invalid_argument | if the given folder does exists or contains the index.json file. |
std::runtime_error | for invalid or unsupported index.json file schema version. |
std::vector< BirthItem > hgps::data::DataManager::get_birth_indicators | ( | const Country | country | ) | const |
|
overridevirtual |
Gets the population birth indicators for a country filtered by time.
country | The target country definition |
time_filter | The time filter predicate, e.g. years range |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets the full collection of countries in the store.
Implements hgps::core::Datastore.
|
overridevirtual |
Gets a single country by the alpha code.
alpha | The country alpha 2 or 3 format code to search |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets a disease full definition by identifier for a country.
info | The target disease information |
country | The target country definition |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets the Burden of Diseases (BoD) analysis dataset for a country.
country | The target country definition |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets a single disease information by identifier.
code | The target disease identifier |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets the parameters required by cancer type diseases for a country.
info | The disease of type cancer information |
country | The target country definition |
std::out_of_range | for unknown disease parameter file type. |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets the collection of diseases information in the store.
Implements hgps::core::Datastore.
|
overridevirtual |
Gets the LMS (lambda-mu-sigma) parameters for childhood growth charts.
Implements hgps::core::Datastore.
std::vector< MortalityItem > hgps::data::DataManager::get_mortality | ( | Country | country | ) | const |
|
overridevirtual |
Gets the population mortality trend for a country filtered by time.
country | The target country definition |
time_filter | The time filter predicate, e.g., years range |
Implements hgps::core::Datastore.
std::vector< PopulationItem > hgps::data::DataManager::get_population | ( | Country | country | ) | const |
|
overridevirtual |
Gets the population growth trend for a country filtered by time.
country | The target country definition |
time_filter | The time filter predicate, e.g., years range |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets the relative risk effects for disease to disease interactions.
source | The source disease information |
target | The target disease information |
Implements hgps::core::Datastore.
|
overridevirtual |
Gets the relative risk effects for risk factor to disease interactions.
source | The disease information |
gender | The gender enumeration |
risk_factor_key | The risk factor identifier |
Implements hgps::core::Datastore.