def test_proportion_of_newborns_receiving_on_time_visits_7days(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_newborns_receiving_1st_chw_' 'checkup_within_7_days_of_birth') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (50.74, 69, 136))
def test_proportion_of_newborns_receiving_on_time_visits_7days(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_newborns_receiving_1st_chw_' 'checkup_within_7_days_of_birth') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (50.74, 69, 136))
def test_proportion_of_households_receiving_on_time_visits_last_30(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_households_receiving_on_' 'time_routine_visits_last_30_days') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (41.67, 4458, 10699))
def test_proportion_of_u5_with_uncmpl_fever_received_rdt_positive(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_uncomplecated_' 'fever_received_rdt_positive') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (28.1, 43, 153))
def test_proportion_of_over5_with_negative_rdt_receiving_adt(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_over5_with_negative_rdt_' 'received_adt') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (-25.0, -1.0, 4.0))
def test_proportion_of_pregnant_routine_checkup_6weeks(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_pregnant_routine_checkup_' '6weeks') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (69.95, 554, 792))
def test_proportion_of_pregnant_reporting_anc_4months(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_pregnant_reporting_anc' '_4months') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (2.93, 10, 341))
def test_proportion_of_neonates_receiving_on_time_visits_7days(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_neonates_receiving' '_on_time_routine_visit_within_7days') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (63.97, 87, 136))
def test_proportion_of_under5_with_uncomplecated_fever_no_rdt(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_uncomplecated_' 'fever_no_rdt') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 153))
def test_proportion_of_under5_with_positive_rdt_received_adt(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_positive_rdt_' 'received_adt') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (93.02, 40, 43))
def test_proportion_of_u5_with_uncmpl_fever_received_rdt_positive(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_uncomplecated_' 'fever_received_rdt_positive') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (28.1, 43, 153))
def test_proportion_of_birth_health_facility(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_births_delivered_in_' 'health_facility') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 115))
def test_proportion_of_pregnant_reporting_anc_4months(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_pregnant_reporting_anc' '_4months') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (2.93, 10, 341))
def test_proportion_of_pregnant_routine_checkup_6weeks(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_pregnant_routine_checkup_' '6weeks') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (69.95, 554, 792))
def test_proportion_of_under5_with_uncomplicated_diarrhea_got_zinc(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_uncomplicated' '_diarrhea_received_zinc') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (91.06, 163, 179))
def test_proportion_of_under5_with_complicated_fever_referred(self): self.period = Period.month_period(2013, 2) self._load_json_indicator('proportion_of_under5_with_complicated_' 'fever_referred') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (84.17, 218, 259))
def test_proportion_of_pregnant_receiving_on_time_visits_last_30(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_pregnant_receiving_on_' 'time_routine_visits_last_30_days') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (60.61, 437, 721))
def test_proportion_of_under5_with_uncomplecated_fever_no_rdt(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_uncomplecated_' 'fever_no_rdt') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 153))
def test_proportion_of_pregnant_receiving_on_time_visits_last_30(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_pregnant_receiving_on_' 'time_routine_visits_last_30_days') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (60.61, 437, 721))
def test_proportion_of_over5_with_negative_rdt_receiving_adt(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_over5_with_negative_rdt_' 'received_adt') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (-25.0, -1.0, 4.0))
def test_proportion_of_neonates_receiving_on_time_visits_7days(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_neonates_receiving' '_on_time_routine_visit_within_7days') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (63.97, 87, 136))
def test_proportion_of_under5_receiving_ontime_muac_reading(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_receiving' '_ontime_muac_reading') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 0))
def test_proportion_of_under5_with_uncomplicated_diarrhea_got_zinc(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_uncomplicated' '_diarrhea_received_zinc') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (91.06, 163, 179))
def test_proportion_of_under5_receiving_ontime_muac_reading(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_receiving' '_ontime_muac_reading') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 0))
def test_proportion_of_birth_health_facility(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_births_delivered_in_' 'health_facility') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 115))
def test_proportion_of_under5_with_complicated_fever_referred(self): self.period = Period.month_period(2013, 2) self._load_json_indicator('proportion_of_under5_with_complicated_' 'fever_referred') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (84.17, 218, 259))
def test_proportion_of_under5_with_positive_rdt_received_adt(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_under5_with_positive_rdt_' 'received_adt') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (93.02, 40, 43))
def test_proportion_of_households_receiving_on_time_visits_last_30(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_households_receiving_on_' 'time_routine_visits_last_30_days') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (41.67, 4458, 10699))
def test_x_days_before_end_of_period(self): period = Period.month_period(2013, 02) ninety_days_ago_b4_eop = period.ninety_days_before_end_of_period self.assertEqual(ninety_days_ago_b4_eop, datetime(2012, 11, 30, 23, 59, 59, 999999)) thirty_days_ago_b4_eop = period.thirty_days_before_end_of_period self.assertEqual(thirty_days_ago_b4_eop, datetime(2013, 01, 29, 23, 59, 59, 999999))
def test_number_of_maternal_deaths(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('number_of_maternal_deaths') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (1, None, None))
def setUp(self): # TODO: load fixtures to bamboo self.bamboo_indicator = BambooIndicator() self.period = Period.month_period(2013, 5)
def test_proportion_of_low_birth_weight_babies(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_low_birth_weight_babies') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 11))
def test_proportion_of_women_using_modern_fp(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_women_using_modern_fp') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (100.0, 1.0, 1.0))
def test_proportion_of_women_using_modern_fp(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_women_using_modern_fp') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (100.0, 1.0, 1.0))
def test_number_of_maternal_deaths(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('number_of_maternal_deaths') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (1, None, None))
def test_proportion_of_low_birth_weight_babies(self): self.period = Period.month_period(2013, 3) self._load_json_indicator('proportion_of_low_birth_weight_babies') value = self.bamboo_indicator\ .get_indicator_value(self.indicator, self.period) self.assertEqual(value, (0.0, 0, 11))
def test_month_period(self): period = Period.month_period(2013, 05) self.assertEqual(period.start, datetime(2013, 05, 1)) self.assertEqual( period.end, datetime(2013, 05, 31, 23, 59, 59, 999999))
def setUp(self): # TODO: load fixtures to bamboo self.bamboo_indicator = BambooIndicator() self.period = Period.month_period(2013, 5)