def adopted_fp(case):
    def ff(f):
        return f.form.get('post_partum_fp', "") == 'yes'
    return get_form(case, form_filter=ff) and getattr(case, 'family_planning_type', "") != 'no_fp_at_delivery'
dataset/ETHPy150Open dimagi/commcare-hq/custom/bihar/calculations/familyplanning.py/adopted_fp/original