5.0.1 X12 zipcode problem

There is a problem with the zipcode when we generate an X12 transmission file to upload to the clearinghouse. If the zipcode field does not have 9 digits then it pads the patient zipcode with 9999 and the facility zipcode with 9998. We are hand editing the transmission file until we deal with this. I can’t seem to find where the padding is being done. I did find where the character set is enforced. We would appreciated any help you have time for. Thanks

hi @garryhallford, it’s here openemr/gen_x12_837.inc.php at master · stephenwaite/openemr · GitHub