Skip to content

Commit

Permalink
corrected
Browse files Browse the repository at this point in the history
Signed-off-by: vinish <vinish@zhservices.com>
  • Loading branch information
vinish authored and yehster committed Feb 14, 2012
1 parent 3b389b3 commit ed4e81c
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 2 deletions.
9 changes: 9 additions & 0 deletions library/Claim.class.php
Expand Up @@ -537,6 +537,15 @@ function x12gssenderid() {
return $tmp;
}

function x12gs03() {
//In some clearing houses ISA08 and GS03 are different
//Example: http://www.acs-gcro.com/downloads/DOL/DOL_CG_X12N_5010_837_v1_02.pdf - Page 18
if($this->x12_partner['x12_gs03'] !== '')
return $this->x12_partner['x12_gs03'];
else
return $this->x12gsreceiverid();
}

function x12gsreceiverid() {
$tmp = $this->x12_partner['x12_receiver_id'];
while (strlen($tmp) < 15) $tmp .= " ";
Expand Down
9 changes: 9 additions & 0 deletions library/classes/X12Partner.class.php
Expand Up @@ -22,6 +22,7 @@ class X12Partner extends ORDataObject{
var $x12_version;
var $processing_format;
var $processing_format_array;
var $x12_gs03; // Application Sender's Code. Default to ISA08.

/**
* Constructor sets all Insurance attributes to their default value
Expand Down Expand Up @@ -171,6 +172,14 @@ function get_processing_format_array() {
function set_processing_format($string) {
$this->processing_format = $string;
}

function get_x12_gs03() {
return $this->x12_gs03;
}

function set_x12_gs03($string) {
$this->x12_gs03 = $string;
}

function get_x12_isa14_array() {
return array(
Expand Down
2 changes: 1 addition & 1 deletion library/gen_x12_837.inc.php
Expand Up @@ -50,7 +50,7 @@ function gen_x12_837($pid, $encounter, &$log, $encounter_claim=false) {
$out .= "GS" .
"*HC" .
"*" . $claim->x12gsgs02() .
"*" . trim($claim->x12gsreceiverid()) .
"*" . trim($claim->x12gs03()) .
"*" . date('Ymd', $today) .
"*" . date('Hi', $today) .
"*1" .
Expand Down
4 changes: 4 additions & 0 deletions sql/4_1_0-to-4_1_1_upgrade.sql
Expand Up @@ -166,4 +166,8 @@ CREATE TABLE `dated_reminders_link` (
KEY `to_id` (`to_id`),
KEY `dr_id` (`dr_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1;
#EndIf

#IfMissingColumn x12_partners x12_gs03
ALTER TABLE `x12_partners` ADD COLUMN `x12_gs03` VARCHAR(15) NOT NULL DEFAULT '';
#EndIf
1 change: 1 addition & 0 deletions sql/database.sql
Expand Up @@ -4841,6 +4841,7 @@ CREATE TABLE `x12_partners` (
`x12_isa15` char(1) NOT NULL DEFAULT 'P',
`x12_gs02` varchar(15) NOT NULL DEFAULT '',
`x12_per06` varchar(80) NOT NULL DEFAULT '',
`x12_gs03` varchar(15) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM;

Expand Down
4 changes: 4 additions & 0 deletions templates/x12_partners/general_edit.html
Expand Up @@ -78,6 +78,10 @@
<td VALIGN="MIDDLE" >{xl t='Processing'}&nbsp;{xl t='Format'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" >{html_options name="processing_format" options=$partner->get_processing_format_array() selected=$partner->get_processing_format()}</td>
</tr>
<tr>
<td VALIGN="MIDDLE" >{xl t='Application Receiver Code (GS03 - If blank ISA08 will be used)'}</td>
<td COLSPAN="2" VALIGN="MIDDLE" ><input type="text" size="20" name="x12_gs03" value="{$partner->get_x12_gs03()}" onKeyDown="PreventIt(event)" maxlength="15"/></td>
</tr>
<tr height="25"><td colspan="2">&nbsp;</td></tr>
<tr>
<td colspan="2">
Expand Down
2 changes: 1 addition & 1 deletion version.php
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 = 58;
$v_database = 59;
?>

0 comments on commit ed4e81c

Please sign in to comment.