Exemplo n.º 1
0
 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))
Exemplo n.º 2
0
 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))
Exemplo n.º 3
0
 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))
Exemplo n.º 4
0
 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))
Exemplo n.º 5
0
 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))
Exemplo n.º 6
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))
Exemplo n.º 7
0
 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))
Exemplo n.º 8
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))
Exemplo n.º 9
0
 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))
Exemplo n.º 10
0
 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))
Exemplo n.º 11
0
 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))
Exemplo n.º 12
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))
Exemplo n.º 13
0
 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))
Exemplo n.º 14
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))
Exemplo n.º 15
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))
Exemplo n.º 16
0
    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))
Exemplo n.º 17
0
 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))
Exemplo n.º 18
0
 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))
Exemplo n.º 19
0
 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))
Exemplo n.º 20
0
 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))
Exemplo n.º 21
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))
Exemplo n.º 22
0
 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))
Exemplo n.º 23
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))
Exemplo n.º 24
0
 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))
Exemplo n.º 25
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))
Exemplo n.º 26
0
 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))
Exemplo n.º 27
0
 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))
Exemplo n.º 28
0
 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))
Exemplo n.º 29
0
 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))
Exemplo n.º 30
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))
Exemplo n.º 31
0
 def setUp(self):
     # TODO: load fixtures to bamboo
     self.bamboo_indicator = BambooIndicator()
     self.period = Period.month_period(2013, 5)
Exemplo n.º 32
0
 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))
Exemplo n.º 33
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))
Exemplo n.º 34
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))
Exemplo n.º 35
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))
Exemplo n.º 36
0
 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))
Exemplo n.º 37
0
 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))
Exemplo n.º 38
0
 def setUp(self):
     # TODO: load fixtures to bamboo
     self.bamboo_indicator = BambooIndicator()
     self.period = Period.month_period(2013, 5)