forked from sbuss/TigerShark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request sbuss#12 from CloudCray/explicit_network_benefits
Explicit "network" values for `EligibilityOrBenefitInformation`
- Loading branch information
Showing
7 changed files
with
133 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
ISA|00| |00| |ZZ|ZIRMED |ZZ|10864 |160405|1354|}|00501|000184077|1|P|^~ | ||
GS|HB|ZIRMED|10864|20160301|1354|184065|X|005010X279A1~ | ||
ST|271|0001|005010X279A1~ | ||
BHT|0022|11|94309|20160301|134403~ | ||
HL|1||20|1~ | ||
NM1|PR|2|MEDICA COM|||||PI|123456789~ | ||
HL|2|1|21|1~ | ||
NM1|1P|1|James|Barraret|J.|||XX|1234567894~ | ||
HL|3|2|22|0~ | ||
TRN|2|434343434|9ZIRMEDCOM|ELR ID~ | ||
TRN|1|422422424|9ZIRMEDCOM|ELI ID~ | ||
NM1|IL|1|SMITH|JOHN||||MI|1234567899~ | ||
REF|18|0404044~ | ||
REF|6P|030030001000120|NEVADA EXCHANGE~ | ||
N3|4040 VILLAGE AB~ | ||
N4|KANSAS CITY|MO|64108~ | ||
DMG|D8|19430813|M~ | ||
INS|Y|18|001|25~ | ||
DTP|346|D8|20160201~ | ||
DTP|472|D8|20160601~ | ||
DTP|356|D8|20141208~ | ||
EB|L|EMP|30|EP~ | ||
MSG|PCP SELECTION NOT REQUIRED~ | ||
EB|W~ | ||
LS|2120~ | ||
NM1|PR|2|Mala Compania~ | ||
N3|PO Box 983322~ | ||
N4|El Fixato|TX|68887~ | ||
LE|2120~ | ||
EB|1|EMP|30|EP|Open Access Elect Choice~ | ||
EB|G|IND|30|C1|||1500|||||Y~ | ||
EB|G|IND|30|C1||24|1500|||||Y~ | ||
EB|G|IND|30|C1||29|0|||||Y~ | ||
EB|C|IND|30||||118|||||Y~ | ||
EB|C|IND|30|||24|118|||||Y~ | ||
EB|C|IND|30|||29|0|||||Y~ | ||
EB|G|IND|30|C1|||0|||||N~ | ||
EB|G|IND|30|C1||24|0|||||N~ | ||
EB|G|IND|30|C1||29|0|||||N~ | ||
EB|C|IND|30||||0|||||N~ | ||
EB|C|IND|30|||24|0|||||N~ | ||
EB|C|IND|30|||29|0|||||N~ | ||
EB|B|EMP|98||||50|||||Y~ | ||
EB|B|EMP|98||||100|||||N~ | ||
EB|A|IND|50|||27||0.1||||W~ | ||
EB|A|IND|52|||||0.1 | ||
EB|I|EMP|1}33}48}50}86}98}UC|||||||||N~ | ||
SE|74|0001~ | ||
GE|1|184065~ | ||
IEA|1|000184077~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import unittest | ||
import logging | ||
import sys | ||
|
||
from tigershark.facade import f271 | ||
from tigershark.parsers import M271_5010_X279_A1 | ||
|
||
|
||
class TestParsed271(unittest.TestCase): | ||
def setUp(self): | ||
m = M271_5010_X279_A1.parsed_271 | ||
with open('tests/271-example-in-out-network.txt') as f: | ||
parsed = m.unmarshall(f.read().strip()) | ||
self.f = f271.F271_5010(parsed) | ||
|
||
def test_number_of_facades(self): | ||
self.assertEqual(len(self.f.facades), 1) | ||
|
||
def test_no_network_info(self): | ||
subscriber = self.f.facades[0].subscribers[0] | ||
benefit = subscriber.eligibility_or_benefit_information[2] | ||
cov_info = benefit.coverage_information | ||
|
||
self.assertEqual(cov_info.in_plan_network_type, None) | ||
self.assertEqual(cov_info.in_plan_network, False) | ||
self.assertEqual(cov_info.both_in_out_network, False) | ||
self.assertEqual(cov_info.out_of_plan_network, False) | ||
|
||
def test_both_network_info(self): | ||
subscriber = self.f.facades[0].subscribers[0] | ||
benefit = subscriber.eligibility_or_benefit_information[17] | ||
cov_info = benefit.coverage_information | ||
|
||
self.assertEqual(cov_info.in_plan_network_type[0], "W") | ||
self.assertEqual(cov_info.in_plan_network, False) | ||
self.assertEqual(cov_info.both_in_out_network, True) | ||
self.assertEqual(cov_info.out_of_plan_network, False) | ||
|
||
def test_out_of_network_info(self): | ||
subscriber = self.f.facades[0].subscribers[0] | ||
benefit = subscriber.eligibility_or_benefit_information[16] | ||
cov_info = benefit.coverage_information | ||
|
||
self.assertEqual(cov_info.in_plan_network_type[0], "N") | ||
self.assertEqual(cov_info.in_plan_network, False) | ||
self.assertEqual(cov_info.both_in_out_network, False) | ||
self.assertEqual(cov_info.out_of_plan_network, True) | ||
|
||
def test_in_network_info(self): | ||
subscriber = self.f.facades[0].subscribers[0] | ||
benefit = subscriber.eligibility_or_benefit_information[15] | ||
cov_info = benefit.coverage_information | ||
|
||
self.assertEqual(cov_info.in_plan_network_type[0], "Y") | ||
self.assertEqual(cov_info.in_plan_network, True) | ||
self.assertEqual(cov_info.both_in_out_network, False) | ||
self.assertEqual(cov_info.out_of_plan_network, False) | ||
|
||
|
||
if __name__ == "__main__": | ||
logging.basicConfig( | ||
stream=sys.stderr, | ||
level=logging.INFO, | ||
) | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
TigerShark - An X12 EDI message parser. | ||
""" | ||
__all__ = ['X12VersionTuple'] | ||
__version__ = "0.3.2" | ||
__version__ = "0.3.3" | ||
__authors__ = [ | ||
"Steven Buss <[email protected]>", | ||
"Steven Lott <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters