@property
    def filters(self):
        filters = None
        if 'enddate' not in self.config:
            self.config['enddate'] = self.config['today']
            self.config['stred'] = self.config['today']

        if 'startdate' in self.config:
            filters = [AND([LTE("date", "enddate"), OR([GTE('closed_on', "startdate"), EQ('closed_on', 'empty')])])]
        else:
            self.config['strsd'] = '0001-01-01'
            filters = [LTE("date", "enddate")]

        for k, v in LOCATION_HIERARCHY.iteritems():
            if v['prop'] in self.config and self.config[v['prop']]:
                filters.append(IN(k, get_INFilter_bindparams(k, self.config[v['prop']])))
        return filters
dataset/ETHPy150Open dimagi/commcare-hq/custom/world_vision/sqldata/__init__.py/BaseSqlData.filters/original