Пример #1
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))
Пример #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))
Пример #3
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))
Пример #4
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))
Пример #5
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))
Пример #6
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))
Пример #7
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))
Пример #8
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))
Пример #9
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))
Пример #10
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))
Пример #11
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))
Пример #12
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))
Пример #13
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))
Пример #14
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))
Пример #15
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))
Пример #16
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))
Пример #17
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))
Пример #18
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))
Пример #19
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))
Пример #20
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))
Пример #21
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))
Пример #22
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))
Пример #23
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))
Пример #24
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))
Пример #25
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))
Пример #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))
Пример #27
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))
Пример #28
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))
Пример #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))
Пример #30
0
 def test_time_period(self):
     start_date = datetime(2013, 05, 01)
     end_date = datetime(2013, 05, 31)
     period = Period(start_date, end_date)
     self.assertEqual(period.start, start_date)
     self.assertEqual(period.end, end_date)
Пример #31
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))
Пример #32
0
 def setUp(self):
     # TODO: load fixtures to bamboo
     self.bamboo_indicator = BambooIndicator()
     self.period = Period.month_period(2013, 5)
Пример #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))
Пример #34
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))
Пример #35
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))
Пример #36
0
 def test_number_of_over_5_deaths(self):
     period = Period(start=date(2013, 1, 1), end=date(2013, 6, 1))
     self._load_json_indicator('number_of_over_5_deaths')
     value = self.bamboo_indicator\
         .get_indicator_value(self.indicator, period)
     self.assertEqual(value, (6, None, None))
Пример #37
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))
Пример #38
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))
Пример #39
0
 def setUp(self):
     self.bamboo_indicator = BambooIndicator()
     self.period = Period(start=date(2013, 5, 1), end=date(2013, 6, 1))
Пример #40
0
 def setUp(self):
     # TODO: load fixtures to bamboo
     self.bamboo_indicator = BambooIndicator()
     self.period = Period.month_period(2013, 5)
Пример #41
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))