Skip to content

Commit

Permalink
Mods for X12 to add isa01-04 / User Login and Password for some clear…
Browse files Browse the repository at this point in the history
…ing houses
  • Loading branch information
aethelwulffe authored and tony committed Jun 3, 2012
1 parent 4f373fe commit 587adbd
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 25 deletions.
17 changes: 17 additions & 0 deletions library/Claim.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,24 @@ function x12gsreceiverid() {
function x12gsisa05() {
return $this->x12_partner['x12_isa05'];
}
//adding in functions for isa 01 - isa 04

function x12gsisa01() {
return $this->x12_partner['x12_isa01'];
}

function x12gsisa02() {
return $this->x12_partner['x12_isa02'];
}

function x12gsisa03() {
return $this->x12_partner['x12_isa03'];
}
function x12gsisa04() {
return $this->x12_partner['x12_isa04'];
}

/////////
function x12gsisa07() {
return $this->x12_partner['x12_isa07'];
}
Expand Down
48 changes: 42 additions & 6 deletions library/classes/X12Partner.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ class X12Partner extends ORDataObject{
var $id;
var $name;
var $id_number;
var $x12_isa01; //
var $x12_isa02; //
var $x12_isa03; //
var $x12_isa04; //
var $x12_isa05; // Sender Interchange ID Qualifier. ZZ = mutually defined, 01 = Duns, etc.
var $x12_sender_id; // ISA06
var $x12_isa07; // Receiver Interchange ID Qualifier.
var $x12_receiver_id; // ISA08
var $x12_isa05; // Sender Interchange ID Qualifier. ZZ = mutually defined, 01 = Duns, etc.
var $x12_isa07; // Receiver Interchange ID Qualifier.
var $x12_isa14; // Acknowledgment Requested. 0 = No, 1 = Yes.
var $x12_isa15; // Usage Indicator. T = testing, P = production.
var $x12_gs02; // Application Sender's Code. Default to ISA06.
var $x12_per06; // The submitter's EDI Access Number, if any.
var $x12_isa14; // Acknowledgment Requested. 0 = No, 1 = Yes.
var $x12_isa15; // Usage Indicator. T = testing, P = production.
var $x12_gs02; // Application Sender's Code. Default to ISA06.
var $x12_per06; // The submitter's EDI Access Number, if any.
var $x12_version;
var $processing_format;
var $processing_format_array;
Expand Down Expand Up @@ -107,6 +111,38 @@ function set_x12_version($string) {
$this->x12_version = $string;
}

function get_x12_isa01() {
return $this->x12_isa01;
}

function set_x12_isa01($string) {
$this->x12_isa01 = $string;
}

function get_x12_isa02() {
return $this->x12_isa02;
}

function set_x12_isa02($string) {
$this->x12_isa02 = $string;
}

function get_x12_isa03() {
return $this->x12_isa03;
}

function set_x12_isa03($string) {
$this->x12_isa03 = $string;
}

function get_x12_isa04() {
return $this->x12_isa04;
}

function set_x12_isa04($string) {
$this->x12_isa04 = $string;
}

function get_x12_isa05() {
return $this->x12_isa05;
}
Expand Down
29 changes: 15 additions & 14 deletions library/gen_x12_837.inc.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?php
// Copyright (C) 2007-2011 Rod Roark <[email protected]>
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//various changes, tested working with multiple carriers

require_once("Claim.class.php");
function stripZipCode($zip)
Expand All @@ -29,10 +24,10 @@ function gen_x12_837($pid, $encounter, &$log, $encounter_claim=false) {
date('Y-m-d H:i', $today) . ".\n";

$out .= "ISA" .
"*00" .
"* " .
"*00" .
"* " .
"*" . $claim->x12gsisa01() .
"*" . $claim->x12gsisa02() .
"*" . $claim->x12gsisa03() .
"*" . $claim->x12gsisa04() .
"*" . $claim->x12gsisa05() .
"*" . $claim->x12gssenderid() .
"*" . $claim->x12gsisa07() .
Expand Down Expand Up @@ -341,7 +336,12 @@ function gen_x12_837($pid, $encounter, &$log, $encounter_claim=false) {
// Prior to the mandated implementation date and prior to any phase-
// in period identified by Federal regulation, PI must be sent."
// *************** Anybody know what that date is? ***************
"*PI" .
// August 2011 - Publish interim final rule
// October 1, 2012-March 31, 2013 - Enumeration
// April 1, 2013-September 30, 2013 - Testing
// October 1, 2013 - Implementation

"*XV" .
// Zirmed ignores this if using payer name matching:
"*" . ($encounter_claim ? $claim->payerAltID() : $claim->payerID()) .
"~\n";
Expand Down Expand Up @@ -393,9 +393,10 @@ function gen_x12_837($pid, $encounter, &$log, $encounter_claim=false) {
"*QC" .
"*1" .
"*" . $claim->patientLastName() .
"*" . $claim->patientFirstName() .
"*" . $claim->patientMiddleName() .
"~\n";
"*" . $claim->patientFirstName();
if ($claim->patientMiddleName() !== '') $out .= "*"
. $claim->patientMiddleName();
$out .= "~\n";

++$edicount;
$out .= "N3" .
Expand Down
16 changes: 16 additions & 0 deletions sql/4_0_0-to-4_1_0_upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1869,3 +1869,19 @@ INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`
INSERT INTO `list_options` (`list_id`, `option_id`, `title`, `seq`, `is_default`, `option_value`, `mapping`, `notes`) VALUES ('msp_remit_codes', 'W2', 'W2', 217, 0, 0, '', 'Payment reduced or denied based on workers'' compensation jurisdictional regulations or payment policies, use only if no other code is applicable. Note: If adjustment is at the Claim Level, the payer must send and the provider should refer to the 835 Insur');
#EndIf

#IfMissingColumn x12_partners isa01
ALTER TABLE x12_partners ADD COLUMN VARCHAR( 2 ) NOT NULL DEFAULT '00' COMMENT 'User logon Required Indicator';
#EndIf

#IfMissingColumn x12_partners isa02
ALTER TABLE x12_partners ADD COLUMN VARCHAR( 10 ) NOT NULL DEFAULT ' ' COMMENT 'User Logon';
#EndIf

#IfMissingColumn x12_partners isa03
ALTER TABLE x12_partners ADD COLUMN VARCHAR( 2 ) NOT NULL DEFAULT '00' COMMENT 'User password required Indicator';
#EndIf

#IfMissingColumn x12_partners isa04
ALTER TABLE x12_partners ADD COLUMN VARCHAR( 10 ) NOT NULL DEFAULT ' ' COMMENT 'User Password';
#EndIf

4 changes: 4 additions & 0 deletions sql/database.sql
Original file line number Diff line number Diff line change
Expand Up @@ -4890,6 +4890,10 @@ CREATE TABLE `x12_partners` (
`x12_receiver_id` varchar(255) default NULL,
`x12_version` varchar(255) default NULL,
`processing_format` enum('standard','medi-cal','cms','proxymed') default NULL,
`x12_isa01` VARCHAR( 2 ) NOT NULL DEFAULT '00' COMMENT 'User logon Required Indicator',
`x12_isa02` VARCHAR( 10 ) NOT NULL DEFAULT ' ' COMMENT 'User Logon',
`x12_isa03` VARCHAR( 2 ) NOT NULL DEFAULT '00' COMMENT 'User password required Indicator',
`x12_isa04` VARCHAR( 10 ) NOT NULL DEFAULT ' ' COMMENT 'User Password',
`x12_isa05` char(2) NOT NULL DEFAULT 'ZZ',
`x12_isa07` char(2) NOT NULL DEFAULT 'ZZ',
`x12_isa14` char(1) NOT NULL DEFAULT '0',
Expand Down
23 changes: 19 additions & 4 deletions templates/x12_partners/general_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,36 @@
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="20" name="id_number" value="{$partner->get_id_number()}" onKeyDown="PreventIt(event)" /></td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='Receiver ID Qualifier (ISA07)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" >{html_options name="x12_isa07" options=$partner->get_idqual_array() selected=$partner->get_x12_isa07()}</td>
<td VALIGN="MIDDLE" >{xl t='User logon Required Indicator (ISA01~ use 00 or 03)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="2" name="x12_isa01" value="{$partner->get_x12_isa01()}" onKeyDown="PreventIt(event)" /></td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='Receiver ID (ISA08)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="20" name="x12_receiver_id" value="{$partner->get_x12_receiver_id()}" onKeyDown="PreventIt(event)" /></td>
<td VALIGN="MIDDLE" >{xl t='User Logon (If 03 above, else leave spaces) (ISA02)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="20" name="x12_isa02" value="{$partner->get_x12_isa02()}" onKeyDown="PreventIt(event)" /></td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='User password required Indicator (ISA03~ use 00 or 01)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="2" name="x12_isa03" value="{$partner->get_x12_isa03()}" onKeyDown="PreventIt(event)" /></td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='User Password (ISA04~ if 01 above, else leave spaces)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="20" name="x12_isa04" value="{$partner->get_x12_isa04()}" onKeyDown="PreventIt(event)" /></td>
</tr>
<td VALIGN="MIDDLE" >{xl t='Sender ID Qualifier (ISA05)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" >{html_options name="x12_isa05" options=$partner->get_idqual_array() selected=$partner->get_x12_isa05()}</td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='Sender ID (ISA06)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="20" name="x12_sender_id" value="{$partner->get_x12_sender_id()}" onKeyDown="PreventIt(event)" /></td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='Receiver ID Qualifier (ISA07)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" >{html_options name="x12_isa07" options=$partner->get_idqual_array() selected=$partner->get_x12_isa07()}</td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='Receiver ID (ISA08)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="20" name="x12_receiver_id" value="{$partner->get_x12_receiver_id()}" onKeyDown="PreventIt(event)" /></td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='Acknowledgment Requested (ISA14)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" >{html_options name="x12_isa14" options=$partner->get_x12_isa14_array() selected=$partner->get_x12_isa14()}</td>
Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
// is a database change in the course of development. It is used
// internally to determine when a database upgrade is needed.
//
$v_database = 68;
$v_database = 69;
?>

0 comments on commit 587adbd

Please sign in to comment.