Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

835 footer #8

Merged
merged 2 commits into from

1 participant

@sbuss
Owner

Add the missing 835 footer and provider adjustments.

@sbuss sbuss merged commit 62a2984 into master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 23, 2013
  1. Version bump to 0.2.6

    Steven Buss authored
This page is out of date. Refresh to see the latest.
View
1  tests/835-example.txt
@@ -45,6 +45,7 @@ ISA|00| |00| |ZZ|MYCLEARINGHOUSE|ZZ|RECVCODE |120323|193
~AMT|B6|12145.65
~LQ|HE|N220
~LQ|HE|M68
+~PLB|743238060|20121231|WO^12104411559120820 001GAL295513|-361.19
~SE|43|0001
~GE|1|15555
~IEA|1|000015442
View
8 tests/test_835.py
@@ -253,6 +253,14 @@ def test_claims(self):
"dispute."))
self.assertEqual(l.notes[1], "M68")
+ def test_footer(self):
+ footer = self.f.facades[0].footer
+ self.assertEqual(len(footer.provider_adjustments), 1)
+ adj = footer.provider_adjustments[0]
+ self.assertEqual(adj.provider_id, '743238060')
+ self.assertEqual(adj.date, datetime.date(2012,12,31))
+ self.assertEqual(adj.amount_1, Decimal('-361.19'))
+
if __name__ == "__main__":
logging.basicConfig(
View
2  tigershark/__init__.py
@@ -1,7 +1,7 @@
"""
TigerShark - An X12 EDI message parser.
"""
-__version__ = "0.2.5"
+__version__ = "0.2.6"
__authors__ = [
"Steven Buss <steven.buss@gmail.com>",
"Steven Lott <slott56@gmail.com>",
View
28 tigershark/facade/f835.py
@@ -1,9 +1,12 @@
from decimal import Decimal
from tigershark.facade import X12LoopBridge
+from tigershark.facade import X12SegmentBridge
from tigershark.facade import ElementAccess
from tigershark.facade import ElementSequenceAccess
from tigershark.facade import CompositeAccess
+from tigershark.facade import SegmentSequenceAccess
+from tigershark.facade import SegmentConversion
from tigershark.facade import D8
from tigershark.facade import Money
from tigershark.facade import Facade
@@ -125,6 +128,30 @@ def __init__(self, aLoop, *args, **kwargs):
self.production_date = Header._ProductionDate(aLoop, *args, **kwargs)
+class ProviderAdjustments(X12SegmentBridge):
+ provider_id = ElementAccess("PLB", 1)
+ date = ElementAccess("PLB", 2, x12type=D8)
+ reason_1 = ElementAccess("PLB", 3)
+ amount_1 = ElementAccess("PLB", 4, x12type=Money)
+ reason_2 = ElementAccess("PLB", 5)
+ amount_2 = ElementAccess("PLB", 6, x12type=Money)
+ reason_3 = ElementAccess("PLB", 7)
+ amount_3 = ElementAccess("PLB", 8, x12type=Money)
+ reason_4 = ElementAccess("PLB", 9)
+ amount_4 = ElementAccess("PLB", 10, x12type=Money)
+ reason_5 = ElementAccess("PLB", 11)
+ amount_5 = ElementAccess("PLB", 12, x12type=Money)
+ reason_6 = ElementAccess("PLB", 13)
+ amount_6 = ElementAccess("PLB", 14, x12type=Money)
+
+
+class Footer(Facade, X12LoopBridge):
+ loopName = "FOOTER"
+
+ provider_adjustments = SegmentSequenceAccess("PLB",
+ x12type=SegmentConversion(ProviderAdjustments))
+
+
class Payer(X12LoopBridge):
"""Payer information from the 1000A loop."""
loopName = "1000A"
@@ -434,3 +461,4 @@ def __init__(self, anX12Message):
self.claims_overview = first(self.loops(ClaimsOverview,
anX12Message))
self.claims = self.loops(Claim, anX12Message)
+ self.footer = first(self.loops(Footer, anX12Message))
Something went wrong with that request. Please try again.