How to Send only 1 Loop 1000A in X12

cristina-moran wrote on Tuesday, January 26, 2010:

Hello,

I have been using Emdeon for billing for the past month and I get 1 report for every claim that I send… about 30 reports a day! I tried to create a batch with multiple claims in it, however, Emdeon doesn’t like it due to having multiple “Loop 1000A’s”. So I took a look around the forums and documentation and found the “gen_x12_837.inc.php” file that generates the claims. The is the particular section that I need to display only once in a batch just like the x12senderid and x12receiverid does.

++$edicount;
  $out .= “NM1” .       // Loop 1000A Submitter
    “*41” .
    “*2” .
    “*” . $claim->billingFacilityName() .
    “*” .
    “*” .
    “*” .
    “*” .
    “*46” .
    “*” . $claim->billingFacilityETIN() .
    “~\n”;

So, I referenced the above to the x12senderid section as follows:

  $out .= “ISA” .
    “*00” .
    "*          " .
    “*00” .
    "*          " .
    “*ZZ” .
    “*” . $claim->x12gssenderid() .
    “*ZZ” .
    “*” . $claim->x12gsreceiverid() .
    “*030911” .
    “*1630” .
    “*U” .
    “*00401” .
    “*000000001” .
    “*0” .
    “*P” .
    “*:” .
    “~\n”;

The only difference I saw was the “++$edicount;” line. So, I removed that line but yet it still generates a 1000A Loop for every claim in the batch file.

Can someone help me and point me in the right direction?

sunsetsystems wrote on Tuesday, January 26, 2010:

gen_x12_837.inc.php generates only one claim at a time.  The logic that batches them into multiple claims is in interface/billing/billing_process.php.  That’s what you’d have to change, and doing it will be non-trivial.

This requirement from your clearinghouse seems unusual and unnecessary.

Rod
www.sunsetsystems.com

cristina-moran wrote on Tuesday, January 26, 2010:

Thank you for a fast response.

I am not a programmer, but I do have common sense. So, looking at this file I see a kludge (what exactly is a kludge?) section (thanks for the comments in the file) and I noticed the following:

function append_claim(&$segs) {
  global $bat_content, $bat_sendid, $bat_recvid, $bat_sender, $bat_stcount;
  global $bat_yymmdd, $bat_yyyymmdd, $bat_hhmm, $bat_icn;
  global $GS02, $ISA07, $ISA14, $ISA15, $PER06;

  foreach ($segs as $seg) {
    if (!$seg) continue;
    $elems = explode(’*’, $seg);
    if ($elems == ‘ISA’) {
      if (!$bat_content) {
        $bat_sendid = trim($elems);
        $bat_recvid = trim($elems);
        $bat_sender = $GS02 ? $GS02 : $bat_sendid;
        $bat_content = substr($seg, 0, 51) .
          $ISA07 . substr($seg, 53, 17) .
          “$bat_yymmdd*$bat_hhmm*U*00401*$bat_icn*$ISA14*$ISA15*:~” .
          “GS*HC*$bat_sender*$bat_recvid*$bat_yyyymmdd*$bat_hhmm*1*X*004010X098A1~”;

These lines look to be of relevance:

global $GS02, $ISA07, $ISA14, $ISA15, $PER06;

and

$ISA07 . substr($seg, 53, 17) .
“$bat_yymmdd*$bat_hhmm*U*00401*$bat_icn*$ISA14*$ISA15*:~” .
“GS*HC*$bat_sender*$bat_recvid*$bat_yyyymmdd*$bat_hhmm*1*X*004010X098A1~”;

It looks as though those lines correspond to the “kludge”.

Would adding something like this to the end of the above work or does the x12 have to be in the specified order?

“NM1*41*2*NAME OF PRACTICE*****46*ETIN NUMBER~”;

Then I would just delete the whole NM1 section for the “gen_x12_837.inc.php” file.

sunsetsystems wrote on Tuesday, January 26, 2010:

Might work, you could try it.  By the way the “kludge” has been removed in more recent code, and the logic has changed somewhat.

Rod
www.sunsetsystems.com

cristina-moran wrote on Tuesday, January 26, 2010:

I tried it and the screen just goes blank when I click to generate the X12! :frowning:

Oh well, how much would it cost to get this done for me?

sunsetsystems wrote on Tuesday, January 26, 2010:

I can discuss that with you, but let’s take it offline.  Send me a note: rod at sunsetsystems dot com.

Rod
www.sunsetsystems.com