def total(self, case): yield get_edd(case) - self.window / 2
def has_edd(self, case): return is_pregnant_mother(case) and get_edd(case) and not get_add(case)
def filter(self, case): return is_pregnant_mother(case) and get_edd(case) and couple_interested_in_fp(case)
def sortkey(self, case, context): return get_edd(case) or datetime.datetime.max.date()
def total(self, case): yield get_edd(case)