def total(self, form): if form_passes_filter_date_delivery(form, self.namespaces): passed_all_filters = True for key in self.key_value_dict: value = self.key_value_dict.get(key, "") if form.form.get(key, None) != value: passed_all_filters = False break if (self.comparison == "<" and string_to_numeric(form.form.get("baby_weight", 0.0), float) >= self.weight)\ or (self.comparison == '>=' and string_to_numeric(form.form.get("baby_weight", 0.0), float) < self.weight): passed_all_filters = False if passed_all_filters: yield [get_date_delivery(form), 1]
def total(self, form): if form.xmlns in self.namespaces and self.filter_function(form): passed_all_filters = True for key in self.key_value_dict: value = self.key_value_dict.get(key, "") if form.form.get(key, None) != value: passed_all_filters = False break if (self.comparison == "<" and string_to_numeric(form.form.get("baby_weight", 0.0), float) >= self.weight)\ or (self.comparison == '>=' and string_to_numeric(form.form.get("baby_weight", 0.0), float) < self.weight): passed_all_filters = False if passed_all_filters: yield [self.get_date_function(form), 1]
def total(self, form): if form.xmlns in FOLLOW_UP_FORMS and string_to_numeric( form.form.get("visits", "0")) >= 4: yield [form.received_on.date(), 1]
def total(self, form): if form.xmlns in FOLLOW_UP_FORMS and string_to_numeric(form.form.get("visits", "0")) >= 4: yield [form.received_on.date(), 1]