tkaufmann wrote on Thursday, August 04, 2005:
When doing testing with ProxyMed last fall I found many changes were required to standard.pl to get the generated claims to pass.
It was a real learning experience. Early on during this learning/questioning/testing I posted one diff (http://sourceforge.net/forum/message.php?msg_id=3172935) but after getting claims to pass, I never posted my other changes. Subsequently 1000+ claims were successfully processed through ProxyMed.
When I upgraded to the latest version of OpenEMR/FreeB, I found that claims wouldn’t pass the ‘ProxyMed HIPAA 3rd Party Testing Service’, so I went back and re-implemented my changes.
A diff follows. I urge those who send X12 to other sources to test this first.
Some of my changes may break things for you, though I couldn’t pass the ‘837 Q1 Health Care Claim Professional’ tests at hipaadesk.com without these.
Note: I commented out the code that put in “REF*1G” – I have never seen this code in any of my claims; I think it was someone’s specific provider they hardcoded, this appears more general.
Please test, and if it works for you as well, someone (Rod?) can check it in. Thanks.
Index: standard.pl
RCS file: /cvsroot/openemr/freeb/formatbin/standard.pl,v
retrieving revision 1.9
diff -r1.9 standard.pl
603a604,609
> # ID 1069, pos 02 NSF ref: DA0-17.0
> my $relationship = FreeB::FBPatient::X12InsuredRelationship($PatientKey,$InsuredKey);
> if ( $relationship != 18 ) {
> $PatientHL = 1;
> }
>
633c639,647
< $data=FreeB::FBPatient::X12InsuredRelationship($PatientKey,$InsuredKey);
—
>
> ##** if code is not ‘18’, then blank this.
> ##** HL04 above is then 1, not 0.
>
> #$data=FreeB::FBPatient::X12InsuredRelationship($PatientKey,$InsuredKey);
> $data = $relationship;
> if ( $relationship != 18 ) {
> $data = ‘’;
> }
1264c1278
<
—
> ############################################ ********* NEW
1310,1326c1324,1342
< $x12item="";
< $data="*";
< $x12delim=$data;
< $x12begin=“REF”;
< $x12item=$x12begin;
< $edicount++;
< $data=“1G”;
< $data = FreeB::Global::X12Beauty($data);
< $x12item=$x12item.$x12delim.uc($data);
< $data=FreeB::FBProvider::IPN($ReferringProviderKey);
< $data = FreeB::Global::X12Beauty($data);
< $x12item=$x12item.$x12delim.uc($data);
< $data="~";
< $x12item = FreeB::Global::X12TrailingDelimiters($x12item);
< $x12item=$x12item.$data;
< print “$x12item
< “;
—
> if (0) {
> $x12item=””;
> $data="*";
> $x12delim=$data;
> $x12begin=“REF”;
> $x12item=$x12begin;
> $edicount++;
> $data=“1G”;
> $data = FreeB::Global::X12Beauty($data);
> $x12item=$x12item.$x12delim.uc($data);
> $data=FreeB::FBProvider::IPN($ReferringProviderKey);
> $data = FreeB::Global::X12Beauty($data);
> $x12item=$x12item.$x12delim.uc($data);
> $data="~";
> $x12item = FreeB::Global::X12TrailingDelimiters($x12item);
> $x12item=$x12item.$data;
> print “$x12item
> “;
> }
1407a1424,1450
> # ********************************************
> ##** Tk - added 2004.11.29 - per proxymed testing - add REF field to PRV
> # however, they identified the missing REF as part of loop 2420
> # and here is 2310…
> #
> # Question: should it only be here for 1B (blue shield) and 1D (medicaid)
>
> $x12item=””;
> $data="*";
> $x12delim=$data;
> $x12begin=“REF”;
> $x12item=$x12begin;
> $edicount++;
> $data=FreeB::FBPractice::ProviderNumX12Type($PracticeKey,$PayerKey,$ProviderKey);
> $data = FreeB::Global::X12Beauty($data);
> $x12item=$x12item.$x12delim.uc($data);
> $data=FreeB::FBPractice::PracticeID($PracticeKey,$PayerKey,$ProviderKey);
> $data = FreeB::Global::X12Beauty($data);
> $x12item=$x12item.$x12delim.uc($data);
> $data="~";
> $x12item = FreeB::Global::X12TrailingDelimiters($x12item);
> $x12item=$x12item.$data;
> print “$x12item
> “;
>
> # ********************************************
>
1570,1571c1613,1615
< #$data=“N”;
< $data=””; # 004010X098A1 (addendum) says this must be Y or blank
—
> #$data=""; # 004010X098A1 (addendum) says this must be Y or blank
> # proxymed doesn’t like it though…
> $data=“N”;