Bug report: insurance saves when simplified_demographics is selected

image

I was assisting with an upgrade today. When the simplified demographics are selected. The system throws an error.

I think the error can be solved by doing this in the new conprehensive_save.php file. Wrap the newInsurance in an if statement.

    if (!$GLOBALS['simplified_demographics']) {
        newInsuranceData(
            $pid,
            "primary",
            filter_input(INPUT_POST, "i1provider"),
            filter_input(INPUT_POST, "i1policy_number"),
            filter_input(INPUT_POST, "i1group_number"),
            filter_input(INPUT_POST, "i1plan_name"),
            filter_input(INPUT_POST, "i1subscriber_lname"),
            filter_input(INPUT_POST, "i1subscriber_mname"),
            filter_input(INPUT_POST, "i1subscriber_fname"),
            filter_input(INPUT_POST, "form_i1subscriber_relationship"),
            filter_input(INPUT_POST, "i1subscriber_ss"),
            $i1dob,
            filter_input(INPUT_POST, "i1subscriber_street"),
            filter_input(INPUT_POST, "i1subscriber_postal_code"),
            filter_input(INPUT_POST, "i1subscriber_city"),
            filter_input(INPUT_POST, "form_i1subscriber_state"),
            filter_input(INPUT_POST, "form_i1subscriber_country"),
            filter_input(INPUT_POST, "i1subscriber_phone"),
            filter_input(INPUT_POST, "i1subscriber_employer"),
            filter_input(INPUT_POST, "i1subscriber_employer_street"),
            filter_input(INPUT_POST, "i1subscriber_employer_city"),
            filter_input(INPUT_POST, "i1subscriber_employer_postal_code"),
            filter_input(INPUT_POST, "form_i1subscriber_employer_state"),
            filter_input(INPUT_POST, "form_i1subscriber_employer_country"),
            filter_input(INPUT_POST, 'i1copay'),
            filter_input(INPUT_POST, 'form_i1subscriber_sex'),
            $i1date,
            filter_input(INPUT_POST, 'i1accept_assignment')
        );
    }

Feedback, please.

hi @juggernautsei, is this v6.0.0, also what triggered the error, was it a save of other demographics info?

Yes, this is v6 and yes it was saving a new patient.

1 Like