Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
133 commits
Select commit Hold shift + click to select a range
5d64bae
Skip existing broken tests for a clean baseline
Jul 1, 2014
81d641d
Support for 5010 270/271
Jun 24, 2014
7f96e3c
Ignore repeating composites and elements (new in 5010) for now
Jun 24, 2014
a5a0f19
Add generated 270 and 271 5010 parsers
Jun 24, 2014
b22e98d
Update 271 facade
Jul 28, 2014
1f6dc58
Revert change to repeating element parsing.
Sep 25, 2014
895e80e
Ignore all .pyc files.
Sep 25, 2014
2f210d4
Revert wrapper special-casing.
Sep 26, 2014
e85ec00
Whitespace.
Sep 26, 2014
be8fd7f
Revert sorting.
Sep 26, 2014
57b8b49
Handle repeats.
Sep 26, 2014
4a892af
speling
Sep 27, 2014
53de737
Cleanup.
Sep 27, 2014
70bac5a
Cleanup.
Sep 27, 2014
d51f588
Add ignoreExtra argument.
Sep 27, 2014
523f1f2
Set codes property.
Sep 27, 2014
331b64a
Add 5010 835 parser.
Sep 27, 2014
e7c5df2
Support YYMMDD dates.
Sep 27, 2014
1e8f3bc
Add generic header parser and facade with ISA loop.
Sep 27, 2014
30b1821
Add generic GS header parser and facade.
Sep 28, 2014
2fdd3d8
Add generic ST header parser and facade.
Sep 28, 2014
1049ee1
Add 5010 generic ISA facade tests.
Sep 29, 2014
3b033e3
Add 5010 generic GS facade tests and version_tuple support.
Sep 29, 2014
f7a47f0
Add 4010 generic facade tests.
Sep 29, 2014
3a7e594
Cleaner naming and structure.
Sep 29, 2014
6d57a39
Add 5010 835 examples.
Sep 29, 2014
df9266b
Cleanup, use structured version tuple, add tests.
Sep 29, 2014
f505d08
Make static.
Sep 29, 2014
9ceb8aa
Refactor.
Sep 29, 2014
def7e78
Refactor control headers.
Sep 29, 2014
cb5625a
Rename.
Sep 29, 2014
ed4d055
Rename.
Sep 29, 2014
6b8554d
PEP8 cleanups.
Sep 29, 2014
1d37672
Rename.
Sep 29, 2014
dad55ab
Cleanup.
Sep 29, 2014
c83b093
Rename.
Sep 30, 2014
13af5fe
Add control parser utility function.
Sep 30, 2014
34de6ae
Add 5010 835 test, cleanup 4010 835 test.
Sep 30, 2014
52a651b
Add 5010 835 test.
Sep 30, 2014
3dc8195
Add 5010 835 test.
Sep 30, 2014
bf5779a
Get ready for new release.
Sep 30, 2014
0603ea1
Add D8 tests, fix bug.
Oct 1, 2014
7831c9a
Cleanup.
Oct 1, 2014
2a30824
Rename.
Oct 1, 2014
1cc0258
Support industry identifier code.
Oct 1, 2014
68f1781
PEP8 cleanups.
Oct 1, 2014
7ca445d
Support integer repeat.
Oct 1, 2014
18f2822
Make findable by nose.
Oct 1, 2014
aa6be98
Generic parser map and test.
Oct 1, 2014
a56fec9
Refactor.
Oct 1, 2014
70f0d5d
Refactor test file defs.
Oct 1, 2014
0343d81
The 'repeat' of a segment is really max_use.
Oct 1, 2014
7e1ab1e
Fix test files.
Oct 1, 2014
32800bc
Fix test files.
Oct 1, 2014
dc6a1a0
All test files parsing.
Oct 1, 2014
2976392
Docs.
Oct 1, 2014
dfc4bb5
PEP8 cleanups.
Oct 1, 2014
5e6c32a
Generic facades.
Oct 1, 2014
5edc091
Fix names.
Oct 1, 2014
8e2d7ed
Generic identifier utility.
Oct 2, 2014
71a902d
Generic util to parse and apply a facade.
Oct 2, 2014
7eaf977
PEP8 cleanups.
Oct 2, 2014
5045fa0
PEP8 cleanups.
Oct 2, 2014
cf69a0b
PEP8 cleanups.
Oct 2, 2014
e04a1c8
PEP8 cleanups.
Oct 2, 2014
beef170
PEP8 cleanups.
Oct 2, 2014
e0899f4
Add docs, rename property.
Oct 2, 2014
7b48d62
Bump version.
Oct 7, 2014
7c004d2
Clean up .gitignore.
Oct 7, 2014
808240a
Clean up .gitignore.
Oct 7, 2014
8eb35ed
Update download URL.
Oct 7, 2014
bdee672
fix LS LE Loop
Apr 8, 2016
a911de0
One example of tests for 5010-271 parser
Apr 13, 2016
46e2e56
removed print and import uncommented
Apr 13, 2016
1d5570e
Merge pull request #1 from WojtekReu/271-5010-LS
jdavisp3 Apr 14, 2016
ce475d8
Add authors file.
jdavisp3 Apr 14, 2016
a8c7886
Update README for new release.
jdavisp3 Apr 14, 2016
ebce2f6
Remove spurious whitespace.
jdavisp3 Apr 14, 2016
101de12
Bump version.
jdavisp3 Apr 14, 2016
77bf96f
Merge pull request #2 from jdavisp3/release-0-2-9
jdavisp3 Apr 14, 2016
e250723
No trailing whitespace.
Sep 13, 2016
a9a7c21
Add tox file to easily run the test suite on multiple versions.
Sep 13, 2016
25aceb6
print_function
Sep 13, 2016
028e406
Remove octal literals.
Sep 13, 2016
a658541
git ls-files | grep '[.]py$' | xargs futurize --stage1 -w
Sep 13, 2016
937e1dc
Update urllib and httplib imports.
Sep 13, 2016
09a4a75
Handle itertools.izip.
Sep 13, 2016
9fc21e9
Fix type check.
Sep 13, 2016
1443ced
Remove pointless import.
Sep 13, 2016
443473f
s/xrange/range/
Sep 13, 2016
e2b8125
s/iteritems()/items()/
Sep 13, 2016
ef2433a
s/map/[verbose list comprehension]/
Sep 13, 2016
24ad7f0
Update metadata
Sep 13, 2016
bf951a9
Merge pull request #3 from lucaswiman/py3k
jdavisp3 Sep 14, 2016
a0b99c4
Add .travis.yml file using tox-travis.
Sep 15, 2016
151cd6d
Sort repr to prevent hash randomization from breaking tests.
Sep 15, 2016
85624b0
Merge pull request #4 from lucaswiman/fix-build
jdavisp3 Sep 15, 2016
870c808
Update README, bump version.
jdavisp3 Sep 16, 2016
5ba972a
Merge pull request #5 from jdavisp3/release-0-3-0
jdavisp3 Sep 16, 2016
1e13b98
Adds to_dict and to_json methods for Facade
CloudCray Jan 24, 2017
9dadd43
Adds to_dict and to_json methods for Facade
CloudCray Jan 24, 2017
88714bd
Merge remote-tracking branch 'origin/master'
CloudCray Jan 24, 2017
7c87405
Refactors to_dict and to_json; Handles empty list error
CloudCray Jan 24, 2017
010aacf
Adds unittest for .to_json; covers 271 and 835, both 4010 and 5010
CloudCray Jan 24, 2017
7e51cdb
Merge pull request #6 from CloudCray/master
jdavisp3 Jan 28, 2017
7ffcb30
Prepare for release.
jdavisp3 Jan 28, 2017
59b01d9
Merge pull request #7 from jdavisp3/release-0-3-1
jdavisp3 Jan 28, 2017
adf881b
Fixes bug that ignored iterables of simple data types
CloudCray Aug 20, 2017
4f68d2d
Python 3.7/3.8 compatibility fixes
ageitgey Jun 12, 2020
33bff6c
Fix for Python3 StopIteration error
CloudCray Aug 17, 2020
cbfdf64
Merge branch 'master' of ssh://github.com/CloudCray/TigerShark
CloudCray Aug 17, 2020
92ce4a2
Adds location_limits to EB segments (eg, `III*ZZ*11` as `Office`)
CloudCray Sep 14, 2020
e1bfb13
Adds fix for `to_dict` and `to_json` tests; adds test for `additional…
CloudCray Sep 14, 2020
73bdc17
Minor style fixes
CloudCray Sep 14, 2020
b4b89f2
Merge pull request #1 from CloudCray/location_limits
CloudCray Sep 16, 2020
2d8a628
Merge pull request #9 from CloudCray/location_limits
jdavisp3 Sep 20, 2020
c46d55d
Explicit "network" values for `EligibilityOrBenefitInformation`
Mar 31, 2021
4b1811b
Fixes typo in docstring
Mar 31, 2021
a5a6ebd
Merge branch 'master' of ssh://github.com/jdavisp3/TigerShark into tu…
Mar 31, 2021
c1cb093
Merge branch 'explicit_network_benefits' of ssh://github.com/CloudCra…
Mar 31, 2021
fd2193c
Prepare for release
Mar 31, 2021
7924ed4
Merge pull request #12 from CloudCray/explicit_network_benefits
jdavisp3 Apr 3, 2021
8c9d831
Adds missing service type codes and designates deprecated codes. Vers…
Apr 13, 2021
0515020
Merge pull request #2 from CloudCray/service_type_code_cleanup
CloudCray Apr 13, 2021
acd99f4
Fix for LS segment position in 2115C loops in 271 5010 transactions
Aug 4, 2021
6686d56
Merge pull request #3 from CloudCray/current_rc
CloudCray Aug 4, 2021
dc9c154
Merge pull request #4 from CloudCray/service_type_code_cleanup
CloudCray Aug 4, 2021
cf5774b
Adds 5010 versions of 837 parsers for Professional and Institutional …
Aug 4, 2021
e27f1e7
Updates README with 837 parser info. Updates authors.
Aug 4, 2021
28754c1
Merge pull request #13 from CloudCray/service_type_code_cleanup
jdavisp3 Aug 7, 2021
0e47643
Fix for zero-length string D8 vals
Jun 2, 2023
51c0cfb
Minor version bump
Jun 2, 2023
cf46e92
Minor version bump
Jun 2, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 8 additions & 37 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,45 +1,16 @@
*.pyc

.komodotools/python.komodotool

.komodotools/python2_6_-m_test_ru.komodotool

Tiger.komodoproject

Tiger.kpf

.DS_Store

X12/*.pyc

X12/map/*.pyc

X12/message/*.pyc

claims/*.pyc

doc/build/.*

doc/build/html/.*

extras/*.pyc

doc/build
doc/*.zargo~

test/*.pyc


testserver.err

testserver.log

tiger.db

tools/*.pyc

web/*.pyc

web/claims/*.pyc

web/claims_837/*.pyc

build/*
build
dist
MANIFEST
.cache
.tox
*.egg-info
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: python
python:
- "2.7"
- "3.5"
install:
- pip install tox tox-travis
script:
- tox
7 changes: 7 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Steven <steven.buss@gmail.com>
Dave Peticolas <dave@krondo.com>
Thomas Kho <tom@hioscar.com>
Wojciech Zając <wojciech.zajac@tirasu.com>
Lucas Wiman <lucas.wiman@gmail.com>
S.Lott <slott56@gmail.com>
Cloud Cray <cloudcray@gmail.com>
109 changes: 107 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,106 @@
TigerShark is an X12 EDI message parser that can be tailored to
a specific partner in the health care payment ecosystem.

State of the Project
====================

Version 0.3.5
-------------

Minor patch for converting zero-length strings to python values in `D8` elements (dates).
Previous behavior raised a `ValueError` trying to convert `''` to a `datetime.date` - now returns `None`.
This now matches the existing functionality for `DR` elements (datetime values)


Version 0.3.4
-------------

This patch cleans up the X12 271 Service Type Codes to bring them in line with current use. This patch also includes
parsers for the 5010 versions of Professional (X222A1) and Institutional (X223A1) 837 transactions.
* Updates `enums.eligibility.service_type_codes` to include new and missing Service Type Codes
* Adds `enums.eligibility.deprecated_service_type_codes`, a tuple of service type codes that have been deprecated by
X12
* Adds `X12_5010_X222A1` and `X12_5010_X223A1` parsers for 837 5010 messages
* This does NOT add or update any facades related to 837 transactions (existing 837 facades only function for 4010
messages)

The `service_type_codes` dict was last updated in June 2012. Since then, 21 Service Type Codes have been added,
7 of which have already been deprecated.

13 Service Type Codes have been deprecated by X12 (including 7 added in this patch). All 13 have been
preserved in `service_type_codes`, as this module may be used to parse existing/old 271 responses. The
`deprecated_service_type_codes` tuple has been added as a helper to identify which codes are considered inactive.

Note: the code `EO` ("ECHO-OSCAR") appears to have been added in error temporarily as a duplicate of `E0`
("ECHO-ZERO") for a 4-month span in 2017. The code has been added back in on the chance it made its way into
any production systems.

New Service Type Codes:

| Code | Label | Date Added | Date Deprecated |
| --- | --- | --- | --- |
| E29 | Technical Cardiac Rehabilitation Services Component | 09/30/2012 | 07/01/2016 |
| E30 | Professional Cardiac Rehabilitation Services Component | 09/30/2012 | 07/01/2016 |
| E31 | Professional Intensive Cardiac Rehabilitation Services Component | 09/30/2012 | 07/01/2016 |
| E32 | Intensive Cardiac Rehabilitation - Technical Component | 06/02/2013 | 05/01/2017 |
| E33 | Intensive Cardiac Rehabilitation | 06/02/2013 | |
| E34 | Pulmonary Rehabilitation - Technical Component | 06/02/2013 | 05/01/2017 |
| E35 | Pulmonary Rehabilitation - Professional Component | 06/02/2013 | 05/01/2017 |
| E36 | Convenience Care | 06/02/2013 | |
| E37 | Telemedicine | 07/01/2015 | |
| E38 | Pharmacist Services | 07/01/2015 | |
| E39 | Diabetic Education | 03/01/2016 | |
| E40 | Early Intervention | 11/01/2016 | |
| EO | Applied Behavioral Analysis Therapy | 03/01/2017 | 07/01/2017 |
| F1 | Medical Coverage | 11/01/2015 | |
| F2 | Social Work Coverage | 11/01/2015 | |
| F3 | Dental Coverage | 11/01/2015 | |
| F4 | Hearing Coverage | 11/01/2015 | |
| F5 | Prescription Drug Coverage | 11/01/2015 | |
| F6 | Vision Coverage | 11/01/2015 | |
| F7 | Orthodontia Coverage | 11/01/2015 | |
| F8 | Mental Health Coverage | 11/01/2015 | |

More on service type codes on the [official X12 website](https://x12.org/codes/service-type-codes).
* _Note: Use the
"Show All" filter to view current and deprecated codes (page only displays current codes by default.)_


Version 0.3.3
-------------

* Adds `in_plan_network_type` to `EligibilityOrBenefitInformation` for explicit values
* Adds `out_of_plan_network` for completion's sake
* Note that `in_plan_network`, `out_of_plan_network`, and `both_in_out_network` all return `False` when no value is set, although `None` would probably be more appropriate
* It may be more intuitive if `in_plan_network` and `out_of_plan_network` returned `True` when `both_in_out_network` is `True`, but the behavior is preserved for backwards compatibility

Version 0.3.2
-------------

* Support for EligibilityOrBenefitAdditionalInformation - `additional_information` property added to EligibilityOrBenefit to handle `III*ZZ*` segments
* Adds `place_of_service` enum for corresponding `additional_information` property
* Cleans up unittest warnings (`assertEquals` replaced with `assertEqual`)
* More descriptive and reliable `.to_dict` and `.to_json` methods.

Version 0.3.1
-------------

* `to_dict` and `to_json` helper methods. Thanks CloudCray.

Version 0.3.0
-------------

* Python 3 support, thanks Lucas Wiman!

Version 0.2.9
-------------

* Bugfix for parsing the LS loop in 5010 271.

Version 0.2.8
-------------

* Support for parsing 5010 270, 271, and 835 files.
* Support for parsing any X12 file to get version and transaction set information.
* Utility APIs for parsing any X12 file.

Version 0.2.5
-------------
Expand Down Expand Up @@ -229,5 +327,12 @@ the tests that currently exist, run the following in the current directory.
python -m unittest discover
```

To limit tests to the `tests` directory (ignoring all tests in the `web` directory), run the following:


```sh
python -m unittest discover -s 'tests'
```

Note that if you first `cd tests` and then run the unit tests, they will fail
because the tests expect certain files to be in certain paths.
19 changes: 12 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,25 @@
name='TigerShark',
version=__version__,
description='TigerShark: An X12 file parser.',
long_description='TigerShark is an X12 EDI message parser that can be '\
'tailored to a specific partner in the health care payment '\
'ecosystem.',
author='Steven Buss & Steven Lott',
author_email='steven.buss@gmail.com',
download_url='https://github.com/sbuss/TigerShark/tarball/v%s' % \
__version__,
long_description=(
'TigerShark is an X12 EDI message parser that can be '
'tailored to a specific partner in the health care payment '
'ecosystem.'),
author='Steven Buss & Steven Lott & Dave Peticolas',
author_email='dave.peticolas@gmail.com',
download_url=(
'https://github.com/jdavisp3/TigerShark/tarball/v%s' % __version__),
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Healthcare Industry",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Topic :: Text Processing",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
],
packages=[
'tigershark',
Expand Down
78 changes: 78 additions & 0 deletions tests/271-example-3.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
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||||2100|||||Y~
MSG|MAXIMUM SAVINGS,QUALIFIED HEALTH PLAN DESIGNATED PROVIDERS~
MSG|INT MED AND RX~
EB|G|IND|30|||29|2100|||||Y~
EB|F|EMP|30|||||||||Y~
MSG|PLAN REQUIRES PRECERT~
EB|F|EMP|30~
MSG|COMMERCIAL~
EB|F|EMP|30|||32~
MSG|UNLIMITED LIFETIME BENEFITS~
EB|1|EMP|1}33}47}48}50}86}98}UC}AL}MH}88||Open Access Elect Choice~
EB|A|EMP|33|||||0||||Y~
MSG|MAXIMUM SAVINGS,QUALIFIED HEALTH PLAN DESIGNATED PROVIDERS~
MSG|CHIROPRACTOR VISIT OR EVALUATION IN OFFICE~
MSG|LAB PERFORMED BY CHIROPRACTOR IN OFFICE~
MSG|XRAY BY CHIROPRACTOR IN OFFICE~
EB|A|EMP|86|||||0||||Y~
MSG|MAXIMUM SAVINGS,QUALIFIED HEALTH PLAN DESIGNATED PROVIDERS~
MSG|EMERGENCY ROOM PHYSICIAN~
MSG|EMERGENCY USE OF EMERGENCY ROOM~
MSG|URGENT CARE~
EB|A|EMP|98|||||.1||||Y~
MSG|MAXIMUM SAVINGS,QUALIFIED HEALTH PLAN DESIGNATED PROVIDERS~
MSG|GYN VISIT,COINS APPLIES TO OUT OF POCKET~
MSG|SPECIALIST VISIT OR EVALUATION,COINS APPLIES TO OUT OF POCKET~
MSG|PRIMARY CARE VISIT OR EVALUATION,COINS APPLIES TO OUT OF POCKET~
III|ZZ|11~
EB|B|EMP|33||||20|||||Y~
MSG|MAXIMUM SAVINGS,QUALIFIED HEALTH PLAN DESIGNATED PROVIDERS~
MSG|CHIROPRACTOR VISIT OR EVALUATION IN OFFICE,COPAY INCLUDED IN OOP~
MSG|LAB PERFORMED BY CHIROPRACTOR IN OFFICE,COPAY INCLUDED IN OOP~
MSG|XRAY BY CHIROPRACTOR IN OFFICE,COPAY INCLUDED IN OOP~
EB|F|IND|33|||||||||Y~
HSD|VS|35|||21|1~
MSG|SHT TRM RHB OP,MANIPULATION BY CHIROPRACTOR,OCCUPATIONAL THERAPY BY CHIROPRACTOR,PHYSICAL THERAPY BY CHIROPRACTOR~
EB|F|IND|33|||||||||Y~
HSD|VS|35|||29~
MSG|SHT TRM RHB OP~
EB|I|EMP|86|||||||||Y~
MSG|NON EMERGENCY USE OF EMERGENCY ROOM/EXCLUSION~
EB|I|EMP|86}UC|||||||||Y~
MSG|NON URGENT SERVICES AT AN URGENT CARE FACILITY/EXCLUSION~
EB|F|EMP|1}33}48}50}86}98}UC~
MSG|PLAN INCLUDES NAP~
EB|I|EMP|1}33}48}50}86}98}UC|||||||||N~
SE|74|0001~
GE|1|184065~
IEA|1|000184077~
50 changes: 50 additions & 0 deletions tests/271-example-in-out-network.txt
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~
26 changes: 26 additions & 0 deletions tests/278-sample.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties
parse_278 = Message( '278', Properties(desc='HIPAA Health Care Services Review: Request X094A1-278'),
Loop( 'ISA', Properties(desc='ISA',repeat='1',req_sit='R'),
Segment( 'ISA', Properties(),
),
Loop( 'GS', Properties(desc='GS',repeat='1',req_sit='R'),
Segment( 'GS', Properties(),
),
Loop( 'ST', Properties(desc='ST',repeat='1',req_sit='R'),
Segment( 'ST', Properties(desc='Transaction Set Header',qual=(1, '278'),repeat='1',req_sit='R'),
Element( 'ST01', Properties(desc=None, req_sit=None, data_type=(None,None,None), position=1,
codes=['278'] ) ),
),
Segment( 'BHT', Properties(desc='Beginning of Hierarchical Transaction',repeat='1',req_sit='R'),
),
Loop( '2000A', Properties(desc='2000A',repeat='1',req_sit='R'),
Segment( 'HL', Properties(desc='Utilization Management Organization (UMO) Level',qual=(3, '20'),repeat='1',req_sit='R'),
Element( 'HL03', Properties(desc=None, req_sit=None, data_type=(None,None,None), position=3,
codes=['20'] ) ),
),
Loop( '2010A', Properties(desc='2010A',repeat='>1',req_sit='R'),
Segment( 'NM1', Properties(desc='Utilization Management Organization (UMO) Name',qual=(1, 'X3'),repeat='1',req_sit='R'),
Element( 'NM101', Properties(desc=None, req_sit=None, data_type=(None,None,None), position=1,
codes=['X3'] ) ),
),
),
Loading