Source code for emodpy_tbhiv.reporters.plugin

from dataclasses import dataclass, field
from emodpy.reporters.base import CustomReporter

[docs]@dataclass class Report_TBHIV_ByAge(CustomReporter): name: str = field(default="Report_TBHIV_ByAge") dll_file: str = field(default="libreport_TBHIV_ByAge.dll")
[docs] def configure_report(self, camp, max_age_yrs, min_age_yrs, start_year, stop_year, events=None): if not events: events = [] """ Creates the report and sets up the parameters. Args: max_age_yrs: Maximum age of people to track, in years min_age_yrs: Minimum age of people to track, in years start_year: starting year after which to track stop_year: stoping year after which to not track events: additional events that you want the report to track Returns: Nothing """ if not events: events = [] else: events = [camp.get_recv_trigger(x) for x in events] self._add_report({ "Additional_Events": events, "Max_Age_Yrs": max_age_yrs, "Min_Age_Yrs": min_age_yrs, "Start_Year": start_year, "Stop_Year": stop_year })