def __init__(self, config=None, loc_level='state', show_test=False):
     super(AggCCSRecordMonthlyDataSource, self).__init__(config)
     self.loc_key = '%s_id' % loc_level
     self.excluded_states = get_test_state_locations_id(self.domain)
     self.config['excluded_states'] = self.excluded_states
     clean_IN_filter_value(self.config, 'excluded_states')
     self.show_test = show_test
Ejemplo n.º 2
0
 def __init__(self, config=None, loc_level='state', show_test=False):
     super(AggCCSRecordMonthlyDataSource, self).__init__(config)
     self.loc_key = '%s_id' % loc_level
     self.excluded_states = get_test_state_locations_id(self.domain)
     self.config['excluded_states'] = self.excluded_states
     clean_IN_filter_value(self.config, 'excluded_states')
     self.show_test = show_test
Ejemplo n.º 3
0
 def __init__(self, config=None, loc_level=1, show_test=False, beta=False):
     self.config = config
     self.loc_level = loc_level
     self.excluded_states = get_test_state_locations_id(self.domain)
     self.config['excluded_states'] = self.excluded_states
     clean_IN_filter_value(self.config, 'excluded_states')
     self.show_test = show_test
     self.beta = beta
Ejemplo n.º 4
0
 def __init__(self, config=None, loc_level=1, show_test=False, beta=False):
     self.config = config
     self.loc_level = loc_level
     self.excluded_states = get_test_state_locations_id(self.domain)
     self.config['excluded_states'] = self.excluded_states
     clean_IN_filter_value(self.config, 'excluded_states')
     self.show_test = show_test
     self.beta = beta
Ejemplo n.º 5
0
 def __init__(self, config=None, loc_level='state', show_test=False, beta=False):
     super(AggChildHealthMonthlyDataSource, self).__init__(config)
     self.excluded_states = get_test_state_locations_id(self.domain)
     self.loc_key = '%s_id' % loc_level
     self.beta = beta
     self.config.update({
         'age_0': '0',
         'age_6': '6',
         'age_12': '12',
         'age_24': '24',
         'age_36': '36',
         'age_48': '48',
         'age_60': '60',
         'age_72': '72',
         'excluded_states': self.excluded_states
     })
     clean_IN_filter_value(self.config, 'excluded_states')
     self.show_test = show_test
 def __init__(self, config=None, loc_level='state', show_test=False, beta=False):
     super(AggChildHealthMonthlyDataSource, self).__init__(config)
     self.excluded_states = get_test_state_locations_id(self.domain)
     self.loc_key = '%s_id' % loc_level
     self.beta = beta
     self.config.update({
         'age_0': '0',
         'age_6': '6',
         'age_12': '12',
         'age_24': '24',
         'age_36': '36',
         'age_48': '48',
         'age_60': '60',
         'age_72': '72',
         'excluded_states': self.excluded_states
     })
     clean_IN_filter_value(self.config, 'excluded_states')
     self.show_test = show_test
Ejemplo n.º 7
0
 def __init__(self, config, data_source=None, show_test=False, beta=False):
     super(NationalAggregationDataSource, self).__init__(config)
     excluded_states = get_test_state_locations_id(self.config['domain'])
     self.config.update({
         'aggregation_level': 1,
         'age_0': '0',
         'age_6': '6',
         'age_12': '12',
         'age_24': '24',
         'age_36': '36',
         'age_48': '48',
         'age_60': '60',
         'age_72': '72',
         'excluded_states': excluded_states
     })
     clean_IN_filter_value(self.config, 'excluded_states')
     self.data_source = data_source
     self.excluded_states = excluded_states
     self.beta = beta
     self.show_test = show_test
Ejemplo n.º 8
0
 def __init__(self, config, data_source=None, show_test=False, beta=False):
     super(NationalAggregationDataSource, self).__init__(config)
     excluded_states = get_test_state_locations_id(self.config['domain'])
     self.config.update({
         'aggregation_level': 1,
         'age_0': '0',
         'age_6': '6',
         'age_12': '12',
         'age_24': '24',
         'age_36': '36',
         'age_48': '48',
         'age_60': '60',
         'age_72': '72',
         'excluded_states': excluded_states
     })
     clean_IN_filter_value(self.config, 'excluded_states')
     self.data_source = data_source
     self.excluded_states = excluded_states
     self.beta = beta
     self.show_test = show_test
Ejemplo n.º 9
0
def apply_exclude(domain, queryset):
    return queryset.exclude(state_id__in=get_test_state_locations_id(domain))
Ejemplo n.º 10
0
def apply_exclude(domain, queryset):
    return queryset.exclude(
        Q(state_id__in=get_test_state_locations_id(domain))
        | Q(district_id__in=get_test_district_locations_id(domain)))
Ejemplo n.º 11
0
def apply_exclude(domain, queryset):
    return queryset.exclude(
        Q(state_id__in=get_test_state_locations_id(domain)) |
        Q(district_id__in=get_test_district_locations_id(domain))
    )