64 const
std::map<core::Identifier,
std::map<core::Gender,
std::map<
std::
string,
double>>>
70 const
std::map<core::Identifier,
71 std::map<core::Gender,
std::map<
std::
string,
std::map<
std::
string,
double>>>>
76 virtual const
std::map<core::Identifier,
77 std::map<core::Gender,
std::map<
std::
string,
double>>> &
82 virtual const
std::map<
84 std::map<core::Gender,
std::map<
std::
string,
std::map<
std::
string,
double>>>> &
105 std::unique_ptr<RiskFactorModelDefinition> definition);
122 const
std::map<core::Identifier,
std::map<core::Gender,
std::map<
std::
string,
double>>>
123 ®ion_data) override;
126 const
std::map<core::Identifier,
127 std::map<core::Gender,
std::map<
std::
string,
std::map<
std::
string,
double>>>>
128 ðnicity_data) override;
130 const
std::map<core::Identifier,
std::map<core::Gender,
std::map<
std::
string,
double>>> &
133 const
std::map<core::Identifier,
134 std::map<core::Gender,
std::map<
std::
string,
std::map<
std::
string,
double>>>> &
137 void clear_cache() noexcept;
140 mutable
std::mutex mutex_;
141 std::reference_wrapper<core::Datastore> data_manager_;
143 std::vector<core::DiseaseInfo> diseases_info_;
148 std::map<core::Identifier,
std::map<core::Gender,
std::map<
std::
string,
double>>>
152 std::map<core::Identifier,
153 std::map<core::Gender,
std::map<
std::
string,
std::map<
std::
string,
double>>>>
154 ethnicity_prevalence_;
156 void load_disease_definition(const core::DiseaseInfo &
info, const
ModelInput &config);
Implements the cached data repository for input datasets and back-end storage.
Definition repository.h:92
CachedRepository()=delete
Implements the disease full definition data type.
Definition disease_definition.h:46
LMS (lambda-mu-sigma) model definition data type.
Definition lms_definition.h:26
Define the data repository interface for input datasets and back-end storage.
Definition repository.h:18
virtual void register_region_prevalence(const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, double > > > ®ion_data)=0
Register region prevalence data.
virtual ~Repository()=default
Destroys a Repository instance.
virtual void register_ethnicity_prevalence(const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, std::map< std::string, double > > > > ðnicity_data)=0
Register ethnicity prevalence data.
Repository & operator=(const Repository &)=delete
virtual DiseaseDefinition & get_disease_definition(const core::DiseaseInfo &info, const ModelInput &config)=0
Gets a disease complete definition.
virtual const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, double > > > & get_region_prevalence() const =0
Gets region prevalence data.
virtual std::optional< core::DiseaseInfo > get_disease_info(core::Identifier code)=0
Gets a disease information by identifier.
virtual core::Datastore & manager() noexcept=0
Gets a reference to the back-end storage instance.
virtual const std::vector< core::DiseaseInfo > & get_diseases()=0
Gets the collection of all diseases available in the back-end storage.
virtual const RiskFactorModelDefinition & get_risk_factor_model_definition(const RiskFactorModelType &model_type) const =0
Gets a user-provided risk factor model definition.
Repository(Repository &&)=delete
virtual const std::map< core::Identifier, std::map< core::Gender, std::map< std::string, std::map< std::string, double > > > > & get_ethnicity_prevalence() const =0
Gets ethnicity prevalence data.
Repository()=default
Initialises a new instance of the Repository class.
virtual LmsDefinition & get_lms_definition()=0
Gets the LMS (lambda-mu-sigma) definition.
Repository(const Repository &)=delete
Repository & operator=(Repository &&)=delete
Risk factor model definition interface.
Definition risk_factor_model.h:44
Defines the Health-GPS back-end data store interface for all implementations.
Definition datastore.h:14
Top-level namespace for Health-GPS Console host application.
Definition command_options.cpp:8
@ info
General notification and progress message.
RiskFactorModelType
Health GPS risk factor module types enumeration.
Definition risk_factor_model.h:12
Global namespace.
Definition column_iterator.h:123