From b21a24a542f172402833b1d8f82d2e931fbd127a Mon Sep 17 00:00:00 2001 From: stephen waite Date: Thu, 22 Jun 2023 19:56:46 -0400 Subject: [PATCH] fix: output other insco zip if not 5 or 9 digits and log if isn't (#6600) * fix: output other insco zip if not 5 or 9 digits and log if isn't * fix: output other insco payer zip if not 5 or 9 digits and log if isn't * fix first commit with insuredZip * fix logic payerZip * surround conditions * formatting --- src/Billing/X125010837P.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/Billing/X125010837P.php b/src/Billing/X125010837P.php index ddb8c8fd8..f601efaa7 100644 --- a/src/Billing/X125010837P.php +++ b/src/Billing/X125010837P.php @@ -1200,13 +1200,15 @@ class X125010837P } $out .= "*"; if ( - strlen($claim->insuredZip($ins)) == 5 - || strlen($claim->insuredZip($ins)) == 9 + !( + (strlen($claim->insuredZip($ins)) == 5) + || (strlen($claim->insuredZip($ins) == 9)) + ) ) { - $out .= $claim->insuredZip($ins); - } else { $log .= "*** Other insco insured zip is not 5 or 9 digits.\n"; } + + $out .= $claim->x12Zip($claim->insuredZip($ins)); $out .= "~\n"; // Segment REF (Other Subscriber Secondary Identification) omitted. @@ -1260,13 +1262,15 @@ class X125010837P } $out .= "*"; if ( - (strlen($claim->payerZip($ins)) == 5) - || (strlen($claim->payerZip() == 9)) + !( + (strlen($claim->payerZip($ins)) == 5) + || (strlen($claim->payerZip() == 9)) + ) ) { - $out .= $claim->x12Zip($claim->payerZip($ins)); - } else { $log .= "*** Other payer zip is not 5 or 9 digits.\n"; } + + $out .= $claim->x12Zip($claim->payerZip($ins)); $out .= "~\n"; // Segment DTP*573 (Claim Check or Remittance Date) omitted. -- 2.11.4.GIT