(self, queryset, indicator_prefix, range_name, legacy_prefix=None)
Given a QuerySet containing data for case based indicators generate the 'total'
        indicators before adding them to the data set.

        QuerySet expected to contain the following columns:
        *  case_owner:  ID of the case owner - User or Group.
        *  count:       The value of the indicator for the owner and the case type.
Given a QuerySet containing data for case based indicators generate the 'total'
        indicators before adding them to the data set.
Given a QuerySet containing data for case based indicators generate the total indicators before adding them to the data set .
def _add_case_data_total(self, queryset, indicator_prefix, range_name, legacy_prefix=None):
        """
        Given a QuerySet containing data for case based indicators generate the 'total'
        indicators before adding them to the data set.

        QuerySet expected to contain the following columns:
        *  case_owner:  ID of the case owner - User or Group.
        *  count:       The value of the indicator for the owner and the case type.
        """
        total_data = defaultdict(lambda: 0)
        for result in queryset:
            owner = result['owner_id']
            count = result['count']
            self._update_dataset(total_data, owner, count)

        formatted_name = '{}_{}'.format(indicator_prefix, range_name)
        legacy_name = '{}{}'.format(legacy_prefix, range_name.title()) if legacy_prefix else None
        self._reformat_and_add(total_data, formatted_name, legacy_name=legacy_name)
def _add_case_data_total ( self , queryset , indicator_prefix , range_name , legacy_prefix = None ) : total_data = defaultdict ( lambda : 0 ) for result in queryset : owner = result [ 'owner_id' ] count = result [ 'count' ] self . _update_dataset ( total_data , owner , count ) formatted_name = '{}_{}' . format ( indicator_prefix , range_name ) legacy_name = '{}{}' . format ( legacy_prefix , range_name . title ( ) ) if legacy_prefix else None self . _reformat_and_add ( total_data , formatted_name , legacy_name = legacy_name )