def __init__(self, report, case_dict):
        case = CommCareCase.get(case_dict["_id"])
        forms = case.get_forms()

        jsy_beneficiary = None
        jsy_money = None
        pnc_on_time_statuses = []

        for form in forms:
            form_dict = form.form
            form_xmlns = form_dict["@xmlns"]

            if NEW in form_xmlns:
                setattr(self, "_caste", get_property(form_dict, "caste"))
            elif DELIVERY in form_xmlns:
                if get_property(form_dict, "where_born") != 'home':
                    setattr(self, "_home_sba_assist", get_property(form_dict, "where_born"))
                else:
                    setattr(self, "_home_sba_assist", get_property(form_dict, "home_sba_assist"))

                setattr(self, "_delivery_nature", get_property(form_dict, "delivery_nature"))
                setattr(self, "_discharge_date", get_property(form_dict, "discharge_date"))
                setattr(self, "_jsy_money_date", get_property(form_dict, "jsy_money_date"))
                setattr(self, "_delivery_complications", get_property(form_dict, "delivery_complications"))
                if 'case' in form_dict and 'update' in form_dict['case']:
                    setattr(self, "_family_planning_type", get_property(form_dict['case']['update'], "family_planning_type"))

                jsy_money = get_property(form_dict, "jsy_money")
                children_count = int(get_property(form_dict, "cast_num_children", 0))

                if children_count == 0:
                    setattr(self, "_num_children", 'still_birth')
                else:
                    setattr(self, "_num_children", children_count)

                child_list = []
                if children_count == 1 and "child_info" in form_dict:
                    child_list.append(form_dict["child_info"])
                elif children_count > 1 and "child_info" in form_dict:
                    child_list = form_dict["child_info"]

                for idx,child in enumerate(child_list):
                    case_child = {}
                    if "case" in child:
                        case_child = CommCareCase.get(child["case"]["@case_id"])
                    setattr(self, "_first_weight_%s" % (idx+1), str(get_property(child, "first_weight")))
                    setattr(self, "_breastfed_hour_%s" % (idx+1), get_property(child, "breastfed_hour"))
                    if case_child:
                        setattr(self, "_case_name_%s" % (idx+1), get_property(case_child, "name"))
                        setattr(self, "_gender_%s" % (idx+1), get_property(case_child, "gender"))
            elif REGISTRATION in form_xmlns:
                jsy_beneficiary = get_property(form_dict, "jsy_beneficiary")
            elif PNC in form_xmlns:

                child_list = []
                if isinstance(form_dict["child_info"], list):
                    child_list.extend(form_dict["child_info"])
                else:
                    child_list.append(form_dict["child_info"])

                for child in child_list:
                    pnc_on_time_status = None
                    if (get_property(child, 'skin_to_skin') == 'yes' or get_property(child, 'wrapped') == 'yes') and get_property(child, 'warm_to_touch') == 'yes':
                        pnc_on_time_status = 'yes'
                    else:
                        pnc_on_time_status = 'no'
                    pnc_on_time_statuses.append(pnc_on_time_status)
            elif BP in form_xmlns:
                if "bp1" in form_dict:
                    bp = form_dict["bp1"]
                    for i in range(1, 5):
                        if "anc%s" % i in bp:
                            anc = bp["anc%s" % i]
                            if "anc%s_blood_pressure" % i in anc:
                                if anc["anc%s_blood_pressure" % i] == 'high_bloodpressure':
                                    anc["anc%s_blood_pressure" % i] = 'high'

                                setattr(self, i % "_blood_pressure_%s", anc["anc%s_blood_pressure" % i])
                            if "anc%s_weight" % i in anc:
                                setattr(self, "_weight_%s" % i, str(anc["anc%s_weight" % i]))
                            if "anc%s_hemoglobin" % i in anc and i == 1:
                                setattr(self, "_hemoglobin", anc["anc%s_hemoglobin" % i])
                    setattr(self, "_anemia", get_property(bp, "anaemia"))

                if "bp2" in form_dict:
                    bp = form_dict["bp2"]
                    setattr(self, "_rti_sti", get_property(bp, "rti_sti"))

                setattr(self, "_complications", get_property(form_dict, "bp_complications"))
            elif MTB_ABORT in form_xmlns:
                setattr(self, "_abortion_type", get_property(form_dict, "abortion_type"))

        if jsy_beneficiary is not None and jsy_beneficiary != EMPTY_FIELD:
            setattr(self, "_jsy_beneficiary", jsy_beneficiary)
        else:
            setattr(self, "_jsy_beneficiary", jsy_money)

        if len(pnc_on_time_statuses) > 0:
            if 'yes' in pnc_on_time_statuses:
                setattr(self, "_all_pnc_on_time", 'yes')
            else:
                setattr(self, "_all_pnc_on_time", 'no')

        super(MCHMotherDisplay, self).__init__(report, case_dict)
dataset/ETHPy150Open dimagi/commcare-hq/custom/bihar/reports/display.py/MCHMotherDisplay.__init__/swapped operands of `%`