diff --git a/interface/billing/billing_report.php b/interface/billing/billing_report.php index d4a3e5fad46..bf436ae56ef 100644 --- a/interface/billing/billing_report.php +++ b/interface/billing/billing_report.php @@ -1117,12 +1117,16 @@ function criteriaSelectHasValue(select) { $last_level_closed = sqlQuery("SELECT `last_level_closed` FROM `form_encounter` WHERE `encounter` = ?", array($iter['enc_encounter']))['last_level_closed']; $effective_insurances = getEffectiveInsurances($iter['pid'], $iter['enc_date']); + $insuranceCount = count($effective_insurances ?? []); foreach ($effective_insurances as $key => $row) { $insuranceName = sqlQuery("SELECT `name` FROM `insurance_companies` WHERE `id` = ?", array($row['provider']))['name']; $x12Partner = sqlQuery("SELECT `x12_default_partner_id` FROM `insurance_companies` WHERE `id` = ?", array($row['provider']))['x12_default_partner_id']; $lhtml .= "