def _filter(self, case): # filter by BP forms for cases with # /data/family_planning_group/counsel_accessible = 'no' def _no_counseling(case): for form in get_forms(case, action_filter=lambda a: visit_is(a, 'bp')): if form.xpath('form/bp2/counsel_accessible') == 'no': return True return False return due_next_month(case) and _no_counseling(case)
def _filter(self, case): # filter by BP forms for cases with # /data/bp2/maternal_danger_signs = 'no' and # /data/bp2/danger_institution = 'no' def _no_prep(case): for form in get_forms(case, action_filter=lambda a: visit_is(a, 'bp')): if form.xpath('form/bp2/maternal_danger_signs') == 'no' and \ form.xpath('form/bp2/danger_institution') == 'no': return True return False return due_next_month(case) and _no_prep(case)
def _filter(self, case): # filter by BP forms for cases with # /data/bp2/wrapping = 'no' and # /data/bp2/skin_to_skin = 'no' and # /data/bp2/immediate_breastfeeding = 'no' and # /data/bp2/cord_care = 'no' def _no_prep(case): for form in get_forms(case, action_filter=lambda a: visit_is(a, 'bp')): if form.xpath('form/bp2/wrapping') == 'no' and \ form.xpath('form/bp2/skin_To_skin') == 'no' and \ form.xpath('form/bp2/immediate_breastfeeding') == 'no' and \ form.xpath('form/bp2/cord_care') == 'no': return True return False return due_next_month(case) and _no_prep(case)
def _filter(self, case): return due_next_month(case)
def _filter(self, case): return due_next_month(case) and getattr(case, 'couple_interested', None) == 'no'