From 8493cde7631e90115c229b4432741fd99dd3df6f Mon Sep 17 00:00:00 2001 From: stephen waite Date: Thu, 10 Oct 2024 13:25:04 -0400 Subject: [PATCH] fix: x12837 billing 5 or 9 digit zip check (#7760) --- src/Billing/Claim.php | 2 +- src/Billing/X125010837P.php | 4 ++-- src/Services/FormService.php | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Billing/Claim.php b/src/Billing/Claim.php index 61741321f35..a2cfeff2e6d 100644 --- a/src/Billing/Claim.php +++ b/src/Billing/Claim.php @@ -1677,7 +1677,7 @@ public function referrerFirstName() public function referrerMiddleName() { - return $this->x12Clean(trim($this->referrer['mname'])); + return $this->x12Clean(trim($this->referrer['mname'] ?? '')); } public function referrerNPI() diff --git a/src/Billing/X125010837P.php b/src/Billing/X125010837P.php index e36ec5983f1..70726296671 100644 --- a/src/Billing/X125010837P.php +++ b/src/Billing/X125010837P.php @@ -1223,7 +1223,7 @@ public static function genX12837P( if ( !( (strlen($claim->insuredZip($ins)) == 5) - || (strlen($claim->insuredZip($ins) == 9)) + || (strlen($claim->insuredZip($ins)) == 9) ) ) { $log .= "*** Other insco insured zip is not 5 or 9 digits.\n"; @@ -1285,7 +1285,7 @@ public static function genX12837P( if ( !( (strlen($claim->payerZip($ins)) == 5) - || (strlen($claim->payerZip() == 9)) + || (strlen($claim->payerZip($ins)) == 9) ) ) { $log .= "*** Other payer zip is not 5 or 9 digits.\n"; diff --git a/src/Services/FormService.php b/src/Services/FormService.php index 6ff66c3720a..c18eebb8a39 100644 --- a/src/Services/FormService.php +++ b/src/Services/FormService.php @@ -48,6 +48,7 @@ public function getFormByEncounter( $res = sqlStatement($sql, $arraySqlBind); + $all = []; for ($iter = 0; $row = sqlFetchArray($res); $iter++) { $all[$iter] = $row; }