diff --git a/.gitignore b/.gitignore index 2339131..41af011 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..dda08fa --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: python +python: + - "2.7" + - "3.5" +install: + - pip install tox tox-travis +script: + - tox diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..ce1adb5 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,7 @@ +Steven +Dave Peticolas +Thomas Kho +Wojciech Zając +Lucas Wiman +S.Lott +Cloud Cray diff --git a/README.md b/README.md index 2d3528f..4dec9c0 100644 --- a/README.md +++ b/README.md @@ -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 ------------- @@ -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. diff --git a/setup.py b/setup.py index d8c977e..0829941 100644 --- a/setup.py +++ b/setup.py @@ -7,13 +7,14 @@ 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", @@ -21,6 +22,10 @@ "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', diff --git a/tests/271-example-3.txt b/tests/271-example-3.txt new file mode 100644 index 0000000..9667c02 --- /dev/null +++ b/tests/271-example-3.txt @@ -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~ diff --git a/tests/271-example-in-out-network.txt b/tests/271-example-in-out-network.txt new file mode 100644 index 0000000..c506b5b --- /dev/null +++ b/tests/271-example-in-out-network.txt @@ -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~ \ No newline at end of file diff --git a/tests/278-sample.txt b/tests/278-sample.txt new file mode 100644 index 0000000..76cb7e9 --- /dev/null +++ b/tests/278-sample.txt @@ -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'] ) ), + ), + ), diff --git a/tests/5010-271-example-1.txt b/tests/5010-271-example-1.txt new file mode 100644 index 0000000..3f4d490 --- /dev/null +++ b/tests/5010-271-example-1.txt @@ -0,0 +1,77 @@ +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~ +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~ diff --git a/tests/5010-835-example-1.txt b/tests/5010-835-example-1.txt new file mode 100644 index 0000000..12de724 --- /dev/null +++ b/tests/5010-835-example-1.txt @@ -0,0 +1,76 @@ +ISA*00* *00* *ZZ*5010TEST *ZZ*835RECVR *110930*1105*^*00501*000004592*0*T*|~ +GS*HP*5010TEST*835RECVR*20110930*100718*45920001*X*005010X221A1~ +ST*835*0001~ +BPR*I*1790*C*CHK************20110930~ +TRN*1*123456789*1123456789~ +REF*EV*5010835EXAMPLE~ +DTM*405*20110930~ +N1*PR*DENTAL PAYER NAME~ +N3*DENTAL PAYER ADDRESS~ +N4*CINCINNATI*OH*45206~ +PER*CX**TE*8003030303~ +PER*BL*TECHNICAL CONTACT*TE*8004040404*EM*PAYER@PAYER.COM~ +PER*IC**UR*WWW.PAYER.COM~ +N1*PE*PROVIDER NAME*XX*1122334455~ +N3*PROVIDER ADDRESS~ +N4*CITY*OH*80003~ +REF*TJ*123456789~ +LX*1~ +CLP*PRECERTIFICATION*25*3790*0**12*CLAIMNUMBER1*11*1~ +CAS*OA*101*122~ +NM1*QC*1*NAME*PATIENT****MI*123456789~ +REF*1L*11223344~ +REF*CE*CONTRACTING~ +DTM*232*19000101~ +DTM*233*19000101~ +DTM*050*20110908~ +PER*CX*WDS CUSTOMER SERVICE*TE*8883030303~ +SVC*AD|D1110*90*80**1~ +CAS*CO*42*10*1~ +REF*6R*00010~ +AMT*B6*80~ +SVC*AD|D2150*115*42**1~ +CAS*PR*2*73*1~ +REF*6R*00020~ +AMT*B6*115~ +SVC*AD|D6751*880*0**1~ +CAS*PR*42*880*1~ +REF*6R*00030~ +LQ*HE*N30~ +SVC*AD|D6241*750*0**1~ +CAS*PR*42*750*1~ +REF*6R*00040~ +LQ*HE*N30~ +SVC*AD|D6751*880*0**1~ +CAS*PR*42*880*1~ +REF*6R*00050~ +LQ*HE*N30~ +SVC*AD|D2751*880*0**1~ +CAS*PR*42*880*1~ +REF*6R*00060~ +LQ*HE*N30~ +SVC*AD|D2952*195*0**1~ +CAS*PR*42*195*1~ +REF*6R*00070~ +LQ*HE*N30~ +CLP*EDI PAID*1*3790*1790*2000*12*CLAIMNUMBER2*11*1~ +NM1*QC*1*TWO*PATIENT****MI*123456789~ +DTM*050*20110908~ +PER*CX*WDS CUSTOMER SERVICE*TE*8883030303~ +SVC*AD|D1110*3790*1790**1~ +DTM*472*20110902~ +CAS*PR*2*2000*1~ +REF*6R*00010~ +AMT*B6*3790~ +CLP*EDI DENIED*1*3790*0*3790*12*CLAIMNUMBER3*11*1~ +NM1*QC*1*LASTNAME*FIRSTNAME****MI*123456789~ +DTM*050*20110908~ +PER*CX*WDS CUSTOMER SERVICE*TE*8883030303~ +SVC*AD|D1110*3790*0**1~ +DTM*472*20110901~ +CAS*PR*32*3790*1~ +REF*6R*00010~ +AMT*B6*3790~ +SE*72*0001~ +GE*1*45920001~ +IEA*1*000004592~ diff --git a/tests/5010-835-example-2.txt b/tests/5010-835-example-2.txt new file mode 100644 index 0000000..30fad96 --- /dev/null +++ b/tests/5010-835-example-2.txt @@ -0,0 +1,56 @@ +ISA*00* *00* *ZZ*5010TEST *ZZ*835RECVR *110930*1105*^*00501*000004592*0*T*:~ +GS*HP*5010TEST*835RECVR*20110930*100718*45920001*X*005010X221A1~ +ST*835*0001~ +BPR*I*100*C*CHK************20110930~ +TRN*1*123456789*1123456789~ +REF*EV*5010835EXAMPLE~ +DTM*405*20110930~ +N1*PR*PAYER NAME~ +N3*PAYER ADDRESS~ +N4*CINCINNATI*OH*45206~ +PER*CX**TE*8003030303~ +PER*BL*TECHNICAL CONTACT INFO*TE*8004040404*EM*PAYER.EDI@PAYER.COM~ +PER*IC**UR*WWW.PAYER.COM~ +N1*PE*PROVIDER NAME*XX*1122334455~ +N3*PROVIDER ADDRESS~ +N4*CITY*OH*80003~ +REF*TJ*123456789~ +LX*1~ +CLP*EDI PAID*1*2083*100**14*CLAIMNUMBER1**1~ +NM1*QC*1*LAST NAME*FIRST NAME****MI*123A12345~ +DTM*050*20110907~ +SVC*NU:0450*2083*100**1**0~ +DTM*472*20110906~ +CAS*CO*45*1983~ +REF*6R*1~ +AMT*B6*100~ +CLP*EDI DENIED*1*207.16*0**HM*CLAIMNUMBER2*13*1~ +NM1*QC*1*LAST*FIRST****MI*AAA123456789~ +NM1*IL*1*LAST*FIRSTNAME****MI*AAA123456789~ +NM1*74*1*LAST*FIRSTLAST****C*0000999998~ +NM1*82*2*REGULAR HOSPITAL*****XX*1123456789~ +DTM*232*20110908~ +DTM*050*20110908~ +SVC*NU:0250*9.2*0**4~ +DTM*472*20110908~ +CAS*CO*16*9.2~ +LQ*HE*N142~ +SVC*NU:0271*57.94*0**2~ +DTM*472*20110908~ +CAS*CO*16*57.94~ +LQ*HE*N142~ +SVC*HC:85025*47*0*0300*1~ +DTM*472*20110907~ +CAS*CO*16*47~ +LQ*HE*N142~ +SVC*NU:0636*18.02*0**2~ +DTM*472*20110908~ +CAS*CO*16*18.02~ +LQ*HE*N142~ +SVC*HC:36591*75*0*0949*1~ +DTM*472*20110908~ +CAS*CO*16*75~ +LQ*HE*N142~ +SE*52*0001~ +GE*1*45920001~ +IEA*1*000004592~ diff --git a/tests/5010-835-example-3.txt b/tests/5010-835-example-3.txt new file mode 100644 index 0000000..d6332de --- /dev/null +++ b/tests/5010-835-example-3.txt @@ -0,0 +1,49 @@ +ISA*00* *00* *ZZ*5010TEST *ZZ*835RECVR *110930*1105*^*00501*000004592*0*T*:~ +GS*HP*5010TEST*835RECVR*20110930*100718*45920001*X*005010X221A1~ +ST*835*0001~ +BPR*I*57.44*C*CHK************20110930~ +TRN*1*123456789*1123456789~ +REF*EV*5010835EXAMPLE~ +DTM*405*20110930~ +N1*PR*PAYER NAME~ +N3*PAYER ADDRESS~ +N4*CINCINNATI*OH*45206~ +PER*CX**TE*8003030303~ +PER*BL*TECHNICAL CONTACT*TE*8004040404*EM*PAYER@PAYER.COM~ +PER*IC**UR*WWW.PAYER.COM~ +N1*PE*PROVIDER NAME*XX*1122334455~ +N3*PROVIDER ADDRESS~ +N4*CITY*OH*89999~ +REF*TJ*123456789~ +LX*1~ +CLP*EDI DENIAL*1*1088*0*1088*HM*CLAIMNUMBER1*21~ +NM1*QC*1*LAST*FIRST****MI*1A2A1A2A1A2A~ +NM1*IL*1*LAST1*FIRST1*G***MI*BBB1A2A1A2A1A2A~ +NM1*82*1*PROVIDER*MR*A***XX*1234567898~ +REF*EA*11223344~ +REF*1L*123456~ +DTM*232*20090113~ +DTM*233*20090113~ +DTM*050*20110908~ +SVC*HC:00220:P2*1088*0**8**76~ +DTM*150*20090113~ +DTM*151*20090113~ +CAS*PR*29*1088~ +CLP*EDI PAID*1*100*57.44*30*12*CLAIMNUMBER2*11~ +NM1*QC*1*LAST2*FIRST2*A***MI*R123456789~ +NM1*IL*1*LAST3*FIRST3*B***MI*R1234567~ +NM1*82*1*PROVIDER1*MRS1*B***XX*1234567899~ +REF*EA*11223344~ +REF*1L*123456~ +DTM*232*20110729~ +DTM*233*20110729~ +DTM*050*20110927~ +SVC*HC:97110*100*57.44**2~ +DTM*150*20110729~ +DTM*151*20110729~ +CAS*PR*3*30~ +CAS*CO*45*12.56~ +AMT*B6*87.44~ +SE*45*0001~ +GE*1*45920001~ +IEA*1*000004592~ diff --git a/tests/5010-837-institutional-example.txt b/tests/5010-837-institutional-example.txt new file mode 100644 index 0000000..117b75b --- /dev/null +++ b/tests/5010-837-institutional-example.txt @@ -0,0 +1,92 @@ +ISA*00* *00* *ZZ*1234567 *ZZ*11111 *170508*1141*^*00501*000000101*1*P*:~ +GS*HC*XXXXXXX*XXXXX*20170617*1741*101*X*005010X223A2~ +ST*837*987654*005010X223A2~ +BHT*0019*00*0123*19960918*0932*CH~ +NM1*41*2*JONES HOSPITAL*****46*12345~ +PER*IC*JANE DOE*TE*9005555555~ +NM1*40*2*MEDICARE*****46*00120~ +HL*1**20*1~ +PRV*BI*PXC*203BA0200N~ +NM1*85*2*JONES HOSPITAL*****XX*9876540809~ +N3*225 MAIN STREET BARKLEY BUILDING~ +N4*CENTERVILLE*PA*17111~ +REF*EI*567891234~ +PER*IC*CONNIE*TE*3055551234~ +HL*2*1*22*0~ +SBR*P*18*******MB~ +NM1*IL*1*DOE*JOHN*T***MI*030005074A~ +N3*125 CITY AVENUE~ +N4*CENTERVILLE*PA*17111~ +DMG*D8*19261111*M~ +NM1*PR*2*MEDICARE B*****PI*00435~ +REF*G2*330127~ +CLM*756048Q*89.93**14:A:1*A*Y*Y~ +DTP*434*RD8*19960911~ +CL1*3**01~ +HI*BK:3669~ +HI*BF:4019*BF:79431~ +HI*BH:A1:D8:19261111*BH:A2:D8:19911101*BH:B1:D8:19261111*BH:B2:D8:19870101~ +HI*BE:A2:::15.31~ +HI*BG:09~ +NM1*71*1*JONES*JOHN*J~ +REF*1G*B99937~ +SBR*S*01*351630*STATE TEACHERS*****CI~ +OI***Y***Y~ +NM1*IL*1*DOE*JANE*S***MI*222004433~ +N3*125 CITY AVENUE~ +N4*CENTERVILLE*PA*17111~ +NM1*PR*2*STATE TEACHERS*****PI*1135~ +LX*1~ +SV2*0305*HC:85025*13.39*UN*1~ +DTP*472*D8*19960911~ +LX*2~ +SV2*0730*HC:93005*76.54*UN*3~ +DTP*472*D8*19960911~ +SE*42*987654~ +GE*1*101~ +GS*HC*XXXXXXX*XXXXX*20170617*1741*101*X*005010X223A2~ +ST*837*987654*005010X223A2~ +BHT*0019*00*0123*19960918*0932*CH~ +NM1*41*2*JONES HOSPITAL*****46*12345~ +PER*IC*JANE DOE*TE*9005555555~ +NM1*40*2*MEDICARE*****46*00120~ +HL*1**20*1~ +PRV*BI*PXC*203BA0200N~ +NM1*85*2*JONES HOSPITAL*****XX*9876540809~ +N3*225 MAIN STREET BARKLEY BUILDING~ +N4*CENTERVILLE*PA*17111~ +REF*EI*567891234~ +PER*IC*CONNIE*TE*3055551234~ +HL*2*1*22*0~ +SBR*P*18*******MB~ +NM1*IL*1*DOE*JOHN*T***MI*030005074A~ +N3*125 CITY AVENUE~ +N4*CENTERVILLE*PA*17111~ +DMG*D8*19261111*M~ +NM1*PR*2*MEDICARE B*****PI*00435~ +REF*G2*330127~ +CLM*756048Q*89.93**14:A:1*A*Y*Y~ +DTP*434*RD8*19960911~ +CL1*3**01~ +HI*BK:3669~ +HI*BF:4019*BF:79431~ +HI*BH:A1:D8:19261111*BH:A2:D8:19911101*BH:B1:D8:19261111*BH:B2:D8:19870101~ +HI*BE:A2:::15.31~ +HI*BG:09~ +NM1*71*1*JONES*JOHN*J~ +REF*1G*B99937~ +SBR*S*01*351630*STATE TEACHERS*****CI~ +OI***Y***Y~ +NM1*IL*1*DOE*JANE*S***MI*222004433~ +N3*125 CITY AVENUE~ +N4*CENTERVILLE*PA*17111~ +NM1*PR*2*STATE TEACHERS*****PI*1135~ +LX*1~ +SV2*0305*HC:85025*13.39*UN*1~ +DTP*472*D8*19960911~ +LX*2~ +SV2*0730*HC:93005*76.54*UN*3~ +DTP*472*D8*19960911~ +SE*42*987654~ +GE*1*101~ +IEA*1*000000101~ \ No newline at end of file diff --git a/tests/5010-837-professional-example.txt b/tests/5010-837-professional-example.txt new file mode 100644 index 0000000..c98803c --- /dev/null +++ b/tests/5010-837-professional-example.txt @@ -0,0 +1,45 @@ +ISA*00* *00* *ZZ*1234567 *ZZ*11111 *170508*1141*^*00501*000000101*1*P*:~ +GS*HC*XXXXXXX*XXXXX*20170617*1741*101*X*005010X222A1~ +ST*837*1239*005010X222A1~ +BHT*0019*00*010*20170617*1741*CH~ +NM1*41*2*SUBMITTER*****46*ABC123~ +PER*IC*BOB SMITH*TE*4805551212~ +NM1*40*2*RECEIVER*****46*44556~ +HL*1**20*1~ +NM1*85*2*BILLING PROVIDER*****XX*1122334455~ +N3*1234 SOME ROAD~ +N4*CHICAGO*IL*606739999~ +REF*EI*999999999~ +HL*2*1*22*0~ +SBR*P*18*******12~ +NM1*IL*1*BLOGGS*JOE****MI*1234567890~ +N3*1 SOME BLVD~ +N4*CHICAGO*IL*606129998~ +DMG*D8*19570111*M~ +NM1*PR*2*PAYER*****PI*12345~ +N3*1 PAYER WAY~ +N4*ST LOUIS*MO*212441850~ +REF*2U*W1014~ +CLM*1000A*140***19:B:1*Y*A*Y*Y~ +HI*ABK:I10~ +LX*1~ +SV1*HC:99213*140*UN*1***1~ +DTP*472*D8*20151124~ +HL*3*1*22*0~ +SBR*P*18*******12~ +NM1*IL*1*BLOGGS*FRED****MI*9876543201~ +N3*1 ANOTHER STR~ +N4*CHICAGO*IL*606129998~ +DMG*D8*19700601*M~ +NM1*PR*2*PAYER*****PI*12345~ +N3*1 PAYER WAY~ +N4*ST LOUIS*MO*212441850~ +REF*2U*W1014~ +CLM*1001A*140***19:B:1*Y*A*Y*Y~ +HI*ABK:I10~ +LX*1~ +SV1*HC:99213*140*UN*1***1~ +DTP*472*D8*20151124~ +SE*41*1239~ +GE*1*101~ +IEA*1*000000101~ \ No newline at end of file diff --git a/tests/TEST 276 TXNs.txt b/tests/TEST 276 TXNs.txt index 5391d3c..37d450e 100755 --- a/tests/TEST 276 TXNs.txt +++ b/tests/TEST 276 TXNs.txt @@ -17,8 +17,6 @@ DTP*232*RD8*20070919-20070921~ SE*15*246742~ GE*1*245842~ IEA*1*000246742~ - - ISA*03*mdycha1 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0905*U*00401*000246785*0*T*:~ GS*HR*0000000Eliginet*BLUECROSS BLUES*20071015*0905*245885*X*004010X093A1~ ST*276*246785~ @@ -38,8 +36,6 @@ DTP*232*RD8*20070919-20070922~ SE*15*246785~ GE*1*245885~ IEA*1*000246785~ - - ISA*03*lhammond1 *01*0000000000*ZZ*0000000Eliginet*ZZ*BlueShield of N*071015*0909*U*00401*000032685*0*T*:~ GS*HR*0000000Eliginet*BlueShield of N*20071015*0909*31785*X*004010X093A1~ ST*276*32685~ @@ -59,8 +55,6 @@ DTP*232*RD8*20070815-20070815~ SE*15*32685~ GE*1*31785~ IEA*1*000032685~ - - ISA*03*lhammond1 *01*0000000000*ZZ*0000000Eliginet*ZZ*BlueShield of N*071015*0911*U*00401*000032694*0*T*:~ GS*HR*0000000Eliginet*BlueShield of N*20071015*0911*31794*X*004010X093A1~ ST*276*32694~ @@ -80,8 +74,6 @@ DTP*232*RD8*20070725-20070725~ SE*15*32694~ GE*1*31794~ IEA*1*000032694~ - - ISA*03*mormond *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0926*U*00401*000247238*0*T*:~ GS*HR*0000000Eliginet*BLUECROSS BLUES*20071015*0926*246338*X*004010X093A1~ ST*276*247238~ @@ -100,4 +92,4 @@ AMT*T3*0.00~ DTP*232*RD8*20070827-20070830~ SE*15*247238~ GE*1*246338~ -IEA*1*000247238~ \ No newline at end of file +IEA*1*000247238~ diff --git a/tests/TEST 278_13 TXNS.txt b/tests/TEST 278_13 TXNS.txt index f04a17e..03d9c11 100755 --- a/tests/TEST 278_13 TXNS.txt +++ b/tests/TEST 278_13 TXNS.txt @@ -1,11 +1,5 @@ - ISA*03*gjohnson2 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0903*U*00401*000242835*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0903*241935*X*004010X094A1~ST*278*242835~BHT*0078*13*GXEDWLXQYKII*20071015*0903~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*SHEIKH*ZIA****24*161590688~REF*ZH*000524454008~N3*4039 ROUTE 219*SUITE 102~N4*SALAMANCA*NY*14779~HL*3*2*22*1~HI*BF:706.1~NM1*IL*1*burton*amanda****MI*yjw88034076701~DMG*D8*19900815*U~HL*4*3*19*1~NM1*SJ*1*JAREMKO*WILLIAM****24*161482964~REF*ZH*000511127003~N3*2646 WEST STATE STREET*SUITE 405~N4*OLEAN*NY*147600000~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*30~SE*24*242835~GE*1*241935~IEA*1*000242835~ - ISA*03*jrandazzo *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0903*U*00401*000242836*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0903*241936*X*004010X094A1~ST*278*242836~BHT*0078*13*KLTVJTDDRYEM*20071015*0903~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*PERNA*ANTHONY****24*161260886~REF*ZH*000500338001~N3*41 DELAWARE ROAD~N4*KENMORE*NY*142172742~HL*3*2*22*1~HI*BF:599.7~NM1*IL*1*farrugia*brenda****MI*88027756201~DMG*D8*19391111*U~HL*4*3*19*1~NM1*SJ*1*GRECO*JOSEPH****24*161511795~REF*ZH*000507772005~N3*55 SPINDRIFT DRIVE*SUITE 240~N4*WILLIAMSVILLE*NY*14221~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*10~SE*24*242836~GE*1*241936~IEA*1*000242836~ - ISA*03*dnoone *01*0000000000*ZZ*0000000Eliginet*ZZ*BlueShield of N*071015*0903*U*00401*000032674*0*P*:~GS*HI*0000000Eliginet*BlueShield of N*20071015*0903*31774*X*004010X094A1~ST*278*32674~BHT*0078*13*ENLENGSDPMTQ*20071015*0903~HL*1**20*1~NM1*X3*2*BLUESHIELD OF NORTHEASTERN NEW YORK*****PI*55204~HL*2*1*21*1~NM1*1P*1*VACEK*JAMES****24*141338465~REF*ZH*000401141002~N3*99 EAST STATE STREET~N4*GLOVERSVILLE*NY~HL*3*2*22*1~HI*BF:366.19~NM1*IL*1******MI*88003509901~DMG*D8*19221209*U~HL*4*3*19*1~NM1*SJ*1*MAIRS*MICHAEL****24*141786068~REF*ZH*000407032001~N3*185 SECOND AVENUE~N4*GLOVERSVILLE*NY*12078~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*20~SE*24*32674~GE*1*31774~IEA*1*000032674~ - ISA*03*gjohnson2 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0904*U*00401*000242839*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0904*241939*X*004010X094A1~ST*278*242839~BHT*0078*13*WHBMBBXDSPML*20071015*0904~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*SHEIKH*ZIA****24*161590688~REF*ZH*000524454008~N3*4039 ROUTE 219*SUITE 102~N4*SALAMANCA*NY*14779~HL*3*2*22*1~HI*BF:706.1~NM1*IL*1*burton*amanda****MI*yjw88034076701~DMG*D8*19900815*U~HL*4*3*19*1~NM1*SJ*1*JAREMKO*WILLIAM****24*161482964~REF*ZH*000511127003~N3*2646 WEST STATE STREET*SUITE 405~N4*OLEAN*NY*147600000~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*30~SE*24*242839~GE*1*241939~IEA*1*000242839~ - ISA*03*tmason *01*0000000000*ZZ*0000000Eliginet*ZZ*BlueShield of N*071015*0905*U*00401*000032679*0*P*:~GS*HI*0000000Eliginet*BlueShield of N*20071015*0905*31779*X*004010X094A1~ST*278*32679~BHT*0078*13*EOCMUPJPJCEO*20071015*0905~HL*1**20*1~NM1*X3*2*BLUESHIELD OF NORTHEASTERN NEW YORK*****PI*55204~HL*2*1*21*1~NM1*1P*1*MAZZEI*RENATA****24*141338428~REF*ZH*000404963001~N3*460 SARATOGA ROAD~N4*SCOTIA*NY*12302~HL*3*2*22*1~HI*BF:V65.8~NM1*IL*1*whitney*james****MI*88059250301~DMG*D8*19701002*U~HL*4*3*19*1~NM1*SJ*1*NYDEGGER*RUDY****24*141787916~REF*ZH*000471951001~N3*1201 NOTT STREET*SUITE 103~N4*SCHENECTADY*NY*123082589~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*6~SE*24*32679~GE*1*31779~IEA*1*000032679~ - diff --git a/tests/TEST 278_28 TXNS_SOA.txt b/tests/TEST 278_28 TXNS_SOA.txt index ae63d15..b7b8575 100755 --- a/tests/TEST 278_28 TXNS_SOA.txt +++ b/tests/TEST 278_28 TXNS_SOA.txt @@ -1,4 +1,3 @@ - ISA*03*jking3 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0905*U*00401*000246767*0*T*:~ GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0905*245867*X*004010X059~ ST*278*246767~ @@ -23,8 +22,6 @@ DTP*472*RD8*20071015-20071113~ SE*20*246767~ GE*1*245867~ IEA*1*000246767~ - - ISA*03*bjary *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0905*U*00401*000242872*0*T*:~ GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0905*241972*X*004010X059~ ST*278*242872~ @@ -49,8 +46,6 @@ DTP*472*RD8*20071012-20071110~ SE*20*242872~ GE*1*241972~ IEA*1*000242872~ - - ISA*03*HEALTHNOW *00*HEALTHNOW *ZZ*KALEIDAHEALTH01*ZZ*KaleidaHealth01*071015*0905*U*00401*905310466*0*T*:~ GS*HI*2000002*BLUECROSS BLUES*20071015*0905*905310467*X*004010X059~ ST*278*905310467~ @@ -69,7 +64,6 @@ DTP*472*RD8*20071015-20071114~ SE*14*905310467~ GE*1*905310467~ IEA*1*905310466 - ISA*03*cww585 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0905*U*00401*000246782*0*T*:~ GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0905*245882*X*004010X059~ ST*278*246782~ @@ -93,4 +87,4 @@ UM*AR********Y~ DTP*472*RD8*20071015-20071113~ SE*20*246782~ GE*1*245882~ -IEA*1*000246782~ \ No newline at end of file +IEA*1*000246782~ diff --git a/tests/__init__.py b/tests/__init__.py index 6c96573..d7bfe08 100755 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -6,7 +6,7 @@ .. automodule:: test.run_tests :members: - + test_navigation =============== @@ -32,3 +32,33 @@ :members: """ +from tigershark import X12_4010_X091A1 +from tigershark import X12_4010_X092A1 +from tigershark import X12_4010_X093A1 +from tigershark import X12_4010_X094A1 +from tigershark import X12_4010_X096A1 +from tigershark import X12_4010_X098A1 +from tigershark import X12_5010_X221A1 +from tigershark import X12_5010_X279A1 + +# (Transaction Set, X12VersionTuple) -> test file name +TEST_FILE_MAP = { + ('271', X12_4010_X092A1): '271-dependent-benefits.txt', + ('271', X12_4010_X092A1): '271-example-2.txt', + ('271', X12_5010_X279A1): '271-example-3.txt', + ('271', X12_4010_X092A1): '271-example-dependent-rejection.txt', + ('271', X12_4010_X092A1): '271-example.txt', + ('271', X12_4010_X092A1): '271-related-entity.txt', + ('276', X12_4010_X093A1): 'TEST 276 TXNs.txt', + ('278', X12_4010_X094A1): 'TEST 278_13 TXNS.txt', + ('835', X12_4010_X091A1): '835-example-2.txt', + ('835', X12_4010_X091A1): '835-example.txt', + ('835', X12_5010_X221A1): '5010-835-example-1.txt', + ('835', X12_5010_X221A1): '5010-835-example-2.txt', + ('835', X12_5010_X221A1): '5010-835-example-3.txt', + ('837', X12_4010_X096A1): '837I-Examples.txt', + ('837', X12_4010_X096A1): '837I-Patient-NotSubscriber.txt', + ('837', X12_4010_X096A1): '837I-Patient-NotSubscriber2.txt', + ('837', X12_4010_X096A1): '837I-Patient-Subscriber.txt', + ('837', X12_4010_X098A1): '837-example.txt', +} diff --git a/tests/run_tests.py b/tests/run_tests.py index 3111415..bc3a279 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -73,7 +73,7 @@ def popRunner( rootDir ): For Python 2.6, this doesn't properly process the test_wsClaims module. That can be tested manually. """ - testRoot= os.path.join( rootDir, "test" ) + testRoot= os.path.join( rootDir, "tests" ) topSuite= unittest.TestSuite() for path,dirList,fileList in os.walk( testRoot, topdown=True ): for f in fileList: diff --git a/tests/test_271.py b/tests/test_271.py index 515cab6..ee63602 100644 --- a/tests/test_271.py +++ b/tests/test_271.py @@ -23,7 +23,7 @@ def test_header(self): "Information Receiver, Subscriber, or Dependent.")) self.assertEqual(h.purpose, ("11", "Response")) self.assertEqual(h.transaction_id, "11111") - self.assertEqual(h.creation_date, datetime.date(2012, 06, 05)) + self.assertEqual(h.creation_date, datetime.date(2012, 6, 5)) self.assertEqual(h.creation_time, datetime.time(23, 24, 23)) def test_number_of_receivers(self): diff --git a/tests/test_271_benefit_additional_info.py b/tests/test_271_benefit_additional_info.py new file mode 100644 index 0000000..697f7ce --- /dev/null +++ b/tests/test_271_benefit_additional_info.py @@ -0,0 +1,29 @@ +import unittest +import logging +import sys + + +from tigershark.facade import f271 +from tigershark.parsers import M271_5010_X279_A1 + + +class TestBenefitAdditionalInfo(unittest.TestCase): + def test_benefit_additional_info(self): + m = M271_5010_X279_A1.parsed_271 + with open('tests/271-example-3.txt') as f: + parsed = m.unmarshall(f.read().strip()) + f = f271.F271_5010(parsed) + + subscriber = f.facades[0].subscribers[0] + benefit_row = subscriber.eligibility_or_benefit_information[11] + additional_information = benefit_row.additional_information[0] + self.assertEqual(additional_information, ('11', 'Office')) + self.assertEqual(len(benefit_row.messages), 4) + + +if __name__ == "__main__": + logging.basicConfig( + stream=sys.stderr, + level=logging.INFO, + ) + unittest.main() diff --git a/tests/test_271_network_indicator.py b/tests/test_271_network_indicator.py new file mode 100644 index 0000000..3e8d0db --- /dev/null +++ b/tests/test_271_network_indicator.py @@ -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() diff --git a/tests/test_5010_271_1.py b/tests/test_5010_271_1.py new file mode 100644 index 0000000..9b30a84 --- /dev/null +++ b/tests/test_5010_271_1.py @@ -0,0 +1,101 @@ +from decimal import Decimal +import unittest + +from tigershark.facade import f271 +from tigershark.parsers.M271_5010_X279_A1 import parsed_271 + + +class TestParsed271(unittest.TestCase): + def setUp(self): + with open('tests/5010-271-example-1.txt') as f: + parsed = parsed_271.unmarshall(f.read().strip()) + self.facade = f271.F271_5010(parsed).facades[0] + + def test_financial_information(self): + eobi = self.facade.subscribers[0].eligibility_or_benefit_information + self.assertEqual( + eobi[0].coverage_information.service_type, + ('30', 'Health Benefit Plan Coverage')) + self.assertEqual( + eobi[0].coverage_information.insurance_type, + ('EP', 'Exclusive Provider Organization')) + self.assertEqual(eobi[0].coverage_information.description, '') + self.assertEqual(eobi[1].coverage_information.benefit_amount, Decimal(0)) + self.assertEqual(eobi[1].coverage_information.benefit_percent, Decimal(0)) + self.assertEqual(eobi[1].coverage_information.information_type, + ('W', 'Other Source of Data')) + + def test_subscriber_information(self): + subscriber = self.facade.subscribers[0] + location = subscriber.personal_information.address_location + self.assertEqual(location.city, 'KANSAS CITY') + self.assertEqual(location.state, 'MO') + self.assertEqual(location.zip, '64108') + street = subscriber.personal_information.address_street + self.assertEqual(street.addr1, '4040 VILLAGE AB') + self.assertEqual(street.addr2, '') + dates = subscriber.personal_information.dates + self.assertEqual(dates[0].time.strftime('%Y-%m-%d'), '2016-02-01') + self.assertEqual(dates[0].type, ('346', 'Plan Begin')) + self.assertEqual(dates[1].time.strftime('%Y-%m-%d'), '2016-06-01') + self.assertEqual(dates[1].type, ('472', 'Service')) + self.assertEqual(dates[2].time.strftime('%Y-%m-%d'), '2014-12-08') + self.assertEqual(dates[2].type, ('356', 'Eligibility Begin')) + demographic = subscriber.personal_information.demographic_information + self.assertEqual(demographic.birth_date.strftime('%Y-%m-%d'), '1943-08-13') + self.assertEqual(demographic.gender, ('M', 'Male')) + name = subscriber.personal_information.name + self.assertEqual(name.entity_identifier, ('IL', 'Insured')) + self.assertEqual(name.entity_type, ('1', 'Person')) + self.assertEqual(name.first_name, 'JOHN') + self.assertEqual(name.id_code, '1234567899') + self.assertEqual(name.id_code_qual, ('MI', 'Member Identification Number')) + self.assertEqual(name.last_name, 'SMITH') + self.assertTrue(name.is_person) + reference_ids = subscriber.personal_information.reference_ids + self.assertEqual(reference_ids[0].reference_id, '0404044') + self.assertEqual(reference_ids[0].reference_id_qualifier, ('18', 'Plan Number')) + self.assertEqual(reference_ids[1].reference_id, '030030001000120') + self.assertEqual(reference_ids[1].reference_id_qualifier, ('6P', 'Group Number')) + self.assertEqual(reference_ids[1].description, 'NEVADA EXCHANGE') + relationship = subscriber.personal_information.relationship + self.assertTrue(relationship.is_insured) + self.assertEqual(relationship.maintenance_reason, ('25', 'Change in Identifying Data Elements')) + self.assertEqual(relationship.maintenance_type, ('001', 'Change')) + self.assertEqual(relationship.relationship, ('18', 'Self')) + + def test_receiver(self): + r_name = self.facade.receivers[0].receiver_information.name + self.assertEqual(r_name.entity_identifier, ('1P', 'Provider')) + self.assertEqual(r_name.entity_type, ('1', 'Person')) + self.assertEqual(r_name.first_name, 'Barraret') + self.assertEqual(r_name.id_code, '1234567894') + self.assertEqual(r_name.id_code_qual, + ('XX', 'Health Care Financing Administration National Provider Identifier')) + self.assertTrue(r_name.is_person) + self.assertEqual(r_name.middle_initial, 'J.') + self.assertEqual(r_name.last_name, 'James') + + def test_version(self): + self.assertEqual(self.facade.transaction_set_identifier_code, '271') + self.assertEqual(self.facade.x12_version_string, '5010') + + def test_payer(self): + eobi = self.facade.subscribers[0].eligibility_or_benefit_information + benefit_related_entity = eobi[1].benefit_related_entity + self.assertEqual(benefit_related_entity.address_location.city, 'El Fixato') + self.assertEqual(benefit_related_entity.address_location.state, 'TX') + self.assertEqual(benefit_related_entity.address_location.zip, '68887') + self.assertEqual(benefit_related_entity.address_street.addr1, 'PO Box 983322') + self.assertEqual(benefit_related_entity.name.entity_identifier, ('PR', 'Payer')) + self.assertEqual(benefit_related_entity.name.entity_type, + ('2', 'Non-Person Entity')) + self.assertTrue(benefit_related_entity.name.is_organization) + self.assertEqual(benefit_related_entity.name.org_name, 'Mala Compania') + + def test_header(self): + header = self.facade.header + self.assertIsNone(header) + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_5010_835_1.py b/tests/test_5010_835_1.py new file mode 100644 index 0000000..d4a0395 --- /dev/null +++ b/tests/test_5010_835_1.py @@ -0,0 +1,129 @@ +import datetime +from decimal import Decimal +import unittest + +from tigershark.facade import f835 +from tigershark.parsers.M835_5010_X221_A1 import parsed_835 + + +class TestParsed835(unittest.TestCase): + def setUp(self): + with open('tests/5010-835-example-1.txt') as f: + parsed = parsed_835.unmarshall(f.read().strip()) + self.facade = f835.F835_5010(parsed).facades[0] + + def test_financial_information(self): + fi = self.facade.header.financial_information + self.assertEqual( + fi.transaction_type, + ('I', 'Remittance Information Only')) + self.assertEqual(fi.amount, Decimal('1790.00')) + self.assertEqual(fi.credit_or_debit, ('C', 'Credit')) + self.assertEqual(fi.payment_method, ('CHK', 'Check')) + self.assertIsNone(fi.payment_format) + self.assertIsNone(fi.sender_aba_transit_routing_number) + self.assertIsNone( + fi.sender_canadian_bank_branch_and_institution_number) + self.assertIsNone(fi.sender_account_type) + self.assertEqual(fi.sender_bank_account_number, '') + self.assertEqual(fi.sender_id, '') + self.assertEqual(fi.sender_supplemental_id, '') + self.assertIsNone(fi.receiver_aba_transit_routing_number) + self.assertIsNone( + fi.receiver_canadian_bank_branch_and_institution_number) + self.assertIsNone(fi.receiver_account_type) + self.assertEqual(fi.receiver_bank_account_number, '') + self.assertEqual(fi.issue_date, datetime.date(2011, 9, 30)) + + def test_reassociation_trace_number(self): + rtn = self.facade.header.reassociation_trace_number + self.assertEqual(rtn.trace_type, + ('1', 'Current Transaction Trace Numbers')) + self.assertEqual(rtn.check_or_eft_trace_number, '123456789') + self.assertEqual(rtn.payer_id, '1123456789') + self.assertEqual(rtn.originating_company_supplemental_code, '') + + def test_currency_information(self): + ci = self.facade.header.currency_information + self.assertIsNone(ci.currency_code) + self.assertIsNone(ci.exchange_rate) + + def test_receiver(self): + receiver = self.facade.header.receiver + self.assertEqual(receiver.id, '5010835EXAMPLE') + self.assertEqual(receiver.description, '') + self.assertEqual(receiver.reference_id, '') + + def test_version(self): + version = self.facade.header.version + self.assertIsNone(version.version_number) + self.assertIsNone(version.description) + self.assertIsNone(version.reference_id) + + def test_production_date(self): + self.assertEqual(self.facade.header.production_date.date, + datetime.date(2011, 9, 30)) + + def test_payer(self): + payer = self.facade.payer + self.assertIsNone(payer.payer_id) + self.assertIsNone(payer.submitter_id) + self.assertIsNone(payer.hin) + self.assertIsNone(payer.naic_code) + + cd = payer.contact_details + self.assertEqual(cd.name, 'DENTAL PAYER NAME') + + def test_payee(self): + payee = self.facade.payee + self.assertIsNone(payee.state_license) + self.assertEqual(payee.tax_id, '123456789') + + def test_claims_overview(self): + co = self.facade.claims_overview + self.assertEqual(co.number, '1') + + def test_claims(self): + self.assertEqual(len(self.facade.claims), 3) + + def test_claim_1(self): + claim = self.facade.claims[0] + self.assertEqual(claim.date_received, datetime.date(2011, 9, 8)) + self.assertEqual( + claim.date_statement_period_start, + datetime.date(1900, 1, 1)) + self.assertEqual( + claim.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) + self.assertEqual( + claim.claim_adjustments.contractual_obligation.amount_1, + Decimal('0.0')) + + self.assertEqual( + claim.payment_info.patient_control_number, + 'PRECERTIFICATION') + self.assertEqual(claim.patient.first_name, 'PATIENT') + self.assertEqual(claim.group_or_policy_number, '11223344') + self.assertEqual(claim.contract_class, 'CONTRACTING') + + self.assertEqual(len(claim.line_items), 7) + + line_item = claim.line_items[0] + self.assertEqual(line_item.charge, Decimal('90')) + self.assertEqual(line_item.payment, Decimal('80')) + self.assertEqual(line_item.quantity, '1') + self.assertEqual(line_item.provider_control_number, '00010') + self.assertEqual(line_item.allowed_amount, Decimal('80')) + self.assertEqual( + line_item.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) + self.assertEqual( + line_item.claim_adjustments.contractual_obligation.amount_1, + Decimal('10.0')) + + def test_footer(self): + footer = self.facade.footer + self.assertIsNone(footer) + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_5010_835_2.py b/tests/test_5010_835_2.py new file mode 100644 index 0000000..7c23e5a --- /dev/null +++ b/tests/test_5010_835_2.py @@ -0,0 +1,127 @@ +import datetime +from decimal import Decimal +import unittest + +from tigershark.facade import f835 +from tigershark.parsers.M835_5010_X221_A1 import parsed_835 + + +class TestParsed835(unittest.TestCase): + def setUp(self): + with open('tests/5010-835-example-2.txt') as f: + parsed = parsed_835.unmarshall(f.read().strip()) + self.facade = f835.F835_5010(parsed).facades[0] + + def test_financial_information(self): + fi = self.facade.header.financial_information + self.assertEqual( + fi.transaction_type, + ('I', 'Remittance Information Only')) + self.assertEqual(fi.amount, Decimal('100.00')) + self.assertEqual(fi.credit_or_debit, ('C', 'Credit')) + self.assertEqual(fi.payment_method, ('CHK', 'Check')) + self.assertIsNone(fi.payment_format) + self.assertIsNone(fi.sender_aba_transit_routing_number) + self.assertIsNone( + fi.sender_canadian_bank_branch_and_institution_number) + self.assertIsNone(fi.sender_account_type) + self.assertEqual(fi.sender_bank_account_number, '') + self.assertEqual(fi.sender_id, '') + self.assertEqual(fi.sender_supplemental_id, '') + self.assertIsNone(fi.receiver_aba_transit_routing_number) + self.assertIsNone( + fi.receiver_canadian_bank_branch_and_institution_number) + self.assertIsNone(fi.receiver_account_type) + self.assertEqual(fi.receiver_bank_account_number, '') + self.assertEqual(fi.issue_date, datetime.date(2011, 9, 30)) + + def test_reassociation_trace_number(self): + rtn = self.facade.header.reassociation_trace_number + self.assertEqual(rtn.trace_type, + ('1', 'Current Transaction Trace Numbers')) + self.assertEqual(rtn.check_or_eft_trace_number, '123456789') + self.assertEqual(rtn.payer_id, '1123456789') + self.assertEqual(rtn.originating_company_supplemental_code, '') + + def test_currency_information(self): + ci = self.facade.header.currency_information + self.assertIsNone(ci.currency_code) + self.assertIsNone(ci.exchange_rate) + + def test_receiver(self): + receiver = self.facade.header.receiver + self.assertEqual(receiver.id, '5010835EXAMPLE') + self.assertEqual(receiver.description, '') + self.assertEqual(receiver.reference_id, '') + + def test_version(self): + version = self.facade.header.version + self.assertIsNone(version.version_number) + self.assertIsNone(version.description) + self.assertIsNone(version.reference_id) + + def test_production_date(self): + self.assertEqual(self.facade.header.production_date.date, + datetime.date(2011, 9, 30)) + + def test_payer(self): + payer = self.facade.payer + self.assertIsNone(payer.payer_id) + self.assertIsNone(payer.submitter_id) + self.assertIsNone(payer.hin) + self.assertIsNone(payer.naic_code) + + cd = payer.contact_details + self.assertEqual(cd.name, 'PAYER NAME') + + def test_payee(self): + payee = self.facade.payee + self.assertIsNone(payee.state_license) + self.assertEqual(payee.tax_id, '123456789') + + def test_claims_overview(self): + co = self.facade.claims_overview + self.assertEqual(co.number, '1') + + def test_claims(self): + self.assertEqual(len(self.facade.claims), 2) + + def test_claim_1(self): + claim = self.facade.claims[0] + self.assertEqual(claim.date_received, datetime.date(2011, 9, 7)) + self.assertIsNone(claim.date_statement_period_start) + self.assertEqual( + claim.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) + self.assertEqual( + claim.claim_adjustments.contractual_obligation.amount_1, + Decimal('0.0')) + + self.assertEqual( + claim.payment_info.patient_control_number, + 'EDI PAID') + self.assertEqual(claim.patient.first_name, 'FIRST NAME') + self.assertIsNone(claim.group_or_policy_number) + self.assertIsNone(claim.contract_class) + + self.assertEqual(len(claim.line_items), 1) + + line_item = claim.line_items[0] + self.assertEqual(line_item.charge, Decimal('2083')) + self.assertEqual(line_item.payment, Decimal('100')) + self.assertEqual(line_item.quantity, '1') + self.assertEqual(line_item.provider_control_number, '1') + self.assertEqual(line_item.allowed_amount, Decimal('100')) + self.assertEqual( + line_item.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) + self.assertEqual( + line_item.claim_adjustments.contractual_obligation.amount_1, + Decimal('1983')) + + def test_footer(self): + footer = self.facade.footer + self.assertIsNone(footer) + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_5010_835_3.py b/tests/test_5010_835_3.py new file mode 100644 index 0000000..dce928c --- /dev/null +++ b/tests/test_5010_835_3.py @@ -0,0 +1,129 @@ +import datetime +from decimal import Decimal +import unittest + +from tigershark.facade import f835 +from tigershark.parsers.M835_5010_X221_A1 import parsed_835 + + +class TestParsed835(unittest.TestCase): + def setUp(self): + with open('tests/5010-835-example-3.txt') as f: + parsed = parsed_835.unmarshall(f.read().strip()) + self.facade = f835.F835_5010(parsed).facades[0] + + def test_financial_information(self): + fi = self.facade.header.financial_information + self.assertEqual( + fi.transaction_type, + ('I', 'Remittance Information Only')) + self.assertEqual(fi.amount, Decimal('57.44')) + self.assertEqual(fi.credit_or_debit, ('C', 'Credit')) + self.assertEqual(fi.payment_method, ('CHK', 'Check')) + self.assertIsNone(fi.payment_format) + self.assertIsNone(fi.sender_aba_transit_routing_number) + self.assertIsNone( + fi.sender_canadian_bank_branch_and_institution_number) + self.assertIsNone(fi.sender_account_type) + self.assertEqual(fi.sender_bank_account_number, '') + self.assertEqual(fi.sender_id, '') + self.assertEqual(fi.sender_supplemental_id, '') + self.assertIsNone(fi.receiver_aba_transit_routing_number) + self.assertIsNone( + fi.receiver_canadian_bank_branch_and_institution_number) + self.assertIsNone(fi.receiver_account_type) + self.assertEqual(fi.receiver_bank_account_number, '') + self.assertEqual(fi.issue_date, datetime.date(2011, 9, 30)) + + def test_reassociation_trace_number(self): + rtn = self.facade.header.reassociation_trace_number + self.assertEqual(rtn.trace_type, + ('1', 'Current Transaction Trace Numbers')) + self.assertEqual(rtn.check_or_eft_trace_number, '123456789') + self.assertEqual(rtn.payer_id, '1123456789') + self.assertEqual(rtn.originating_company_supplemental_code, '') + + def test_currency_information(self): + ci = self.facade.header.currency_information + self.assertIsNone(ci.currency_code) + self.assertIsNone(ci.exchange_rate) + + def test_receiver(self): + receiver = self.facade.header.receiver + self.assertEqual(receiver.id, '5010835EXAMPLE') + self.assertEqual(receiver.description, '') + self.assertEqual(receiver.reference_id, '') + + def test_version(self): + version = self.facade.header.version + self.assertIsNone(version.version_number) + self.assertIsNone(version.description) + self.assertIsNone(version.reference_id) + + def test_production_date(self): + self.assertEqual(self.facade.header.production_date.date, + datetime.date(2011, 9, 30)) + + def test_payer(self): + payer = self.facade.payer + self.assertIsNone(payer.payer_id) + self.assertIsNone(payer.submitter_id) + self.assertIsNone(payer.hin) + self.assertIsNone(payer.naic_code) + + cd = payer.contact_details + self.assertEqual(cd.name, 'PAYER NAME') + + def test_payee(self): + payee = self.facade.payee + self.assertIsNone(payee.state_license) + self.assertEqual(payee.tax_id, '123456789') + + def test_claims_overview(self): + co = self.facade.claims_overview + self.assertEqual(co.number, '1') + + def test_claims(self): + self.assertEqual(len(self.facade.claims), 2) + + def test_claim_1(self): + claim = self.facade.claims[0] + self.assertEqual(claim.date_received, datetime.date(2011, 9, 8)) + self.assertEqual( + claim.date_statement_period_start, + datetime.date(2009, 1, 13)) + self.assertEqual( + claim.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) + self.assertEqual( + claim.claim_adjustments.contractual_obligation.amount_1, + Decimal('0.0')) + + self.assertEqual( + claim.payment_info.patient_control_number, + 'EDI DENIAL') + self.assertEqual(claim.patient.first_name, 'FIRST') + self.assertEqual(claim.group_or_policy_number, '123456') + self.assertIsNone(claim.contract_class) + + self.assertEqual(len(claim.line_items), 1) + + line_item = claim.line_items[0] + self.assertEqual(line_item.charge, Decimal('1088')) + self.assertEqual(line_item.payment, Decimal('0')) + self.assertEqual(line_item.quantity, '8') + self.assertIsNone(line_item.provider_control_number) + self.assertEqual(line_item.allowed_amount, Decimal('0')) + self.assertEqual( + line_item.claim_adjustments.patient_responsibility.amount_1, + Decimal('1088.0')) + self.assertEqual( + line_item.claim_adjustments.contractual_obligation.amount_1, + Decimal('0')) + + def test_footer(self): + footer = self.facade.footer + self.assertIsNone(footer) + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_5010_837I.py b/tests/test_5010_837I.py new file mode 100644 index 0000000..72505f3 --- /dev/null +++ b/tests/test_5010_837I.py @@ -0,0 +1,45 @@ +import datetime +from decimal import Decimal +import unittest + +from tigershark.parsers.M837_5010_X223_A1 import parsed_837 + + +class TestParserX223A1(unittest.TestCase): + def test_financial_information(self): + with open('tests/5010-837-institutional-example.txt') as f: + parsed = parsed_837.unmarshall(f.read().strip()) + + segments = parsed.segs() + + self.assertEqual(len(segments), 92) + self.assertEqual( + [str(x) for x in segments[1].elements], + [ + "GS", + "HC", + "XXXXXXX", + "XXXXX", + "20170617", + "1741", + "101", + "X", + "005010X223A2" + ] + ) + segment_first_nm1 = parsed.descendant("segment", "NM1")[0] + self.assertEqual( + [str(x) for x in segment_first_nm1.elements], + [ + "NM1", + "41", + "2", + "JONES HOSPITAL", + "", + "", + "", + "", + "46", + "12345" + ] + ) \ No newline at end of file diff --git a/tests/test_5010_837P.py b/tests/test_5010_837P.py new file mode 100644 index 0000000..8484b0c --- /dev/null +++ b/tests/test_5010_837P.py @@ -0,0 +1,45 @@ +import datetime +from decimal import Decimal +import unittest + +from tigershark.parsers.M837_5010_X222_A1 import parsed_837 + + +class TestParserX222A1(unittest.TestCase): + def test_financial_information(self): + with open('tests/5010-837-professional-example.txt') as f: + parsed = parsed_837.unmarshall(f.read().strip()) + + segments = parsed.segs() + + self.assertEqual(len(segments), 45) + self.assertEqual( + [str(x) for x in segments[1].elements], + [ + "GS", + "HC", + "XXXXXXX", + "XXXXX", + "20170617", + "1741", + "101", + "X", + "005010X222A1" + ] + ) + segment_first_nm1 = parsed.descendant("segment", "NM1")[0] + self.assertEqual( + [str(x) for x in segment_first_nm1.elements], + [ + "NM1", + "41", + "2", + "SUBMITTER", + "", + "", + "", + "", + "46", + "ABC123" + ] + ) \ No newline at end of file diff --git a/tests/test_835.py b/tests/test_835.py index 2e88194..8e7d845 100644 --- a/tests/test_835.py +++ b/tests/test_835.py @@ -16,50 +16,54 @@ def setUp(self): parsed = m.unmarshall(f.read().strip()) self.f = f835.F835_4010(parsed) - ## Header ## def test_financial_information(self): fi = self.f.facades[0].header.financial_information - self.assertEqual(fi.transaction_type, - ('I', 'Remittance Information Only')) + self.assertEqual( + fi.transaction_type, + ('I', 'Remittance Information Only')) self.assertEqual(fi.amount, Decimal('12345.67')) self.assertEqual(fi.credit_or_debit, ('C', 'Credit')) - self.assertEqual(fi.payment_method, - ('ACH', 'Automated Clearing House (ACH)')) - self.assertEqual(fi.payment_format, - ('CCP', 'Cash Concentration/Disbursement Plus Addenda')) + self.assertEqual( + fi.payment_method, + ('ACH', 'Automated Clearing House (ACH)')) + self.assertEqual( + fi.payment_format, + ('CCP', 'Cash Concentration/Disbursement Plus Addenda')) self.assertEqual(fi.sender_aba_transit_routing_number, '999999999') - self.assertEqual(fi.sender_canadian_bank_branch_and_institution_number, - None) + self.assertIsNone( + fi.sender_canadian_bank_branch_and_institution_number) self.assertEqual(fi.sender_account_type, ('DA', 'Demand Deposit')) self.assertEqual(fi.sender_bank_account_number, '1234567890') self.assertEqual(fi.sender_id, '1111111111') self.assertEqual(fi.sender_supplemental_id, '000011111') self.assertEqual(fi.receiver_aba_transit_routing_number, '222222222') self.assertEqual( - fi.receiver_canadian_bank_branch_and_institution_number, None) + fi.receiver_canadian_bank_branch_and_institution_number, None) self.assertEqual(fi.receiver_account_type, ('DA', 'Demand Deposit')) self.assertEqual(fi.receiver_bank_account_number, '3333333333') - self.assertEqual(fi.issue_date, datetime.date(2012, 03, 22)) + self.assertEqual(fi.issue_date, datetime.date(2012, 3, 22)) def test_reassociation_trace_number(self): rtn = self.f.facades[0].header.reassociation_trace_number - self.assertEqual(rtn.trace_type, - ('1', 'Current Transaction Trace Numbers')) + self.assertEqual( + rtn.trace_type, + ('1', 'Current Transaction Trace Numbers')) self.assertEqual(rtn.check_or_eft_trace_number, '1QG11111111') self.assertEqual(rtn.payer_id, '1111111111') - self.assertEqual(rtn.originating_company_supplemental_code, - '000011111') + self.assertEqual( + rtn.originating_company_supplemental_code, + '000011111') def test_production_date(self): pd = self.f.facades[0].header.production_date - self.assertEqual(pd.date, datetime.date(2012, 03, 19)) + self.assertEqual(pd.date, datetime.date(2012, 3, 19)) - ## PAYER ## def test_payer(self): p = self.f.facades[0].payer c = p.contact_details self.assertEqual(c.name, 'UNITED HEALTHCARE INSURANCE COMPANY') - self.assertEqual(c.id_qualifier, + self.assertEqual( + c.id_qualifier, ('XV', 'Health Care Financing Administration National Plan ID')) self.assertEqual(c.id, '87726') self.assertEqual(c.addr1, '9900 BREN ROAD') @@ -71,21 +75,21 @@ def test_payer(self): self.assertEqual(c.contact_phone_ext, None) self.assertEqual(p.payer_id, '87726') - ## PAYEE ## def test_payee(self): p = self.f.facades[0].payee c = p.contact_details self.assertEqual(c.name, 'MY CLINIC') - self.assertEqual(c.id_qualifier, - ('XX', 'Health Care Financing Administration National '\ - 'Provider ID')) + self.assertEqual( + c.id_qualifier, + ('XX', + 'Health Care Financing Administration National ' + 'Provider ID')) self.assertEqual(c.id, '1333333333') self.assertEqual(c.addr1, '123 HEALTHCARE STREET') self.assertEqual(c.city, 'SAN FRANCISCO') self.assertEqual(c.zip, '94109') self.assertEqual(p.tax_id, '777777777') - ## Claims Overview ## def test_claims_overview(self): co = self.f.facades[0].claims_overview self.assertEqual(co.number, '1') @@ -96,11 +100,10 @@ def test_claims_overview(self): self.assertEqual(co.total_claim_charge, Decimal('23456.78')) self.assertEqual(co.total_covered_charge, Decimal('12345.67')) - ## Claims ## def test_claims(self): claims = self.f.facades[0].claims c = claims[0] - # Claim details + pi = c.payment_info self.assertEqual(pi.patient_control_number, "001-DDDDDDDDDD") self.assertEqual(pi.status_code, ('1', 'Processed as Primary')) @@ -109,11 +112,10 @@ def test_claims(self): self.assertEqual(pi.patient_responsibility, Decimal('0.0')) self.assertEqual(pi.claim_type, ('13', 'Point of Service (POS)')) self.assertEqual(pi.payer_claim_control_number, - '1234567890 0987654321') + '1234567890 0987654321') self.assertEqual(pi.facility_type, '81') self.assertEqual(pi.total_covered_charge, Decimal('200.02')) - # Patient patient = c.patient self.assertTrue(patient.is_person()) self.assertFalse(patient.is_organization()) @@ -122,7 +124,6 @@ def test_claims(self): self.assertEqual(patient.middle_initial, "") self.assertEqual(patient.suffix, "") - # Insured insured = c.insured self.assertTrue(insured.is_person()) self.assertFalse(insured.is_organization()) @@ -130,78 +131,81 @@ def test_claims(self): self.assertEqual(insured.first_name, "JANE") self.assertEqual(insured.middle_initial, "") self.assertEqual(insured.suffix, "") - self.assertEqual(insured.id_code_qual, - ("MI", "Member Identification Number")) + self.assertEqual( + insured.id_code_qual, + ("MI", "Member Identification Number")) self.assertEqual(insured.id_code, "123111111") - # Corrected Info corrected = c.corrected_insured self.assertEqual(corrected.last_name, "DOE") self.assertEqual(corrected.first_name, "JANE") self.assertEqual(corrected.middle_initial, "D") - # Service Provider provider = c.service_provider self.assertFalse(provider.is_person()) self.assertTrue(provider.is_organization()) self.assertEqual(provider.org_name, "MY CLINIC") - self.assertEqual(provider.id_code_qual, ( - ("XX", "Health Care Financing Administration National "\ - "Provider Identifier"))) + self.assertEqual( + provider.id_code_qual, + ("XX", + "Health Care Financing Administration National " + "Provider Identifier")) self.assertEqual(provider.id_code, '1333333333') - # Other stuff self.assertEqual(c.group_or_policy_number, '5G5G5G') self.assertEqual(c.contract_class, 'CHOYC+') # If a received date isn't supplied, don't die just return None! self.assertEqual(c.date_received, None) - self.assertEqual(c.date_statement_period_start, - datetime.date(2012, 02, 22)) - self.assertEqual(c.claim_adjustments.patient_responsibility.amount_1, - Decimal('0.0')) - self.assertEqual(c.claim_adjustments.contractual_obligation.amount_1, - Decimal('0.0')) + self.assertEqual( + c.date_statement_period_start, + datetime.date(2012, 2, 22)) + self.assertEqual( + c.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) + self.assertEqual( + c.claim_adjustments.contractual_obligation.amount_1, + Decimal('0.0')) - # Line item charges l = c.line_items[0] self.assertEqual(l.hcpcs_code[0], '88888') self.assertEqual(l.charge, Decimal('200.02')) self.assertEqual(l.payment, Decimal('200.02')) self.assertEqual(l.quantity, '1') - self.assertEqual(l.service_date, datetime.date(2012, 02, 22)) + self.assertEqual(l.service_date, datetime.date(2012, 2, 22)) self.assertEqual(l.provider_control_number, '251111111111') self.assertEqual(l.allowed_amount, Decimal('200.02')) - self.assertEqual(l.claim_adjustments.patient_responsibility.amount_1, - Decimal('0.0')) - self.assertEqual(l.claim_adjustments.contractual_obligation.amount_1, - Decimal('0.0')) + self.assertEqual( + l.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) + self.assertEqual( + l.claim_adjustments.contractual_obligation.amount_1, + Decimal('0.0')) - # Second claim! c = claims[1] self.assertEqual(c.get_actual_deductible(), Decimal('145.0')) self.assertEqual(c.get_actual_coinsurance(), Decimal('0.0')) - # Claim details + pi = c.payment_info self.assertEqual(pi.patient_control_number, "001-SSSSSSSSSS") self.assertEqual(pi.status_code, ('1', 'Processed as Primary')) self.assertEqual(pi.total_charge, Decimal('23276.56')) self.assertEqual(pi.payment, Decimal('12000.65')) self.assertEqual(pi.patient_responsibility, Decimal('145.0')) - self.assertEqual(pi.claim_type, - ("14", "Exclusive Provider Organization (EPO)")) - self.assertEqual(pi.payer_claim_control_number, - '2234567890 0987654322') + self.assertEqual( + pi.claim_type, + ("14", "Exclusive Provider Organization (EPO)")) + self.assertEqual( + pi.payer_claim_control_number, + '2234567890 0987654322') self.assertEqual(pi.facility_type, '81') self.assertEqual(pi.total_covered_charge, Decimal('12145.65')) - # Patient patient = c.patient self.assertTrue(patient.is_person()) self.assertFalse(patient.is_organization()) self.assertEqual(patient.last_name, "SMITH") self.assertEqual(patient.first_name, "JOHN") - # Insured insured = c.insured self.assertTrue(insured.is_person()) self.assertFalse(insured.is_organization()) @@ -209,48 +213,52 @@ def test_claims(self): self.assertEqual(insured.first_name, "JANE") self.assertEqual(insured.middle_initial, "") self.assertEqual(insured.suffix, "") - self.assertEqual(insured.id_code_qual, - ("MI", "Member Identification Number")) + self.assertEqual( + insured.id_code_qual, + ("MI", "Member Identification Number")) self.assertEqual(insured.id_code, "123222222") - # Corrected Info corrected = c.corrected_insured self.assertEqual(corrected.last_name, "SMITH") self.assertEqual(corrected.first_name, "JANE") self.assertEqual(corrected.middle_initial, "A") - # Other stuff self.assertEqual(c.group_or_policy_number, '717171') self.assertEqual(c.contract_class, 'CHOYC') - self.assertEqual(c.date_received, datetime.date(2012, 03, 03)) - self.assertEqual(c.date_statement_period_start, - datetime.date(2012, 02, 23)) - self.assertEqual(c.claim_adjustments.patient_responsibility.amount_1, - Decimal('145.0')) + self.assertEqual(c.date_received, datetime.date(2012, 3, 3)) + self.assertEqual( + c.date_statement_period_start, + datetime.date(2012, 2, 23)) + self.assertEqual( + c.claim_adjustments.patient_responsibility.amount_1, + Decimal('145.0')) # Don't look into the child loops for segments - self.assertEqual(c.claim_adjustments.contractual_obligation.amount_1, - Decimal('0.0')) + self.assertEqual( + c.claim_adjustments.contractual_obligation.amount_1, + Decimal('0.0')) - # Line item charges l = c.line_items[0] self.assertEqual(l.hcpcs_code[0], '88888') self.assertEqual(l.charge, Decimal('23276.56')) self.assertEqual(l.payment, Decimal('12145.65')) self.assertEqual(l.quantity, '1') - self.assertEqual(l.service_date, datetime.date(2012, 02, 21)) + self.assertEqual(l.service_date, datetime.date(2012, 2, 21)) self.assertEqual(l.provider_control_number, '252222222222') - self.assertEqual(l.claim_adjustments.contractual_obligation.amount_1, - Decimal('11130.91')) self.assertEqual( - l.claim_adjustments.contractual_obligation.total_amount(), - Decimal('11130.91')) - self.assertEqual(l.claim_adjustments.patient_responsibility.amount_1, - Decimal('0.0')) + l.claim_adjustments.contractual_obligation.amount_1, + Decimal('11130.91')) + self.assertEqual( + l.claim_adjustments.contractual_obligation.total_amount(), + Decimal('11130.91')) + self.assertEqual( + l.claim_adjustments.patient_responsibility.amount_1, + Decimal('0.0')) self.assertEqual(l.allowed_amount, Decimal('12145.65')) - self.assertEqual(l.notes[0], ("N220", "Alert: See the payer's web "\ - "site or contact the payer's Customer Service department to " \ - "obtain forms and instructions for filing a provider "\ - "dispute.")) + self.assertEqual(l.notes[0], ( + "N220", "Alert: See the payer's web " + "site or contact the payer's Customer Service department to " + "obtain forms and instructions for filing a provider " + "dispute.")) self.assertEqual(l.notes[1], "M68") def test_footer(self): @@ -258,7 +266,7 @@ def test_footer(self): 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.date, datetime.date(2012, 12, 31)) self.assertEqual(adj.amount_1, Decimal('-361.19')) diff --git a/tests/test_835_2.py b/tests/test_835_2.py index 3a0201e..efcfd68 100644 --- a/tests/test_835_2.py +++ b/tests/test_835_2.py @@ -39,7 +39,7 @@ def test_financial_information(self): fi.receiver_canadian_bank_branch_and_institution_number, None) self.assertEqual(fi.receiver_account_type, ('DA', 'Demand Deposit')) self.assertEqual(fi.receiver_bank_account_number, '3333333333') - self.assertEqual(fi.issue_date, datetime.date(2012, 03, 22)) + self.assertEqual(fi.issue_date, datetime.date(2012, 3, 22)) def test_reassociation_trace_number(self): rtn = self.f.facades[0].header.reassociation_trace_number @@ -60,9 +60,9 @@ def test_reassociation_trace_number(self): def test_production_date(self): pd = self.f.facades[0].header.production_date - self.assertEqual(pd.date, datetime.date(2012, 03, 19)) + self.assertEqual(pd.date, datetime.date(2012, 3, 19)) pd = self.f.facades[1].header.production_date - self.assertEqual(pd.date, datetime.date(2012, 03, 19)) + self.assertEqual(pd.date, datetime.date(2012, 3, 19)) ## PAYER ## def test_payer(self): @@ -194,7 +194,7 @@ def test_claims(self): # If a received date isn't supplied, don't die just return None! self.assertEqual(c.date_received, None) self.assertEqual(c.date_statement_period_start, - datetime.date(2012, 02, 22)) + datetime.date(2012, 2, 22)) self.assertEqual(c.claim_adjustments.patient_responsibility.amount_1, Decimal('0.0')) self.assertEqual(c.claim_adjustments.contractual_obligation.amount_1, @@ -206,7 +206,7 @@ def test_claims(self): self.assertEqual(l.charge, Decimal('200.02')) self.assertEqual(l.payment, Decimal('200.02')) self.assertEqual(l.quantity, '1') - self.assertEqual(l.service_date, datetime.date(2012, 02, 22)) + self.assertEqual(l.service_date, datetime.date(2012, 2, 22)) self.assertEqual(l.provider_control_number, '251111111111') self.assertEqual(l.allowed_amount, Decimal('200.02')) self.assertEqual(l.claim_adjustments.patient_responsibility.amount_1, @@ -259,9 +259,9 @@ def test_claims(self): # Other stuff self.assertEqual(c.group_or_policy_number, '717171') self.assertEqual(c.contract_class, 'CHOYC') - self.assertEqual(c.date_received, datetime.date(2012, 03, 03)) + self.assertEqual(c.date_received, datetime.date(2012, 3, 3)) self.assertEqual(c.date_statement_period_start, - datetime.date(2012, 02, 23)) + datetime.date(2012, 2, 23)) self.assertEqual(c.claim_adjustments.patient_responsibility.amount_1, Decimal('145.0')) # Don't look into the child loops for segments @@ -274,7 +274,7 @@ def test_claims(self): self.assertEqual(l.charge, Decimal('23276.56')) self.assertEqual(l.payment, Decimal('12145.65')) self.assertEqual(l.quantity, '1') - self.assertEqual(l.service_date, datetime.date(2012, 02, 21)) + self.assertEqual(l.service_date, datetime.date(2012, 2, 21)) self.assertEqual(l.provider_control_number, '252222222222') self.assertEqual(l.claim_adjustments.contractual_obligation.amount_1, Decimal('11130.91')) diff --git a/tests/test_common.py b/tests/test_common.py new file mode 100644 index 0000000..5351259 --- /dev/null +++ b/tests/test_common.py @@ -0,0 +1,27 @@ +import datetime +import unittest + +from tigershark.facade import D8 + + +class TestD8(unittest.TestCase): + + def test_parse_none(self): + self.assertEqual(D8.x12_to_python(None), None) + + def test_parse_CCYYMMDD(self): + self.assertEqual(D8.x12_to_python('19790405'), + datetime.date(1979, 4, 5)) + + def test_parse_YYMMDD(self): + self.assertEqual( + D8.x12_to_python('140405'), + datetime.date(2014, 4, 5)) + + def test_to_x12_none(self): + self.assertEqual(D8.python_to_x12(None), '') + + def test_to_x12_date(self): + self.assertEqual( + D8.python_to_x12(datetime.date(2014, 4, 5)), + '20140405') diff --git a/tests/test_control.py b/tests/test_control.py new file mode 100644 index 0000000..2b2bc4c --- /dev/null +++ b/tests/test_control.py @@ -0,0 +1,124 @@ +import datetime +import os +import unittest + +from tigershark import X12_4010_X092A1 +from tigershark import X12_5010_X221A1 +from tigershark.facade.control import ControlHeaders +from tigershark.parsers import parse_control_headers + +from tests import TEST_FILE_MAP + + +class TestControlHeaders(unittest.TestCase): + + def parse_file(self, name): + with open(os.path.join('tests', name)) as f: + parsed = parse_control_headers(f.read().strip()) + return ControlHeaders(parsed) + + def test_5010_details(self): + facade = self.parse_file('5010-835-example-1.txt') + + control = facade.interchange_controls[0] + + self.assertEqual(control.authorization_information_qualifier, '00') + self.assertEqual(control.authorization_information, ' ') + + self.assertEqual(control.security_information_qualifier, '00') + self.assertEqual(control.security_information, ' ') + + self.assertEqual(control.interchange_sender_id_qualifier, 'ZZ') + self.assertEqual(control.interchange_sender_id, '5010TEST ') + + self.assertEqual(control.interchange_receiver_id_qualifier, 'ZZ') + self.assertEqual(control.interchange_receiver_id, '835RECVR ') + + self.assertEqual(control.interchange_date, datetime.date(2011, 9, 30)) + self.assertEqual(control.interchange_time, datetime.time(11, 5)) + + self.assertEqual(control.interchange_control_standards_id, '^') + self.assertEqual(control.interchange_control_version_number, '00501') + self.assertEqual(control.interchange_control_number, '000004592') + + self.assertEqual(control.acknowledgement_requested, '0') + self.assertEqual(control.test_indicator, 'T') + self.assertEqual(control.subelement_separator, '|') + + group = control.functional_groups[0] + + self.assertEqual(group.functional_id_code, 'HP') + + self.assertEqual(group.application_sender_code, '5010TEST') + self.assertEqual(group.application_receiver_code, '835RECVR') + + self.assertEqual(group.date, datetime.date(2011, 9, 30)) + self.assertEqual(group.time, datetime.time(10, 7, 18)) + + self.assertEqual(group.group_control_number, '45920001') + + self.assertEqual(group.responsible_agency_code, 'X') + + self.assertEqual(group.version_indicator_code, '005010X221A1') + + self.assertTrue(group.version_tuple.is_5010) + self.assertEqual(group.version_tuple, X12_5010_X221A1) + + def test_4010_details(self): + facade = self.parse_file('271-example.txt') + + control = facade.interchange_controls[0] + + self.assertEqual(control.authorization_information_qualifier, '00') + self.assertEqual(control.authorization_information, ' ') + + self.assertEqual(control.security_information_qualifier, '00') + self.assertEqual(control.security_information, ' ') + + self.assertEqual(control.interchange_sender_id_qualifier, 'ZZ') + self.assertEqual(control.interchange_sender_id, 'ZIRMED ') + + self.assertEqual(control.interchange_receiver_id_qualifier, 'ZZ') + self.assertEqual(control.interchange_receiver_id, '12345 ') + + self.assertEqual(control.interchange_date, datetime.date(2012, 6, 5)) + self.assertEqual(control.interchange_time, datetime.time(23, 24)) + + self.assertEqual(control.interchange_control_standards_id, 'U') + self.assertEqual(control.interchange_control_version_number, '00401') + self.assertEqual(control.interchange_control_number, '000050033') + + self.assertEqual(control.acknowledgement_requested, '1') + self.assertEqual(control.test_indicator, 'P') + self.assertEqual(control.subelement_separator, '^') + + group = control.functional_groups[0] + + self.assertEqual(group.functional_id_code, 'HB') + + self.assertEqual(group.application_sender_code, 'ZIRMED') + self.assertEqual(group.application_receiver_code, '12345') + + self.assertEqual(group.date, datetime.date(2012, 6, 5)) + self.assertEqual(group.time, datetime.time(23, 24)) + + self.assertEqual(group.group_control_number, '50025') + + self.assertEqual(group.responsible_agency_code, 'X') + + self.assertEqual(group.version_indicator_code, '004010X092A1') + + self.assertTrue(group.version_tuple.is_4010) + self.assertEqual(group.version_tuple, X12_4010_X092A1) + + def test_all_parseable(self): + all_tests = sorted(TEST_FILE_MAP.items()) + for (transaction_set_id, version_tuple), name in all_tests: + facade = self.parse_file(name) + control = facade.interchange_controls[0] + group = control.functional_groups[0] + self.assertEqual(group.version_tuple, version_tuple) + transaction_set = group.transaction_sets[0] + self.assertEqual(transaction_set.transaction_set_identifier_code, + transaction_set_id) + self.assertIs(transaction_set.functional_group, group) diff --git a/tests/test_convert.py b/tests/test_convert.py old mode 100755 new mode 100644 index 34349d7..5023cab --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """Test :mod:`tools.convertPyX12`. Each TestCase is reasonably similar to the following. @@ -12,7 +11,6 @@ import unittest, logging, sys import os.path from tigershark.tools import convertPyX12 -import cStringIO import sqlite3.dbapi2 as sqlite import zipfile from tigershark.X12.map.source import FlatPythonVisitor @@ -23,9 +21,9 @@ class TestConvertPyx12(unittest.TestCase): """Test conversion of PyX12 source XML definitions. - + .. note:: - + The ORIGINAL 278.4010.X094.A1.xml definition was improperly nested. The 2000A, 2000B, 2000C, 2000D, 2000E, 2000F Loop structure was not flat; a failure to match the Situational 2000D segment means that are @@ -33,6 +31,7 @@ class TestConvertPyx12(unittest.TestCase): nested within 2010D - inexplicably. """ def setUp( self ): + raise unittest.SkipTest('Broken as of July 1, 2014') # a 278-13 - I think this is a referral response self.msg1="""ISA*03*gjohnson2 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0903*U*00401*000242835*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0903*241935*X*004010X094A1~ST*278*242835~BHT*0078*13*GXEDWLXQYKII*20071015*0903~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*SHEIKH*ZIA****24*161590688~REF*ZH*000524454008~N3*4039 ROUTE 219*SUITE 102~N4*SALAMANCA*NY*14779~HL*3*2*22*1~HI*BF:706.1~NM1*IL*1*burton*amanda****MI*yjw88034076701~DMG*D8*19900815*U~HL*4*3*19*1~NM1*SJ*1*JAREMKO*WILLIAM****24*161482964~REF*ZH*000511127003~N3*2646 WEST STATE STREET*SUITE 405~N4*OLEAN*NY*147600000~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*30~SE*24*242835~GE*1*241935~IEA*1*000242835~""" @@ -57,12 +56,12 @@ def setUp( self ): def testPythonOut( self ): try: # Creates response parser, parse_278 - exec self.pyCode - except Exception, ex: + exec(self.pyCode) + except Exception as ex: logger.exception( self.pyCode ) try: x12mssg= parse_278.unmarshall( self.msg1 ) - except Exception, ex: + except Exception as ex: logger.exception( self.pyCode ) eltPunct, compPunct, segPunct, segments= Message.tokenize(self.msg1) logger.error( segments ) @@ -76,14 +75,7 @@ def testSQL( self ): try: for stmt in self.sqlCode.split( '\n;\n' ): db.execute( stmt ) - except sqlite.OperationalError, e: + except sqlite.OperationalError as e: logger.exception( stmt ) raise db.close() - -if __name__ == '__main__': - logging.basicConfig( - stream=sys.stderr, - level=logging.DEBUG, - ) - unittest.main() diff --git a/tests/test_facades.py b/tests/test_facades.py new file mode 100644 index 0000000..81b44f4 --- /dev/null +++ b/tests/test_facades.py @@ -0,0 +1,37 @@ +import os +import unittest + +from tigershark import X12VersionTuple +from tigershark.facade import FACADE_MAP +from tigershark.facade import get_facade +from tigershark.parsers import SimpleParser + +from tests import TEST_FILE_MAP + + +class TestGenericParsing(unittest.TestCase): + + def test_all_loadable(self): + for transaction_set_id in FACADE_MAP: + for version in FACADE_MAP[transaction_set_id]: + version_tuple = X12VersionTuple(version, 1, 0, '') + get_facade(transaction_set_id, version_tuple) + + def test_all_facadable(self): + for (transaction_set_id, version_tuple), name in TEST_FILE_MAP.items(): # nopep8 + if transaction_set_id not in FACADE_MAP: + continue + if version_tuple.version not in FACADE_MAP[transaction_set_id]: + continue + + with open(os.path.join('tests', name)) as f: + contents = f.read().replace('\n', '') + + parser = SimpleParser(transaction_set_id, version_tuple) + x12 = parser.unmarshall(contents) + facade = get_facade(transaction_set_id, version_tuple)(x12) + + self.assertEqual(facade.x12_version_string, + version_tuple.version_string) + self.assertEqual(facade.transaction_set_identifier_code, + transaction_set_id) diff --git a/tests/test_json_parsing.py b/tests/test_json_parsing.py new file mode 100644 index 0000000..27f85e5 --- /dev/null +++ b/tests/test_json_parsing.py @@ -0,0 +1,89 @@ +import unittest +import logging +import sys + + +from tigershark.facade import f835, f271 +from tigershark.parsers import M835_4010_X091_A1, M271_4010_X092_A1, M835_5010_X221_A1, M271_5010_X279_A1 + + +class TestJSONFunction(unittest.TestCase): + def test_json_835(self): + m = M835_4010_X091_A1.parsed_835 + with open('tests/835-example.txt') as f: + parsed = m.unmarshall(f.read().strip()) + f = f835.F835_4010(parsed) + try: + f.to_json() + except TypeError: + self.fail(".to_json() raised TypeError") + + def test_json_271(self): + m = M271_4010_X092_A1.parsed_271 + with open('tests/271-example.txt') as f: + parsed = m.unmarshall(f.read().strip()) + f = f271.F271_4010(parsed) + try: + f.to_json() + except TypeError: + self.fail(".to_json() raised TypeError") + + def test_json_271_segments(self): + m = M271_4010_X092_A1.parsed_271 + with open('tests/271-example-2.txt') as f: + parsed = m.unmarshall(f.read().strip()) + f = f271.F271_4010(parsed) + js_data = f.to_dict() + self.assertEqual(js_data["transaction_set_identifier_code"], "271") + + source = js_data["facades"][0]["source"] + self.assertEqual(source["loopName"], "2000A") + + subscriber = source["receivers"][0]["subscribers"][0] + self.assertEqual(subscriber["personal_information"]["name"]["first_name"], "JANET") + self.assertEqual( + subscriber["personal_information"]["demographic_information"]["gender"], + {"code": "F", "label": "Female"} + ) + + elig_info = subscriber["eligibility_or_benefit_information"] + self.assertEqual(len(elig_info), 109) + + benefit = elig_info[14] + self.assertEqual(benefit["coverage_information"]["benefit_amount"], 1500) + self.assertEqual( + benefit["coverage_information"]["coverage_level"], + {"code": "IND", "label": "Individual"} + ) + self.assertEqual( + benefit["coverage_information"]["information_type"], + {"code": "G", "label": "Out of Pocket (Stop Loss)"} + ) + + def test_json_835_5010(self): + m = M835_5010_X221_A1.parsed_835 + with open('tests/5010-835-example-1.txt') as f: + parsed = m.unmarshall(f.read().strip()) + f = f835.F835_5010(parsed) + try: + f.to_json() + except TypeError: + self.fail(".to_json() raised TypeError") + + def test_json_271_5010(self): + m = M271_5010_X279_A1.parsed_271 + with open('tests/5010-271-example-1.txt') as f: + parsed = m.unmarshall(f.read().strip()) + f = f271.F271_5010(parsed) + try: + f.to_json() + except TypeError: + self.fail(".to_json() raised TypeError") + + +if __name__ == "__main__": + logging.basicConfig( + stream=sys.stderr, + level=logging.INFO, + ) + unittest.main() diff --git a/tests/test_navigation.py b/tests/test_navigation.py old mode 100755 new mode 100644 index 41b6665..49e9e1f --- a/tests/test_navigation.py +++ b/tests/test_navigation.py @@ -1,63 +1,59 @@ -#!/usr/bin/env python """Test :mod:`X12.message` Xpath-like navigation. The :mod:`X12.message` Factory is used to build one set of objects. This works in a stand-alone mode. """ import unittest -import logging, sys from tigershark.X12.message import Factory as MessageFactory from tigershark.X12.parse import SegmentToken -class TestNavigationX12( unittest.TestCase ): +class TestNavigationX12(unittest.TestCase): """Test XPath-like Navigation methods.""" - factory= MessageFactory - def setUp( self ): - factory= self.factory - self.message= factory.makeMessage( "278" ) - loop_isa= factory.makeLoop( "ISA" ) - self.message.addChild( loop_isa ) - isaSegToken= SegmentToken( ["ISA", "21", "blah", "blah", "blah"] ) - loop_isa.addChild( factory.makeSegment( isaSegToken ) ) - loop_gs= factory.makeLoop( "GS" ) - loop_isa.addChild( loop_gs ) - gsSegToken= SegmentToken( ["GS", "HI", "blah", "blah", "blah"] ) - loop_gs.addChild( factory.makeSegment( gsSegToken ) ) - geSegToken= SegmentToken( ["GE", "hi", "there"] ) - loop_gs.addChild( factory.makeSegment( geSegToken ) ) - ieaSegToken= SegmentToken( ["IEA", "xx", "yy"] ) - loop_isa.addChild( factory.makeSegment( ieaSegToken ) ) - def testChild( self ): - loops= self.message.child( "LOOP" ) - self.assertEquals( 1, len(loops) ) - segs= self.message.child( "SEGMENT" ) - self.assertEquals( 0, len(segs) ) - isaList= self.message.child( "LOOP", name="ISA" ) - self.assertEquals( 1, len(isaList) ) - ieaList= isaList[0].child( "SEGMENT", name="IEA" ) - self.assertEquals( 1, len(ieaList) ) - def testDescendant( self ): - geList= self.message.descendant( "SEGMENT", name="GE" ) - self.assertEquals( 1, len(geList) ) - def testParent( self ): - geList= self.message.descendant( "SEGMENT", name="GE" ) - self.assertEquals( 1, len(geList) ) - ge= geList[0] - self.assertEquals( 0, len(ge.parent("SEGMENT")) ) - parentList= ge.parent( "LOOP" ) - self.assertEquals( 1, len(parentList) ) - self.assertEquals( "GS", parentList[0].name ) - def testAncestor( self ): - geList= self.message.descendant( "SEGMENT", name="GE" ) - self.assertEquals( 1, len(geList) ) - ge= geList[0] - isaList= ge.ancestor( "LOOP", name="ISA" ) - self.assertEquals( 1, len(isaList) ) - -if __name__ == '__main__': - logging.basicConfig( - stream=sys.stderr, - level=logging.DEBUG, - ) - unittest.main() + factory = MessageFactory + + def setUp(self): + factory = self.factory + self.message = factory.makeMessage("278") + loop_isa = factory.makeLoop("ISA") + self.message.addChild(loop_isa) + isaSegToken = SegmentToken(["ISA", "21", "blah", "blah", "blah"]) + loop_isa.addChild(factory.makeSegment(isaSegToken)) + loop_gs = factory.makeLoop("GS") + loop_isa.addChild(loop_gs) + gsSegToken = SegmentToken(["GS", "HI", "blah", "blah", "blah"]) + loop_gs.addChild(factory.makeSegment(gsSegToken)) + geSegToken = SegmentToken(["GE", "hi", "there"]) + loop_gs.addChild(factory.makeSegment(geSegToken)) + ieaSegToken = SegmentToken(["IEA", "xx", "yy"]) + loop_isa.addChild(factory.makeSegment(ieaSegToken)) + + def testChild(self): + loops = self.message.child("LOOP") + self.assertEqual(1, len(loops)) + segs = self.message.child("SEGMENT") + self.assertEqual(0, len(segs)) + isaList = self.message.child("LOOP", name="ISA") + self.assertEqual(1, len(isaList)) + ieaList = isaList[0].child("SEGMENT", name="IEA") + self.assertEqual(1, len(ieaList)) + + def testDescendant(self): + geList = self.message.descendant("SEGMENT", name="GE") + self.assertEqual(1, len(geList)) + + def testParent(self): + geList = self.message.descendant("SEGMENT", name="GE") + self.assertEqual(1, len(geList)) + ge = geList[0] + self.assertEqual(0, len(ge.parent("SEGMENT"))) + parentList = ge.parent("LOOP") + self.assertEqual(1, len(parentList)) + self.assertEqual("GS", parentList[0].name) + + def testAncestor(self): + geList = self.message.descendant("SEGMENT", name="GE") + self.assertEqual(1, len(geList)) + ge = geList[0] + isaList = ge.ancestor("LOOP", name="ISA") + self.assertEqual(1, len(isaList)) diff --git a/tests/test_parse.py b/tests/test_parse.py old mode 100755 new mode 100644 index df03dd5..80d8790 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -1,164 +1,158 @@ -#!/usr/bin/env python -"""Test :mod:`X12.parse`. +import logging +import os +import unittest -Manually build a 278 parser, :py:data:`parse_278`. Exercise that manually-built parser. +from tigershark.X12.map.SQL import SQLTableVisitor +from tigershark.X12.map.dj import DjangoModelVisitor +from tigershark.X12.map.source import FlatPythonVisitor +from tigershark.X12.map.source import PythonVisitor +from tigershark.X12.parse import Element +from tigershark.X12.parse import Loop +from tigershark.X12.parse import Message +from tigershark.X12.parse import Properties +from tigershark.X12.parse import Segment +from tigershark.X12.parse import StructureError +from tigershark.parsers import PARSER_MAP +from tigershark.parsers import get_parsers +from tigershark.parsers import SimpleParser -Test the Python output from the 278 parser. +from tests import TEST_FILE_MAP +from tests.example_278 import loop2000A +from tests.example_278 import loop2000F +from tests.example_278 import parse_278 -Test the SQL output from the 278 parser. -Test the Django output from the 278 parser. +logger = logging.getLogger(__name__) -:parse_278: Manually built parser for :samp:`278` messages. -""" -from __future__ import print_function -import unittest -import logging, sys -import os.path -from tigershark.X12.parse import Message -from tigershark.X12.parse import Loop -from tigershark.X12.parse import Segment -from tigershark.X12.parse import Element -from tigershark.X12.parse import Properties -from tigershark.X12.parse import StructureError -from tigershark.X12.map.source import PythonVisitor -from tigershark.X12.map.source import FlatPythonVisitor -from tigershark.X12.map.SQL import SQLTableVisitor -from tigershark.X12.map.dj import DjangoModelVisitor +class TestGenericParsing(unittest.TestCase): -logger= logging.getLogger( __name__ ) + def test_all_loadable(self): + for transaction_set_id in PARSER_MAP: + for version_tuple in PARSER_MAP[transaction_set_id]: + list(get_parsers(transaction_set_id, version_tuple)) + + def test_all_parseable(self): + for (transaction_set_id, version_tuple), name in TEST_FILE_MAP.items(): # nopep8 + with open(os.path.join('tests', name)) as f: + contents = f.read().replace('\n', '') + parser = SimpleParser(transaction_set_id, version_tuple) + parser.unmarshall(contents) -# THE MANUALLY-BUILT PARSER: -from tests.example_278 import parse_278 -from tests.example_278 import loop2000F -from tests.example_278 import loop2000A class TestStructure(unittest.TestCase): """Test Message Structure.""" - def testBadLoop( self ): + def testBadLoop(self): """Can't include a Message within a Loop.""" - self.assertRaises( StructureError, - Loop, "name", Properties(desc="desc", req_sit="R", repeat="1"), Message("bad",Properties(desc="bad") ) ) - def testMessage( self ): - self.assertEquals( parse_278, loop2000F.message ) - self.assertEquals( "278", loop2000A.message.name ) + self.assertRaises( + StructureError, + Loop, "name", + Properties( + desc="desc", + req_sit="R", + repeat="1"), + Message("bad", Properties(desc="bad"))) + + def testMessage(self): + self.assertEqual(parse_278, loop2000F.message) + self.assertEqual("278", loop2000A.message.name) + class TestSegmentMatch(unittest.TestCase): """Test Segment match.""" - def setUp( self ): - self.segments1= [ ['ST', '278', '242835'] ] - self.segments2= [ ['ST', '279', '242835'] ] - self.parserQual= Segment( "ST", Properties( qual=(1,"278"), desc="ST", req_sit="R" ), - Element( "ST01", Properties(position=1,codes=["278"]) ), - ) - self.parserNonQual= Segment( "ST", Properties( desc="ST", req_sit="R" ) ) - def testQual( self ): - self.assertTrue( self.parserQual.match( self.segments1[0] ) ) - self.assertFalse( self.parserQual.match( self.segments2[0] ) ) - def testNonQual( self ): - self.assertTrue( self.parserNonQual.match( self.segments1[0] )) - self.assertTrue( self.parserNonQual.match( self.segments2[0] )) + def setUp(self): + self.segments1 = [['ST', '278', '242835']] + self.segments2 = [['ST', '279', '242835']] + self.parserQual = Segment( + "ST", + Properties(qual=(1, "278"), desc="ST", req_sit="R"), + Element("ST01", Properties(position=1, codes=["278"])), + ) + self.parserNonQual = Segment("ST", Properties(desc="ST", req_sit="R")) + + def testQual(self): + self.assertTrue(self.parserQual.match(self.segments1[0])) + self.assertFalse(self.parserQual.match(self.segments2[0])) + + def testNonQual(self): + self.assertTrue(self.parserNonQual.match(self.segments1[0])) + self.assertTrue(self.parserNonQual.match(self.segments2[0])) + class TestParse278_13(unittest.TestCase): """Test the hand-build 278 parser.""" - def setUp( self ): + def setUp(self): # a 278-13 response - self.msg1="""ISA*03*gjohnson2 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0903*U*00401*000242835*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0903*241935*X*004010X094A1~ST*278*242835~BHT*0078*13*GXEDWLXQYKII*20071015*0903~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*SHEIKH*ZIA****24*161590688~REF*ZH*000524454008~N3*4039 ROUTE 219*SUITE 102~N4*SALAMANCA*NY*14779~HL*3*2*22*1~HI*BF:706.1~NM1*IL*1*burton*amanda****MI*yjw88034076701~DMG*D8*19900815*U~HL*4*3*19*1~NM1*SJ*1*JAREMKO*WILLIAM****24*161482964~REF*ZH*000511127003~N3*2646 WEST STATE STREET*SUITE 405~N4*OLEAN*NY*147600000~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*30~SE*24*242835~GE*1*241935~IEA*1*000242835~""" - - def testTokenize( self ): - _, _, _, tokens= parse_278.tokenize( self.msg1 ) - self.assertEquals( 28, len(tokens) ) - self.assertEquals( 17, len(tokens[0])) # The ISA Segment - self.assertEquals( "ISA", tokens[0][0] ) - self.assertEquals( "GS", tokens[1][0] ) - self.assertEquals( "ST", tokens[2][0] ) - self.assertEquals( "SE", tokens[-3][0] ) - self.assertEquals( "GE", tokens[-2][0] ) - self.assertEquals( "IEA", tokens[-1][0] ) - - def testISAMatch( self ): - _, _, _, tokens= parse_278.tokenize( self.msg1 ) - isaTokens= tokens[0] - isa= parse_278.structure[0] - self.assertTrue( isa.match(isaTokens) ) - - def testParse( self ): - message= parse_278.unmarshall( self.msg1 ) - self.assertEquals( self.msg1, message.marshall() ) - #print( message ) + self.msg1 = """ISA*03*gjohnson2 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0903*U*00401*000242835*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0903*241935*X*004010X094A1~ST*278*242835~BHT*0078*13*GXEDWLXQYKII*20071015*0903~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*SHEIKH*ZIA****24*161590688~REF*ZH*000524454008~N3*4039 ROUTE 219*SUITE 102~N4*SALAMANCA*NY*14779~HL*3*2*22*1~HI*BF:706.1~NM1*IL*1*burton*amanda****MI*yjw88034076701~DMG*D8*19900815*U~HL*4*3*19*1~NM1*SJ*1*JAREMKO*WILLIAM****24*161482964~REF*ZH*000511127003~N3*2646 WEST STATE STREET*SUITE 405~N4*OLEAN*NY*147600000~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*30~SE*24*242835~GE*1*241935~IEA*1*000242835~""" # nopep8 + + def testTokenize(self): + _, _, _, tokens = parse_278.tokenize(self.msg1) + self.assertEqual(28, len(tokens)) + self.assertEqual(17, len(tokens[0])) # The ISA Segment + self.assertEqual("ISA", tokens[0][0]) + self.assertEqual("GS", tokens[1][0]) + self.assertEqual("ST", tokens[2][0]) + self.assertEqual("SE", tokens[-3][0]) + self.assertEqual("GE", tokens[-2][0]) + self.assertEqual("IEA", tokens[-1][0]) + + def testISAMatch(self): + _, _, _, tokens = parse_278.tokenize(self.msg1) + isaTokens = tokens[0] + isa = parse_278.structure[0] + self.assertTrue(isa.match(isaTokens)) + + def testParse(self): + message = parse_278.unmarshall(self.msg1) + self.assertEqual(self.msg1, message.marshall()) + class TestVisitor1(unittest.TestCase): """Test the generic visitor.""" - def testPythonVisitor( self ): - python= PythonVisitor( "parse_278" ) - parse_278.visit( python ) - text= python.getSource() - sample="""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(req_sit='R',repeat='1',desc='ISA'), - Segment( 'ISA', Properties(), - ), - Loop( 'GS', Properties(req_sit='R',repeat='1',desc='GS'), - Segment( 'GS', Properties(), - ), - Loop( 'ST', Properties(req_sit='R',repeat='1',desc='ST'), - Segment( 'ST', Properties(qual=(1, '278'),req_sit='R',repeat='1',desc='Transaction Set Header'), - Element( 'ST01', Properties(desc=None, req_sit=None, data_type=(None,None,None), position=1, - codes=['278'] ) ), - ), - Segment( 'BHT', Properties(req_sit='R',repeat='1',desc='Beginning of Hierarchical Transaction'), - ), - Loop( '2000A', Properties(req_sit='R',repeat='1',desc='2000A'), - Segment( 'HL', Properties(qual=(3, '20'),req_sit='R',repeat='1',desc='Utilization Management Organization (UMO) Level'), - Element( 'HL03', Properties(desc=None, req_sit=None, data_type=(None,None,None), position=3, - codes=['20'] ) ), - ), - Loop( '2010A', Properties(req_sit='R',repeat='>1',desc='2010A'), - Segment( 'NM1', Properties(qual=(1, 'X3'),req_sit='R',repeat='1',desc='Utilization Management Organization (UMO) Name'), - Element( 'NM101', Properties(desc=None, req_sit=None, data_type=(None,None,None), position=1, - codes=['X3'] ) ), - ), - ),""" - tLines= text.splitlines() - sLines= sample.splitlines() + def test_PythonVisitor(self): + python = PythonVisitor("parse_278") + parse_278.visit(python) + text = python.getSource() + with open('tests/278-sample.txt') as f: + sample = f.read() + tLines = text.splitlines() + sLines = sample.splitlines() for i in range(len(sLines)): - self.assertEqual( tLines[i].rstrip(), sLines[i].rstrip() ) + self.assertEqual(tLines[i].rstrip(), sLines[i].rstrip()) + class TestPythonVisitor(unittest.TestCase): """Does it compile? Does it actually parse the message?""" - def setUp( self ): + def setUp(self): # a 278-13 response - self.msg1="""ISA*03*gjohnson2 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0903*U*00401*000242835*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0903*241935*X*004010X094A1~ST*278*242835~BHT*0078*13*GXEDWLXQYKII*20071015*0903~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*SHEIKH*ZIA****24*161590688~REF*ZH*000524454008~N3*4039 ROUTE 219*SUITE 102~N4*SALAMANCA*NY*14779~HL*3*2*22*1~HI*BF:706.1~NM1*IL*1*burton*amanda****MI*yjw88034076701~DMG*D8*19900815*U~HL*4*3*19*1~NM1*SJ*1*JAREMKO*WILLIAM****24*161482964~REF*ZH*000511127003~N3*2646 WEST STATE STREET*SUITE 405~N4*OLEAN*NY*147600000~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*30~SE*24*242835~GE*1*241935~IEA*1*000242835~""" - def testPythonVisitorCompile( self ): - python= FlatPythonVisitor( "parse_278" ) - parse_278.visit( python ) - text= python.getSource() - #print( "***Manual Inspection" ) - #print( text ) - exec text - - def testPythonVisitorWorks( self ): - python= FlatPythonVisitor( "parse_278" ) - parse_278.visit( python ) - text= python.getSource() - exec text - self.assertEqual( type(parse_278), Message ) - msg= parse_278.unmarshall( self.msg1 ) + self.msg1 = """ISA*03*gjohnson2 *01*0000000000*ZZ*0000000Eliginet*ZZ*BLUECROSS BLUES*071015*0903*U*00401*000242835*0*P*:~GS*HI*0000000Eliginet*BLUECROSS BLUES*20071015*0903*241935*X*004010X094A1~ST*278*242835~BHT*0078*13*GXEDWLXQYKII*20071015*0903~HL*1**20*1~NM1*X3*2*BLUECROSS BLUESHIELD OF WESTERN NEW*****PI*55204~HL*2*1*21*1~NM1*1P*1*SHEIKH*ZIA****24*161590688~REF*ZH*000524454008~N3*4039 ROUTE 219*SUITE 102~N4*SALAMANCA*NY*14779~HL*3*2*22*1~HI*BF:706.1~NM1*IL*1*burton*amanda****MI*yjw88034076701~DMG*D8*19900815*U~HL*4*3*19*1~NM1*SJ*1*JAREMKO*WILLIAM****24*161482964~REF*ZH*000511127003~N3*2646 WEST STATE STREET*SUITE 405~N4*OLEAN*NY*147600000~HL*5*4*SS*0~TRN*1*1*9999955204~UM*SC*I*******Y~DTP*472*RD8*20071015-20080415~HSD*VS*30~SE*24*242835~GE*1*241935~IEA*1*000242835~""" # nopep8 + + def testPythonVisitorCompile(self): + python = FlatPythonVisitor("parse_278") + parse_278.visit(python) + text = python.getSource() + exec(text) + + def testPythonVisitorWorks(self): + python = FlatPythonVisitor("parse_278") + parse_278.visit(python) + text = python.getSource() + exec(text) + self.assertEqual(type(parse_278), Message) + msg = parse_278.unmarshall(self.msg1) # XXX - check the resulting structure - self.assertEquals( self.msg1, msg.marshall() ) + self.assertEqual(self.msg1, msg.marshall()) + class TestSQLVisitor(unittest.TestCase): """Does it compile?""" - def testSQLVisitor( self ): - sql= SQLTableVisitor( ) - parse_278.visit( sql ) - text= sql.getSource() - #print( "***Manual Inspection" ) - #print( text ) - sample="""-- HIPAA Health Care Services Review: Request X094A1-278 + def testSQLVisitor(self): + sql = SQLTableVisitor() + parse_278.visit(sql) + text = sql.getSource() + sample = """-- HIPAA Health Care Services Review: Request X094A1-278 CREATE TABLE X278_278( id INTEGER PRIMARY KEY AUTOINCREMENT, -- FK reference from X278_ISA -- ISA @@ -187,20 +181,20 @@ def testSQLVisitor( self ): ) -- GS ; """ - tLines= text.splitlines() - sLines= sample.splitlines() + tLines = text.splitlines() + sLines = sample.splitlines() for i in range(len(sLines)): - self.assertEqual( tLines[i].rstrip(), sLines[i].rstrip() ) + self.assertEqual(tLines[i].rstrip(), sLines[i].rstrip()) + class TestDjangoVisitors(unittest.TestCase): """Look at the Django structure emitted""" - def testDjangoModel( self ): - dj= DjangoModelVisitor( ) - parse_278.visit( dj ) - text= dj.getSource(appname='claims_837') - #print( "***Manual Inspection" ) - #print( text ) - sample='''\ + @unittest.skip('Django tests disabled') + def testDjangoModel(self): + dj = DjangoModelVisitor() + parse_278.visit(dj) + text = dj.getSource(appname='claims_837') + sample = '''\ from web.claims.models import X12Segment from django.db import models @@ -221,17 +215,17 @@ class Segment_ST(models.Model): def unmarshall( self, segmentToken, cs=':' ): self.ST01 = segmentToken.elt(1) ''' - tLines= text.splitlines() - sLines= sample.splitlines() + tLines = text.splitlines() + sLines = sample.splitlines() for i in range(len(sLines)): - self.assertEqual( tLines[i].rstrip(), sLines[i].rstrip() ) - def testDjangoAdmin( self ): - dj= DjangoAdminVisitor( ) - parse_278.visit( dj ) - text= dj.getSource(appname='claims_837') - #print( "***Manual Inspection" ) - #print( text ) - sample= '''\ + self.assertEqual(tLines[i].rstrip(), sLines[i].rstrip()) + + @unittest.skip('Django tests disabled') + def testDjangoAdmin(self): + dj = DjangoAdminVisitor() + parse_278.visit(dj) + text = dj.getSource(appname='claims_837') + sample = '''\ from web.claims_837.models import NM1 admin.site.register( NM1 ) from web.claims_837.models import PER @@ -289,15 +283,7 @@ def testDjangoAdmin( self ): from web.claims_837.models import SE admin.site.register( SE ) ''' - tLines= text.splitlines() - sLines= sample.splitlines() + tLines = text.splitlines() + sLines = sample.splitlines() for i in range(len(sLines)): - self.assertEqual( tLines[i].rstrip(), sLines[i].rstrip() ) - -if __name__ == '__main__': - logging.basicConfig( - stream=sys.stderr, - level=logging.DEBUG, - ) - - unittest.main() + self.assertEqual(tLines[i].rstrip(), sLines[i].rstrip()) diff --git a/tests/test_util.py b/tests/test_util.py new file mode 100644 index 0000000..36046f6 --- /dev/null +++ b/tests/test_util.py @@ -0,0 +1,47 @@ +import os +import unittest + +from tigershark.X12.parse import ParseError +from tigershark.facade import FACADE_MAP +from tigershark.util import apply_facade_to_simple_x12 +from tigershark.util import identify_simple_x12 + +from tests import TEST_FILE_MAP + + +class TestUtil(unittest.TestCase): + + def test_all_identifiable(self): + all_tests = sorted(TEST_FILE_MAP.items()) + + for expected, name in all_tests: + with open(os.path.join('tests', name)) as f: + x12_contents = f.read().replace('\n', '') + self.assertEqual(expected, identify_simple_x12(x12_contents)) + + def test_parse_error(self): + with self.assertRaises(ParseError): + identify_simple_x12('not x12') + + def test_apply_facade(self): + all_tests = sorted(TEST_FILE_MAP.items()) + + for (transaction_set_id, version_tuple), name in all_tests: + with open(os.path.join('tests', name)) as f: + x12_contents = f.read().replace('\n', '') + + facadable = ( + transaction_set_id in FACADE_MAP + and version_tuple.version in FACADE_MAP[transaction_set_id] + ) + + if facadable: + facade = apply_facade_to_simple_x12(x12_contents) + + self.assertEqual(facade.x12_version_string, + version_tuple.version_string) + self.assertEqual(facade.transaction_set_identifier_code, + transaction_set_id) + else: + with self.assertRaises(ValueError): + apply_facade_to_simple_x12(x12_contents) diff --git a/tests/test_wsClaims.py b/tests/test_wsClaims.py index cf19db6..79fb5f2 100755 --- a/tests/test_wsClaims.py +++ b/tests/test_wsClaims.py @@ -4,8 +4,11 @@ """ from __future__ import print_function import unittest -import httplib -import urllib2, urllib +try: + from httplib import HTTPConnection +except ImportError: + from http.client import HTTPConnection +import urllib import logging, sys import os.path import datetime @@ -57,9 +60,9 @@ def test_01_Load( self ): result= response.read() #print( result ) self.client.close() - self.assertEquals( "CREATED", response.reason ) + self.assertEqual( "CREATED", response.reason ) object= json.loads(result) - self.assertEquals( claimId, object['claim_id'] ) + self.assertEqual( claimId, object['claim_id'] ) def test_02_Fetch( self ): claimId= self.claimDict["CLAIM-ID"] self.client.request( 'GET', "/claim/{0}/".format(claimId), headers=self.headers ) @@ -67,8 +70,8 @@ def test_02_Fetch( self ): result= response.read() self.client.close() object= json.loads(result) - self.assertEquals( "OK", response.reason ) - self.assertEquals( self.claimText, object['claim'] ) + self.assertEqual( "OK", response.reason ) + self.assertEqual( self.claimText, object['claim'] ) def test_03_Fetch( self ): claimId= '837_example' self.client.request( 'GET', "/claim_837/{0}/".format(claimId), headers=self.headers ) @@ -77,10 +80,11 @@ def test_03_Fetch( self ): self.client.close() object= json.loads(result) #print( result ) - self.assertEquals( "OK", response.reason ) + self.assertEqual( "OK", response.reason ) print( object['claim'] ) def setUpModule(): + raise unittest.SkipTest('Django tests disabled') """Spawn the test server process. This should build a test database, load fixtures, and then provide the Django-based services. @@ -127,7 +131,7 @@ def tearDownModule(): stream=sys.stderr, level=logging.DEBUG, ) - + if sys.version_info[:2] <= ( 2, 6 ): #Python2.6 work-around setUpModule() diff --git a/tigershark/X12/map/dj.py b/tigershark/X12/map/dj.py index 5426be3..94cdb7d 100755 --- a/tigershark/X12/map/dj.py +++ b/tigershark/X12/map/dj.py @@ -5,7 +5,7 @@ .. autoclass:: DjangoModelVisitor :members: - + .. autoclass:: DjangoAdminVisitor :members: """ @@ -14,7 +14,7 @@ class DjangoModelVisitor( StructureVisitor ): """Emit Django class definitions for Segments. - + Extension to :class:`X12.parse.StructureVisitor` """ def __init__( self, *args, **kw ): @@ -67,7 +67,7 @@ def getSource( self, appname='claims_837' ): class DjangoAdminVisitor( StructureVisitor ): """Emit Django admin definitions for Segments. - + Extension to :class:`X12.parse.StructureVisitor` """ def __init__( self, *args, **kw ): diff --git a/tigershark/X12/message/__init__.py b/tigershark/X12/message/__init__.py index e6e6161..0a8a8cd 100755 --- a/tigershark/X12/message/__init__.py +++ b/tigershark/X12/message/__init__.py @@ -103,7 +103,7 @@ .. autoclass:: X12Message :members: - + SQL Alchemy module =========================== diff --git a/tigershark/X12/message/sa.py b/tigershark/X12/message/sa.py index c464b17..db9989c 100755 --- a/tigershark/X12/message/sa.py +++ b/tigershark/X12/message/sa.py @@ -25,7 +25,7 @@ - X12Element. An atomic piece of data. These are identified positionally within a segment's source text. - + .. autoclass:: Factory :members: """ @@ -48,7 +48,7 @@ class Factory( Factory ): @staticmethod def makeMessage( name, *structure ): """Create a new X12Message object. - + :param name: name of this Message :param structure: the various Loops of this Message :returns: X12Message instance @@ -57,7 +57,7 @@ def makeMessage( name, *structure ): @staticmethod def makeLoop( name, *structure ): """Create a new X12Loop object. - + :param name: name of this Loop :param structure: the various sub-Loops and Segments of this Loop :returns: X12Loop instance diff --git a/tigershark/X12/parse.py b/tigershark/X12/parse.py index b5f91b6..38095b0 100755 --- a/tigershark/X12/parse.py +++ b/tigershark/X12/parse.py @@ -250,11 +250,24 @@ .. autofunction:: preParse """ from __future__ import print_function +from itertools import chain +from itertools import count +try: + from itertools import izip +except ImportError: + izip = zip +from itertools import repeat import logging # This is only to give us access a default Factory. from tigershark.X12.message import Factory as MessageFactory +try: + STRING_TYPES = (str, unicode) +except NameError: + STRING_TYPES = (str, bytes) + + class SegmentToken( object ): """A list-like object that gracefully handles a Segment with missing elements. @@ -358,7 +371,7 @@ class Properties( object ): Each property becomes an attibute of the resulting object. """ def __init__( self, **kw ): - self.repr= ",".join( [ "%s=%r" % (k,v,) for k,v in kw.items() ] ) + self.repr= ",".join(sorted("%s=%r" % (k,v,) for k,v in kw.items())) self.__dict__.update( kw ) def __repr__( self ): return "%s(%s)" % (self.__class__.__name__, self.repr,) @@ -389,7 +402,7 @@ class Parser( object ): Message parsing breaks the source message down into a flat list of segment tokens. Then the structure defined by Segment, Element and Loop is imposed on those segment tokens. - to build the X12Message from X12Loop and X12Segment. + to build the X12Message from tigershark.X12Loop and X12Segment. There are several properties: @@ -425,7 +438,7 @@ class Parser( object ): segmentHeader= 1 def __init__( self, name, properties=None, *parts ): """Build a simple structure of sub-elements. - + :param name: the X12 ID for this structure (Message, Loop, Segment, Element) :param properties: a Properties object with the description, etc. :param parts: Sub-Parsers that belong to this Parser. @@ -437,7 +450,7 @@ def __init__( self, name, properties=None, *parts ): self.position= self.props.position self.parent= None self.theFactory= None - if type(name) not in ( str, unicode, None ): + if not isinstance(name, STRING_TYPES): raise StructureError( "Possible missing parameter: name") if type(properties) != Properties: raise StructureError( "Possible missing parameter: properties") @@ -500,15 +513,19 @@ def getParts( self, segments, theLoop ): """ for part in self.structure: count= 0 - for subloop in part.parse( segments ): - subloop.occurrence= count - theLoop.addChild( subloop ) - count += 1 + segment_parts = part.parse( segments ) + try: + for subloop in segment_parts: + subloop.occurrence= count + theLoop.addChild( subloop ) + count += 1 + except StopIteration: + return def visit( self, visitor, indent=0 ): """Iterate through the components.""" try: self.preVisit( visitor, indent ) - except StopDescent, s: + except StopDescent as s: return for s in self.structure: s.visit( visitor, indent+1 ) @@ -664,22 +681,24 @@ def parse( self, segments ): """If this segment matches the next segment token in the input, create the X12Segment object. :param segments: list of SegmentTokens for the current message. - :returns: yields a single parsed Segment or raises StopIteration + :returns: yields a single parsed Segment or ends iteration (returns) """ - try: - if self.repeat.startswith(">"): - repeat = 999 - else: - repeat = int(self.repeat) - except: - repeat = 1 - for i in range(repeat): + if isinstance(self.repeat, int): + length_loop = range(self.repeat) + elif self.repeat.startswith(">"): + length_loop = count() + else: + length_loop = range(int(self.repeat) if self.repeat.isdigit() else 1) + + required_loop = chain([self.required], repeat(False)) + + for required, _ in izip(required_loop, length_loop): if self.match( segments[0] ): compPunct= self.getMessage().compPunct theSegment= self.theFactory.makeSegment( segments.pop(0), compPunct, self ) yield theSegment - elif self.situational or self.notused: - raise StopIteration + elif not required: + return else: error= ParseError( "Could not unmarshall {seg_name} Segment, "\ @@ -726,7 +745,7 @@ def parse( self, segments ): loops until a segment no longer matches. :param segments: list of SegmentToken instances - :returns: Yields the next X12.message.X12Loop structure or raises StopIteration + :returns: Yields the next X12.message.X12Loop structure or ends interation (returns) """ # Confirm match between this loop and a segment of the structure i = 0 @@ -741,7 +760,10 @@ def parse( self, segments ): structure=[s.name for s in self.structure])) theLoop = self.theFactory.makeLoop(self.name) self.getParts(segments, theLoop) - yield theLoop + try: + yield theLoop + except StopIteration: + return elif self.structure[i].situational and \ segments[0][0] in [s.name for s in self.structure]: # Absence of a situational segment shouldn't exit @@ -750,7 +772,7 @@ def parse( self, segments ): i += 1 else: # Nothing left to check, so stop the iteration - raise StopIteration + return def match( self, candidate ): return self.structure[0].match( candidate ) @@ -787,7 +809,7 @@ class Message( Parser ): valid_types= ( Loop, ) def __init__( self, name, properties, *loops ): """Build a parser for a given X12 message structure. - + :param name: Name of this message. :param properties: instance of :class:`X12.parse.Properties` with Message properties. Currently, only the :samp:`desc` property is used. @@ -821,19 +843,21 @@ def tokenize( msg ): SegmentToken( seg.split(eltPunct) ) for seg in msg.split( segPunct ) if len(seg) > 0] - def unmarshall( self, message, factory=MessageFactory ): + def unmarshall(self, message, factory=MessageFactory, ignoreExtra=False): """Unmarshall the text version of an X12 message into a structure defined by the given factory. - + :param message: X12 source text :param factory: A message instance Factory, by default :class:`X12.message.Factory`. + :param ignoreExtra: If True, extra segments are ignored instead of + causing a parse error. :returns: :class:`X12.message.X12Message` structure :raises ParseError: if the message does not fit this parser's structure. """ self.factory= factory try: self.eltPunct, self.compPunct, self.segPunct, self.segmentTokens= self.tokenize(message) - except ParseError, ex: + except ParseError as ex: ex.details= dict( description= self.desc, parser= self, @@ -842,7 +866,7 @@ def unmarshall( self, message, factory=MessageFactory ): raise ex theMssg= self.factory.makeMessage( self.name ) self.getParts( self.segmentTokens, theMssg ) - if len(self.segmentTokens) != 0: + if len(self.segmentTokens) != 0 and not ignoreExtra: names= ", ".join( s[0] for s in self.segmentTokens ) raise ParseError( "Extra segments {0!r}".format( names ), diff --git a/tigershark/__init__.py b/tigershark/__init__.py index ea74359..65a9606 100644 --- a/tigershark/__init__.py +++ b/tigershark/__init__.py @@ -1,8 +1,102 @@ """ TigerShark - An X12 EDI message parser. """ -__version__ = "0.2.7" +__all__ = ['X12VersionTuple'] +__version__ = "0.3.5" __authors__ = [ - "Steven Buss ", - "Steven Lott ", + "Steven Buss ", + "Steven Lott ", + "Dave Peticolas ", + "Cloud Cray ", ] + +from collections import namedtuple + +_X12VersionTuple = namedtuple('X12VersionTuple', ( + 'version', + 'release', + 'subrelease', + 'industry_identifier_code', +)) + + +class X12VersionTuple(_X12VersionTuple): + """ + A structured representation of an X12 version / release / industry id code. + + Attributes: + * version: The integer version number. + * release: The integer release number. + * subrelease: The integer subrelease number. + * industry_identifier_code: The string industry identifer code. + + For example, the representation of 004010X091 is: + + X12VersionTuple( + version=4, + release=1, + subrelease=0, + industry_identifier_code='X091') + """ + + @classmethod + def for_4010(cls, industry_identifier_code): + """ + Construct an X12VersionTuple for 4010 with the given industry id code. + """ + return cls(version=4, release=1, subrelease=0, + industry_identifier_code=industry_identifier_code) + + @classmethod + def for_5010(cls, industry_identifier_code): + """ + Construct an X12VersionTuple for 5010 with the given industry id code. + """ + return cls(version=5, release=1, subrelease=0, + industry_identifier_code=industry_identifier_code) + + @property + def is_4010(self): + """ + True if this is a 4010 version. + """ + return ( + self.version == 4 + and self.release == 1 + and self.subrelease == 0 + ) + + @property + def is_5010(self): + """ + True if this is a 5010 version. + """ + return ( + self.version == 5 + and self.release == 1 + and self.subrelease == 0 + ) + + @property + def version_string(self): + """ + The string representation of a version without the industry id code. + """ + return '{}{:02}{}'.format(self.version, self.release, self.subrelease) + + +X12_4010_X061A1 = X12VersionTuple.for_4010('X061A1') +X12_4010_X070 = X12VersionTuple.for_4010('X070') +X12_4010_X091A1 = X12VersionTuple.for_4010('X091A1') +X12_4010_X092A1 = X12VersionTuple.for_4010('X092A1') +X12_4010_X093A1 = X12VersionTuple.for_4010('X093A1') +X12_4010_X094A1 = X12VersionTuple.for_4010('X094A1') +X12_4010_X095A1 = X12VersionTuple.for_4010('X095A1') +X12_4010_X096A1 = X12VersionTuple.for_4010('X096A1') +X12_4010_X097A1 = X12VersionTuple.for_4010('X097A1') +X12_4010_X098A1 = X12VersionTuple.for_4010('X098A1') +X12_4010_XXXC = X12VersionTuple.for_4010('XXXC') +X12_5010_X221A1 = X12VersionTuple.for_5010('X221A1') +X12_5010_X279A1 = X12VersionTuple.for_5010('X279A1') +X12_5010_X222A1 = X12VersionTuple.for_5010('X222A1') +X12_5010_X223A1 = X12VersionTuple.for_5010('X223A1') diff --git a/tigershark/extras/__init__.py b/tigershark/extras/__init__.py old mode 100755 new mode 100644 index 803f29c..d3f5a12 --- a/tigershark/extras/__init__.py +++ b/tigershark/extras/__init__.py @@ -1 +1 @@ -#!/usr/bin/env python + diff --git a/tigershark/extras/standardSegment.py b/tigershark/extras/standardSegment.py old mode 100755 new mode 100644 index ccb9772..e4798a3 --- a/tigershark/extras/standardSegment.py +++ b/tigershark/extras/standardSegment.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python """Define :mod:`X12.parse` structures for some standard X12 Segments. These are definitions of some standard Segments without a lot @@ -19,79 +18,84 @@ .. autofunction:: buildSegment """ from __future__ import print_function -from tigershark.X12.parse import Segment, Element, Properties -ISAFields= """ ISA01 Authorization Information Qualifier - ISA02 Authorization Information - ISA03 Security Information Qualifier - ISA04 Security Information - ISA05 Interchange ID Qualifier - ISA06 Interchange Sender ID - ISA07 Interchange ID Qualifier - ISA08 Interchange Receiver ID - ISA09 Interchange Date - ISA10 Interchange Time - ISA11 Interchange Control Standards ID - ISA12 Interchange Control Version Number - ISA13 Interchange Control Number - ISA14 Acknowledgement Requested - ISA15 Test Indicator - ISA16 Subelement Separator""" +from tigershark.X12.parse import Element +from tigershark.X12.parse import Properties +from tigershark.X12.parse import Segment -GSFields= """ GS01 Functional ID code - GS02 Application Sender's Code - GS03 Application Receiver's Code - GS04 Date - GS05 Time - GS06 Group Control Number - GS07 Responsible Agency Code - GS08 Version/Rel. Ind. ID Code""" +ISAFields = """\ +ISA01 Authorization Information Qualifier +ISA02 Authorization Information +ISA03 Security Information Qualifier +ISA04 Security Information +ISA05 Interchange ID Qualifier +ISA06 Interchange Sender ID +ISA07 Interchange ID Qualifier +ISA08 Interchange Receiver ID +ISA09 Interchange Date +ISA10 Interchange Time +ISA11 Interchange Control Standards ID +ISA12 Interchange Control Version Number +ISA13 Interchange Control Number +ISA14 Acknowledgement Requested +ISA15 Test Indicator +ISA16 Subelement Separator +""" + +GSFields = """\ +GS01 Functional ID code +GS02 Application Sender's Code +GS03 Application Receiver's Code +GS04 Date +GS05 Time +GS06 Group Control Number +GS07 Responsible Agency Code +GS08 Version/Rel. Ind. ID Code""" -STFields= """ ST01 Transaction set ID code - ST02 Transaction set control number""" +STFields = """\ +ST01 Transaction set ID code +ST02 Transaction set control number +""" -SEFields= """ SE01 Number of included segments - SE02 Transaction set control number""" - # SE02 must match ST02 +# SE02 must match ST02 +SEFields = """\ +SE01 Number of included segments +SE02 Transaction set control number""" -GEFields= """ GE01 Number of Transaction Sets Included in this Function Group - GE02 Group Control Number""" - # GE02 must match GS06 +# GE02 must match GS06 +GEFields = """\ +GE01 Number of Transaction Sets Included in this Function Group +GE02 Group Control Number""" -IEAFields= """ IEA01 Number of Included Functional Groups - IEA02 Interchange Control Number (same as ISA13)""" - # IEA02 must match ISA13 +# IEA02 must match ISA13 +IEAFields = """\ +IEA01 Number of Included Functional Groups +IEA02 Interchange Control Number (same as ISA13) +""" -def buildSegment( name, desc, fieldText ): + +def buildSegment(name, desc, fieldText): """Convert a block of text to a Segment definition. The block of text has one Element defined on each line. The Element definition is an Element name, one or more spaces, and the element description. - + :param name: the name of the segment :param desc: the description of the segment - :param fieldText: a block of text, with one Element name and description per line. + :param fieldText: a block of text, with one Element name + and description per line. :returns: :class:`X12.parse.Segment` definition """ - theSeg= Segment( name, Properties( desc=desc ) ) - for line in fieldText.splitlines(): - clean= line.strip() - eltName, space, eltDesc = clean.partition( " " ) - theElt= Element( eltName, Properties( desc=eltDesc ) ) - theSeg.append( theElt ) - return theSeg - -isa= buildSegment( "ISA", "ISA", ISAFields ) -gs= buildSegment( "GS", "GS", GSFields ) -st= buildSegment( "ST", "ST", STFields ) -se= buildSegment( "SE", "SE", SEFields ) -ge= buildSegment( "GE", "GE", GEFields ) -iea= buildSegment( "IEA", "IEA", IEAFields ) + segment = Segment(name, Properties(desc=desc)) + for line in filter(None, fieldText.splitlines()): + name, description = line.strip().split(None, 1) + element = Element(name, Properties(desc=description, codes=[])) + segment.append(element) + return segment -if __name__ == "__main__": - print( isa ) - print( gs ) - print( st ) - print( se ) - print( ge ) - print( iea ) +isa = buildSegment("ISA", "ISA", ISAFields) +gs = buildSegment("GS", "GS", GSFields) +st = buildSegment("ST", "ST", STFields) +se = buildSegment("SE", "SE", SEFields) +ge = buildSegment("GE", "GE", GEFields) +iea = buildSegment("IEA", "IEA", IEAFields) diff --git a/tigershark/facade/__init__.py b/tigershark/facade/__init__.py index 10d5c1b..3f132b8 100644 --- a/tigershark/facade/__init__.py +++ b/tigershark/facade/__init__.py @@ -2,9 +2,11 @@ Facade Use Cases ================ -The :class:`X12LoopBridge` will associate a Python class with an X12 Loop definition. -Each attribute of Python class is a **Descriptor** that references an X12 Element -in a Segment instance within the overall Loop. +The :class:`X12LoopBridge` will associate a Python class with an +X12 Loop definition. + +Each attribute of Python class is a **Descriptor** that references an +X12 Element in a Segment instance within the overall Loop. It's a **Bridge** between a Python class and an X12 Loop. @@ -22,36 +24,42 @@ The attribute Descriptor has several use cases, depending on the attribute's type and how that value is accessed from the X12 Segment. - - Single simple value, identified by position within a Segment of the top-level Loop. - This is a direct reference to an Element, and is only appropriate when the - Segment doesn't repeat. + - Single simple value, identified by position within a Segment of + the top-level Loop. + This is a direct reference to an Element, and is only appropriate when + the Segment doesn't repeat. + + - Single simple value, one of a number of alternative positions within + a Segment. - - Single simple value, one of a number of alternative positions within a Segment. - This is a - direct reference to an Element, and is appropriate when the Segment - doesn't repeat. The Element is one of a number of + This is a direct reference to an Element, and is appropriate when the + Segment doesn't repeat. The Element is one of a number of candidates, which are defined by a sequence of - :samp:`(qualifier,value)` position tuples. If the Element value in the qualifier - position is equal to a given qualifier value, the Element in the value - position is the desired Element. This is required to pick values out of - the :samp:`PER` segment. + :samp:`(qualifier,value)` position tuples. If the Element value in the + qualifier position is equal to a given qualifier value, the Element in + the value position is the desired Element. This is required to pick + values out of the :samp:`PER` segment. - - Sequence of simple values, with the value identified a fixed position in multiple - occurrences of a Segment. This is used for :samp:`NTE` segments. + - Sequence of simple values, with the value identified a fixed position + in multiple occurrences of a Segment. This is used for :samp:`NTE` + segments. - - Single simple value, identified by a position in a Composite. This is a direct reference - to a sub-element of a Composite. This is used to pick apart the various - composites that occur in :samp:`HI` segments when a single value is required. + - Single simple value, identified by a position in a Composite. + This is a direct reference to a sub-element of a Composite. This is + used to pick apart the various composites that occur in :samp:`HI` + segments when a single value is required. - Single complex value, identified by a Composite. - - Sequence of simple values, with the value identified by a fixed position in - multiple occurrences of a Composite. This is used to pick apart the various - composites that occur in :samp:`HI` segments when a sequence of values is required. + - Sequence of simple values, with the value identified by a fixed + position in multiple occurrences of a Composite. This is used to pick + apart the various composites that occur in :samp:`HI` segments when a + sequence of values is required. - Sequence of complex values, with the value identified by a recurring - Segment. This is used to define a nested object. This is used to pick apart the :samp:`PWK` - Segments, which occur multiple times within the 2300 and 2400 loops. + Segment. This is used to define a nested object. This is used to pick + apart the :samp:`PWK` Segments, which occur multiple times within the + 2300 and 2400 loops. XXX - Can Composite and Element be refactored to have a common superclass? Do all Composites have a type identifier in the initial position? @@ -66,7 +74,8 @@ - Segment or Segments that match simple qualifications. - - Composite or Composites that match simple Criteria, but are found in multiple Segments. + - Composite or Composites that match simple Criteria, but are + found in multiple Segments. - Element Selection: @@ -74,14 +83,15 @@ within a Segment. This creates a sequence of strings values. - Fixed position(s) within a Composite, Sequence of Positions - within a Composite (usually positions [1:]). This creates a sequence - of string values. + within a Composite (usually positions [1:]). This creates a + sequence of string values. - The whole Segment. - - Conversion: No conversion, single-element conversion, multi-element conversion. - At this point, we don't care whether the data was from a Composite or Segment - since it's now a sequence of strings. + - Conversion: No conversion, single-element conversion, multi-element + conversion. + At this point, we don't care whether the data was from a Composite or + Segment since it's now a sequence of strings. - Result Stucture: single occurance vs. the complete sequence. @@ -91,23 +101,23 @@ No conversion is done. - Single-element non-string value is done through a simple conversion - protocol. A class with two static methods (x12_to_python and python_to_x12) - is used by the Descriptor to make the value usable. + protocol. A class with two static methods (x12_to_python and + python_to_x12) is used by the Descriptor to make the value usable. - - Multiple-element all-string values are can be handled as simple Python lists of - strings. + - Multiple-element all-string values are can be handled as simple + Python lists of strings. - Multiple-element, non-String values use the same basic conversion - protocol, starting from a list of strings instead of a single string Element - value. + protocol, starting from a list of strings instead of a single string + Element value. Facade Implementation ============================ -The :class:`X12LoopBridge` handles the high-level mapping between a Python class -and an instance of an :class:`X12.message.X12Loop`. Each bridge has a few -high-level methods, and a long sequence of attribute definitions. Each attribute -is defined using an instance of the :class:`ElementAccess` class. +The :class:`X12LoopBridge` handles the high-level mapping between a Python +class and an instance of an :class:`X12.message.X12Loop`. Each bridge has a few +high-level methods, and a long sequence of attribute definitions. Each +attribute is defined using an instance of the :class:`ElementAccess` class. The :class:`ElementAccess` class is a **Lightweight** class that has parameters and a reference to the underlying :class:`X12.message.X12Loop` structure. It is @@ -151,10 +161,11 @@ - **Element Selection**. Accumulate the sequence of Element values. This is done by a :class:`CompositePosition` object. There are two - composite positions algorithms: single value position and range of positions. - Package as a list of strings for step 5. + composite positions algorithms: single value position and range of + positions. Package as a list of strings for step 5. - 5. **Conversion**. Apply x12_to_python type conversion to sequences of Element values. + 5. **Conversion**. Apply x12_to_python type conversion to sequences of + Element values. Ths various :class:`Conversion` subclasses handle this. 6. **Result Structure**. Pick the first value or the whole list of values. @@ -181,21 +192,22 @@ position is a single, fixed position within a Segment. The position can be defined numerically. -When creating an :class:`ElementAccess` attribute definition, a numeric position -is implicitly translated to an instance of :class:`Position`, the simplest kind -of position definition. +When creating an :class:`ElementAccess` attribute definition, a numeric +position is implicitly translated to an instance of :class:`Position`, the +simplest kind of position definition. There are several kinds of Position definitions. - :class:`Position` defines a single, fixed Element position as the value for an attribute. - - :class:`OneOf` is used to implement attributes of the :samp:`PER` Segment, which - are defined by a series of (qualifer,value) pairs. The Element's position - isn't fixed, but is determined by examining a number of alterantives. + - :class:`OneOf` is used to implement attributes of the :samp:`PER` + Segment, which are defined by a series of (qualifer,value) pairs. + The Element's position isn't fixed, but is determined by examining + a number of alternatives. - - :class:`SequenceOf` is used to implement attributes which are a simple sequence - of values picked from the Elements of the Segment. + - :class:`SequenceOf` is used to implement attributes which are a simple + sequence of values picked from the Elements of the Segment. .. autoclass:: Position @@ -213,8 +225,6 @@ .. autoclass:: CompositeAccess -# XXX - Refactor CompositeAccess and CompositeSequenceAccess to be much simpler. - .. autoclass:: CompositeSequenceAccess Conversion @@ -224,8 +234,8 @@ - x12_to_python. This method converts an X12 string or sequence of strings into a Python object. The sequence of strings is used - to convert Composites as well as converting whole Segments into distinct - Python objects. + to convert Composites as well as converting whole Segments into + distinct Python objects. - python_to_x12. This method converts a Python object into an X12 string or a sequence of strings. @@ -242,140 +252,393 @@ .. autoclass:: MissingSegment """ import datetime +import json +import inspect from decimal import Decimal +from ..X12.message import X12Structure + +# Transaction Set ID -> X12 release number -> (facade module, facade name) +FACADE_MAP = { + '270': { + 4: ('f270', 'F270_4010'), + 5: ('f270', 'F270_5010'), + }, + '271': { + 4: ('f271', 'F271_4010'), + 5: ('f271', 'F271_5010'), + }, + '835': { + 4: ('f835', 'F835_4010'), + 5: ('f835', 'F835_5010'), + }, +} + + +def get_facade(transaction_set_id, version_tuple): + """ + Return the facade to use for a given transaction set and version. + + Raises ValueError if the transaction set and version are not supported. + """ + try: + module_name, facade_name = ( + FACADE_MAP[transaction_set_id][version_tuple.version]) + except KeyError: + raise ValueError("Unsupported transaction set and version.", + transaction_set_id, version_tuple) + + module = __import__('tigershark.facade.' + module_name, + fromlist=[facade_name]) + return getattr(module, facade_name) + + +def extract_position(pos): + if type(pos) is Position: + return pos.position + elif type(pos) is OneOf: + return { + "value": pos.value, + "oneOf": [extract_position(x) for x in pos.posPairSeq] + } + elif type(pos) is SequenceOf: + return { + "start": pos.start, + "end": pos.end + } + else: + return pos + + +def extract_element_value(instance, attribute): + if attribute not in type(instance).__dict__: + return None + + extract_from_types = ( + ElementAccess, + SegmentAccess, + CompositeAccess, + SegmentSequenceAccess, + ElementSequenceAccess, + ) + + value = getattr(instance, attribute) + if isinstance(value, tuple) and len(value) == 2 and all([type(value) is str for x in value]): + value = { + "code": value[0], + "label": value[1] + } + else: + value = _to_python_dict(value) + + class_prop = type(instance).__dict__[attribute] + + if not any([isinstance(class_prop, x) for x in extract_from_types]): + return None + + output = { + "name": attribute, + "valueType": class_prop.__class__.__name__ + } + + extract_props = ( + "segment", + "qualifier", + "x12type", + "position", + "compPosition", + "qualPos", + "inList", + "notInList" + ) + for prop in extract_props: + if not hasattr(class_prop, prop): + continue + prop_val = getattr(class_prop, prop) + if prop == "x12type": + if hasattr(prop_val, "__name__") and not any([isinstance(prop_val, x) for x in (X12LoopBridge, X12SegmentBridge, Facade)]) and hasattr(prop_val, "to_dict"): # isinstance(prop_val, Conversion): + prop_val = prop_val.to_dict() + else: + prop_val = str(prop_val) + output[prop] = prop_val + elif isinstance(prop_val, Position): + output[prop] = extract_position(prop_val) + elif any([isinstance(prop_val, x) for x in extract_from_types]): + output[prop] = extract_element_value(class_prop, prop) + else: + output[prop] = str(prop_val) # _to_python_dict(prop_val) + + return value + + # return { + # "value": value, + # "meta": output + # } + + +def is_x12_obj(obj): + return isinstance(obj, X12LoopBridge) or isinstance(obj, X12SegmentBridge) or isinstance(obj, Facade) + + +def _to_python_dict(instance): + from tigershark.X12.message import X12Loop, X12Message, X12Segment, X12Structure + import datetime + import types + + extract_from_types = ( + ElementAccess, + SegmentAccess, + CompositeAccess, + SegmentSequenceAccess, + ElementSequenceAccess, + ) + + if type(instance) in [int, float, str, bool, type(None)]: + return instance + elif type(instance) is Decimal: + return float(instance) + elif isinstance(instance, datetime.date) or isinstance(instance, datetime.time): + return instance.isoformat() + elif type(instance) is datetime.timedelta: + return { + "days": instance.days, + "seconds": instance.seconds, + } + elif isinstance(instance, list) or isinstance(instance, tuple) or isinstance(instance, set): + if isinstance(instance, tuple) and len(instance) == 2 and all([type(x) is str for x in instance]): + return { + "code": instance[0], + "label": instance[1] + } + else: + return [_to_python_dict(x) for x in instance] + elif inspect.ismethod(instance) or inspect.isbuiltin(instance) or isinstance(instance, types.FunctionType) or isinstance(instance, property): + return None + + properties = [x for x in inspect.getmembers(instance) if not x[0].startswith("_")] + record = dict() + + check_types = [X12Loop, X12Message, X12Segment, X12Structure, X12LoopBridge, X12SegmentBridge] + match_types = [x.__name__ for x in check_types if isinstance(instance, x)] + if len(match_types) > 0: + if type(instance.__class__.__name__) not in match_types: + match_types.append(instance.__class__.__name__) + # record["_type"] = instance.__class__.__name__ + # record["_types"] = match_types + + for k, v in properties: + if any([isinstance(instance, x) for x in (X12LoopBridge, X12SegmentBridge, Facade)]): + element_value = extract_element_value(instance, k) + if element_value is not None: + record[k] = element_value + continue + if type(v) in [int, float, str, bool, type(None)]: + record[k] = v + elif type(v) is datetime.timedelta: + record[k] = { + "days": v.days, + "seconds": v.seconds, + } + elif inspect.ismethod(v) or inspect.isbuiltin(v) or isinstance(v, types.FunctionType) or isinstance(v, property): + pass + elif isinstance(v, X12Structure): + pass + elif isinstance(v, list) or isinstance(v, tuple) or isinstance(v, set): + if isinstance(v, tuple) and len(v) == 2 and all([type(x) is str for x in v]): + record[k] = { + "code": v[0], + "label": v[1] + } + else: + record[k] = [_to_python_dict(x) for x in v] + elif type(v) is Decimal: + record[k] = float(v) + elif isinstance(v, datetime.date) or isinstance(v, datetime.time): + record[k] = v.isoformat() + elif isinstance(v, X12LoopBridge) or isinstance(v, X12SegmentBridge) or isinstance(v, Facade): + record[k] = v.to_dict() + elif any([isinstance(v, x) for x in extract_from_types]): + record[k] = extract_element_value(instance, k) + else: + raise TypeError("Cannot parse '{0}'; type is '{1}'".format(k, str(type(v)))) + return record + class Facade(object): + def loops(self, theClass, anX12Message, *args, **kwargs): return [theClass(loop, *args, **kwargs) for loop in anX12Message.descendant("loop", theClass.loopName)] + def to_dict(self): + return _to_python_dict(self) + + def to_json(self, **kwargs): + return json.dumps(self.to_dict(), **kwargs) -class MissingSegment( Exception ): + +class MissingSegment(Exception): """This exception is raised if the target Segment cannot be found within the Loop. """ - pass -class X12LoopBridge( object ): - """Bridge between a user-focused class/attribute definition and an :class:`X12.message.X12Loop`. + +class X12LoopBridge(object): + """Bridge between a model definition and an :class:`X12.message.X12Loop`. This wrapper implements a simple search for Segments within a Loop. It leverates the essential XPath like "descendant" search capability, and either returns a sequence of Segments or a single Segment which matches certain qualifying criteria. - This is an abstract superclass definition. A subclass will contain a number - of attributes, defined using the :class:`ElementAccess` class or any of its - subclasses. + This is an abstract superclass definition. A subclass will contain a + number of attributes, defined using the :class:`ElementAccess` class or any + of its subclasses. """ - def __init__( self, aLoop ): + def __init__(self, aLoop): """Named loop within a specific message. - + :param aLoop: the loop identifier to pick out of the X12Message. """ - self.loop= aLoop - def __str__( self ): + self.loop = aLoop + + def __str__(self): return str(self.loop) - def _filteredList( self, name, qualifierPos=None, inList=None, notInList=None ): + + def _filteredList(self, name, qualifierPos=None, + inList=None, notInList=None): """Return all matching X12Segments that are children of the X12Loop. + Do not check descendants, only check immediate children. If no qualifier, then all segments with the given name are returned. - If a qualifier position is provided, then the element at that position in the - segment is checked for a value in the :meth:`inList` or not in the :meth:`notInList` - values. - + If a qualifier position is provided, then the element at that position + in the segment is checked for a value in the :meth:`inList` or not in + the :meth:`notInList` values. + :param name: name of the segment :param qualifierPos: optional qualifier position in the Segment. - if omitted, all matching segments are returned. - :param inList: optional qualification values. Only used if the qualiferPosition - is provided. This the positive list of values segments must have. - :param notInList: optional qualification values. Only used if the qualiferPosition - is provided. This the negatuve list of values segments must not have. - :returns: list of all :class:`X12.message.X12Segment` instances within this Loop. + if omitted, all matching segments are returned. + :param inList: optional qualification values. Only used if the + qualiferPosition is provided. This the positive list of values + segments must have. + :param notInList: optional qualification values. Only used if the + qualiferPosition is provided. This the negatuve list of values + segments must not have. + :returns: list of all :class:`X12.message.X12Segment` instances + within this Loop. """ - segList= [ s for s in self.loop.child( "segment", name ) ] + segList = [s for s in self.loop.child("segment", name)] if qualifierPos: if inList: - filtered= [ seg for seg in segList if seg.getByPos(qualifierPos) in inList ] + filtered = [seg for seg in segList + if seg.getByPos(qualifierPos) in inList] elif notInList: - filtered= [ seg for seg in segList if seg.getByPos(qualifierPos) not in notInList ] + filtered = [seg for seg in segList + if seg.getByPos(qualifierPos) not in notInList] else: - raise TypeError( "QualifierPos requires inList or notInList") + raise TypeError("QualifierPos requires inList or notInList") else: - filtered= segList + filtered = segList return filtered - def segList( self, name, qualifierPos=None, inList=None, notInList=None ): + + def segList(self, name, qualifierPos=None, inList=None, notInList=None): """Return a all matching X12Segments of the X12Loop. If no qualifier, then all segments with the given name are returned. - If a qualifier position is provided, then the element at that position in the - segment is checked for a value in the :meth:`inList` or not in the :meth:`notInList` - values. - + If a qualifier position is provided, then the element at that position + in the segment is checked for a value in the :meth:`inList` or not in + the :meth:`notInList` values. + :param name: name of the segment :param qualifierPos: optional qualifier position in the Segment. if omitted, all matching segments are returned. - :param inList: optional qualification values. Only used if the qualiferPosition - is provided. This the positive list of values segments must have. - :param notInList: optional qualification values. Only used if the qualiferPosition - is provided. This the negatuve list of values segments must not have. - :returns: list of all :class:`X12.message.X12Segment` instances within this Loop. + :param inList: optional qualification values. Only used if the + qualiferPosition is provided. This the positive list of values + segments must have. + :param notInList: optional qualification values. Only used if the + qualiferPosition is provided. This the negative list of values + segments must not have. + :returns: list of all :class:`X12.message.X12Segment` instances + within this Loop. """ - return [ X12SegmentBridge(s) for s in self._filteredList(name,qualifierPos,inList,notInList) ] - def segment( self, name, qualifierPosition=None, inList=None, notInList=None ): + return [X12SegmentBridge(s) + for s in self._filteredList( + name, qualifierPos, inList, notInList)] + + def segment(self, name, qualifierPosition=None, + inList=None, notInList=None): """Return a specific X12Segment of the X12Loop. - If no qualifier, then the first segment with the given name is returned. + If no qualifier, then the first segment with the given name + is returned. If there's one instance of a segment within a loop, this default picks the only instance. - If a qualifier position is provided, then the element at that position in the - segment is checked for a value in the list of values. - + If a qualifier position is provided, then the element at that + position in the segment is checked for a value in the list of values. + :param name: name of the segment :param qualifierPosition: optional qualification position. if omitted, the first matching segment is returned. - :param inList: optional qualification values. Only used if the qualifier - is provided to specify the position to check. - :param notInList: optional negative list of values to exclude from qualification. - Only used if the qualifier - is provided to specify the position to check. + :param inList: optional qualification values. Only used if the + qualifier is provided to specify the position to check. + :param notInList: optional negative list of values to exclude from + qualification. Only used if the qualifier is provided to specify + the position to check. :returns: :class:`X12.message.X12Segment` instance within this Loop. """ - matches= self._filteredList(name,qualifierPosition,inList,notInList) - if len(matches) == 0: return None - return X12SegmentBridge( matches[0] ) + matches = self._filteredList( + name, qualifierPosition, inList, notInList) + if len(matches) == 0: + return None + return X12SegmentBridge(matches[0]) + + def to_dict(self): + return _to_python_dict(self) -class X12SegmentBridge( object ): - """Bridge between a user-focused class/attribute definition and an :class:`X12.message.X12Segment`. + def to_json(self, **kwargs): + return json.dumps(self.to_dict(), **kwargs) - This is a simple wrapper around an X12Segment which can be used to locate Composites - within the Segment or locate Elements within the Segment. + +class X12SegmentBridge(object): + """Bridge between a model and an :class:`X12.message.X12Segment`. + + This is a simple wrapper around an X12Segment which can be used + to locate Composites within the Segment or locate Elements within + the Segment. XXX - This is only really necessary when extracting Composites. Consider not using X12SegmentBridge for ordinary ElementAccess processing. """ - def __init__(self, aSegment ): - self.segment= aSegment - def __str__( self ): - return str( self.segment ) - def compositeList( self, *names ): - sep= self.segment.message.getCompositeSeparator() - result= [] - pos= 1 - while self.segment.getByPos(pos) is not "": - composite= self.segment.getByPos( pos ) - # XXX - Seems vaguely icky to parse composites here. - subElts= composite.split( sep ) + def __init__(self, aSegment): + self.segment = aSegment + + def __str__(self): + return str(self.segment) + + def compositeList(self, *names): + sep = self.segment.message.getCompositeSeparator() + result = [] + pos = 1 + while self.segment.getByPos(pos) != "": + composite = self.segment.getByPos(pos) + subElts = composite.split(sep) if subElts[0] in names: - result.append( subElts ) + result.append(subElts) pos += 1 return result - def composite( self, *name ): - compList= self.compositeList( *name ) - if len(compList) > 0: return compList[0] - return None # technically redundant to do this. + def composite(self, *name): + compList = self.compositeList(*name) + if len(compList) > 0: + return compList[0] + return None + + def to_dict(self): + return _to_python_dict(self) -class SegmentAccess( object ): + def to_json(self, **kwargs): + return json.dumps(self.to_dict(), **kwargs) + + +class SegmentAccess(object): """Used to get a single segment. Best used in Conjunction with X12SegmentBridge, eg: @@ -393,39 +656,41 @@ class InformationReceiver(X12LoopBridge): x12type=SegmentConversion(NamedEntity)) """ - def __init__( self, segment, qualifier=None, x12type=None ): - self.segment= segment + def __init__(self, segment, qualifier=None, x12type=None): + self.segment = segment if qualifier is None: - self.qualifier= None - elif isinstance(qualifier, (list,tuple)): - self.qualifier= qualifier + self.qualifier = None + elif isinstance(qualifier, (list, tuple)): + self.qualifier = qualifier else: - self.qualifier= ( qualifier, ) - self.x12type= x12type + self.qualifier = (qualifier, ) + self.x12type = x12type - def __repr__( self ): + def __repr__(self): """Provide Documentation for epydoc.""" typeName = "None" if self.x12type is None else self.x12type.__name__ - return "SegmentAccess( %r, %r, %s )" % ( self.segment, self.qualifier, typeName ) + return "SegmentAccess( %r, %r, %s )" % ( + self.segment, self.qualifier, typeName) - def __get__( self, instance, owner ): + def __get__(self, instance, owner): """Get the requested Segment and convert it, if applicable. :param instance: An X12LoopBridge object. """ if self.qualifier is None: - segBridge = instance.segment( self.segment, ) + segBridge = instance.segment(self.segment, ) else: - segBridge = instance.segment( self.segment, self.qualifier[0], inList=self.qualifier[1:] ) + segBridge = instance.segment( + self.segment, self.qualifier[0], inList=self.qualifier[1:]) if segBridge is None: return None return self.x12type.x12_to_python(segBridge.segment) - def __set__( self, instance, value ): - raise UnimplementedError( "Can't set segment sequences, yet") + def __set__(self, instance, value): + raise NotImplementedError("Can't set segment sequences, yet") -class SegmentSequenceAccess( object ): +class SegmentSequenceAccess(object): """Define access to sequence of Segments with a user-friendly attribute name. This appears as a sequence of individual object instances. This requires a :class:`Conversion` for doing data @@ -435,162 +700,193 @@ class SegmentSequenceAccess( object ): mappings to X12Segments in an :class:`X12.message.X12Loop` instance. This is a Descriptor, which implements the attribute name via implicit - getters and setters defined in this class. These are attached to X12LoopBridge - objects, so "instance" is always a specific X12LoopBridge, and owner is - a subclass of X12LoopBridge. + getters and setters defined in this class. These are attached to + X12LoopBridge objects, so "instance" is always a specific X12LoopBridge, + and owner is a subclass of X12LoopBridge. - - __get__ must locate the Segments and provide lists of string element values - to a Conversion class. + - __get__ must locate the Segments and provide lists of string + element values to a Conversion class. - - __set__ must convert objects to lists of strings, then locate the elements and replace their - values. + - __set__ must convert objects to lists of strings, then locate + the elements and replace their values. """ - def __init__( self, segment, qualifier=None, x12type=None ): + def __init__(self, segment, qualifier=None, x12type=None): """Define an attribute. - Most attributes are the string values of Elements, simply accessed by position. - If an attribute has a non-string type, the :py:data:`x12type` parameter can identify - a :class:`Conversion` class to use. + Most attributes are the string values of Elements, + accessed by position. - If an attribute is on a Segment which can occur multiple times, with a qualified - value, then the :py:data:`qualifier` parameter is used to provide a tuple with - the position of the segment used for qualification and the value to test. + If an attribute has a non-string type, the :py:data:`x12type` + parameter can identify a :class:`Conversion` class to use. - For example: :samp:`segment="REF", qualifier=(2,"SY")` will examine all "REF" segments - within this loop, looking for one with :samp:`"SY"` in :samp:`REF02`. + If an attribute is on a Segment which can occur multiple times, + with a qualified value, then the :py:data:`qualifier` parameter + is used to provide a tuple with the position of the segment used + for qualification and the value to test. - :param segment: Name of the segment that contains the element which has the - value for this attribute. - :param qualifier: A qualifier tuple used when there are multiple instances - of the given segment name and a specific position in the segment must be tested. + For example: :samp:`segment="REF", qualifier=(2,"SY")` will examine + all "REF" segments within this loop, looking for one with :samp:`"SY"` + in :samp:`REF02`. + + :param segment: Name of the segment that contains the element which + has the value for this attribute. + :param qualifier: A qualifier tuple used when there are multiple + instances of the given segment name and a specific position in the + segment must be tested. :param x12type: An X12type conversion class name. :returns: The element value for this attribute name. """ - self.segment= segment + self.segment = segment if qualifier is None: - self.qualifier= None - elif isinstance(qualifier, (list,tuple)): - self.qualifier= qualifier + self.qualifier = None + elif isinstance(qualifier, (list, tuple)): + self.qualifier = qualifier else: - self.qualifier= ( qualifier, ) - self.x12type= x12type - def __repr__( self ): + self.qualifier = (qualifier, ) + self.x12type = x12type + + def __repr__(self): """Provide Documentation for epydoc.""" typeName = "None" if self.x12type is None else self.x12type.__name__ - return "SegmentSequenceAccess( %r, %r, %s )" % ( self.segment, self.qualifier, typeName ) - def __get__( self, instance, owner ): - # XXX - Some are unfiltered... + return "SegmentSequenceAccess( %r, %r, %s )" % ( + self.segment, self.qualifier, typeName) + + def __get__(self, instance, owner): if self.qualifier is None: - segBridgeList= instance.segList( self.segment, ) + segBridgeList = instance.segList(self.segment) else: - segBridgeList= instance.segList( self.segment, self.qualifier[0], inList=self.qualifier[1:] ) - return [ self.x12type.x12_to_python(segBridge.segment) for segBridge in segBridgeList ] - def __set__( self, instance, value ): - raise UnimplementedError( "Can't set segment sequences, yet") + segBridgeList = instance.segList( + self.segment, self.qualifier[0], inList=self.qualifier[1:]) + return [self.x12type.x12_to_python(segBridge.segment) + for segBridge in segBridgeList] + + def __set__(self, instance, value): + raise NotImplementedError("Can't set segment sequences, yet") -class Position( object ): + +class Position(object): """Sets or gets the value of an Element in a Segment based on a single, fixed position. """ - def __init__( self, position ): + def __init__(self, position): """Define a fixed Position for ElementAccess. - + :param position: the numeric position of this element. """ - self.position= position - def __repr__( self ): - return "Position(%d)" % ( self.position, ) - def get( self, aSegment ): + self.position = position + + def __repr__(self): + return "Position(%d)" % (self.position, ) + + def get(self, aSegment): """Get our defined Element out of the given X12Segment. - + :param aSegment: an :class:`X12.message.X12Segment` to examine. """ - return aSegment.getByPos( self.position ) - def set( self, aSegment, value ): + return aSegment.getByPos(self.position) + + def set(self, aSegment, value): """Set our defined Element within the given X12Segment. - + :param aSegment: an :class:`X12.message.X12Segment` to update. :param value: the String value to place into the segment. """ - aSegment.setByPos( self.position, value ) + aSegment.setByPos(self.position, value) + -class OneOf( Position ): +class OneOf(Position): """Sets or Gets the value of an Element by searching through a sequence of alternative Element pairs using a qualifier value. - This subclsas of Position is initialized with a sequence (qualifier,value) position pairs and - a qualifier value. If the qualifier value matches the element - in the qualifier position, then the element in the value position + This subclsas of Position is initialized with a sequence (qualifier,value) + position pairs and a qualifier value. If the qualifier value matches the + element in the qualifier position, then the element in the value position is used. """ - def __init__( self, value, *posPairSeq ): - """Define a qualifier value and a sequence of (qualifier,value) positions ElementAccess. - - :param value: the qualifier value used to match the Element in one of the qualifier positions. + def __init__(self, value, *posPairSeq): + """Define a qualifier value and a sequence of (qualifier,value) + positions ElementAccess. + + :param value: the qualifier value used to match the Element in one of + the qualifier positions. :param posPairSeq: sequence of (qualifierPosition, valuePosition) """ - self.value= value - self.posPairSeq= posPairSeq - def __repr__( self ): - return "OneOf(%r,%r)" % ( self.value, self.posPairSeq, ) - def get( self, aSegment ): + self.value = value + self.posPairSeq = posPairSeq + + def __repr__(self): + return "OneOf(%r,%r)" % (self.value, self.posPairSeq) + + def get(self, aSegment): """Get our defined element out of the given segment. If the qualifier value cannot be found, return None. - + :param aSegment: an :class:`X12.message.X12Segment` to examine. """ for qualPos, valPos in self.posPairSeq: - if aSegment.getByPos( qualPos ) == self.value: - return aSegment.getByPos( valPos ) + if aSegment.getByPos(qualPos) == self.value: + return aSegment.getByPos(valPos) return None - def set( self, aSegment, value ): + + def set(self, aSegment, value): """Set our defined element within the given segment. If the qualifier value cannot be found, raise a NotImplementedError. - + XXX - Implement the ability to add qualifiers and values to a segment. - + :param aSegment: an :class:`X12.message.X12Segment` to examine. :param value: the String value to place into the segment. """ for qualPos, valPos in self.posPairSeq: - if aSegment.getByPos( qualPos ) == self.value: - aSegment.setByPos( valPos, value ) + if aSegment.getByPos(qualPos) == self.value: + aSegment.setByPos(valPos, value) return - raise NotImplementedError( "Unimplemented: add new OneOf value to this segment" ) + raise NotImplementedError() + -class SequenceOf( Position ): +class SequenceOf(Position): """Unwind a number of Elements into an sequence of attribute values. - Often, each value is a Composite element with a qualifier, plus additional values.""" - def __init__( self, start, end ): + Often, each value is a Composite element with a qualifier, plus + additional values.""" + def __init__(self, start, end): """Define a sequence Position for ElementAccess. - + :param start: the first Element position within the Segment. :param end: last Element position within the Segment) """ - self.start= start - self.end= end - def __repr__( self ): - return "SequenceOf(%d,%d)" % ( self.start, self.end, ) - def get( self, aSegment ): - elementList= [ aSegment.getByPos(pos) for pos in range(self.start,self.end) if aSegment.getByPos(pos) is not None ] + self.start = start + self.end = end + + def __repr__(self): + return "SequenceOf(%d,%d)" % (self.start, self.end) + + def get(self, aSegment): + elementList = [aSegment.getByPos(pos) + for pos in range(self.start, self.end) + if aSegment.getByPos(pos) is not None] return elementList - def set( self, aSegment, valueList ): - for pos,val in zip(range(self.start,self.end),valueList): - aSegment.setByPos(pos,val) + + def set(self, aSegment, valueList): + for pos, val in zip(range(self. start, self.end), valueList): + aSegment.setByPos(pos, val) return - raise NotImplementedError( "Unimplemented: add new SequenceOf value to this segment" ) + raise NotImplementedError() + + +class ElementAccess(object): + """Define access to Element(s) within a Segment with a user-friendly + attribute name. -class ElementAccess( object ): - """Define access to Element(s) within a Segment with a user-friendly attribute name. - This can also bind in a :class:`Position` for finding the specific Element, and - a :class:`Conversion` for doing data type conversion of the Element. + This can also bind in a :class:`Position` for finding the specific Element, + and a :class:`Conversion` for doing data type conversion of the Element. This class is used to create attribute definitions which are - mappings to positional Elements in an :class:`X12.message.X12Segment` instance. + mappings to positional Elements in an :class:`X12.message.X12Segment` + instance. This is a Descriptor, which implements the attribute name via implicit - getters and setters defined in this class. These are attached to X12LoopBridge - objects, so "instance" is always a specific X12LoopBridge, and owner is - a subclass of X12LoopBridge. + getters and setters defined in this class. These are attached to + X12LoopBridge objects, so "instance" is always a specific X12LoopBridge, + and owner is a subclass of X12LoopBridge. The instance object that has ElementAccess attribtues may influence the default qualifier used. For example: @@ -609,70 +905,81 @@ def __init__(self, aLoop): and I do apologize for the weird behavior but I have a deadline to meet. At least I left behind this helpful comment... - - __get__ must locate the elements and provide string to a Conversion class. + - __get__ must locate the elements and provide string to a + Conversion class. - - __set__ must convert strings, then locate the elements and replace their - values. + - __set__ must convert strings, then locate the elements and + replace their values. """ - def __init__( self, segment, position=None, oneOf=None, qualifier=None, x12type=None ): + def __init__(self, segment, position=None, oneOf=None, + qualifier=None, x12type=None): """Define an attribute. - Most attributes are the string values of Elements, simply accessed by position. - If an attribute has a non-string type, the :py:data:`x12type` parameter can identify - a :class:`Conversion` class to use. + Most attributes are the string values of Elements, + accessed by position. - If an attribute is on a Segment which can occur multiple times, with a qualified - value, then the :py:data:`qualifier` parameter is used to provide a tuple with - the position of the segment used for qualification and the value to test. + If an attribute has a non-string type, the :py:data:`x12type` + parameter can identify a :class:`Conversion` class to use. - For example: :samp:`segment="REF", qualifier=(2,"SY")` will examine all "REF" segments - within this loop, looking for one with :samp:`"SY"` in :samp:`REF02`. + If an attribute is on a Segment which can occur multiple times, + with a qualified value, then the :py:data:`qualifier` parameter + is used to provide a tuple with the position of the segment used + for qualification and the value to test. - If an attribute occurs multiple times within a segment, and a qualifying - element is used, then the :class:`oneOf` parameter is used. This accepts a sequence - of values: the first is a test to use, the remaining values are - pairs of positions. The first position is used to test, the second position - is the result. + For example: :samp:`segment="REF", qualifier=(2,"SY")` will examine + all "REF" segment within this loop, looking for one with :samp:`"SY"` + in :samp:`REF02`. - For example: :samp:`segment="PER", oneOf=( "EM", (3,4), (5,6), (7,8) )` means that - if element 3 is "EM", the attribute is element 4; if element 5 is "EM", - the attribute is element 6; if element 7 is "EM", the attribute is element 8. + If an attribute occurs multiple times within a segment, and a + qualifying element is used, then the :class:`oneOf` parameter is used. + This accepts a sequence of values: the first is a test to use, the + remaining values are pairs of positions. The first position is used + to test, the second position is the result. - :param segment: Name of the segment that contains the element which has the - value for this attribute. - :param position: integer position of the element within the segment; this - is not used if oneOf is used to pick a position. + For example: :samp:`segment="PER", oneOf=( "EM", (3,4), (5,6), (7,8) )` + means that if element 3 is "EM", the attribute is element 4; + if element 5 is "EM", the attribute is element 6; if element 7 is "EM", + the attribute is element 8. + + :param segment: Name of the segment that contains the element which + has the value for this attribute. + :param position: integer position of the element within the segment; + this is not used if oneOf is used to pick a position. :param oneOf: a sequence with a qualifier and position pairs used to examine a qualifier element and a value element. Example - :samp:`oneOf=( "EM", (3,4), (5,6), (7,7)`. If oneOf is used, position is - meaningless. - :param qualifier: A qualifier tuple used when there are multiple instances - of the given segment name and a specific position in the segment must be tested. + :samp:`oneOf=( "EM", (3,4), (5,6), (7,7)`. If oneOf is used, position + is meaningless. + :param qualifier: A qualifier tuple used when there are multiple + instances of the given segment name and a specific position in the + segment must be tested. :param x12type: An X12type conversion class name. :returns: The element value for this attribute name. """ - self.segment= segment + self.segment = segment if isinstance(position, int): - self.position= Position( position ) - elif isinstance(oneOf, (list,tuple) ): - self.position= OneOf( *oneOf ) - elif isinstance( position, Position ): - self.position= position + self.position = Position(position) + elif isinstance(oneOf, (list, tuple)): + self.position = OneOf(*oneOf) + elif isinstance(position, Position): + self.position = position else: - raise TypeError( "position (%r) is an unrecognized type (%s)" % ( position, type(position) ) ) - if isinstance(qualifier, (list,tuple)): - self.qualifier= qualifier + raise TypeError("position (%r) is an unrecognized type (%s)" % ( + position, type(position))) + if isinstance(qualifier, (list, tuple)): + self.qualifier = qualifier else: - self.qualifier= ( qualifier, ) - self.x12type= x12type - def __repr__( self ): + self.qualifier = (qualifier, ) + self.x12type = x12type + + def __repr__(self): """Provide Documentation for epydoc.""" typeName = "None" if self.x12type is None else self.x12type.__name__ - return "ElementAccess( %r, %r, %r, %s )" % ( self.segment, self.position, self.qualifier, typeName ) + return "ElementAccess( %r, %r, %r, %s )" % ( + self.segment, self.position, self.qualifier, typeName) def get_qualifier(self, instance, owner): """ Allow instance to influence the qualifier. - + This is a huge, regrettable hack. This will cause bugs that will take you hours to track down. I'm so sorry. @@ -686,13 +993,14 @@ def get_qualifier(self, instance, owner): return self.qualifier return (None,) - def __get__( self, instance, owner ): + def __get__(self, instance, owner): qualifier = self.get_qualifier(instance, owner) if isinstance(instance, X12LoopBridge): - segBridge= instance.segment( self.segment, qualifier[0], inList=qualifier[1:] ) + segBridge = instance.segment( + self.segment, qualifier[0], inList=qualifier[1:]) else: # ElementAccess works on a Segment which doesn't include qualifier - # info, so make sure the current Segment has the qualifier + # info, so make sure the current Segment has the qualifier. if qualifier[0] is None or \ instance.segment.getByPos(qualifier[0]) == qualifier[1]: segBridge = instance @@ -701,216 +1009,258 @@ def __get__( self, instance, owner ): if segBridge is None: raw = None else: - raw = self.position.get( segBridge.segment ) + raw = self.position.get(segBridge.segment) if self.x12type is not None: - return self.x12type.x12_to_python( raw ) + return self.x12type.x12_to_python(raw) else: return raw - def __set__( self, instance, value ): - qualifier = self.get_qualifier(instance, owner) - if x12type is not None: - raw= self.x12type.python_to_x12( value ) + + def __set__(self, instance, value): + qualifier = self.get_qualifier(instance, None) + if self.x12type is not None: + raw = self.x12type.python_to_x12(value) else: - raw= value - segBridge= instance.segment( self.segment, qualifier[0], inList=qualifier[1:] ) + raw = value + segBridge = instance.segment( + self.segment, qualifier[0], inList=qualifier[1:]) if segBridge is None: - raise MissingSegment( "Segment %s (%r) Not Found" % ( self.segment, qualifier ) ) + raise MissingSegment( + "Segment %s (%r) Not Found" % (self.segment, qualifier)) else: - self.position.set( segBridge.segment, raw ) + self.position.set(segBridge.segment, raw) -class ElementSequenceAccess( ElementAccess ): - """Map a user-friendly attribute name to an sequence of Elements that occur in multiple - copies of a Segment type. This is used for the "NTE" Segments where - a sequence of individual instances occur within a 2300 claim details loop. + +class ElementSequenceAccess(ElementAccess): + """Map a user-friendly attribute name to an sequence of Elements + that occur in multiple copies of a Segment type. This is used for the + "NTE" Segments where a sequence of individual instances occur within a + 2300 claim details loop. This is a Descriptor which implements the attributes name using __get__ and __set__ methods. """ - def __init__( self, segment, position, qualPos=None, inList=None, notInList=None, x12type=None ): + def __init__(self, segment, position, qualPos=None, + inList=None, notInList=None, x12type=None): """Build Element Access for a sequence of Elements. - - :param segment: Name of the segments that contains the elements which are the - values for this attribute. + + :param segment: Name of the segments that contains the elements + which are the values for this attribute. :param position: integer position of the element within the segment. - :param qualPos: integer position of the qualifier attribute in each segment instance. - If omitted, all instances of the segment will become the sequence of values. + :param qualPos: integer position of the qualifier attribute in each + segment instance. + If omitted, all instances of the segment will become the sequence + of values. If used, either :meth:`inList` or :meth:`notInList` must be provided. :param inList: sequence of values to include segments. :param notInList: sequence of values to exclude segments. :param x12type: An X12type conversion class name. :returns: The sequence of element values for this attribute name. """ - self.segment= segment - self.position= position - self.qualPos= qualPos - self.inList= inList - self.notInList= notInList - self.x12type= x12type - def __repr__( self ): + self.segment = segment + self.position = position + self.qualPos = qualPos + self.inList = inList + self.notInList = notInList + self.x12type = x12type + + def __repr__(self): """Provide Documentation for epydoc.""" typeName = "None" if self.x12type is None else self.x12type.__name__ - return "ElementSequenceAccess( %r, %r, %r, %s )" % ( self.segment, self.position, self.qualPos, typeName ) - def __get__( self, instance, owner ): - segs= instance.segList( self.segment, self.qualPos, self.inList, self.notInList ) - raw_list = [ s.segment.getByPos(self.position) for s in segs ] + return "ElementSequenceAccess( %r, %r, %r, %s )" % ( + self.segment, self.position, self.qualPos, typeName) + + def __get__(self, instance, owner): + segs = instance.segList( + self.segment, self.qualPos, self.inList, self.notInList) + raw_list = [s.segment.getByPos(self.position) for s in segs] if self.x12type is not None: - return [self.x12type.x12_to_python( raw ) for raw in raw_list] + return [self.x12type.x12_to_python(raw) for raw in raw_list] else: return raw_list - def __set__( self, instance, valueList ): - segs= instance.segList( self.segment, self.qualPos, self.inList, self.notInList ) - for seg,val in zip(segs, valueList): + + def __set__(self, instance, valueList): + segs = instance.segList( + self.segment, self.qualPos, self.inList, self.notInList) + for seg, val in zip(segs, valueList): if seg is None or val is None: - raise NotImplementedError( "Unimplemented: number of values and segments don't match" ) - if x12type is not None: - raw= self.x12type.python_to_x12( val ) + raise NotImplementedError() + if self.x12type is not None: + raw = self.x12type.python_to_x12(val) else: - raw= val - seg.setByPos( self.position, raw ) + raw = val + seg.setByPos(self.position, raw) + -class CompositePosition( object ): +class CompositePosition(object): """Sets or gets the value of an Element in a Composite based on a single, fixed position. Segments are managed as SegmentToken instances. Composites, however, are simple sequences of strings. """ - def __init__( self, *position ): - self.positions= position - def get( self, aComposite ): - return [ aComposite[c] if c < len(aComposite) else None for c in self.positions ] - def set( self, aComposite, *value ): - for pos,val in zip(self.positions,value): - assert pos is not None and val is not None, ValueError("values and composite positions diffent lengths") - aComposite[pos]= val - -class CompositeAccess( ElementAccess ): + def __init__(self, *position): + self.positions = position + + def get(self, aComposite): + return [aComposite[c] if c < len(aComposite) + else None for c in self.positions] + + def set(self, aComposite, *value): + for pos, val in zip(self.positions, value): + assert pos is not None and val is not None, ValueError( + "values and composite positions diffent lengths") + aComposite[pos] = val + + +class CompositeAccess(ElementAccess): """Map a user-friendly attribute name to an Element of a Composite; the composites can be found anywhere among the occurances of a given Segment type. - This is used for the various "HI" Segments where a single value is located in a - qualified Composite. This behaves a little bit like the OneOf position - for an ordinary ElementAccess. + This is used for the various "HI" Segments where a single value is + located in a qualified Composite. This behaves a little bit like the + OneOf position for an ordinary ElementAccess. - Generally, a Composite has multiple Elements, the first of which is a qualifier. - The rest of which are the target values. + Generally, a Composite has multiple Elements, the first of which is + a qualifier. The rest of which are the target values. This is a Descriptor which implements the attributes name using - __get__ and __set__ methods. This descriptor is associated with a subclass of - X12LoopBridge, the instance is a specific **Brige** and the owner is - the subclass of X12LoopBridge. + __get__ and __set__ methods. This descriptor is associated with a + subclass of X12LoopBridge, the instance is a specific **Brige** and + the owner is the subclass of X12LoopBridge. """ - def __init__( self, segment, compositeQualifier, compositePosition, x12type=None ): + def __init__(self, segment, compositeQualifier, + compositePosition, x12type=None): """Build Composite Access for an individual Composite. - - :param segment: Name of the segments that contains the composites which are the - values for this attribute. - :param compositeQualifier: A qualifier string or tuple of strings that identifies - the composites to collect - :param compositePosition: The numeric position of the element within the Composite. - :param x12type: An X12type conversion class name. This conversion will receive a - large, complex sequence of values decomposed from a Composite. + + :param segment: Name of the segments that contains the composites + which are the values for this attribute. + :param compositeQualifier: A qualifier string or tuple of strings that + identifies the composites to collect + :param compositePosition: The numeric position of the element within + the Composite. + :param x12type: An X12type conversion class name. This conversion + will receive a large, complex sequence of values decomposed from + a Composite. :returns: The sequence of element values for this attribute name. """ - self.segment= segment - if isinstance( compositeQualifier, (list,tuple) ): - self.qualifier= compositeQualifier + self.segment = segment + if isinstance(compositeQualifier, (list, tuple)): + self.qualifier = compositeQualifier else: - self.qualifier= (compositeQualifier,) - if isinstance( compositePosition, CompositePosition ): - self.compPosition= compositePosition - if isinstance( compositePosition, (list,tuple) ): - self.compPosition= CompositePosition( *compositePosition ) + self.qualifier = (compositeQualifier,) + if isinstance(compositePosition, CompositePosition): + self.compPosition = compositePosition + if isinstance(compositePosition, (list, tuple)): + self.compPosition = CompositePosition(*compositePosition) else: - self.compPosition= CompositePosition( compositePosition ) - self.x12type= x12type - def __repr__( self ): + self.compPosition = CompositePosition(compositePosition) + self.x12type = x12type + + def __repr__(self): """Provide Documentation for epydoc.""" typeName = "None" if self.x12type is None else self.x12type.__name__ - return "CompositeAccess( %r, %r, %r, %s )" % ( self.segment, self.position, self.qualifier, typeName ) - def __get__( self, instance, owner ): - segList= instance.segList( self.segment ) - compList= [] + return "CompositeAccess( %r, %r, %r, %s )" % ( + self.segment, self.position, self.qualifier, typeName) + + def __get__(self, instance, owner): + segList = instance.segList(self.segment) + compList = [] for seg in segList: - compList.extend( seg.compositeList( *self.qualifier ) ) - data= [] + compList.extend(seg.compositeList(*self.qualifier)) + data = [] for composite in compList: - raw= self.compPosition.get( composite ) + raw = self.compPosition.get(composite) if self.x12type is not None: - data.append( self.x12type.x12_to_python( raw ) ) + data.append(self.x12type.x12_to_python(raw)) else: - data.append( raw ) + data.append(raw) + if len(data) == 0: + return None return data[0] - def __set__( self, instance, value ): + + def __set__(self, instance, value): """XXX - Implement this.""" - raise NotImplementedError( "Unimplemented: can't update Composite" ) - segList= instance.segList( self.segment ) - # need to locate composite in this segList and update it. + raise NotImplementedError() + -class CompositeSequenceAccess( CompositeAccess ): - """Map a user-friendly attribute name to a sequence of Composites that occur - somewhere in the occurances of a given Segment type - This is used for the various "HI" Segments where a sequence of values is located in a - qualified Composites. +class CompositeSequenceAccess(CompositeAccess): + """Map a user-friendly attribute name to a sequence of Composites + that occur somewhere in the occurances of a given Segment type. + This is used for the various "HI" Segments where a sequence of values + is located in a qualified Composites. - Each Composite Element has multiple values, the first of which is a qualifier - for the Composite. The rest of which is the target values. + Each Composite Element has multiple values, the first of which + is a qualifier for the Composite. The rest of which is the target values. This is a Descriptor which implements the attributes name using __get__ and __set__ methods. """ - def __init__( self, segment, compositeQualifier=None, x12type=None ): + def __init__(self, segment, compositeQualifier=None, x12type=None): """Build Composite Access for a sequence of Composites. - - :param segment: Name of the segments that contains the elements which are the - values for this attribute. - :param compositeQualifier: A qualifier string or tuple of strings that identifies - the composites to collect - :param x12type: An X12type conversion class name. This conversion will receive a - large, complex sequence of values decomposed from a Composite. + + :param segment: Name of the segments that contains the elements + which are the values for this attribute. + :param compositeQualifier: A qualifier string or tuple of strings + that identifies the composites to collect + :param x12type: An X12type conversion class name. This conversion + will receive a large, complex sequence of values decomposed from + a Composite. :returns: The sequence of element values for this attribute name. """ - self.segment= segment - if isinstance( compositeQualifier, (list,tuple) ): - self.qualifier= compositeQualifier + self.segment = segment + if isinstance(compositeQualifier, (list, tuple)): + self.qualifier = compositeQualifier else: - self.qualifier= ( compositeQualifier, ) - self.x12type= x12type - def __repr__( self ): + self.qualifier = (compositeQualifier, ) + self.x12type = x12type + + def __repr__(self): """Provide Documentation for epydoc.""" typeName = "None" if self.x12type is None else self.x12type.__name__ - return "CompositeSequenceAccess( %r, %r, %r, %s )" % ( self.segment, self.position, self.qualifier, typeName ) - def __get__( self, instance, owner ): - segList= instance.segList( self.segment ) - compList= [] + return "CompositeSequenceAccess( %r, %r, %r, %s )" % ( + self.segment, self.position, self.qualifier, typeName) + + def __get__(self, instance, owner): + segList = instance.segList(self.segment) + compList = [] for seg in segList: - compList.extend( seg.compositeList( *self.qualifier ) ) - data= [] + compList.extend(seg.compositeList(*self.qualifier)) + data = [] for composite in compList: - raw= composite + raw = composite if self.x12type is not None: - data.append( self.x12type.x12_to_python( raw ) ) + data.append(self.x12type.x12_to_python(raw)) else: - data.append( raw ) + data.append(raw) return data - def __set__( self, instance, value ): - """XXX - implement this.""" - raise NotImplementedError( "Unimplemented: can't update Composite" ) -class Conversion( object ): + def __set__(self, instance, value): + raise NotImplementedError() + + +class Conversion(object): """Convert between X12 strings and Python objects. This is the abstract superclass for all conversions. """ @staticmethod - def x12_to_python( raw ): + def to_dict(): + return NotImplemented + + @staticmethod + def x12_to_python(raw): return NotImplemented + @staticmethod - def python_to_x12( value ): + def python_to_x12(value): return NotImplemented class TM(Conversion): """Convert between TM format time to proper datetime.time objects.""" + @staticmethod + def to_dict(): + return {"type": "time"} + @staticmethod def x12_to_python(raw): if raw is None or raw == "": @@ -933,59 +1283,86 @@ def python_to_x12(value): if value is None: return "" return "{time}{centiseconds}".format( - time=value.strftime("%H%M%S"), - centiseconds=int(value.microsecond / 10000)) + time=value.strftime("%H%M%S"), + centiseconds=int(value.microsecond / 10000)) -class D8( Conversion ): +class D8(Conversion): """Convert between D8 format dates to proper DateTime objects.""" @staticmethod - def x12_to_python( raw ): - if raw is None: - return raw - yy,mm,dd = int(raw[0:4]), int(raw[4:6]), int(raw[6:8]) - return datetime.date( yy,mm,dd ) + def to_dict(): + return {"type": "datetime"} + @staticmethod - def python_to_x12( value ): - if value is None: - return "" - return value.strftime( "%4Y%2m%2d" ) + def x12_to_python(raw): + if raw is None or raw == "": + return None + + if len(raw) >= 8: + year, month, day = int(raw[0:4]), int(raw[4:6]), int(raw[6:8]) + else: + year, month, day = int(raw[0:2]), int(raw[2:4]), int(raw[4:6]) + year += datetime.datetime.strptime('00', '%y').year + + return datetime.date(year, month, day) + + @staticmethod + def python_to_x12(value): + return '' if value is None else value.strftime("%Y%m%d") -class DR( Conversion ): +class DR(Conversion): """Convert between DR format dates to proper DateTime objects.""" @staticmethod - def x12_to_python( raw ): + def to_dict(): + return {"type": "datetime"} + + @staticmethod + def x12_to_python(raw): if raw is None or raw == "": return None + d1, punct, d2 = raw.partition('-') + if d1 is None or d2 is None or d1 == "" or d2 == "": return None - yy1,mm1,dd1 = int(d1[0:4]), int(d1[4:6]), int(d1[6:8]) - yy2,mm2,dd2 = int(d2[0:4]), int(d2[4:6]), int(d2[6:8]) - return datetime.date( yy1,mm1,dd1 ), datetime.date( yy2,mm2,dd2 ) + + yy1, mm1, dd1 = int(d1[0:4]), int(d1[4:6]), int(d1[6:8]) + yy2, mm2, dd2 = int(d2[0:4]), int(d2[4:6]), int(d2[6:8]) + + return datetime.date(yy1, mm1, dd1), datetime.date(yy2, mm2, dd2) + @staticmethod - def python_to_x12( value ): + def python_to_x12(value): if value is None: return "" d1, d2 = value - return "%s-%s" % ( d1.strftime( "%4Y%2m%2d" ), d2.strftime( "%4Y%2m%2d" ) ) + return "%s-%s" % (d1.strftime("4Y%m%d"), d2.strftime("%Y%m%d")) -class SegmentConversion( Conversion ): +class SegmentConversion(Conversion): __name__ = "SegmentConversion" """Convert between an X12Segment and a proper Python object.""" - def __init__( self, someClass ): - self.someClass= someClass + def __init__(self, someClass): + self.someClass = someClass + + def to_dict(self): + return { + "type": self.someClass.__name__, + } - def x12_to_python( self, raw ): - return self.someClass( raw ) + def x12_to_python(self, raw): + return self.someClass(raw) - def python_to_x12( self, value ): + def python_to_x12(self, value): return value.segment class XDecimal(Conversion): + @staticmethod + def to_dict(): + return {"type": "float"} + @staticmethod def x12_to_python(raw): if raw == "" or raw is None: @@ -1037,6 +1414,10 @@ class Header(X12LoopBridge): header.type -> "Z" """ class Enum(Conversion): + @staticmethod + def to_dict(): + return {"type": "enum", "options": options} + @staticmethod def x12_to_python(raw): if raw == "" or raw is None: @@ -1054,7 +1435,7 @@ def python_to_x12(value): elif value in options: return value else: - for (k,v) in options.iteritems(): + for (k, v) in options.items(): if value == v: return k if raw_unknowns: @@ -1066,6 +1447,10 @@ def python_to_x12(value): def boolean(match): """ True if the field matches match. Match must be a string. """ class Boolean(Conversion): + @staticmethod + def to_dict(): + return {"type": "bool", "match": match} + @staticmethod def x12_to_python(raw): return raw == match diff --git a/tigershark/facade/control.py b/tigershark/facade/control.py new file mode 100644 index 0000000..3d068cf --- /dev/null +++ b/tigershark/facade/control.py @@ -0,0 +1,95 @@ +from tigershark import X12VersionTuple +from tigershark.facade import D8 +from tigershark.facade import ElementAccess +from tigershark.facade import Facade +from tigershark.facade import TM +from tigershark.facade import X12LoopBridge + + +class ControlHeaders(Facade): + + def __init__(self, x12_message): + super(ControlHeaders, self).__init__() + isa_loops = x12_message.descendant('LOOP', name='ISA_LOOP') + self.interchange_controls = [InterchangeControlHeader(loop) for loop in isa_loops] + + +class InterchangeControlHeader(X12LoopBridge): + + authorization_information_qualifier = ElementAccess("ISA", 1) + authorization_information = ElementAccess("ISA", 2) + + security_information_qualifier = ElementAccess("ISA", 3) + security_information = ElementAccess("ISA", 4) + + interchange_sender_id_qualifier = ElementAccess("ISA", 5) + interchange_sender_id = ElementAccess("ISA", 6) + + interchange_receiver_id_qualifier = ElementAccess("ISA", 7) + interchange_receiver_id = ElementAccess("ISA", 8) + + interchange_date = ElementAccess("ISA", 9, x12type=D8) + interchange_time = ElementAccess("ISA", 10, x12type=TM) + + interchange_control_standards_id = ElementAccess("ISA", 11) + interchange_control_version_number = ElementAccess("ISA", 12) + interchange_control_number = ElementAccess("ISA", 13) + + acknowledgement_requested = ElementAccess("ISA", 14) + test_indicator = ElementAccess("ISA", 15) + subelement_separator = ElementAccess("ISA", 16) + + def __init__(self, x12_message): + super(InterchangeControlHeader, self).__init__(x12_message) + gs_loops = x12_message.descendant('LOOP', name='GS_LOOP') + self.functional_groups = [FunctionalGroupHeader(loop) for loop in gs_loops] + + +class FunctionalGroupHeader(X12LoopBridge): + + functional_id_code = ElementAccess("GS", 1) + + application_sender_code = ElementAccess("GS", 2) + application_receiver_code = ElementAccess("GS", 3) + + date = ElementAccess("GS", 4, x12type=D8) + time = ElementAccess("GS", 5, x12type=TM) + + group_control_number = ElementAccess("GS", 6) + + responsible_agency_code = ElementAccess("GS", 7) + + version_indicator_code = ElementAccess("GS", 8) + + def __init__(self, x12_message): + super(FunctionalGroupHeader, self).__init__(x12_message) + st_loops = x12_message.descendant('LOOP', name='ST_LOOP') + self.transaction_sets = [ + TransactionSetHeader(self, st_loop) + for st_loop in st_loops] + + @property + def version_tuple(self): + """ + Return a tuple of (version, release, subrelease) numbers. + + Returns None if no version is given or has a different format. + """ + if self.responsible_agency_code == 'X': + return X12VersionTuple( + version=int(self.version_indicator_code[0:3]), + release=int(self.version_indicator_code[3:5]), + subrelease=int(self.version_indicator_code[5:6]), + industry_identifier_code=self.version_indicator_code[6:], + ) + + +class TransactionSetHeader(X12LoopBridge): + + transaction_set_identifier_code = ElementAccess("ST", 1) + + transaction_set_control_number = ElementAccess("ST", 2) + + def __init__(self, functional_group, x12_message): + super(TransactionSetHeader, self).__init__(x12_message) + self.functional_group = functional_group diff --git a/tigershark/facade/enums/common.py b/tigershark/facade/enums/common.py index 6b54ced..370886f 100644 --- a/tigershark/facade/enums/common.py +++ b/tigershark/facade/enums/common.py @@ -3863,3 +3863,56 @@ "YXY": "Programmed Calendar Year", "ZZZ": "Mutually Defined", } + +place_of_service = { + "1": "Pharmacy", + "2": "Telehealth", + "3": "School", + "4": "Homeless Shelter", + "5": "Indian Health Service, Free-standing Facility", + "6": "Indian Health Service, Provider-based Facility", + "7": "Tribal 638, Free-standing Facility", + "8": "Tribal 638, Provider-based Facility", + "9": "Prison/Correctional Facility", + "11": "Office", + "12": "Home", + "13": "Assisted Living Facility", + "14": "Group Home", + "15": "Mobile Unit", + "16": "Temporary Lodging", + "17": "Walk-in Retail Health Clinic", + "18": "Place of Employment-Worksite", + "19": "Off Campus-Outpatient Hospital", + "20": "Urgent Care Facility", + "21": "Inpatient Hospital", + "22": "On Campus-Outpatient Hospital", + "23": "Emergency Room – Hospital", + "24": "Ambulatory Surgical Center", + "25": "Birthing Center", + "26": "Military Treatment Facility", + "31": "Skilled Nursing Facility", + "32": "Nursing Facility", + "33": "Custodial Care Facility", + "34": "Hospice", + "41": "Ambulance - Land", + "42": "Ambulance – Air or Water", + "49": "Independent Clinic", + "50": "Federally Qualified Health Center", + "51": "Inpatient Psychiatric Facility", + "52": "Psychiatric Facility-Partial Hospitalization", + "53": "Community Mental Health Center", + "54": "Intermediate Care Facility/ Individuals with Intellectual Disabilities", + "55": "Residential Substance Abuse Treatment Facility", + "56": "Psychiatric Residential Treatment Center", + "57": "Non-residential Substance Abuse Treatment Facility", + "58": "Non-residential Opioid Treatment Facility", + "59": "Unassigned", + "60": "Mass Immunization Center", + "61": "Comprehensive Inpatient Rehabilitation Facility", + "62": "Comprehensive Outpatient Rehabilitation Facility", + "65": "End-Stage Renal Disease Treatment Facility", + "71": "Public Health Clinic", + "72": "Rural Health Clinic", + "81": "Independent Laboratory", + "99": "Other Place of Service", +} diff --git a/tigershark/facade/enums/eligibility.py b/tigershark/facade/enums/eligibility.py index 0bb408c..02c53e6 100644 --- a/tigershark/facade/enums/eligibility.py +++ b/tigershark/facade/enums/eligibility.py @@ -193,12 +193,33 @@ "E26": "Comprehensive Medication Therapy Management Review", "E27": "Targeted Medication Therapy Management Review", "E28": "Dietary/Nutritional Services", + "E29": "Technical Cardiac Rehabilitation Services Component", + "E30": "Professional Cardiac Rehabilitation Services Component", + "E31": "Professional Intensive Cardiac Rehabilitation Services Component", + "E32": "Intensive Cardiac Rehabilitation - Technical Component", + "E33": "Intensive Cardiac Rehabilitation", + "E34": "Pulmonary Rehabilitation - Technical Component", + "E35": "Pulmonary Rehabilitation - Professional Component", + "E36": "Convenience Care", + "E37": "Telemedicine", + "E38": "Pharmacist Services", + "E39": "Diabetic Education", + "E40": "Early Intervention", "EA": "Preventive Services", "EB": "Specialty Pharmacy", "EC": "Durable Medical Equipment New", "ED": "CAT Scan", "EE": "Ophthalmology", "EF": "Contact Lenses", + "EO": "Allied Behavioral Analysis Therapy", + "F1": "Medical Coverage", + "F2": "Social Work Coverage", + "F3": "Dental Coverage", + "F4": "Hearing Coverage", + "F5": "Prescription Drug Coverage", + "F6": "Vision Coverage", + "F7": "Orthodontia Coverage", + "F8": "Mental Health Coverage", "GF": "Generic Prescription Drug - Formulary", "GN": "Generic Prescription Drug - Non-Formulary", "GY": "Allergy", @@ -217,6 +238,22 @@ "UC": "Urgent Care", } +deprecated_service_type_codes = ( + "34", + "BW", + "BX", + "E12", + "E13", + "E24", + "E29", + "E30", + "E31", + "E32", + "E34", + "E35", + "EO", +) + coverage_level = { "CHD": "Children Only", "DEP": "Dependents Only", diff --git a/tigershark/facade/f270.py b/tigershark/facade/f270.py index ff0d5a8..9e8e21a 100644 --- a/tigershark/facade/f270.py +++ b/tigershark/facade/f270.py @@ -42,7 +42,7 @@ def __init__(self, anX12Message, *args, **kwargs): super(Source, self).__init__(anX12Message, *args, **kwargs) self.source_information = first(self.loops( self._Information, anX12Message)) - self.receivers = self.loops(Receiver, anX12Message) + self.receivers = self.loops(Receiver, anX12Message) # N/A for 5010 class Receiver(Facade, X12LoopBridge): @@ -71,7 +71,7 @@ def __init__(self, anX12Message, *args, **kwargs): super(Receiver, self).__init__(anX12Message, *args, **kwargs) self.receiver_information = first(self.loops( self._Information, anX12Message)) - self.subscribers = self.loops(Subscriber, anX12Message) + self.subscribers = self.loops(Subscriber, anX12Message) # N/A for 5010 class EligibilityOrBenefitInquiry(X12SegmentBridge): @@ -161,7 +161,7 @@ def __init__(self, anX12Message, *args, **kwargs): self._Information, anX12Message)) self.eligibility_or_benefit_information = self.loops( self._EligibilityOrBenefitInformation, anX12Message) - self.dependents = self.loops(Dependent, anX12Message) + self.dependents = self.loops(Dependent, anX12Message) # N/A for 5010 class Dependent(Facade, X12LoopBridge): @@ -218,6 +218,10 @@ def __init__(self, anX12Message, *args, **kwargs): class F270_4010(Facade): + + transaction_set_identifier_code = '270' + x12_version_string = '4010' + def __init__(self, anX12Message): st_loops = anX12Message.descendant('LOOP', name='ST_LOOP') if len(st_loops) > 0: @@ -227,3 +231,22 @@ def __init__(self, anX12Message): else: self.header = first(self.loops(Header, anX12Message)) self.source = first(self.loops(Source, anX12Message)) + + +class F270_5010(Facade): + + transaction_set_identifier_code = '270' + x12_version_string = '5010' + + def __init__(self, anX12Message): + st_loops = anX12Message.descendant('LOOP', name='ST_LOOP') + if len(st_loops) > 0: + self.facades = [] + for loop in st_loops: + self.facades.append(F270_5010(loop)) + else: + self.header = first(self.loops(Header, anX12Message)) + self.source = first(self.loops(Source, anX12Message)) + self.receivers = self.loops(Receiver, anX12Message) + self.subscribers = self.loops(Subscriber, anX12Message) + self.dependents = self.loops(Dependent, anX12Message) diff --git a/tigershark/facade/f271.py b/tigershark/facade/f271.py index 666244f..ca593e3 100644 --- a/tigershark/facade/f271.py +++ b/tigershark/facade/f271.py @@ -15,6 +15,7 @@ from tigershark.facade.enums.common import delivery_time_pattern_code from tigershark.facade.enums.common import quantity_qualifier from tigershark.facade.enums.common import time_period_qualifier +from tigershark.facade.enums.common import place_of_service from tigershark.facade.enums.eligibility import coverage_level from tigershark.facade.enums.eligibility import eligibility_or_benefit_code from tigershark.facade.enums.eligibility import insurance_type @@ -122,7 +123,13 @@ class EligibilityOrBenefitInformation(X12SegmentBridge): authorization_or_certification = ElementAccess("EB", 11, x12type=boolean("Y")) in_plan_network = ElementAccess("EB", 12, x12type=boolean("Y")) + out_of_plan_network = ElementAccess("EB", 12, x12type=boolean("N")) both_in_out_network = ElementAccess("EB", 12, x12type=boolean("W")) + in_plan_network_type = ElementAccess("EB", 12, x12type=enum({ + "Y": "In Plan Network", + "N": "Out of Plan Network", + "W": "Both In and Out of Plan Network", + })) ada_code = CompositeAccess("EB", "AD", 13) cpt_code = CompositeAccess("EB", "CJ", 13) hcpcs_code = CompositeAccess("EB", "HC", 13) @@ -155,6 +162,10 @@ class Message(X12LoopBridge): message_text = ElementAccess("MSG", 1) +class EligibilityOrBenefitAdditionalInformation(X12LoopBridge): + additional_information = CompositeAccess("III", "ZZ", 2, x12type=enum(place_of_service)) + + class Subscriber(Facade, X12LoopBridge): """The person uniquely identified by the Source. @@ -218,6 +229,7 @@ class _EligibilityOrBenefitInformation(Facade, X12LoopBridge): request_validations = SegmentSequenceAccess("AAA", x12type=SegmentConversion(RequestValidation)) messages = ElementSequenceAccess("MSG", 1) + additional_information = ElementSequenceAccess("III", 2, x12type=enum(place_of_service)) class _AdditionalInformation(X12LoopBridge): loopName = "2115C" @@ -304,6 +316,7 @@ class _EligibilityOrBenefitInformation(Facade, X12LoopBridge): request_validations = SegmentSequenceAccess("AAA", x12type=SegmentConversion(RequestValidation)) messages = ElementSequenceAccess("MSG", 1) + additional_information = ElementSequenceAccess("III", 2, x12type=enum(place_of_service)) class _AdditionalInformation(X12LoopBridge): loopName = "2115C" @@ -342,6 +355,10 @@ def __init__(self, anX12Message, *args, **kwargs): class F271_4010(Facade): + + transaction_set_identifier_code = '271' + x12_version_string = '4010' + def __init__(self, anX12Message): st_loops = anX12Message.descendant('LOOP', name='ST_LOOP') if len(st_loops) > 0: @@ -351,3 +368,22 @@ def __init__(self, anX12Message): else: self.header = first(self.loops(Header, anX12Message)) self.source = first(self.loops(Source, anX12Message)) + + +class F271_5010(Facade): + + transaction_set_identifier_code = '271' + x12_version_string = '5010' + + def __init__(self, anX12Message): + st_loops = anX12Message.descendant('LOOP', name='ST_LOOP') + if len(st_loops) > 0: + self.facades = [] + for loop in st_loops: + self.facades.append(F271_5010(loop)) + else: + self.header = first(self.loops(Header, anX12Message)) + self.source = first(self.loops(Source, anX12Message)) + self.receivers = self.loops(Receiver, anX12Message) + self.subscribers = self.loops(Subscriber, anX12Message) + self.dependents = self.loops(Dependent, anX12Message) diff --git a/tigershark/facade/f835.py b/tigershark/facade/f835.py index b6c5e0f..907aac9 100644 --- a/tigershark/facade/f835.py +++ b/tigershark/facade/f835.py @@ -28,45 +28,44 @@ class _FinancialInformation(X12LoopBridge): providers in a chain. The BPR contains mandatory information, even when it is not being used to move funds electronically. """ - transaction_type = ElementAccess("BPR", 1, x12type=enum( - {"C": "Payment Accompanies Remittance Advice", - "D": "Make Payment Only", - "H": "Notification Only", - "I": "Remittance Information Only", - "P": "Prenotification of Ruture Transfers", - "U": "Split Payment and Remittance", - "X": "Handling Party's Option to Split Payment and "\ - "Remittance."})) + transaction_type = ElementAccess("BPR", 1, x12type=enum({ + "C": "Payment Accompanies Remittance Advice", + "D": "Make Payment Only", + "H": "Notification Only", + "I": "Remittance Information Only", + "P": "Prenotification of Ruture Transfers", + "U": "Split Payment and Remittance", + "X": "Handling Party's Option to Split Payment and Remittance."})) amount = ElementAccess("BPR", 2, x12type=Money) - credit_or_debit = ElementAccess("BPR", 3, x12type=enum( - {"C": "Credit", - "D": "Debit"})) - payment_method = ElementAccess("BPR", 4, x12type=enum( - {"ACH": "Automated Clearing House (ACH)", - "BOP": "Financial Institution Option", - "CHK": "Check", - "FWT": "Federal Reserve Funds/Wire Transfer - Nonrepetitive", - "NON": "Non-payment Data (only for transaction-type=H)"})) - payment_format = ElementAccess("BPR", 5, x12type=enum( - {"CCP": "Cash Concentration/Disbursement Plus Addenda", - "CTX": "Coporate Trade Exchange"})) - sender_aba_transit_routing_number = ElementAccess("BPR", 7, - qualifier=(6, "01")) + credit_or_debit = ElementAccess("BPR", 3, x12type=enum({ + "C": "Credit", + "D": "Debit"})) + payment_method = ElementAccess("BPR", 4, x12type=enum({ + "ACH": "Automated Clearing House (ACH)", + "BOP": "Financial Institution Option", + "CHK": "Check", + "FWT": "Federal Reserve Funds/Wire Transfer - Nonrepetitive", + "NON": "Non-payment Data (only for transaction-type=H)"})) + payment_format = ElementAccess("BPR", 5, x12type=enum({ + "CCP": "Cash Concentration/Disbursement Plus Addenda", + "CTX": "Coporate Trade Exchange"})) + sender_aba_transit_routing_number = ElementAccess( + "BPR", 7, qualifier=(6, "01")) sender_canadian_bank_branch_and_institution_number = ElementAccess( - "BPR", 7, qualifier=(6, "04")) - sender_account_type = ElementAccess("BPR", 8, x12type=enum( - {"DA": "Demand Deposit"})) + "BPR", 7, qualifier=(6, "04")) + sender_account_type = ElementAccess("BPR", 8, x12type=enum({ + "DA": "Demand Deposit"})) sender_bank_account_number = ElementAccess("BPR", 9) sender_id = ElementAccess("BPR", 10) sender_supplemental_id = ElementAccess("BPR", 11) - receiver_aba_transit_routing_number = ElementAccess("BPR", 13, - qualifier=(12, "01")) + receiver_aba_transit_routing_number = ElementAccess( + "BPR", 13, qualifier=(12, "01")) receiver_canadian_bank_branch_and_institution_number = ElementAccess( - "BPR", 13, qualifier=(12, "04")) - receiver_account_type = ElementAccess("BPR", 14, x12type=enum( - {"DA": "Demand Deposit", - "SG": "Savings"})) + "BPR", 13, qualifier=(12, "04")) + receiver_account_type = ElementAccess("BPR", 14, x12type=enum({ + "DA": "Demand Deposit", + "SG": "Savings"})) receiver_bank_account_number = ElementAccess("BPR", 15) issue_date = ElementAccess("BPR", 16, x12type=D8) @@ -78,12 +77,11 @@ class _ReassociationTraceNumber(X12LoopBridge): separated. """ trace_type = ElementAccess("TRN", 1, x12type=enum({ - "1": "Current Transaction Trace Numbers"})) + "1": "Current Transaction Trace Numbers"})) check_or_eft_trace_number = ElementAccess("TRN", 2) payer_id = ElementAccess("TRN", 3) originating_company_supplemental_code = ElementAccess("TRN", 4) - # TODO tests class _CurrencyInformation(X12LoopBridge): """ Specify the currency and exchange rate, if applicable. @@ -93,10 +91,11 @@ class _CurrencyInformation(X12LoopBridge): currency_code = ElementAccess("CUR", 2) exchange_rate = ElementAccess("CUR", 3) - # TODO tests class _Receiver(X12LoopBridge): """ Used when the receiver of the transaction is not the payee. """ id = ElementAccess("REF", 2, qualifier=(1, "EV")) + description = ElementAccess("REF", 3, qualifier=(1, "EV")) + reference_id = ElementAccess("REF", 4, qualifier=(1, "EV")) # TODO tests class _Version(X12LoopBridge): @@ -107,6 +106,8 @@ class _Version(X12LoopBridge): underlying EDI file. This is sometimes used for customer service requests, to help track down where an error was introduced.""" version_number = ElementAccess("REF", 2, qualifier=(1, "F2")) + description = ElementAccess("REF", 3, qualifier=(1, "F2")) + reference_id = ElementAccess("REF", 4, qualifier=(1, "F2")) class _ProductionDate(X12LoopBridge): """ Production date of the claim. @@ -118,11 +119,11 @@ class _ProductionDate(X12LoopBridge): def __init__(self, aLoop, *args, **kwargs): super(Header, self).__init__(aLoop, *args, **kwargs) self.financial_information = Header._FinancialInformation( - aLoop, *args, **kwargs) + aLoop, *args, **kwargs) self.reassociation_trace_number = Header._ReassociationTraceNumber( - aLoop, *args, **kwargs) + aLoop, *args, **kwargs) self.currency_information = Header._CurrencyInformation( - aLoop, *args, **kwargs) + aLoop, *args, **kwargs) self.receiver = Header._Receiver(aLoop, *args, **kwargs) self.version = Header._Version(aLoop, *args, **kwargs) self.production_date = Header._ProductionDate(aLoop, *args, **kwargs) @@ -148,8 +149,8 @@ class ProviderAdjustments(X12SegmentBridge): class Footer(Facade, X12LoopBridge): loopName = "FOOTER" - provider_adjustments = SegmentSequenceAccess("PLB", - x12type=SegmentConversion(ProviderAdjustments)) + provider_adjustments = SegmentSequenceAccess( + "PLB", x12type=SegmentConversion(ProviderAdjustments)) class Payer(X12LoopBridge): @@ -162,8 +163,7 @@ class Payer(X12LoopBridge): naic_code = ElementAccess("REF", 2, qualifier=(1, "NF")) def __str__(self): - return "%s, %s %s %s" % (self.last, self.first, self.mid, - self.suffix) + return "%s, %s %s %s" % (self.last, self.first, self.mid, self.suffix) def __init__(self, aLoop, *args, **kwargs): super(Payer, self).__init__(aLoop, *args, **kwargs) @@ -232,48 +232,44 @@ class _ServiceInfo(X12LoopBridge): charge = ElementAccess("SVC", 2, x12type=Money) payment = ElementAccess("SVC", 3, x12type=Money) quantity = ElementAccess("SVC", 5) - start_date = ElementAccess("DTM", 2, qualifier=(1, "150"), - x12type=D8) - end_date = ElementAccess("DTM", 2, qualifier=(1, "151"), - x12type=D8) - service_date = ElementAccess("DTM", 2, qualifier=(1, "472"), - x12type=D8) + start_date = ElementAccess("DTM", 2, qualifier=(1, "150"), x12type=D8) + end_date = ElementAccess("DTM", 2, qualifier=(1, "151"), x12type=D8) + service_date = ElementAccess( + "DTM", 2, qualifier=(1, "472"), x12type=D8) # Identification apg_number = ElementAccess("REF", 2, qualifier=(1, "1S")) - provider_control_number = ElementAccess("REF", 2, - qualifier=(1, "6R")) - authorization_number = ElementAccess("REF", 2, - qualifier=(1, "BB")) + provider_control_number = ElementAccess("REF", 2, qualifier=(1, "6R")) + authorization_number = ElementAccess("REF", 2, qualifier=(1, "BB")) attachment_code = ElementAccess("REF", 2, qualifier=(1, "E9")) - prior_authorization_number = ElementAccess("REF", 2, - qualifier=(1, "G1")) - predetermination_of_benefits_id = ElementAccess("REF", 2, - qualifier=(1, "G3")) + prior_authorization_number = ElementAccess( + "REF", 2, qualifier=(1, "G1")) + predetermination_of_benefits_id = ElementAccess( + "REF", 2, qualifier=(1, "G3")) location_number = ElementAccess("REF", 2, qualifier=(1, "LU")) rate_code_number = ElementAccess("REF", 2, qualifier=(1, "RB")) # TODO: Rendering provider info? # Line-item claim amounts - allowed_amount = ElementAccess("AMT", 2, qualifier=(1, "B6"), - x12type=Money) - per_day_limit = ElementAccess("AMT", 2, qualifier=(1, "DY"), - x12type=Money) - deduction_amount = ElementAccess("AMT", 2, qualifier=(1, "KH"), - x12type=Money) - tax_amount = ElementAccess("AMT", 2, qualifier=(1, "T"), - x12type=Money) - total_claim_before_taxes = ElementAccess("AMT", 2, - qualifier=(1, "T2"), x12type=Money) + allowed_amount = ElementAccess( + "AMT", 2, qualifier=(1, "B6"), x12type=Money) + per_day_limit = ElementAccess( + "AMT", 2, qualifier=(1, "DY"), x12type=Money) + deduction_amount = ElementAccess( + "AMT", 2, qualifier=(1, "KH"), x12type=Money) + tax_amount = ElementAccess( + "AMT", 2, qualifier=(1, "T"), x12type=Money) + total_claim_before_taxes = ElementAccess( + "AMT", 2, qualifier=(1, "T2"), x12type=Money) not_covered_quantity = ElementAccess("QTY", 2, qualifier=(1, "NE")) - notes = ElementSequenceAccess("LQ", 2, qualPos=1, inList=("HE",), - x12type=enum(remittance_advice_codes, raw_unknowns=True)) + notes = ElementSequenceAccess( + "LQ", 2, qualPos=1, inList=("HE",), + x12type=enum(remittance_advice_codes, raw_unknowns=True)) def __init__(self, anX12Message, *args, **kwargs): - super(Claim._ServiceInfo, self).__init__(anX12Message, *args, - **kwargs) - # Claim adjustments + super(Claim._ServiceInfo, self).__init__( + anX12Message, *args, **kwargs) self.claim_adjustments = Claim._ClaimAdjustments(anX12Message) def get_actual_allowed_amount(self): @@ -283,53 +279,51 @@ def get_actual_allowed_amount(self): return self.allowed_amount def get_actual_deductible(self): - return self.claim_adjustments.patient_responsibility.\ - total_amount('1') + return (self.claim_adjustments + .patient_responsibility.total_amount('1')) def get_actual_coinsurance(self): - return self.claim_adjustments.patient_responsibility.\ - total_amount('2') + return (self.claim_adjustments + .patient_responsibility.total_amount('2')) def get_actual_copayment(self): - return self.claim_adjustments.patient_responsibility.\ - total_amount('3') + return (self.claim_adjustments + .patient_responsibility.total_amount('3')) class _ClaimPaymentInfo(X12LoopBridge): patient_control_number = ElementAccess("CLP", 1) status_code = ElementAccess("CLP", 2, x12type=enum({ - "1": "Processed as Primary", - "2": "Processed as Secondary", - "3": "Processed as Tertiary", - "4": "Denied", - "19": "Processed as Primary, Forwarded to Additional Payer(s)", - "20": "Processed as Secondary, Forwarded to Additional "\ - "Payer(s)", - "21": "Processed as Tertiary, Forwarded to Additional "\ - "Payer(s)", - "22": "Reversal of Previous Payment", - "23": "Not Our Claim, Forwarded to Additional Payer(s)", - "25": "Predetermination Pricing Only - No Payment"})) + "1": "Processed as Primary", + "2": "Processed as Secondary", + "3": "Processed as Tertiary", + "4": "Denied", + "19": "Processed as Primary, Forwarded to Additional Payer(s)", + "20": "Processed as Secondary, Forwarded to Additional Payer(s)", + "21": "Processed as Tertiary, Forwarded to Additional Payer(s)", + "22": "Reversal of Previous Payment", + "23": "Not Our Claim, Forwarded to Additional Payer(s)", + "25": "Predetermination Pricing Only - No Payment"})) total_charge = ElementAccess("CLP", 3, x12type=Money) payment = ElementAccess("CLP", 4, x12type=Money) patient_responsibility = ElementAccess("CLP", 5, x12type=Money) claim_type = ElementAccess("CLP", 6, x12type=enum({ - "12": "Preferred Provider Organization (PPO)", - "13": "Point of Service (POS)", - "14": "Exclusive Provider Organization (EPO)", - "15": "Indemnity Insurance", - "16": "Health Maintenance Organization (HMO) Medicare Risk", - "AM": "Automobile Medical", - "CH": "Champus", - "DS": "Disability", - "HM": "Health Maintenance Organization", - "LM": "Liability Medical", - "MA": "Medicare Part A", - "MB": "Medicare Part B", - "MC": "Medicaid", - "OF": "Other Federal Program", - "TV": "Title V", - "VA": "Veteran Administration Plan", - "WC": "Workers Compensation Health Claim"})) + "12": "Preferred Provider Organization (PPO)", + "13": "Point of Service (POS)", + "14": "Exclusive Provider Organization (EPO)", + "15": "Indemnity Insurance", + "16": "Health Maintenance Organization (HMO) Medicare Risk", + "AM": "Automobile Medical", + "CH": "Champus", + "DS": "Disability", + "HM": "Health Maintenance Organization", + "LM": "Liability Medical", + "MA": "Medicare Part A", + "MB": "Medicare Part B", + "MC": "Medicaid", + "OF": "Other Federal Program", + "TV": "Title V", + "VA": "Veteran Administration Plan", + "WC": "Workers Compensation Health Claim"})) payer_claim_control_number = ElementAccess("CLP", 7) facility_type = ElementAccess("CLP", 8) frequency_code = ElementAccess("CLP", 9) @@ -337,88 +331,80 @@ class _ClaimPaymentInfo(X12LoopBridge): discharge_fraction = ElementAccess("CLP", 12) # TODO: Medicare inpatient/outpatient adjudication? - total_covered_charge = ElementAccess("AMT", 2, qualifier=(1, "AU"), - x12type=Money) - discount_amount = ElementAccess("AMT", 2, qualifier=(1, "D8"), - x12type=Money) - per_day_limit = ElementAccess("AMT", 2, qualifier=(1, "DY"), - x12type=Money) - patient_amount_paid = ElementAccess("AMT", 2, qualifier=(1, "F5"), - x12type=Money) - interest = ElementAccess("AMT", 2, qualifier=(1, "I"), x12type=Money) - negative_ledger = ElementAccess("AMT", 2, qualifier=(1, "NL"), - x12type=Money) - tax_amount = ElementAccess("AMT", 2, qualifier=(1, "T"), x12type=Money) - total_claim_before_taxes = ElementAccess("AMT", 2, - qualifier=(1, "T2"), x12type=Money) + total_covered_charge = ElementAccess( + "AMT", 2, qualifier=(1, "AU"), x12type=Money) + discount_amount = ElementAccess( + "AMT", 2, qualifier=(1, "D8"), x12type=Money) + per_day_limit = ElementAccess( + "AMT", 2, qualifier=(1, "DY"), x12type=Money) + patient_amount_paid = ElementAccess( + "AMT", 2, qualifier=(1, "F5"), x12type=Money) + interest = ElementAccess( + "AMT", 2, qualifier=(1, "I"), x12type=Money) + negative_ledger = ElementAccess( + "AMT", 2, qualifier=(1, "NL"), x12type=Money) + tax_amount = ElementAccess( + "AMT", 2, qualifier=(1, "T"), x12type=Money) + total_claim_before_taxes = ElementAccess( + "AMT", 2, qualifier=(1, "T2"), x12type=Money) class _ClaimAdjustments(X12LoopBridge): def __init__(self, aLoop, *args, **kwargs): - super(Claim._ClaimAdjustments, self).__init__(aLoop, *args, - **kwargs) - self.contractual_obligation = ClaimAdjustment(aLoop, - qualifier=(1, "CO")) - self.correction_and_reversal = ClaimAdjustment(aLoop, - qualifier=(1, "CR")) + super(Claim._ClaimAdjustments, self).__init__( + aLoop, *args, **kwargs) + self.contractual_obligation = ClaimAdjustment( + aLoop, qualifier=(1, "CO")) + self.correction_and_reversal = ClaimAdjustment( + aLoop, qualifier=(1, "CR")) self.other = ClaimAdjustment(aLoop, qualifier=(1, "OA")) - self.payor_initiated_reductions = ClaimAdjustment(aLoop, - qualifier=(1, "PI")) - self.patient_responsibility = ClaimAdjustment(aLoop, - qualifier=(1, "PR")) + self.payor_initiated_reductions = ClaimAdjustment( + aLoop, qualifier=(1, "PI")) + self.patient_responsibility = ClaimAdjustment( + aLoop, qualifier=(1, "PR")) loopName = "2100" # References group_or_policy_number = ElementAccess("REF", 2, qualifier=(1, "1L")) member_id = ElementAccess("REF", 2, qualifier=(1, "1W")) - repriced_claim_reference_number = ElementAccess("REF", 2, - qualifier=(1, "9A")) - adjusted_repriced_claim_reference_number = ElementAccess("REF", 2, - qualifier=(1, "9B")) + repriced_claim_reference_number = ElementAccess( + "REF", 2, qualifier=(1, "9A")) + adjusted_repriced_claim_reference_number = ElementAccess( + "REF", 2, qualifier=(1, "9B")) employee_id = ElementAccess("REF", 2, qualifier=(1, "A6")) authorization_number = ElementAccess("REF", 2, qualifier=(1, "BB")) contract_class = ElementAccess("REF", 2, qualifier=(1, "CE")) medical_record_id = ElementAccess("REF", 2, qualifier=(1, "EA")) - original_reference_number = ElementAccess("REF", 2, - qualifier=(1, "F8")) - prior_authorization_number = ElementAccess("REF", 2, - qualifier=(1, "G1")) - predetermination_of_benefits_number = ElementAccess("REF", 2, - qualifier=(1, "G3")) + original_reference_number = ElementAccess("REF", 2, qualifier=(1, "F8")) + prior_authorization_number = ElementAccess("REF", 2, qualifier=(1, "G1")) + predetermination_of_benefits_number = ElementAccess( + "REF", 2, qualifier=(1, "G3")) insurance_policy_number = ElementAccess("REF", 2, qualifier=(1, "IG")) ssn = ElementAccess("REF", 2, qualifier=(1, "SY")) - provider_commercial_number = ElementAccess("REF", 2, - qualifier=(1, "G2")) + provider_commercial_number = ElementAccess("REF", 2, qualifier=(1, "G2")) # Dates - date_expiration = ElementAccess("DTM", 2, qualifier=(1, "036"), - x12type=D8) - date_received = ElementAccess("DTM", 2, qualifier=(1, "050"), - x12type=D8) - date_statement_period_start = ElementAccess("DTM", 2, - qualifier=(1, "232"), x12type=D8) - date_statement_period_end = ElementAccess("DTM", 2, - qualifier=(1, "233"), x12type=D8) + date_expiration = ElementAccess("DTM", 2, qualifier=(1, "036"), x12type=D8) + date_received = ElementAccess("DTM", 2, qualifier=(1, "050"), x12type=D8) + date_statement_period_start = ElementAccess( + "DTM", 2, qualifier=(1, "232"), x12type=D8) + date_statement_period_end = ElementAccess( + "DTM", 2, qualifier=(1, "233"), x12type=D8) def __init__(self, anX12Message, *args, **kwargs): - super(Claim, self).__init__(anX12Message, *args, - **kwargs) - self.claim_adjustments = self._ClaimAdjustments( - anX12Message) + super(Claim, self).__init__(anX12Message, *args, **kwargs) + self.claim_adjustments = self._ClaimAdjustments(anX12Message) self.line_items = self.loops(self._ServiceInfo, anX12Message) # Take advantage of ElementAccess attributes inheriting their parent's # qualifier. This needs to be fixed someday. self.patient = NamedEntity(anX12Message, qualifier=(1, "QC")) self.insured = NamedEntity(anX12Message, qualifier=(1, "IL")) - self.corrected_insured = NamedEntity(anX12Message, - qualifier=(1, "74")) - self.service_provider = NamedEntity(anX12Message, - qualifier=(1, "82")) - self.crossover_carrier = NamedEntity(anX12Message, - qualifier=(1, "TT")) - self.corrected_priority_payer = NamedEntity(anX12Message, - qualifier=(1, "PR")) + self.corrected_insured = NamedEntity(anX12Message, qualifier=(1, "74")) + self.service_provider = NamedEntity(anX12Message, qualifier=(1, "82")) + self.crossover_carrier = NamedEntity(anX12Message, qualifier=(1, "TT")) + self.corrected_priority_payer = NamedEntity( + anX12Message, qualifier=(1, "PR")) self.payment_info = self._ClaimPaymentInfo(anX12Message) def get_actual_allowed_amount(self): @@ -447,18 +433,40 @@ def get_actual_copayment(self): class F835_4010(Facade): + + transaction_set_identifier_code = '835' + x12_version_string = '4010' + + def __init__(self, anX12Message): + """Examine the message and extract the relevant Loops.""" + st_loops = anX12Message.descendant('LOOP', name='ST_LOOP') + if st_loops: + self.facades = [F835_4010(loop) for loop in st_loops] + else: + self.header = first(self.loops(Header, anX12Message)) + self.payer = first(self.loops(Payer, anX12Message)) + self.payee = first(self.loops(Payee, anX12Message)) + self.claims_overview = first( + self.loops(ClaimsOverview, anX12Message)) + self.claims = self.loops(Claim, anX12Message) + self.footer = first(self.loops(Footer, anX12Message)) + + +class F835_5010(Facade): + + transaction_set_identifier_code = '835' + x12_version_string = '5010' + def __init__(self, anX12Message): """Examine the message and extract the relevant Loops.""" st_loops = anX12Message.descendant('LOOP', name='ST_LOOP') - if len(st_loops) > 0: - self.facades = [] - for loop in st_loops: - self.facades.append(F835_4010(loop)) + if st_loops: + self.facades = [F835_5010(loop) for loop in st_loops] else: self.header = first(self.loops(Header, anX12Message)) self.payer = first(self.loops(Payer, anX12Message)) self.payee = first(self.loops(Payee, anX12Message)) - self.claims_overview = first(self.loops(ClaimsOverview, - anX12Message)) + self.claims_overview = first( + self.loops(ClaimsOverview, anX12Message)) self.claims = self.loops(Claim, anX12Message) self.footer = first(self.loops(Footer, anX12Message)) diff --git a/tigershark/facade/f837.py b/tigershark/facade/f837.py index 8a39f3d..c018269 100644 --- a/tigershark/facade/f837.py +++ b/tigershark/facade/f837.py @@ -61,6 +61,8 @@ .. autoclass:: Claim """ +from __future__ import print_function + from tigershark.facade import X12LoopBridge from tigershark.facade import X12SegmentBridge from tigershark.facade import ElementAccess @@ -365,7 +367,7 @@ class ServiceLineAdj( X12LoopBridge ): class Claim( object ): """A claim, built from an X12 :samp:`837` message. - + :ivar submitter: A sequence of :class:`Submitter` instances from the 1000A loop. :ivar provider: A sequence of :class:`Provider` instances from the 2000A loop. :ivar subscriber: A sequence of :class:`Subscriber` instances from the 2000B loop. @@ -378,14 +380,14 @@ def __init__( self, anX12Message ): """Examine the message and extract the relevant Loops.""" # XXX - determine 837P vs. 837I and Inpatient vs. Outpatient self.submitter= self.loops( Submitter, anX12Message ) - print( "Loop 1000A, Submitter", map( str, self.submitter ) ) - self.provider= self.loops( Provider, anX12Message ) - print( "Loop 2000A, Billing Provider", map( str, self.provider ) ) - self.subscriber= self.loops( Subscriber, anX12Message ) - print( "Loop 2000B, Subscriber", map( str, self.subscriber ) ) + print("Loop 1000A, Submitter", [str(x) for x in self.submitter ]) + self.provider= self.loops(Provider, anX12Message) + print("Loop 2000A, Billing Provider", [str(x) for x in self.provider]) + self.subscriber= self.loops(Subscriber, anX12Message) + print("Loop 2000B, Subscriber", [str(x) for x in self.subscriber]) self.patient= self.loops( Institutional_Inpatient, anX12Message ) - print( "Loop 2000C, Patient", map( str, self.patient ) ) + print("Loop 2000C, Patient", [str(x) for x in self.patient]) # Loop 2300 - Claim Details self.claimDetails= self.loops( Institutional_ClaimDetails, anX12Message ) - print( "Loop 2300, Claim Details", map( str, self.claimDetails ) ) + print("Loop 2300, Claim Details", [str(x) for x in self.claimDetails]) # Loop 2400 - Service Lines diff --git a/tigershark/facade/utils.py b/tigershark/facade/utils.py index bda7883..b6cb7a9 100644 --- a/tigershark/facade/utils.py +++ b/tigershark/facade/utils.py @@ -1,5 +1,5 @@ def first(l): try: return l.pop() - except: + except Exception: return None diff --git a/tigershark/parsers/M270_4010_X092_A1.py b/tigershark/parsers/M270_4010_X092_A1.py index 5f04f7c..46d9da4 100644 --- a/tigershark/parsers/M270_4010_X092_A1.py +++ b/tigershark/parsers/M270_4010_X092_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-10-03 14:38:27.454816 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_270_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_270_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0022'] ) ), @@ -18,7 +18,7 @@ codes=[u'RT', u'RU'] ) ), ), ) -parsed_270_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Source Name'), +parsed_270_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Source Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Information Source Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'2B', u'36', u'GP', u'P5', u'PR'] ) ), @@ -44,7 +44,7 @@ codes=[] ) ), ), ) -parsed_270_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Receiver Name'), +parsed_270_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Information Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P', u'2B', u'36', u'80', u'FA', u'GP', u'P5', u'PR'] ) ), @@ -134,7 +134,7 @@ codes=[] ) ), ), ) -parsed_270_2110C = Loop( u'2110C', Properties(looptype='',repeat=u'99',pos=u'130',req_sit=u'S',desc=u'Subscriber Eligibility or Benefit Inquiry Information'), +parsed_270_2110C = Loop( u'2110C', Properties(looptype='',repeat=u'99',pos=u'130',req_sit=u'S',desc=u'Subscriber Eligibility or Benefit Inquiry Information'), Segment( u'EQ', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Subscriber Eligibility or Benefit Inquiry Information'), Element( u'EQ01', Properties(desc=u'Service Type Code', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9', u'10', u'11', u'12', u'13', u'14', u'15', u'16', u'17', u'18', u'19', u'20', u'21', u'22', u'23', u'24', u'25', u'26', u'27', u'28', u'30', u'32', u'33', u'34', u'35', u'36', u'37', u'38', u'39', u'40', u'41', u'42', u'43', u'44', u'45', u'46', u'47', u'48', u'49', u'50', u'51', u'52', u'53', u'54', u'55', u'56', u'57', u'58', u'59', u'60', u'61', u'62', u'63', u'64', u'65', u'66', u'67', u'68', u'69', u'70', u'71', u'72', u'73', u'74', u'75', u'76', u'77', u'78', u'79', u'80', u'81', u'82', u'83', u'84', u'85', u'86', u'87', u'88', u'89', u'90', u'91', u'92', u'93', u'94', u'95', u'96', u'97', u'98', u'99', u'A0', u'A1', u'A2', u'A3', u'A4', u'A5', u'A6', u'A7', u'A8', u'A9', u'AA', u'AB', u'AC', u'AD', u'AE', u'AF', u'AG', u'AH', u'AI', u'AJ', u'AK', u'AL', u'AM', u'AN', u'AO', u'AQ', u'AR', u'BA', u'BB', u'BC', u'BD', u'BE', u'BF', u'BG', u'BH', u'BI', u'BJ', u'BK', u'BL', u'BM', u'BN', u'BP', u'BQ', u'BR', u'BS'] ) ), @@ -206,7 +206,7 @@ codes=[] ) ), ), ) -parsed_270_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Subscriber Name'), +parsed_270_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -341,7 +341,7 @@ ), parsed_270_2110C, ) -parsed_270_2110D = Loop( u'2110D', Properties(looptype='',repeat=u'99',pos=u'130',req_sit=u'R',desc=u'Dependent Eligibility or Benefit Inquiry Information'), +parsed_270_2110D = Loop( u'2110D', Properties(looptype='',repeat=u'99',pos=u'130',req_sit=u'R',desc=u'Dependent Eligibility or Benefit Inquiry Information'), Segment( u'EQ', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Dependent Eligibility or Benefit Inquiry Information'), Element( u'EQ01', Properties(desc=u'Service Type Code', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9', u'10', u'11', u'12', u'13', u'14', u'15', u'16', u'17', u'18', u'19', u'20', u'21', u'22', u'23', u'24', u'25', u'26', u'27', u'28', u'30', u'32', u'33', u'34', u'35', u'36', u'37', u'38', u'39', u'40', u'41', u'42', u'43', u'44', u'45', u'46', u'47', u'48', u'49', u'50', u'51', u'52', u'53', u'54', u'55', u'56', u'57', u'58', u'59', u'60', u'61', u'62', u'63', u'64', u'65', u'66', u'67', u'68', u'69', u'70', u'71', u'72', u'73', u'74', u'75', u'76', u'77', u'78', u'79', u'80', u'81', u'82', u'83', u'84', u'85', u'86', u'87', u'88', u'89', u'90', u'91', u'92', u'93', u'94', u'95', u'96', u'97', u'98', u'99', u'A0', u'A1', u'A2', u'A3', u'A4', u'A5', u'A6', u'A7', u'A8', u'A9', u'AA', u'AB', u'AC', u'AD', u'AE', u'AF', u'AG', u'AH', u'AI', u'AJ', u'AK', u'AL', u'AM', u'AN', u'AO', u'AQ', u'AR', u'BA', u'BB', u'BC', u'BD', u'BE', u'BF', u'BG', u'BH', u'BI', u'BJ', u'BK', u'BL', u'BM', u'BN', u'BP', u'BQ', u'BR', u'BS'] ) ), @@ -405,7 +405,7 @@ codes=[] ) ), ), ) -parsed_270_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Dependent Name'), +parsed_270_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'03'] ) ), @@ -540,7 +540,7 @@ ), parsed_270_2110D, ) -parsed_270_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Dependent Level'), +parsed_270_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -563,7 +563,7 @@ ), parsed_270_2100D, ) -parsed_270_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'R',desc=u'Subscriber Level'), +parsed_270_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'R',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -587,7 +587,7 @@ parsed_270_2100C, parsed_270_2000D, ) -parsed_270_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'R',desc=u'Information Receiver Level'), +parsed_270_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'R',desc=u'Information Receiver Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Receiver Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -601,7 +601,7 @@ parsed_270_2100B, parsed_270_2000C, ) -parsed_270_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), +parsed_270_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Source Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -615,10 +615,10 @@ parsed_270_2100A, parsed_270_2000B, ) -parsed_270_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_270_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_270_2000A, ) -parsed_270_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_270_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'270'] ) ), @@ -634,7 +634,7 @@ codes=[] ) ), ), ) -parsed_270_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_270_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HS'] ) ), @@ -661,7 +661,7 @@ codes=[] ) ), ), ) -parsed_270_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_270_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -716,7 +716,7 @@ codes=[] ) ), ), ) -parsed_270 = Message( u'270', Properties(desc=u'HIPAA Health Care Eligibility Inquiry X092A1-270'), +parsed_270 = Message( u'270', Properties(desc=u'HIPAA Health Care Eligibility Inquiry X092A1-270'), parsed_270_ISA_LOOP, ) diff --git a/tigershark/parsers/M270_5010_X279_A1.py b/tigershark/parsers/M270_5010_X279_A1.py new file mode 100644 index 0000000..7fc8d82 --- /dev/null +++ b/tigershark/parsers/M270_5010_X279_A1.py @@ -0,0 +1,1092 @@ +# +# Generated by TigerShark.tools.convertPyX12 on 2014-06-30 18:14:55.936044 +# +from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties +parsed_270_2100A = Loop( u'2100A', Properties(position=u'0300',looptype='',repeat=u'1',req_sit=u'R',desc=u'Information Source Name'), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Information Source Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'2B', u'36', u'GP', u'P5', u'PR'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1', u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'24', u'46', u'FI', u'NI', u'PI', u'XV', u'XX'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +) +parsed_270_2000A = Loop( u'2000A', Properties(position=u'0120',looptype='',repeat=u'>1',req_sit=u'R',desc=u'Information Source Level'), +Segment( u'HL', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Information Source Level'), + Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, + codes=[] ) ), + Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'N', data_type=(u'AN',u'1',u'12'), position=2, + codes=[] ) ), + Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, + codes=[u'20'] ) ), + Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, + codes=[u'1'] ) ), +), +parsed_270_2100A, +) +parsed_270_2100B = Loop( u'2100B', Properties(position=u'0300',looptype='',repeat=u'1',req_sit=u'R',desc=u'Information Receiver Name'), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Information Receiver Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'1P', u'2B', u'36', u'80', u'FA', u'GP', u'P5', u'PR'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1', u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'24', u'34', u'FI', u'PI', u'PP', u'SV', u'XV', u'XX'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'0400',req_sit=u'S',repeat=u'9',desc=u'Information Receiver Additional Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'0B', u'1C', u'1D', u'1J', u'4A', u'CT', u'EL', u'EO', u'HPI', u'JD', u'N5', u'N7', u'Q4', u'SY', u'TJ'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'S', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'N3', Properties(syntax='',position=u'0600',req_sit=u'S',repeat=u'1',desc=u'Information Receiver Address'), + Element( u'N301', Properties(desc=u'Address Information', req_sit=u'R', data_type=(u'AN',u'1',u'55'), position=1, + codes=[] ) ), + Element( u'N302', Properties(desc=u'Address Information', req_sit=u'S', data_type=(u'AN',u'1',u'55'), position=2, + codes=[] ) ), +), +Segment( u'N4', Properties(syntax=u'E0207 C0605 C0704',position=u'0700',req_sit=u'S',repeat=u'1',desc=u'Information Receiver City, State, ZIP Code'), + Element( u'N401', Properties(desc=u'City Name', req_sit=u'R', data_type=(u'AN',u'2',u'30'), position=1, + codes=[] ) ), + Element( u'N402', Properties(desc=u'State or Province Code', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'N403', Properties(desc=u'Postal Code', req_sit=u'S', data_type=(u'ID',u'3',u'15'), position=3, + codes=[] ) ), + Element( u'N404', Properties(desc=u'Country Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'N405', Properties(desc=u'Location Qualifier', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=5, + codes=[] ) ), + Element( u'N406', Properties(desc=u'Location Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'N407', Properties(desc=u'Country Subdivision Code', req_sit=u'S', data_type=(u'ID',u'1',u'3'), position=7, + codes=[] ) ), +), +Segment( u'PRV', Properties(syntax=u'P0203',position=u'0900',req_sit=u'S',repeat=u'1',desc=u'Information Receiver Provider Information'), + Element( u'PRV01', Properties(desc=u'Provider Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SB', u'SK', u'SU'] ) ), + Element( u'PRV02', Properties(desc=u'Reference Identification Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, + codes=[u'PXC'] ) ), + Element( u'PRV03', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=3, + codes=[] ) ), + Element( u'PRV04', Properties(desc=u'State or Province Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Composite( u'C035', Properties(req_sit=u'N',repeat='',refdes='',seq=u'05',desc=u'Provider Specialty Information'), + ), + Element( u'PRV06', Properties(desc=u'Provider Organization Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=6, + codes=[] ) ), +), +) +parsed_270_2000B = Loop( u'2000B', Properties(position=u'0130',looptype='',repeat=u'>1',req_sit=u'R',desc=u'Information Receiver Level'), +Segment( u'HL', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Information Receiver Level'), + Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, + codes=[] ) ), + Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=2, + codes=[] ) ), + Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, + codes=[u'21'] ) ), + Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, + codes=[u'1'] ) ), +), +parsed_270_2100B, +) +parsed_270_2110C = Loop( u'2110C', Properties(position=u'1300',looptype='',repeat=u'99',req_sit=u'S',desc=u'Subscriber Eligibility or Benefit Inquiry'), +Segment( u'EQ', Properties(syntax=u'R0102',position=u'1300',req_sit=u'R',repeat=u'1',desc=u'Subscriber Eligibility or Benefit Inquiry'), + Element( u'EQ01', Properties(desc=u'Service Type Code', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'1', u'10', u'11', u'12', u'13', u'14', u'15', u'16', u'17', u'18', u'19', u'2', u'20', u'21', u'22', u'23', u'24', u'25', u'26', u'27', u'28', u'3', u'30', u'32', u'33', u'34', u'35', u'36', u'37', u'38', u'39', u'4', u'40', u'41', u'42', u'43', u'44', u'45', u'46', u'47', u'48', u'49', u'5', u'50', u'51', u'52', u'53', u'54', u'55', u'56', u'57', u'58', u'59', u'6', u'60', u'61', u'62', u'63', u'64', u'65', u'66', u'67', u'68', u'69', u'7', u'70', u'71', u'72', u'73', u'74', u'75', u'76', u'77', u'78', u'79', u'8', u'80', u'81', u'82', u'83', u'84', u'85', u'86', u'87', u'88', u'89', u'9', u'90', u'91', u'92', u'93', u'94', u'95', u'96', u'97', u'98', u'99', u'A0', u'A1', u'A2', u'A3', u'A4', u'A5', u'A6', u'A7', u'A8', u'A9', u'AA', u'AB', u'AC', u'AD', u'AE', u'AF', u'AG', u'AH', u'AI', u'AJ', u'AK', u'AL', u'AM', u'AN', u'AO', u'AQ', u'AR', u'B1', u'B2', u'B3', u'BA', u'BB', u'BC', u'BD', u'BE', u'BF', u'BG', u'BH', u'BI', u'BJ', u'BK', u'BL', u'BM', u'BN', u'BP', u'BQ', u'BR', u'BS', u'BT', u'BU', u'BV', u'BW', u'BX', u'BY', u'BZ', u'C1', u'CA', u'CB', u'CC', u'CD', u'CE', u'CF', u'CG', u'CH', u'CI', u'CJ', u'CK', u'CL', u'CM', u'CN', u'CO', u'CP', u'CQ', u'DG', u'DM', u'DS', u'GF', u'GN', u'GY', u'IC', u'MH', u'NI', u'ON', u'PT', u'PU', u'RN', u'RT', u'TC', u'TN', u'UC'] ) ), + Composite( u'C003', Properties(req_sit=u'S',repeat='',refdes='',seq=u'02',desc=u'Composite Medical Procedure Identifier'), + Element( u'EQ02-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[u'AD', u'CJ', u'HC', u'ID', u'IV', u'N4', u'ZZ'] ) ), + Element( u'EQ02-02', Properties(desc=u'Product/Service ID', req_sit=u'R', data_type=(u'AN',u'1',u'48'), position=1, + codes=[] ) ), + Element( u'EQ02-03', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'EQ02-04', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=3, + codes=[] ) ), + Element( u'EQ02-05', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'EQ02-06', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=5, + codes=[] ) ), + Element( u'EQ02-07', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=6, + codes=[] ) ), + Element( u'EQ02-08', Properties(desc=u'Product/Service ID', req_sit=u'N', data_type=(u'AN',u'1',u'48'), position=7, + codes=[] ) ), + ), + Element( u'EQ03', Properties(desc=u'Coverage Level Code', req_sit=u'S', data_type=(u'ID',u'3',u'3'), position=3, + codes=[u'FAM'] ) ), + Element( u'EQ04', Properties(desc=u'Insurance Type Code', req_sit=u'N', data_type=(u'ID',u'1',u'3'), position=4, + codes=[] ) ), + Composite( u'C004', Properties(req_sit=u'S',repeat='',refdes='',seq=u'05',desc=u'Composite Diagnosis Code Pointer'), + Element( u'EQ05-01', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'R', data_type=(u'N0',u'1',u'2'), position=0, + codes=[] ) ), + Element( u'EQ05-02', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'S', data_type=(u'N0',u'1',u'2'), position=1, + codes=[] ) ), + Element( u'EQ05-03', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'S', data_type=(u'N0',u'1',u'2'), position=2, + codes=[] ) ), + Element( u'EQ05-04', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'S', data_type=(u'N0',u'1',u'2'), position=3, + codes=[] ) ), + ), +), +Segment( u'AMT', Properties(syntax='',position=u'1350',req_sit=u'S',repeat=u'1',desc=u'Subscriber Spend Down Amount'), + Element( u'AMT01', Properties(desc=u'Amount Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'R'] ) ), + Element( u'AMT02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'AMT03', Properties(desc=u'Credit/Debit Flag Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=3, + codes=[] ) ), +), +Segment( u'AMT', Properties(syntax='',position=u'1350',req_sit=u'S',repeat=u'1',desc=u'Subscriber Spend Down Total Billed Amount'), + Element( u'AMT01', Properties(desc=u'Amount Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'PB'] ) ), + Element( u'AMT02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'AMT03', Properties(desc=u'Credit/Debit Flag Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=3, + codes=[] ) ), +), +Segment( u'III', Properties(syntax=u'P0102 L030405',position=u'1700',req_sit=u'S',repeat=u'1',desc=u'Subscriber Eligibility or Benefit Additional Inquiry Information'), + Element( u'III01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'ZZ'] ) ), + Element( u'III02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=2, + codes=[] ) ), + Element( u'III03', Properties(desc=u'Code Category', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=3, + codes=[] ) ), + Element( u'III04', Properties(desc=u'Free-form Message Text', req_sit=u'N', data_type=(u'AN',u'1',u'264'), position=4, + codes=[] ) ), + Element( u'III05', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Composite( u'C001', Properties(req_sit=u'N',repeat='',refdes='',seq=u'06',desc=u'Composite Unit of Measure'), + ), + Element( u'III07', Properties(desc=u'Surface/Layer/Position Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=7, + codes=[] ) ), + Element( u'III08', Properties(desc=u'Surface/Layer/Position Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=8, + codes=[] ) ), + Element( u'III09', Properties(desc=u'Surface/Layer/Position Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=9, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1900',req_sit=u'S',repeat=u'1',desc=u'Subscriber Additional Information'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'9F', u'G1'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'DTP', Properties(syntax='',position=u'2000',req_sit=u'S',repeat=u'1',desc=u'Subscriber Eligibility/Benefit Date'), + Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'291'] ) ), + Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, + codes=[u'D8', u'RD8'] ) ), + Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), +), +) +parsed_270_2100C = Loop( u'2100C', Properties(position=u'0300',looptype='',repeat=u'1',req_sit=u'R',desc=u'Subscriber Name'), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Subscriber Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'IL'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1', u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'II', u'MI'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'S', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'0400',req_sit=u'S',repeat=u'9',desc=u'Subscriber Additional Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'18', u'1L', u'1W', u'3H', u'6P', u'CT', u'EA', u'EJ', u'F6', u'GH', u'HJ', u'IG', u'N6', u'NQ', u'SY', u'Y4'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'N3', Properties(syntax='',position=u'0600',req_sit=u'S',repeat=u'1',desc=u'Subscriber Address'), + Element( u'N301', Properties(desc=u'Address Information', req_sit=u'R', data_type=(u'AN',u'1',u'55'), position=1, + codes=[] ) ), + Element( u'N302', Properties(desc=u'Address Information', req_sit=u'S', data_type=(u'AN',u'1',u'55'), position=2, + codes=[] ) ), +), +Segment( u'N4', Properties(syntax=u'E0207 C0605 C0704',position=u'0700',req_sit=u'S',repeat=u'1',desc=u'Subscriber City, State, ZIP Code'), + Element( u'N401', Properties(desc=u'City Name', req_sit=u'R', data_type=(u'AN',u'2',u'30'), position=1, + codes=[] ) ), + Element( u'N402', Properties(desc=u'State or Province Code', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'N403', Properties(desc=u'Postal Code', req_sit=u'S', data_type=(u'ID',u'3',u'15'), position=3, + codes=[] ) ), + Element( u'N404', Properties(desc=u'Country Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'N405', Properties(desc=u'Location Qualifier', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=5, + codes=[] ) ), + Element( u'N406', Properties(desc=u'Location Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'N407', Properties(desc=u'Country Subdivision Code', req_sit=u'S', data_type=(u'ID',u'1',u'3'), position=7, + codes=[] ) ), +), +Segment( u'PRV', Properties(syntax=u'P0203',position=u'0900',req_sit=u'S',repeat=u'1',desc=u'Provider Information'), + Element( u'PRV01', Properties(desc=u'Provider Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SK', u'SU'] ) ), + Element( u'PRV02', Properties(desc=u'Reference Identification Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, + codes=[u'9K', u'D3', u'EI', u'HPI', u'PXC', u'SY', u'TJ'] ) ), + Element( u'PRV03', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=3, + codes=[] ) ), + Element( u'PRV04', Properties(desc=u'State or Province Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Composite( u'C035', Properties(req_sit=u'N',repeat='',refdes='',seq=u'05',desc=u'Provider Specialty Information'), + ), + Element( u'PRV06', Properties(desc=u'Provider Organization Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=6, + codes=[] ) ), +), +Segment( u'DMG', Properties(syntax=u'P0102 P1011 C1105',position=u'1000',req_sit=u'S',repeat=u'1',desc=u'Subscriber Demographic Information'), + Element( u'DMG01', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'D8'] ) ), + Element( u'DMG02', Properties(desc=u'Date Time Period', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=2, + codes=[] ) ), + Element( u'DMG03', Properties(desc=u'Gender Code', req_sit=u'S', data_type=(u'ID',u'1',u'1'), position=3, + codes=[u'F', u'M'] ) ), + Element( u'DMG04', Properties(desc=u'Marital Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=4, + codes=[] ) ), + Composite( u'C056', Properties(req_sit=u'N',repeat=u'10',refdes='',seq=u'05',desc=u'Composite Race or Ethnicity Information'), + ), + Element( u'DMG06', Properties(desc=u'Citizenship Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=6, + codes=[] ) ), + Element( u'DMG07', Properties(desc=u'Country Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=7, + codes=[] ) ), + Element( u'DMG08', Properties(desc=u'Basis of Verification Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=8, + codes=[] ) ), + Element( u'DMG09', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=9, + codes=[] ) ), + Element( u'DMG10', Properties(desc=u'Code List Qualifier Code', req_sit=u'N', data_type=(u'ID',u'1',u'3'), position=10, + codes=[] ) ), + Element( u'DMG11', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=11, + codes=[] ) ), +), +Segment( u'INS', Properties(syntax=u'P1112',position=u'1100',req_sit=u'S',repeat=u'1',desc=u'Multiple Birth Sequence Number'), + Element( u'INS01', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, + codes=[u'Y'] ) ), + Element( u'INS02', Properties(desc=u'Individual Relationship Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=2, + codes=[u'18'] ) ), + Element( u'INS03', Properties(desc=u'Maintenance Type Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=3, + codes=[] ) ), + Element( u'INS04', Properties(desc=u'Maintenance Reason Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'INS05', Properties(desc=u'Benefit Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=5, + codes=[] ) ), + Composite( u'C052', Properties(req_sit=u'N',repeat='',refdes='',seq=u'06',desc=u'Medicare Status Code'), + ), + Element( u'INS07', Properties(desc=u'Consolidated Omnibus Budget Reconciliation Act (COBRA) Qualifying', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=7, + codes=[] ) ), + Element( u'INS08', Properties(desc=u'Employment Status Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=8, + codes=[] ) ), + Element( u'INS09', Properties(desc=u'Student Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=9, + codes=[] ) ), + Element( u'INS10', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=10, + codes=[] ) ), + Element( u'INS11', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'INS12', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=12, + codes=[] ) ), + Element( u'INS13', Properties(desc=u'Confidentiality Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=13, + codes=[] ) ), + Element( u'INS14', Properties(desc=u'City Name', req_sit=u'N', data_type=(u'AN',u'2',u'30'), position=14, + codes=[] ) ), + Element( u'INS15', Properties(desc=u'State or Province Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=15, + codes=[] ) ), + Element( u'INS16', Properties(desc=u'Country Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=16, + codes=[] ) ), + Element( u'INS17', Properties(desc=u'Number', req_sit=u'R', data_type=(u'N0',u'1',u'9'), position=17, + codes=[] ) ), +), +Segment( u'HI', Properties(syntax='',position=u'1150',req_sit=u'S',repeat=u'1',desc=u'Subscriber Health Care Diagnosis Code'), + Composite( u'C022', Properties(req_sit=u'R',repeat='',refdes='',seq=u'01',desc=u'Health Care Code Information'), + Element( u'HI01-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABK', u'BK'] ) ), + Element( u'HI01-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI01-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI01-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI01-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI01-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI01-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI01-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI01-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'02',desc=u'Health Care Code Information'), + Element( u'HI02-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI02-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI02-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI02-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI02-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI02-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI02-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI02-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI02-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'03',desc=u'Health Care Code Information'), + Element( u'HI03-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI03-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI03-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI03-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI03-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI03-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI03-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI03-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI03-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'04',desc=u'Health Care Code Information'), + Element( u'HI04-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI04-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI04-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI04-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI04-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI04-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI04-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI04-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI04-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'05',desc=u'Health Care Code Information'), + Element( u'HI05-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI05-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI05-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI05-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI05-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI05-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI05-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI05-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI05-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'06',desc=u'Health Care Code Information'), + Element( u'HI06-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI06-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI06-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI06-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI06-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI06-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI06-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI06-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI06-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'07',desc=u'Health Care Code Information'), + Element( u'HI07-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI07-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI07-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI07-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI07-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI07-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI07-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI07-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI07-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'08',desc=u'Health Care Code Information'), + Element( u'HI08-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI08-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI08-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI08-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI08-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI08-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI08-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI08-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI08-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'09',desc=u'Health Care Code Information'), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'10',desc=u'Health Care Code Information'), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'11',desc=u'Health Care Code Information'), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'12',desc=u'Health Care Code Information'), + ), +), +Segment( u'DTP', Properties(syntax='',position=u'1200',req_sit=u'S',repeat=u'2',desc=u'Subscriber Date'), + Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'102', u'291'] ) ), + Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, + codes=[u'D8', u'RD8'] ) ), + Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), +), +parsed_270_2110C, +) +parsed_270_2000C = Loop( u'2000C', Properties(position=u'0140',looptype='',repeat=u'>1',req_sit=u'R',desc=u'Subscriber Level'), +Segment( u'HL', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Subscriber Level'), + Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, + codes=[] ) ), + Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=2, + codes=[] ) ), + Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, + codes=[u'22'] ) ), + Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, + codes=[u'0', u'1'] ) ), +), +Segment( u'TRN', Properties(syntax='',position=u'0200',req_sit=u'S',repeat=u'2',desc=u'Subscriber Trace Number'), + Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'1'] ) ), + Element( u'TRN02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'TRN03', Properties(desc=u'Originating Company Identifier', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=3, + codes=[] ) ), + Element( u'TRN04', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=4, + codes=[] ) ), +), +parsed_270_2100C, +) +parsed_270_2110D = Loop( u'2110D', Properties(position=u'1300',looptype='',repeat=u'99',req_sit=u'R',desc=u'Dependent Eligibility or Benefit Inquiry'), +Segment( u'EQ', Properties(syntax=u'R0102',position=u'1300',req_sit=u'R',repeat=u'1',desc=u'Dependent Eligibility or Benefit Inquiry'), + Element( u'EQ01', Properties(desc=u'Service Type Code', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'1', u'10', u'11', u'12', u'13', u'14', u'15', u'16', u'17', u'18', u'19', u'2', u'20', u'21', u'22', u'23', u'24', u'25', u'26', u'27', u'28', u'3', u'30', u'32', u'33', u'34', u'35', u'36', u'37', u'38', u'39', u'4', u'40', u'41', u'42', u'43', u'44', u'45', u'46', u'47', u'48', u'49', u'5', u'50', u'51', u'52', u'53', u'54', u'55', u'56', u'57', u'58', u'59', u'6', u'60', u'61', u'62', u'63', u'64', u'65', u'66', u'67', u'68', u'69', u'7', u'70', u'71', u'72', u'73', u'74', u'75', u'76', u'77', u'78', u'79', u'8', u'80', u'81', u'82', u'83', u'84', u'85', u'86', u'87', u'88', u'89', u'9', u'90', u'91', u'92', u'93', u'94', u'95', u'96', u'97', u'98', u'99', u'A0', u'A1', u'A2', u'A3', u'A4', u'A5', u'A6', u'A7', u'A8', u'A9', u'AA', u'AB', u'AC', u'AD', u'AE', u'AF', u'AG', u'AH', u'AI', u'AJ', u'AK', u'AL', u'AM', u'AN', u'AO', u'AQ', u'AR', u'B1', u'B2', u'B3', u'BA', u'BB', u'BC', u'BD', u'BE', u'BF', u'BG', u'BH', u'BI', u'BJ', u'BK', u'BL', u'BM', u'BN', u'BP', u'BQ', u'BR', u'BS', u'BT', u'BU', u'BV', u'BW', u'BX', u'BY', u'BZ', u'C1', u'CA', u'CB', u'CC', u'CD', u'CE', u'CF', u'CG', u'CH', u'CI', u'CJ', u'CK', u'CL', u'CM', u'CN', u'CO', u'CP', u'CQ', u'DG', u'DM', u'DS', u'GF', u'GN', u'GY', u'IC', u'MH', u'NI', u'ON', u'PT', u'PU', u'RN', u'RT', u'TC', u'TN', u'UC'] ) ), + Composite( u'C003', Properties(req_sit=u'S',repeat='',refdes='',seq=u'02',desc=u'Composite Medical Procedure Identifier'), + Element( u'EQ02-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[u'AD', u'CJ', u'HC', u'ID', u'IV', u'N4', u'ZZ'] ) ), + Element( u'EQ02-02', Properties(desc=u'Product/Service ID', req_sit=u'R', data_type=(u'AN',u'1',u'48'), position=1, + codes=[] ) ), + Element( u'EQ02-03', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'EQ02-04', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=3, + codes=[] ) ), + Element( u'EQ02-05', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'EQ02-06', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=5, + codes=[] ) ), + Element( u'EQ02-07', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=6, + codes=[] ) ), + Element( u'EQ02-08', Properties(desc=u'Product/Service ID', req_sit=u'N', data_type=(u'AN',u'1',u'48'), position=7, + codes=[] ) ), + ), + Element( u'EQ03', Properties(desc=u'Coverage Level Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=3, + codes=[] ) ), + Element( u'EQ04', Properties(desc=u'Insurance Type Code', req_sit=u'N', data_type=(u'ID',u'1',u'3'), position=4, + codes=[] ) ), + Composite( u'C004', Properties(req_sit=u'S',repeat='',refdes='',seq=u'05',desc=u'Composite Diagnosis Code Pointer'), + Element( u'EQ05-01', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'R', data_type=(u'N0',u'1',u'2'), position=0, + codes=[] ) ), + Element( u'EQ05-02', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'S', data_type=(u'N0',u'1',u'2'), position=1, + codes=[] ) ), + Element( u'EQ05-03', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'S', data_type=(u'N0',u'1',u'2'), position=2, + codes=[] ) ), + Element( u'EQ05-04', Properties(desc=u'Diagnosis Code Pointer', req_sit=u'S', data_type=(u'N0',u'1',u'2'), position=3, + codes=[] ) ), + ), +), +Segment( u'III', Properties(syntax=u'P0102 L030405',position=u'1700',req_sit=u'S',repeat=u'1',desc=u'Dependent Eligibility or Benefit Additional Inquiry Information'), + Element( u'III01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'ZZ'] ) ), + Element( u'III02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=2, + codes=[] ) ), + Element( u'III03', Properties(desc=u'Code Category', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=3, + codes=[] ) ), + Element( u'III04', Properties(desc=u'Free-form Message Text', req_sit=u'N', data_type=(u'AN',u'1',u'264'), position=4, + codes=[] ) ), + Element( u'III05', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Composite( u'C001', Properties(req_sit=u'N',repeat='',refdes='',seq=u'06',desc=u'Composite Unit of Measure'), + ), + Element( u'III07', Properties(desc=u'Surface/Layer/Position Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=7, + codes=[] ) ), + Element( u'III08', Properties(desc=u'Surface/Layer/Position Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=8, + codes=[] ) ), + Element( u'III09', Properties(desc=u'Surface/Layer/Position Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=9, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1900',req_sit=u'S',repeat=u'1',desc=u'Dependent Additional Information'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'9F', u'G1'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'DTP', Properties(syntax='',position=u'2000',req_sit=u'S',repeat=u'1',desc=u'Dependent Eligibility/Benefit Date'), + Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'291'] ) ), + Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, + codes=[u'D8', u'RD8'] ) ), + Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), +), +) +parsed_270_2100D = Loop( u'2100D', Properties(position=u'0300',looptype='',repeat=u'1',req_sit=u'R',desc=u'Dependent Name'), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Dependent Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'03'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=8, + codes=[] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'N', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'0400',req_sit=u'S',repeat=u'9',desc=u'Dependent Additional Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'18', u'1L', u'1W', u'6P', u'CT', u'EA', u'EJ', u'F6', u'GH', u'HJ', u'IF', u'IG', u'MRC', u'N6', u'SY', u'Y4'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'N3', Properties(syntax='',position=u'0600',req_sit=u'S',repeat=u'1',desc=u'Dependent Address'), + Element( u'N301', Properties(desc=u'Address Information', req_sit=u'R', data_type=(u'AN',u'1',u'55'), position=1, + codes=[] ) ), + Element( u'N302', Properties(desc=u'Address Information', req_sit=u'S', data_type=(u'AN',u'1',u'55'), position=2, + codes=[] ) ), +), +Segment( u'N4', Properties(syntax=u'E0207 C0605 C0704',position=u'0700',req_sit=u'S',repeat=u'1',desc=u'Dependent City, State, ZIP Code'), + Element( u'N401', Properties(desc=u'City Name', req_sit=u'R', data_type=(u'AN',u'2',u'30'), position=1, + codes=[] ) ), + Element( u'N402', Properties(desc=u'State or Province Code', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'N403', Properties(desc=u'Postal Code', req_sit=u'S', data_type=(u'ID',u'3',u'15'), position=3, + codes=[] ) ), + Element( u'N404', Properties(desc=u'Country Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'N405', Properties(desc=u'Location Qualifier', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=5, + codes=[] ) ), + Element( u'N406', Properties(desc=u'Location Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'N407', Properties(desc=u'Country Subdivision Code', req_sit=u'S', data_type=(u'ID',u'1',u'3'), position=7, + codes=[] ) ), +), +Segment( u'PRV', Properties(syntax=u'P0203',position=u'0900',req_sit=u'S',repeat=u'1',desc=u'Provider Information'), + Element( u'PRV01', Properties(desc=u'Provider Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SK', u'SU'] ) ), + Element( u'PRV02', Properties(desc=u'Reference Identification Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=2, + codes=[u'9K', u'D3', u'EI', u'HPI', u'PXC', u'SY', u'TJ'] ) ), + Element( u'PRV03', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=3, + codes=[] ) ), + Element( u'PRV04', Properties(desc=u'State or Province Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Composite( u'C035', Properties(req_sit=u'N',repeat='',refdes='',seq=u'05',desc=u'Provider Specialty Information'), + ), + Element( u'PRV06', Properties(desc=u'Provider Organization Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=6, + codes=[] ) ), +), +Segment( u'DMG', Properties(syntax=u'P0102 P1011 C1105',position=u'1000',req_sit=u'S',repeat=u'1',desc=u'Dependent Demographic Information'), + Element( u'DMG01', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'D8'] ) ), + Element( u'DMG02', Properties(desc=u'Date Time Period', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=2, + codes=[] ) ), + Element( u'DMG03', Properties(desc=u'Gender Code', req_sit=u'S', data_type=(u'ID',u'1',u'1'), position=3, + codes=[u'F', u'M'] ) ), + Element( u'DMG04', Properties(desc=u'Marital Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=4, + codes=[] ) ), + Composite( u'C056', Properties(req_sit=u'N',repeat=u'10',refdes='',seq=u'05',desc=u'Composite Race or Ethnicity Information'), + ), + Element( u'DMG06', Properties(desc=u'Citizenship Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=6, + codes=[] ) ), + Element( u'DMG07', Properties(desc=u'Country Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=7, + codes=[] ) ), + Element( u'DMG08', Properties(desc=u'Basis of Verification Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=8, + codes=[] ) ), + Element( u'DMG09', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=9, + codes=[] ) ), + Element( u'DMG10', Properties(desc=u'Code List Qualifier Code', req_sit=u'N', data_type=(u'ID',u'1',u'3'), position=10, + codes=[] ) ), + Element( u'DMG11', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=11, + codes=[] ) ), +), +Segment( u'INS', Properties(syntax=u'P1112',position=u'1100',req_sit=u'S',repeat=u'1',desc=u'Dependent Relationship'), + Element( u'INS01', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, + codes=[u'N'] ) ), + Element( u'INS02', Properties(desc=u'Individual Relationship Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=2, + codes=[u'01', u'19', u'34'] ) ), + Element( u'INS03', Properties(desc=u'Maintenance Type Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=3, + codes=[] ) ), + Element( u'INS04', Properties(desc=u'Maintenance Reason Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'INS05', Properties(desc=u'Benefit Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=5, + codes=[] ) ), + Composite( u'C052', Properties(req_sit=u'N',repeat='',refdes='',seq=u'06',desc=u'Medicare Status Code'), + ), + Element( u'INS07', Properties(desc=u'Consolidated Omnibus Budget Reconciliation Act (COBRA) Qualifying', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=7, + codes=[] ) ), + Element( u'INS08', Properties(desc=u'Employment Status Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=8, + codes=[] ) ), + Element( u'INS09', Properties(desc=u'Student Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=9, + codes=[] ) ), + Element( u'INS10', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=10, + codes=[] ) ), + Element( u'INS11', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'INS12', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=12, + codes=[] ) ), + Element( u'INS13', Properties(desc=u'Confidentiality Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=13, + codes=[] ) ), + Element( u'INS14', Properties(desc=u'City Name', req_sit=u'N', data_type=(u'AN',u'2',u'30'), position=14, + codes=[] ) ), + Element( u'INS15', Properties(desc=u'State or Province Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=15, + codes=[] ) ), + Element( u'INS16', Properties(desc=u'Country Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=16, + codes=[] ) ), + Element( u'INS17', Properties(desc=u'Number', req_sit=u'S', data_type=(u'N0',u'1',u'9'), position=17, + codes=[] ) ), +), +Segment( u'HI', Properties(syntax='',position=u'1150',req_sit=u'S',repeat=u'1',desc=u'Dependent Health Care Diagnosis Code'), + Composite( u'C022', Properties(req_sit=u'R',repeat='',refdes='',seq=u'01',desc=u'Health Care Code Information'), + Element( u'HI01-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABK', u'BK'] ) ), + Element( u'HI01-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI01-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI01-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI01-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI01-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI01-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI01-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI01-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'02',desc=u'Health Care Code Information'), + Element( u'HI02-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI02-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI02-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI02-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI02-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI02-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI02-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI02-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI02-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'03',desc=u'Health Care Code Information'), + Element( u'HI03-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI03-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI03-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI03-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI03-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI03-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI03-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI03-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI03-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'04',desc=u'Health Care Code Information'), + Element( u'HI04-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI04-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI04-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI04-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI04-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI04-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI04-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI04-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI04-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'05',desc=u'Health Care Code Information'), + Element( u'HI05-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI05-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI05-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI05-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI05-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI05-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI05-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI05-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI05-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'06',desc=u'Health Care Code Information'), + Element( u'HI06-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI06-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI06-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI06-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI06-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI06-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI06-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI06-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI06-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'07',desc=u'Health Care Code Information'), + Element( u'HI07-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI07-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI07-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI07-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI07-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI07-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI07-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI07-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI07-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'S',repeat='',refdes='',seq=u'08',desc=u'Health Care Code Information'), + Element( u'HI08-01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=0, + codes=[u'ABF', u'BF'] ) ), + Element( u'HI08-02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=1, + codes=[] ) ), + Element( u'HI08-03', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=2, + codes=[] ) ), + Element( u'HI08-04', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), + Element( u'HI08-05', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'HI08-06', Properties(desc=u'Quantity', req_sit=u'N', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Element( u'HI08-07', Properties(desc=u'Version Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'HI08-08', Properties(desc=u'Industry Code', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=7, + codes=[] ) ), + Element( u'HI08-09', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=8, + codes=[] ) ), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'09',desc=u'Health Care Code Information'), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'10',desc=u'Health Care Code Information'), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'11',desc=u'Health Care Code Information'), + ), + Composite( u'C022', Properties(req_sit=u'N',repeat='',refdes='',seq=u'12',desc=u'Health Care Code Information'), + ), +), +Segment( u'DTP', Properties(syntax='',position=u'1200',req_sit=u'S',repeat=u'2',desc=u'Dependent Date'), + Element( u'DTP01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'102', u'291'] ) ), + Element( u'DTP02', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=2, + codes=[u'D8', u'RD8'] ) ), + Element( u'DTP03', Properties(desc=u'Date Time Period', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, + codes=[] ) ), +), +parsed_270_2110D, +) +parsed_270_2000D = Loop( u'2000D', Properties(position=u'0150',looptype='',repeat=u'>1',req_sit=u'S',desc=u'Dependent Level'), +Segment( u'HL', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Dependent Level'), + Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, + codes=[] ) ), + Element( u'HL02', Properties(desc=u'Hierarchical Parent ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=2, + codes=[] ) ), + Element( u'HL03', Properties(desc=u'Hierarchical Level Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, + codes=[u'23'] ) ), + Element( u'HL04', Properties(desc=u'Hierarchical Child Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, + codes=[u'0'] ) ), +), +Segment( u'TRN', Properties(syntax='',position=u'0200',req_sit=u'S',repeat=u'2',desc=u'Dependent Trace Number'), + Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'1'] ) ), + Element( u'TRN02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'TRN03', Properties(desc=u'Originating Company Identifier', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=3, + codes=[] ) ), + Element( u'TRN04', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=4, + codes=[] ) ), +), +parsed_270_2100D, +) +parsed_270_ST_LOOP = Loop( u'ST_LOOP', Properties(position=u'0200',looptype=u'explicit',repeat=u'>1',req_sit=u'R',desc=u'Transaction Set Header'), +Segment( u'ST', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Transaction Set Header'), + Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'270'] ) ), + Element( u'ST02', Properties(desc=u'Transaction Set Control Number', req_sit=u'R', data_type=(u'AN',u'4',u'9'), position=2, + codes=[] ) ), + Element( u'ST03', Properties(desc=u'Implementation Convention Reference', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=3, + codes=[u'005010X279A1'] ) ), +), +Segment( u'BHT', Properties(syntax='',position=u'0110',req_sit=u'R',repeat=u'1',desc=u'Beginning of Hierarchical Transaction'), + Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, + codes=[u'0022'] ) ), + Element( u'BHT02', Properties(desc=u'Transaction Set Purpose Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=2, + codes=[u'01', u'13'] ) ), + Element( u'BHT03', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=3, + codes=[] ) ), + Element( u'BHT04', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=4, + codes=[] ) ), + Element( u'BHT05', Properties(desc=u'Time', req_sit=u'R', data_type=(u'TM',u'4',u'8'), position=5, + codes=[] ) ), + Element( u'BHT06', Properties(desc=u'Transaction Type Code', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=6, + codes=[u'RT'] ) ), +), +parsed_270_2000A, +parsed_270_2000B, +parsed_270_2000C, +parsed_270_2000D, +Segment( u'SE', Properties(syntax='',position=u'2100',req_sit=u'R',repeat=u'1',desc=u'Transaction Set Trailer'), + Element( u'SE01', Properties(desc=u'Number of Included Segments', req_sit=u'R', data_type=(u'N0',u'1',u'10'), position=1, + codes=[] ) ), + Element( u'SE02', Properties(desc=u'Transaction Set Control Number', req_sit=u'R', data_type=(u'AN',u'4',u'9'), position=2, + codes=[] ) ), +), +) +parsed_270_GS_LOOP = Loop( u'GS_LOOP', Properties(position=u'0200',looptype=u'explicit',repeat=u'>1',req_sit=u'R',desc=u'Functional Group Header'), +Segment( u'GS', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Functional Group Header'), + Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'HS'] ) ), + Element( u'GS02', Properties(desc=u'Application Senders Code', req_sit=u'R', data_type=(u'AN',u'2',u'15'), position=2, + codes=[] ) ), + Element( u'GS03', Properties(desc=u'124', req_sit=u'R', data_type=(u'AN',u'2',u'15'), position=3, + codes=[] ) ), + Element( u'GS04', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=4, + codes=[] ) ), + Element( u'GS05', Properties(desc=u'Time', req_sit=u'R', data_type=(u'TM',u'4',u'8'), position=5, + codes=[] ) ), + Element( u'GS06', Properties(desc=u'Group Control Number', req_sit=u'R', data_type=(u'N0',u'1',u'9'), position=6, + codes=[] ) ), + Element( u'GS07', Properties(desc=u'Responsible Agency Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=7, + codes=[u'X'] ) ), + Element( u'GS08', Properties(desc=u'Version / Release / Industry Identifier Code', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=8, + codes=[u'005010X279A1'] ) ), +), +parsed_270_ST_LOOP, +Segment( u'GE', Properties(syntax='',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Functional Group Trailer'), + Element( u'GE01', Properties(desc=u'97', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, + codes=[] ) ), + Element( u'GE02', Properties(desc=u'Group Control Number', req_sit=u'R', data_type=(u'N0',u'1',u'9'), position=2, + codes=[] ) ), +), +) +parsed_270_ISA_LOOP = Loop( u'ISA_LOOP', Properties(position=u'0010',looptype=u'explicit',repeat=u'>1',req_sit=u'R',desc=u'Interchange Control Header'), +Segment( u'ISA', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Interchange Control Header'), + Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'00', u'03'] ) ), + Element( u'ISA02', Properties(desc=u'I02', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=2, + codes=[] ) ), + Element( u'ISA03', Properties(desc=u'I03', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=3, + codes=[u'00', u'01'] ) ), + Element( u'ISA04', Properties(desc=u'I04', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=4, + codes=[] ) ), + Element( u'ISA05', Properties(desc=u'I05', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=5, + codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', u'ZZ'] ) ), + Element( u'ISA06', Properties(desc=u'I06', req_sit=u'R', data_type=(u'AN',u'15',u'15'), position=6, + codes=[] ) ), + Element( u'ISA07', Properties(desc=u'I05', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=7, + codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', u'ZZ'] ) ), + Element( u'ISA08', Properties(desc=u'I07', req_sit=u'R', data_type=(u'AN',u'15',u'15'), position=8, + codes=[] ) ), + Element( u'ISA09', Properties(desc=u'I08', req_sit=u'R', data_type=(u'DT',u'6',u'6'), position=9, + codes=[] ) ), + Element( u'ISA10', Properties(desc=u'I09', req_sit=u'R', data_type=(u'TM',u'4',u'4'), position=10, + codes=[] ) ), + Element( u'ISA11', Properties(desc=u'I65', req_sit=u'R', data_type=(u'AN',u'1',u'1'), position=11, + codes=[] ) ), + Element( u'ISA12', Properties(desc=u'I11', req_sit=u'R', data_type=(u'ID',u'5',u'5'), position=12, + codes=[u'00501'] ) ), + Element( u'ISA13', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=13, + codes=[] ) ), + Element( u'ISA14', Properties(desc=u'I13', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=14, + codes=[u'0', u'1'] ) ), + Element( u'ISA15', Properties(desc=u'I14', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=15, + codes=[u'P', u'T'] ) ), + Element( u'ISA16', Properties(desc=u'I15', req_sit=u'R', data_type=(u'AN',u'1',u'1'), position=16, + codes=[] ) ), +), +parsed_270_GS_LOOP, +Segment( u'TA1', Properties(syntax='',position=u'0200',req_sit=u'S',repeat=u'1',desc=u'Interchange Acknowledgement'), + Element( u'TA101', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=1, + codes=[] ) ), + Element( u'TA102', Properties(desc=u'I08', req_sit=u'R', data_type=(u'DT',u'6',u'6'), position=2, + codes=[] ) ), + Element( u'TA103', Properties(desc=u'I09', req_sit=u'R', data_type=(u'TM',u'4',u'4'), position=3, + codes=[] ) ), + Element( u'TA104', Properties(desc=u'I17', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, + codes=[u'A', u'E', u'R'] ) ), + Element( u'TA105', Properties(desc=u'I18', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=5, + codes=[u'000', u'001', u'002', u'003', u'004', u'005', u'006', u'007', u'008', u'009', u'010', u'011', u'012', u'013', u'014', u'015', u'016', u'017', u'018', u'019', u'020', u'021', u'022', u'023', u'024', u'025', u'026', u'027', u'028', u'029', u'030', u'031'] ) ), +), +Segment( u'IEA', Properties(syntax='',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Interchange Control Trailer'), + Element( u'IEA01', Properties(desc=u'I16', req_sit=u'R', data_type=(u'N0',u'1',u'5'), position=1, + codes=[] ) ), + Element( u'IEA02', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=2, + codes=[] ) ), +), +) +parsed_270 = Message( u'270B1', Properties(desc=u'HIPAA Health Care Eligibility Benefit Inquiry 005010X279A1 270B1'), +parsed_270_ISA_LOOP, +) + diff --git a/tigershark/parsers/M271_4010_X092_A1.py b/tigershark/parsers/M271_4010_X092_A1.py index 96d4054..1887ece 100644 --- a/tigershark/parsers/M271_4010_X092_A1.py +++ b/tigershark/parsers/M271_4010_X092_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-10-15 12:31:01.733403 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_271_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_271_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0022'] ) ), @@ -18,7 +18,7 @@ codes=[] ) ), ), ) -parsed_271_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Source Name'), +parsed_271_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Source Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Information Source Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'2B', u'36', u'GP', u'P5', u'PR'] ) ), @@ -84,7 +84,7 @@ codes=[u'C', u'N', u'P', u'R', u'S', u'W', u'X', u'Y'] ) ), ), ) -parsed_271_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Receiver Name'), +parsed_271_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Information Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Information Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P', u'2B', u'36', u'80', u'FA', u'GP', u'P5', u'PR'] ) ), @@ -130,7 +130,7 @@ codes=[u'C', u'N', u'R', u'S', u'W', u'X', u'Y'] ) ), ), ) -parsed_271_2115C = Loop( u'2115C', Properties(looptype='',repeat=u'10',pos=u'260',req_sit=u'S',desc=u'Subscriber Eligibility or Benefit Additional Information'), +parsed_271_2115C = Loop( u'2115C', Properties(looptype='',repeat=u'10',pos=u'260',req_sit=u'S',desc=u'Subscriber Eligibility or Benefit Additional Information'), Segment( u'III', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'260',desc=u'Subscriber Eligibility or Benefit Additional Information'), Element( u'III01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, codes=[u'BF', u'BK', u'ZZ'] ) ), @@ -152,7 +152,7 @@ codes=[] ) ), ), ) -parsed_271_2120C = Loop( u'2120C', Properties(looptype='',repeat=u'1',pos=u'340',req_sit=u'S',desc=u'Subscriber Benefit Related Entity Name'), +parsed_271_2120C = Loop( u'2120C', Properties(looptype='',repeat=u'1',pos=u'340',req_sit=u'S',desc=u'Subscriber Benefit Related Entity Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'340',desc=u'Subscriber Benefit Related Entity Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'13', u'1P', u'2B', u'36', u'73', u'FA', u'GP', u'IL', u'LR', u'P3', u'P4', u'P5', u'PR', u'VN', u'X3', u'PRP', u'SEP', u'TTP'] ) ), @@ -232,7 +232,7 @@ codes=[] ) ), ), ) -parsed_271_2110C = Loop( u'2110C', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Subscriber Eligibility or Benefit Information'), +parsed_271_2110C = Loop( u'2110C', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Subscriber Eligibility or Benefit Information'), Segment( u'EB', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Subscriber Eligibility or Benefit Information'), Element( u'EB01', Properties(desc=u'Eligibility or Benefit Information Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'H', u'I', u'J', u'K', u'L', u'M', u'N', u'O', u'P', u'Q', u'R', u'S', u'T', u'U', u'V', u'W', u'X', u'Y', u'CB', u'MC'] ) ), @@ -340,7 +340,7 @@ codes=[u'2120'] ) ), ), ) -parsed_271_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Subscriber Name'), +parsed_271_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -491,7 +491,7 @@ ), parsed_271_2110C, ) -parsed_271_2115D = Loop( u'2115D', Properties(looptype='',repeat=u'10',pos=u'260',req_sit=u'S',desc=u'Dependent Eligibility or Benefit Additional Information'), +parsed_271_2115D = Loop( u'2115D', Properties(looptype='',repeat=u'10',pos=u'260',req_sit=u'S',desc=u'Dependent Eligibility or Benefit Additional Information'), Segment( u'III', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'260',desc=u'Dependent Eligibility or Benefit Additional Information'), Element( u'III01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, codes=[u'BF', u'BK', u'ZZ'] ) ), @@ -513,7 +513,7 @@ codes=[] ) ), ), ) -parsed_271_2120D = Loop( u'2120D', Properties(looptype='',repeat=u'1',pos=u'340',req_sit=u'S',desc=u'Dependent Benefit Related Entity Name'), +parsed_271_2120D = Loop( u'2120D', Properties(looptype='',repeat=u'1',pos=u'340',req_sit=u'S',desc=u'Dependent Benefit Related Entity Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'340',desc=u'Dependent Benefit Related Entity Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'13', u'1P', u'2B', u'36', u'73', u'FA', u'GP', u'IL', u'LR', u'P3', u'P4', u'P5', u'PR', u'VN', u'X3', u'PRP', u'SEP', u'TTP'] ) ), @@ -593,7 +593,7 @@ codes=[] ) ), ), ) -parsed_271_2110D = Loop( u'2110D', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Dependent Eligibility or Benefit Information'), +parsed_271_2110D = Loop( u'2110D', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Dependent Eligibility or Benefit Information'), Segment( u'EB', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Dependent Eligibility or Benefit Information'), Element( u'EB01', Properties(desc=u'Eligibility or Benefit Information Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'H', u'I', u'J', u'K', u'L', u'M', u'N', u'O', u'P', u'Q', u'R', u'S', u'T', u'U', u'V', u'W', u'X', u'Y', u'CB', u'MC'] ) ), @@ -701,7 +701,7 @@ codes=[u'2120'] ) ), ), ) -parsed_271_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Dependent Name'), +parsed_271_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'03'] ) ), @@ -852,7 +852,7 @@ ), parsed_271_2110D, ) -parsed_271_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Dependent Level'), +parsed_271_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -875,7 +875,7 @@ ), parsed_271_2100D, ) -parsed_271_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Subscriber Level'), +parsed_271_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -899,7 +899,7 @@ parsed_271_2100C, parsed_271_2000D, ) -parsed_271_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Information Receiver Level'), +parsed_271_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'S',desc=u'Information Receiver Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Receiver Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -913,7 +913,7 @@ parsed_271_2100B, parsed_271_2000C, ) -parsed_271_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), +parsed_271_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Source Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -937,10 +937,10 @@ parsed_271_2100A, parsed_271_2000B, ) -parsed_271_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_271_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_271_2000A, ) -parsed_271_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_271_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'271'] ) ), @@ -956,7 +956,7 @@ codes=[] ) ), ), ) -parsed_271_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_271_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HB'] ) ), @@ -983,7 +983,7 @@ codes=[] ) ), ), ) -parsed_271_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_271_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -1038,7 +1038,7 @@ codes=[] ) ), ), ) -parsed_271 = Message( u'271', Properties(desc=u'HIPAA Health Care Eligibility Benefit Response X092A1-271'), +parsed_271 = Message( u'271', Properties(desc=u'HIPAA Health Care Eligibility Benefit Response X092A1-271'), parsed_271_ISA_LOOP, ) diff --git a/tigershark/parsers/M271_5010_X279_A1.py b/tigershark/parsers/M271_5010_X279_A1.py new file mode 100644 index 0000000..cadeeff --- /dev/null +++ b/tigershark/parsers/M271_5010_X279_A1.py @@ -0,0 +1,4735 @@ +# +# Generated by TigerShark.tools.convertPyX12 on 2014-06-30 18:14:56.440530 +# +from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties + + +parsed_271_2100A = Loop( + u'2100A', + Properties( + position=u'0300', looptype='', repeat=u'1', req_sit=u'R', + desc=u'Information Source Name'), + Segment( + u'NM1', + Properties( + syntax=u'P0809 C1110 C1203', position=u'0300', req_sit=u'R', repeat=u'1', + desc=u'Information Source Name'), + Element( + u'NM101', Properties( + desc=u'Entity Identifier Code', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'2B', u'36', u'GP', u'P5', u'PR']) + ), + Element( + u'NM102', Properties( + desc=u'Entity Type Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=2, + codes=[u'1', u'2']) + ), + Element( + u'NM103', Properties( + desc=u'Name Last or Organization Name', req_sit=u'R', + data_type=(u'AN', u'1', u'60'), position=3, + codes=[]) + ), + Element( + u'NM104', + Properties( + desc=u'Name First', req_sit=u'S', data_type=(u'AN', u'1', u'35'), + position=4, + codes=[]) + ), + Element( + u'NM105', + Properties( + desc=u'Name Middle', req_sit=u'S', data_type=(u'AN', u'1', u'25'), + position=5, + codes=[]) + ), + Element( + u'NM106', + Properties( + desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN', u'1', u'10'), + position=6, + codes=[]) + ), + Element( + u'NM107', + Properties( + desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN', u'1', u'10'), + position=7, + codes=[]) + ), + Element( + u'NM108', Properties( + desc=u'Identification Code Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[u'24', u'46', u'FI', u'NI', u'PI', u'XV', u'XX']) + ), + Element( + u'NM109', Properties( + desc=u'Identification Code', req_sit=u'R', + data_type=(u'AN', u'2', u'80'), position=9, + codes=[]) + ), + Element( + u'NM110', Properties( + desc=u'Entity Relationship Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=10, + codes=[]) + ), + Element( + u'NM111', Properties( + desc=u'Entity Identifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'NM112', Properties( + desc=u'Name Last or Organization Name', req_sit=u'N', + data_type=(u'AN', u'1', u'60'), position=12, + codes=[]) + ), + ), + Segment( + u'PER', + Properties( + syntax=u'P0304 P0506 P0708', position=u'0800', req_sit=u'S', repeat=u'3', + desc=u'Information Source Contact Information'), + Element( + u'PER01', Properties( + desc=u'Contact Function Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=1, + codes=[u'IC']) + ), + Element( + u'PER02', Properties( + desc=u'Name', req_sit=u'S', data_type=(u'AN', u'1', u'60'), + position=2, + codes=[]) + ), + Element( + u'PER03', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'ED', u'EM', u'FX', u'TE', u'UR']) + ), + Element( + u'PER04', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=4, + codes=[]) + ), + Element( + u'PER05', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=5, + codes=[u'ED', u'EM', u'EX', u'FX', u'TE', u'UR']) + ), + Element( + u'PER06', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=6, + codes=[]) + ), + Element( + u'PER07', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=7, + codes=[u'ED', u'EM', u'EX', u'FX', u'TE', u'UR']) + ), + Element( + u'PER08', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=8, + codes=[]) + ), + Element( + u'PER09', Properties( + desc=u'Contact Inquiry Reference', req_sit=u'N', + data_type=(u'AN', u'1', u'20'), position=9, + codes=[]) + ), + ), + Segment( + u'AAA', Properties( + syntax='', position=u'0850', req_sit=u'S', repeat=u'9', + desc=u'Request Validation'), + Element( + u'AAA01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N', u'Y']) + ), + Element( + u'AAA02', Properties( + desc=u'Agency Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'AAA03', Properties( + desc=u'Reject Reason Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'04', u'41', u'42', u'79', u'80', u'T4']) + ), + Element( + u'AAA04', Properties( + desc=u'Follow-up Action Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'C', u'N', u'P', u'R', u'S', u'W', u'X', u'Y']) + ), + ), +) +parsed_271_2000A = Loop( + u'2000A', Properties( + position=u'0120', looptype='', repeat=u'>1', req_sit=u'R', + desc=u'Information Source Level'), + Segment( + u'HL', Properties( + syntax='', position=u'0100', req_sit=u'R', repeat=u'1', + desc=u'Information Source Level'), + Element( + u'HL01', Properties( + desc=u'Hierarchical ID Number', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=1, + codes=[]) + ), + Element( + u'HL02', Properties( + desc=u'Hierarchical Parent ID Number', req_sit=u'N', + data_type=(u'AN', u'1', u'12'), position=2, + codes=[]) + ), + Element( + u'HL03', Properties( + desc=u'Hierarchical Level Code', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=3, + codes=[u'20']) + ), + Element( + u'HL04', Properties( + desc=u'Hierarchical Child Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'0', u'1']) + ), + ), + Segment( + u'AAA', Properties( + syntax='', position=u'0250', req_sit=u'S', repeat=u'9', + desc=u'Request Validation'), + Element( + u'AAA01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N', u'Y']) + ), + Element( + u'AAA02', Properties( + desc=u'Agency Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'AAA03', Properties( + desc=u'Reject Reason Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'04', u'41', u'42', u'79']) + ), + Element( + u'AAA04', Properties( + desc=u'Follow-up Action Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'C', u'N', u'P', u'R', u'S', u'Y']) + ), + ), + parsed_271_2100A, +) +parsed_271_2100B = Loop( + u'2100B', Properties( + position=u'0300', looptype='', repeat=u'1', req_sit=u'R', + desc=u'Information Receiver Name'), + Segment( + u'NM1', + Properties( + syntax=u'P0809 C1110 C1203', position=u'0300', req_sit=u'R', repeat=u'1', + desc=u'Information Receiver Name'), + Element( + u'NM101', Properties( + desc=u'Entity Identifier Code', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'1P', u'2B', u'36', u'80', u'FA', u'GP', u'P5', + u'PR']) + ), + Element( + u'NM102', Properties( + desc=u'Entity Type Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=2, + codes=[u'1', u'2']) + ), + Element( + u'NM103', Properties( + desc=u'Name Last or Organization Name', req_sit=u'S', + data_type=(u'AN', u'1', u'60'), position=3, + codes=[]) + ), + Element( + u'NM104', + Properties( + desc=u'Name First', req_sit=u'S', data_type=(u'AN', u'1', u'35'), + position=4, + codes=[]) + ), + Element( + u'NM105', + Properties( + desc=u'Name Middle', req_sit=u'S', data_type=(u'AN', u'1', u'25'), + position=5, + codes=[]) + ), + Element( + u'NM106', + Properties( + desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN', u'1', u'10'), + position=6, + codes=[]) + ), + Element( + u'NM107', + Properties( + desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN', u'1', u'10'), + position=7, + codes=[]) + ), + Element( + u'NM108', Properties( + desc=u'Identification Code Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[u'24', u'34', u'FI', u'PI', u'PP', u'SV', u'XV', + u'XX']) + ), + Element( + u'NM109', Properties( + desc=u'Identification Code', req_sit=u'R', + data_type=(u'AN', u'2', u'80'), position=9, + codes=[]) + ), + Element( + u'NM110', Properties( + desc=u'Entity Relationship Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=10, + codes=[]) + ), + Element( + u'NM111', Properties( + desc=u'Entity Identifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'NM112', Properties( + desc=u'Name Last or Organization Name', req_sit=u'N', + data_type=(u'AN', u'1', u'60'), position=12, + codes=[]) + ), + ), + Segment( + u'REF', Properties( + syntax=u'R0203', position=u'0400', req_sit=u'S', repeat=u'9', + desc=u'Information Receiver Additional Identification'), + Element( + u'REF01', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'0B', u'1C', u'1D', u'1J', u'4A', u'CT', u'EL', + u'EO', u'HPI', u'JD', u'N5', u'N7', u'Q4', u'SY', + u'TJ']) + ), + Element( + u'REF02', Properties( + desc=u'Reference Identification', req_sit=u'R', + data_type=(u'AN', u'1', u'50'), position=2, + codes=[]) + ), + Element( + u'REF03', + Properties( + desc=u'Description', req_sit=u'S', data_type=(u'AN', u'1', u'80'), + position=3, + codes=[]) + ), + Composite( + u'C040', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'04', + desc=u'Reference Identifier'), + ), + ), + Segment( + u'N3', Properties( + syntax='', position=u'0600', req_sit=u'S', repeat=u'1', + desc=u'Information Receiver Address'), + Element( + u'N301', Properties( + desc=u'Address Information', req_sit=u'R', + data_type=(u'AN', u'1', u'55'), position=1, + codes=[]) + ), + Element( + u'N302', Properties( + desc=u'Address Information', req_sit=u'S', + data_type=(u'AN', u'1', u'55'), position=2, + codes=[]) + ), + ), + Segment( + u'N4', + Properties( + syntax=u'E0207 C0605 C0704', position=u'0700', req_sit=u'S', repeat=u'1', + desc=u'Information Receiver City, State, ZIP Code'), + Element( + u'N401', + Properties( + desc=u'City Name', req_sit=u'R', data_type=(u'AN', u'2', u'30'), + position=1, + codes=[]) + ), + Element( + u'N402', Properties( + desc=u'State or Province Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'N403', + Properties( + desc=u'Postal Code', req_sit=u'S', data_type=(u'ID', u'3', u'15'), + position=3, + codes=[]) + ), + Element( + u'N404', + Properties( + desc=u'Country Code', req_sit=u'S', data_type=(u'ID', u'2', u'3'), + position=4, + codes=[]) + ), + Element( + u'N405', Properties( + desc=u'Location Qualifier', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=5, + codes=[]) + ), + Element( + u'N406', Properties( + desc=u'Location Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'N407', Properties( + desc=u'Country Subdivision Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=7, + codes=[]) + ), + ), + Segment( + u'AAA', Properties( + syntax='', position=u'0850', req_sit=u'S', repeat=u'9', + desc=u'Information Receiver Request Validation'), + Element( + u'AAA01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N', u'Y']) + ), + Element( + u'AAA02', Properties( + desc=u'Agency Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'AAA03', Properties( + desc=u'Reject Reason Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'15', u'41', u'43', u'44', u'45', u'46', u'47', + u'48', u'50', u'51', u'79', u'97', u'T4']) + ), + Element( + u'AAA04', Properties( + desc=u'Follow-up Action Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'C', u'N', u'R', u'S', u'W', u'X', u'Y']) + ), + ), + Segment( + u'PRV', Properties( + syntax=u'P0203', position=u'0900', req_sit=u'S', repeat=u'1', + desc=u'Information Receiver Provider Information'), + Element( + u'PRV01', + Properties( + desc=u'Provider Code', req_sit=u'R', data_type=(u'ID', u'1', u'3'), + position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', + u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SB', u'SK', + u'SU']) + ), + Element( + u'PRV02', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'PXC']) + ), + Element( + u'PRV03', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=3, + codes=[]) + ), + Element( + u'PRV04', Properties( + desc=u'State or Province Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=4, + codes=[]) + ), + Composite( + u'C035', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'05', + desc=u'Provider Specialty Information'), + ), + Element( + u'PRV06', Properties( + desc=u'Provider Organization Code', req_sit=u'N', + data_type=(u'ID', u'3', u'3'), position=6, + codes=[]) + ), + ), +) +parsed_271_2000B = Loop( + u'2000B', Properties( + position=u'0130', looptype='', repeat=u'>1', req_sit=u'S', + desc=u'Information Receiver Level'), + Segment( + u'HL', Properties( + syntax='', position=u'0100', req_sit=u'R', repeat=u'1', + desc=u'Information Receiver Level'), + Element( + u'HL01', Properties( + desc=u'Hierarchical ID Number', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=1, + codes=[]) + ), + Element( + u'HL02', Properties( + desc=u'Hierarchical Parent ID Number', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=2, + codes=[]) + ), + Element( + u'HL03', Properties( + desc=u'Hierarchical Level Code', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=3, + codes=[u'21']) + ), + Element( + u'HL04', Properties( + desc=u'Hierarchical Child Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'0', u'1']) + ), + ), + parsed_271_2100B, +) +parsed_271_2120C = Loop( + u'2120C', Properties( + position=u'1800', looptype='', repeat=u'23', req_sit=u'S', + desc=u'Subscriber Benefit Related Entity Name'), + Segment( + u'NM1', + Properties( + syntax=u'P0809 C1110 C1203', position=u'3400', req_sit=u'R', repeat=u'1', + desc=u'Subscriber Benefit Related Entity Name'), + Element( + u'NM101', Properties( + desc=u'Entity Identifier Code', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'13', u'1I', u'1P', u'2B', u'36', u'73', u'FA', + u'GP', u'GW', u'I3', u'IL', u'LR', u'OC', u'P3', + u'P4', u'P5', u'PR', u'PRP', u'SEP', u'TTP', u'VER', + u'VN', u'VY', u'X3', u'Y2']) + ), + Element( + u'NM102', Properties( + desc=u'Entity Type Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=2, + codes=[u'1', u'2']) + ), + Element( + u'NM103', Properties( + desc=u'Name Last or Organization Name', req_sit=u'S', + data_type=(u'AN', u'1', u'60'), position=3, + codes=[]) + ), + Element( + u'NM104', + Properties( + desc=u'Name First', req_sit=u'S', data_type=(u'AN', u'1', u'35'), + position=4, + codes=[]) + ), + Element( + u'NM105', + Properties( + desc=u'Name Middle', req_sit=u'S', data_type=(u'AN', u'1', u'25'), + position=5, + codes=[]) + ), + Element( + u'NM106', + Properties( + desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN', u'1', u'10'), + position=6, + codes=[]) + ), + Element( + u'NM107', + Properties( + desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN', u'1', u'10'), + position=7, + codes=[]) + ), + Element( + u'NM108', Properties( + desc=u'Identification Code Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[u'24', u'34', u'46', u'FA', u'FI', u'II', u'MI', + u'NI', u'PI', u'PP', u'SV', u'XV', u'XX']) + ), + Element( + u'NM109', Properties( + desc=u'Identification Code', req_sit=u'S', + data_type=(u'AN', u'2', u'80'), position=9, + codes=[]) + ), + Element( + u'NM110', Properties( + desc=u'Entity Relationship Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=10, + codes=[u'01', u'02', u'27', u'41', u'48', u'65', u'72']) + ), + Element( + u'NM111', Properties( + desc=u'Entity Identifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'NM112', Properties( + desc=u'Name Last or Organization Name', req_sit=u'N', + data_type=(u'AN', u'1', u'60'), position=12, + codes=[]) + ), + ), + Segment( + u'N3', Properties( + syntax='', position=u'3600', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Benefit Related Entity Address'), + Element( + u'N301', Properties( + desc=u'Address Information', req_sit=u'R', + data_type=(u'AN', u'1', u'55'), position=1, + codes=[]) + ), + Element( + u'N302', Properties( + desc=u'Address Information', req_sit=u'S', + data_type=(u'AN', u'1', u'55'), position=2, + codes=[]) + ), + ), + Segment( + u'N4', + Properties( + syntax=u'E0207 C0605 C0704', position=u'3700', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Benefit Related Entity City, State, ZIP Code'), + Element( + u'N401', + Properties( + desc=u'City Name', req_sit=u'R', data_type=(u'AN', u'2', u'30'), + position=1, + codes=[]) + ), + Element( + u'N402', Properties( + desc=u'State or Province Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'N403', + Properties( + desc=u'Postal Code', req_sit=u'S', data_type=(u'ID', u'3', u'15'), + position=3, + codes=[]) + ), + Element( + u'N404', + Properties( + desc=u'Country Code', req_sit=u'S', data_type=(u'ID', u'2', u'3'), + position=4, + codes=[]) + ), + Element( + u'N405', Properties( + desc=u'Location Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=5, + codes=[u'RJ']) + ), + Element( + u'N406', Properties( + desc=u'Location Identifier', req_sit=u'S', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'N407', Properties( + desc=u'Country Subdivision Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=7, + codes=[]) + ), + ), + Segment( + u'PER', + Properties( + syntax=u'P0304 P0506 P0708', position=u'3800', req_sit=u'S', repeat=u'3', + desc=u'Subscriber Benefit Related Entity Contact Information'), + Element( + u'PER01', Properties( + desc=u'Contact Function Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=1, + codes=[u'IC']) + ), + Element( + u'PER02', Properties( + desc=u'Name', req_sit=u'S', data_type=(u'AN', u'1', u'60'), + position=2, + codes=[]) + ), + Element( + u'PER03', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'ED', u'EM', u'FX', u'TE', u'UR', u'WP']) + ), + Element( + u'PER04', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=4, + codes=[]) + ), + Element( + u'PER05', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=5, + codes=[u'ED', u'EM', u'EX', u'FX', u'TE', u'UR', u'WP']) + ), + Element( + u'PER06', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=6, + codes=[]) + ), + Element( + u'PER07', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=7, + codes=[u'ED', u'EM', u'EX', u'FX', u'TE', u'UR', u'WP']) + ), + Element( + u'PER08', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=8, + codes=[]) + ), + Element( + u'PER09', Properties( + desc=u'Contact Inquiry Reference', req_sit=u'N', + data_type=(u'AN', u'1', u'20'), position=9, + codes=[]) + ), + ), + Segment( + u'PRV', Properties( + syntax=u'P0203', position=u'3900', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Benefit Related Provider Information'), + Element( + u'PRV01', + Properties( + desc=u'Provider Code', req_sit=u'R', data_type=(u'ID', u'1', u'3'), + position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', + u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SB', u'SK', + u'SU']) + ), + Element( + u'PRV02', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'PXC']) + ), + Element( + u'PRV03', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=3, + codes=[]) + ), + Element( + u'PRV04', Properties( + desc=u'State or Province Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=4, + codes=[]) + ), + Composite( + u'C035', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'05', + desc=u'Provider Specialty Information'), + ), + Element( + u'PRV06', Properties( + desc=u'Provider Organization Code', req_sit=u'N', + data_type=(u'ID', u'3', u'3'), position=6, + codes=[]) + ), + ), + Segment( + u'LE', Properties( + syntax='', position=u'4000', req_sit=u'S', repeat=u'1', + desc=u'Loop Trailer'), + Element( + u'LE01', Properties( + desc=u'Loop Identifier Code', req_sit=u'R', + data_type=(u'AN', u'1', u'4'), position=1, + codes=[u'2120']) + ), + ), +) +parsed_271_2115C = Loop( + u'2115C', Properties( + position=u'1710', looptype='', repeat=u'10', req_sit=u'S', + desc=u'Subscriber Eligibility or Benefit Additional Information'), + Segment( + u'III', Properties( + syntax=u'P0102 L030405', position=u'2600', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Eligibility or Benefit Additional Information'), + Element( + u'III01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=1, + codes=[u'GR', u'NI', u'ZZ']) + ), + Element( + u'III02', + Properties( + desc=u'Industry Code', req_sit=u'S', data_type=(u'AN', u'1', u'30'), + position=2, + codes=[]) + ), + Element( + u'III03', + Properties( + desc=u'Code Category', req_sit=u'S', data_type=(u'ID', u'2', u'2'), + position=3, + codes=[u'44']) + ), + Element( + u'III04', Properties( + desc=u'Free-form Message Text', req_sit=u'S', + data_type=(u'AN', u'1', u'264'), position=4, + codes=[]) + ), + Element( + u'III05', + Properties( + desc=u'Quantity', req_sit=u'N', data_type=(u'R', u'1', u'15'), + position=5, + codes=[]) + ), + Composite( + u'C001', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'06', + desc=u'Composite Unit of Measure'), + ), + Element( + u'III07', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=7, + codes=[]) + ), + Element( + u'III08', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=8, + codes=[]) + ), + Element( + u'III09', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=9, + codes=[]) + ), + ), + Segment( + u'LS', + Properties( + syntax='', position=u'2650', req_sit=u'S', repeat=u'1', desc=u'Loop Header'), + Element( + u'LS01', Properties( + desc=u'Loop Identifier Code', req_sit=u'R', + data_type=(u'AN', u'1', u'4'), position=1, + codes=[u'2120']) + ), + ), + parsed_271_2120C, +) +parsed_271_2110C = Loop( + u'2110C', Properties( + position=u'1300', looptype='', repeat=u'>1', req_sit=u'S', + desc=u'Subscriber Eligibility or Benefit Information'), + Segment( + u'EB', Properties( + syntax=u'P0910', position=u'1300', req_sit=u'R', repeat=u'1', + desc=u'Subscriber Eligibility or Benefit Information'), + Element( + u'EB01', + Properties( + desc=u'Eligibility or Benefit Information Code', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=1, + codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'A', u'B', + u'C', u'CB', u'D', u'E', u'F', u'G', u'H', u'I', u'J', u'K', + u'L', u'M', u'MC', u'N', u'O', u'P', u'Q', u'R', u'S', u'T', + u'U', u'V', u'W', u'X', u'Y']) + ), + Element( + u'EB02', Properties( + desc=u'Coverage Level Code', req_sit=u'S', + data_type=(u'ID', u'3', u'3'), position=2, + codes=[u'CHD', u'DEP', u'ECH', u'EMP', u'ESP', u'FAM', + u'IND', u'SPC', u'SPO']) + ), + Element( + u'EB03', Properties( + desc=u'Service Type Code', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=3, + codes=[u'1', u'10', u'11', u'12', u'13', u'14', u'15', + u'16', u'17', u'18', u'19', u'2', u'20', u'21', + u'22', u'23', u'24', u'25', u'26', u'27', u'28', + u'3', u'30', u'32', u'33', u'34', u'35', u'36', + u'37', u'38', u'39', u'4', u'40', u'41', u'42', + u'43', u'44', u'45', u'46', u'47', u'48', u'49', + u'5', u'50', u'51', u'52', u'53', u'54', u'55', + u'56', u'57', u'58', u'59', u'6', u'60', u'61', + u'62', u'63', u'64', u'65', u'66', u'67', u'68', + u'69', u'7', u'70', u'71', u'72', u'73', u'74', + u'75', u'76', u'77', u'78', u'79', u'8', u'80', + u'81', u'82', u'83', u'84', u'85', u'86', u'87', + u'88', u'89', u'9', u'90', u'91', u'92', u'93', + u'94', u'95', u'96', u'97', u'98', u'99', u'A0', + u'A1', u'A2', u'A3', u'A4', u'A5', u'A6', u'A7', + u'A8', u'A9', u'AA', u'AB', u'AC', u'AD', u'AE', + u'AF', u'AG', u'AH', u'AI', u'AJ', u'AK', u'AL', + u'AM', u'AN', u'AO', u'AQ', u'AR', u'B1', u'B2', + u'B3', u'BA', u'BB', u'BC', u'BD', u'BE', u'BF', + u'BG', u'BH', u'BI', u'BJ', u'BK', u'BL', u'BM', + u'BN', u'BP', u'BQ', u'BR', u'BS', u'BT', u'BU', + u'BV', u'BW', u'BX', u'BY', u'BZ', u'C1', u'CA', + u'CB', u'CC', u'CD', u'CE', u'CF', u'CG', u'CH', + u'CI', u'CJ', u'CK', u'CL', u'CM', u'CN', u'CO', + u'CP', u'CQ', u'DG', u'DM', u'DS', u'GF', u'GN', + u'GY', u'IC', u'MH', u'NI', u'ON', u'PT', u'PU', + u'RN', u'RT', u'TC', u'TN', u'UC']) + ), + Element( + u'EB04', Properties( + desc=u'Insurance Type Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=4, + codes=[u'12', u'13', u'14', u'15', u'16', u'41', u'42', + u'43', u'47', u'AP', u'C1', u'CO', u'CP', u'D', + u'DB', u'EP', u'FF', u'GP', u'HM', u'HN', u'HS', + u'IN', u'IP', u'LC', u'LD', u'LI', u'LT', u'MA', + u'MB', u'MC', u'MH', u'MI', u'MP', u'OT', u'PE', + u'PL', u'PP', u'PR', u'PS', u'QM', u'RP', u'SP', + u'TF', u'WC', u'WU']) + ), + Element( + u'EB05', Properties( + desc=u'Plan Coverage Description', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=5, + codes=[]) + ), + Element( + u'EB06', Properties( + desc=u'Time Period Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=6, + codes=[u'13', u'21', u'22', u'23', u'24', u'25', u'26', + u'27', u'28', u'29', u'30', u'31', u'32', u'33', + u'34', u'35', u'36', u'6', u'7']) + ), + Element( + u'EB07', + Properties( + desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R', u'1', u'18'), + position=7, + codes=[]) + ), + Element( + u'EB08', Properties( + desc=u'Percentage as Decimal', req_sit=u'S', + data_type=(u'R', u'1', u'10'), position=8, + codes=[]) + ), + Element( + u'EB09', Properties( + desc=u'Quantity Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=9, + codes=[u'8H', u'99', u'CA', u'CE', u'D3', u'DB', u'DY', + u'HS', u'LA', u'LE', u'M2', u'MN', u'P6', u'QA', + u'S7', u'S8', u'VS', u'YY']) + ), + Element( + u'EB10', + Properties( + desc=u'Quantity', req_sit=u'S', data_type=(u'R', u'1', u'15'), + position=10, + codes=[]) + ), + Element( + u'EB11', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'S', + data_type=(u'ID', u'1', u'1'), position=11, + codes=[u'N', u'U', u'Y']) + ), + Element( + u'EB12', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'S', + data_type=(u'ID', u'1', u'1'), position=12, + codes=[u'N', u'U', u'W', u'Y']) + ), + Composite( + u'C003', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'13', + desc=u'Composite Medical Procedure Identifier'), + Element( + u'EB13-01', + Properties( + desc=u'Product/Service ID Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=0, + codes=[u'AD', u'CJ', u'HC', u'ID', u'IV', u'N4', u'ZZ']) + ), + Element( + u'EB13-02', Properties( + desc=u'Product/Service ID', req_sit=u'R', + data_type=(u'AN', u'1', u'48'), position=1, + codes=[]) + ), + Element( + u'EB13-03', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'EB13-04', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=3, + codes=[]) + ), + Element( + u'EB13-05', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=4, + codes=[]) + ), + Element( + u'EB13-06', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=5, + codes=[]) + ), + Element( + u'EB13-07', Properties( + desc=u'Description', req_sit=u'N', + data_type=(u'AN', u'1', u'80'), position=6, + codes=[]) + ), + Element( + u'EB13-08', Properties( + desc=u'Product/Service ID', req_sit=u'S', + data_type=(u'AN', u'1', u'48'), position=7, + codes=[]) + ), + ), + Composite( + u'C004', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'14', + desc=u'Composite Diagnosis Code Pointer'), + Element( + u'EB14-01', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'R', + data_type=(u'N0', u'1', u'2'), position=0, + codes=[]) + ), + Element( + u'EB14-02', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'S', + data_type=(u'N0', u'1', u'2'), position=1, + codes=[]) + ), + Element( + u'EB14-03', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'S', + data_type=(u'N0', u'1', u'2'), position=2, + codes=[]) + ), + Element( + u'EB14-04', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'S', + data_type=(u'N0', u'1', u'2'), position=3, + codes=[]) + ), + ), + ), + Segment( + u'HSD', Properties( + syntax=u'P0102 C0605', position=u'1350', req_sit=u'S', repeat=u'9', + desc=u'Health Care Services Delivery'), + Element( + u'HSD01', Properties( + desc=u'Quantity Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=1, + codes=[u'DY', u'FL', u'HS', u'MN', u'VS']) + ), + Element( + u'HSD02', + Properties( + desc=u'Quantity', req_sit=u'S', data_type=(u'R', u'1', u'15'), + position=2, + codes=[]) + ), + Element( + u'HSD03', Properties( + desc=u'Unit or Basis for Measurement Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'DA', u'MO', u'VS', u'WK', u'YR']) + ), + Element( + u'HSD04', Properties( + desc=u'Sample Selection Modulus', req_sit=u'S', + data_type=(u'R', u'1', u'6'), position=4, + codes=[]) + ), + Element( + u'HSD05', Properties( + desc=u'Time Period Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=5, + codes=[u'21', u'22', u'23', u'24', u'25', u'26', u'27', + u'28', u'29', u'30', u'31', u'32', u'33', u'34', + u'35', u'6', u'7']) + ), + Element( + u'HSD06', Properties( + desc=u'Number of Periods', req_sit=u'S', + data_type=(u'N0', u'1', u'3'), position=6, + codes=[]) + ), + Element( + u'HSD07', + Properties( + desc=u'Ship/Delivery or Calendar Pattern Code', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=7, + codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9', u'A', + u'B', u'C', u'D', u'E', u'F', u'G', u'H', u'J', u'K', u'L', + u'M', u'N', u'O', u'P', u'Q', u'R', u'S', u'SG', u'SL', u'SP', + u'SX', u'SY', u'SZ', u'T', u'U', u'V', u'W', u'X', u'Y']) + ), + Element( + u'HSD08', Properties( + desc=u'Ship/Delivery Pattern Time Code', req_sit=u'S', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'Y']) + ), + ), + Segment( + u'REF', Properties( + syntax=u'R0203', position=u'1400', req_sit=u'S', repeat=u'9', + desc=u'Subscriber Additional Identification'), + Element( + u'REF01', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'18', u'1L', u'1W', u'49', u'6P', u'9F', u'ALS', + u'CLI', u'F6', u'FO', u'G1', u'IG', u'M7', u'N6', + u'NQ']) + ), + Element( + u'REF02', Properties( + desc=u'Reference Identification', req_sit=u'R', + data_type=(u'AN', u'1', u'50'), position=2, + codes=[]) + ), + Element( + u'REF03', + Properties( + desc=u'Description', req_sit=u'S', data_type=(u'AN', u'1', u'80'), + position=3, + codes=[]) + ), + Composite( + u'C040', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'04', + desc=u'Reference Identifier'), + ), + ), + Segment( + u'DTP', Properties( + syntax='', position=u'1500', req_sit=u'S', repeat=u'20', + desc=u'Subscriber Eligibility/Benefit Date'), + Element( + u'DTP01', Properties( + desc=u'Date/Time Qualifier', req_sit=u'R', + data_type=(u'ID', u'3', u'3'), position=1, + codes=[u'096', u'193', u'194', u'198', u'290', u'291', + u'292', u'295', u'304', u'307', u'318', u'346', + u'348', u'349', u'356', u'357', u'435', u'472', + u'636', u'771']) + ), + Element( + u'DTP02', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'D8', u'RD8']) + ), + Element( + u'DTP03', Properties( + desc=u'Date Time Period', req_sit=u'R', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + ), + Segment( + u'AAA', Properties( + syntax='', position=u'1600', req_sit=u'S', repeat=u'9', + desc=u'Subscriber Request Validation'), + Element( + u'AAA01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N', u'Y']) + ), + Element( + u'AAA02', Properties( + desc=u'Agency Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'AAA03', Properties( + desc=u'Reject Reason Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'15', u'33', u'52', u'53', u'54', u'55', u'56', + u'57', u'60', u'61', u'62', u'63', u'69', u'70', + u'98', u'AA', u'AE', u'AF', u'AG', u'AO', u'CI', + u'E8', u'IA', u'MA']) + ), + Element( + u'AAA04', Properties( + desc=u'Follow-up Action Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'C', u'N', u'R', u'W', u'X', u'Y']) + ), + ), + parsed_271_2115C, + Segment( + u'MSG', Properties( + syntax=u'C0302', position=u'2500', req_sit=u'S', repeat=u'10', + desc=u'Message Text'), + Element( + u'MSG01', Properties( + desc=u'Free-form Message Text', req_sit=u'R', + data_type=(u'AN', u'1', u'264'), position=1, + codes=[]) + ), + Element( + u'MSG02', Properties( + desc=u'Printer Carriage Control Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'MSG03', + Properties( + desc=u'Number', req_sit=u'N', data_type=(u'N0', u'1', u'9'), + position=3, + codes=[]) + ), + ), + Segment( + u'III', Properties( + syntax=u'P0102 L030405', position=u'2600', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Eligibility or Benefit Additional Information'), + Element( + u'III01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=1, + codes=[u'GR', u'NI', u'ZZ']) + ), + Element( + u'III02', + Properties( + desc=u'Industry Code', req_sit=u'S', data_type=(u'AN', u'1', u'30'), + position=2, + codes=[]) + ), + Element( + u'III03', + Properties( + desc=u'Code Category', req_sit=u'S', data_type=(u'ID', u'2', u'2'), + position=3, + codes=[u'44']) + ), + Element( + u'III04', Properties( + desc=u'Free-form Message Text', req_sit=u'S', + data_type=(u'AN', u'1', u'264'), position=4, + codes=[]) + ), + Element( + u'III05', + Properties( + desc=u'Quantity', req_sit=u'N', data_type=(u'R', u'1', u'15'), + position=5, + codes=[]) + ), + Composite( + u'C001', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'06', + desc=u'Composite Unit of Measure'), + ), + Element( + u'III07', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=7, + codes=[]) + ), + Element( + u'III08', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=8, + codes=[]) + ), + Element( + u'III09', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=9, + codes=[]) + ), + ), + Segment( + u'LS', + Properties( + syntax='', position=u'3300', req_sit=u'S', repeat=u'1', desc=u'Loop Header'), + Element( + u'LS01', Properties( + desc=u'Loop Identifier Code', req_sit=u'R', + data_type=(u'AN', u'1', u'4'), position=1, + codes=[u'2120']) + ), + ), + parsed_271_2120C, +) +parsed_271_2100C = Loop( + u'2100C', + Properties( + position=u'0300', looptype='', repeat=u'1', req_sit=u'R', desc=u'Subscriber Name'), + Segment( + u'NM1', + Properties( + syntax=u'P0809 C1110 C1203', position=u'0300', req_sit=u'R', repeat=u'1', + desc=u'Subscriber Name'), + Element( + u'NM101', Properties( + desc=u'Entity Identifier Code', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'IL']) + ), + Element( + u'NM102', Properties( + desc=u'Entity Type Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=2, + codes=[u'1', u'2']) + ), + Element( + u'NM103', Properties( + desc=u'Name Last or Organization Name', req_sit=u'S', + data_type=(u'AN', u'1', u'60'), position=3, + codes=[]) + ), + Element( + u'NM104', + Properties( + desc=u'Name First', req_sit=u'S', data_type=(u'AN', u'1', u'35'), + position=4, + codes=[]) + ), + Element( + u'NM105', + Properties( + desc=u'Name Middle', req_sit=u'S', data_type=(u'AN', u'1', u'25'), + position=5, + codes=[]) + ), + Element( + u'NM106', + Properties( + desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN', u'1', u'10'), + position=6, + codes=[]) + ), + Element( + u'NM107', + Properties( + desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN', u'1', u'10'), + position=7, + codes=[]) + ), + Element( + u'NM108', Properties( + desc=u'Identification Code Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[u'II', u'MI']) + ), + Element( + u'NM109', Properties( + desc=u'Identification Code', req_sit=u'S', + data_type=(u'AN', u'2', u'80'), position=9, + codes=[]) + ), + Element( + u'NM110', Properties( + desc=u'Entity Relationship Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=10, + codes=[]) + ), + Element( + u'NM111', Properties( + desc=u'Entity Identifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'NM112', Properties( + desc=u'Name Last or Organization Name', req_sit=u'N', + data_type=(u'AN', u'1', u'60'), position=12, + codes=[]) + ), + ), + Segment( + u'REF', Properties( + syntax=u'R0203', position=u'0400', req_sit=u'S', repeat=u'9', + desc=u'Subscriber Additional Identification'), + Element( + u'REF01', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'18', u'1L', u'1W', u'3H', u'49', u'6P', u'CE', + u'CT', u'EA', u'EJ', u'F6', u'GH', u'HJ', u'IF', + u'IG', u'N6', u'NQ', u'Q4', u'SY', u'Y4']) + ), + Element( + u'REF02', Properties( + desc=u'Reference Identification', req_sit=u'R', + data_type=(u'AN', u'1', u'50'), position=2, + codes=[]) + ), + Element( + u'REF03', + Properties( + desc=u'Description', req_sit=u'S', data_type=(u'AN', u'1', u'80'), + position=3, + codes=[]) + ), + Composite( + u'C040', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'04', + desc=u'Reference Identifier'), + ), + ), + Segment( + u'N3', Properties( + syntax='', position=u'0600', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Address'), + Element( + u'N301', Properties( + desc=u'Address Information', req_sit=u'R', + data_type=(u'AN', u'1', u'55'), position=1, + codes=[]) + ), + Element( + u'N302', Properties( + desc=u'Address Information', req_sit=u'S', + data_type=(u'AN', u'1', u'55'), position=2, + codes=[]) + ), + ), + Segment( + u'N4', + Properties( + syntax=u'E0207 C0605 C0704', position=u'0700', req_sit=u'S', repeat=u'1', + desc=u'Subscriber City, State, ZIP Code'), + Element( + u'N401', + Properties( + desc=u'City Name', req_sit=u'R', data_type=(u'AN', u'2', u'30'), + position=1, + codes=[]) + ), + Element( + u'N402', Properties( + desc=u'State or Province Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'N403', + Properties( + desc=u'Postal Code', req_sit=u'S', data_type=(u'ID', u'3', u'15'), + position=3, + codes=[]) + ), + Element( + u'N404', + Properties( + desc=u'Country Code', req_sit=u'S', data_type=(u'ID', u'2', u'3'), + position=4, + codes=[]) + ), + Element( + u'N405', Properties( + desc=u'Location Qualifier', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=5, + codes=[]) + ), + Element( + u'N406', Properties( + desc=u'Location Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'N407', Properties( + desc=u'Country Subdivision Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=7, + codes=[]) + ), + ), + Segment( + u'AAA', Properties( + syntax='', position=u'0850', req_sit=u'S', repeat=u'9', + desc=u'Subscriber Request Validation'), + Element( + u'AAA01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N', u'Y']) + ), + Element( + u'AAA02', Properties( + desc=u'Agency Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'AAA03', Properties( + desc=u'Reject Reason Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'15', u'35', u'42', u'43', u'45', u'47', u'48', + u'49', u'51', u'52', u'56', u'57', u'58', u'60', + u'61', u'62', u'63', u'71', u'72', u'73', u'74', + u'75', u'76', u'78']) + ), + Element( + u'AAA04', Properties( + desc=u'Follow-up Action Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'C', u'N', u'R', u'S', u'W', u'X', u'Y']) + ), + ), + Segment( + u'PRV', Properties( + syntax=u'P0203', position=u'0900', req_sit=u'S', repeat=u'1', + desc=u'Provider Information'), + Element( + u'PRV01', + Properties( + desc=u'Provider Code', req_sit=u'R', data_type=(u'ID', u'1', u'3'), + position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', + u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SK', u'SU']) + ), + Element( + u'PRV02', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'PXC']) + ), + Element( + u'PRV03', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=3, + codes=[]) + ), + Element( + u'PRV04', Properties( + desc=u'State or Province Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=4, + codes=[]) + ), + Composite( + u'C035', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'05', + desc=u'Provider Specialty Information'), + ), + Element( + u'PRV06', Properties( + desc=u'Provider Organization Code', req_sit=u'N', + data_type=(u'ID', u'3', u'3'), position=6, + codes=[]) + ), + ), + Segment( + u'DMG', + Properties( + syntax=u'P0102 P1011 C1105', position=u'1000', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Demographic Information'), + Element( + u'DMG01', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'D8']) + ), + Element( + u'DMG02', Properties( + desc=u'Date Time Period', req_sit=u'S', + data_type=(u'AN', u'1', u'35'), position=2, + codes=[]) + ), + Element( + u'DMG03', + Properties( + desc=u'Gender Code', req_sit=u'S', data_type=(u'ID', u'1', u'1'), + position=3, + codes=[u'F', u'M', u'U']) + ), + Element( + u'DMG04', Properties( + desc=u'Marital Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[]) + ), + Composite( + u'C056', Properties( + req_sit=u'N', repeat=u'10', refdes='', seq=u'05', + desc=u'Composite Race or Ethnicity Information'), + ), + Element( + u'DMG06', Properties( + desc=u'Citizenship Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=6, + codes=[]) + ), + Element( + u'DMG07', + Properties( + desc=u'Country Code', req_sit=u'N', data_type=(u'ID', u'2', u'3'), + position=7, + codes=[]) + ), + Element( + u'DMG08', Properties( + desc=u'Basis of Verification Code', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[]) + ), + Element( + u'DMG09', + Properties( + desc=u'Quantity', req_sit=u'N', data_type=(u'R', u'1', u'15'), + position=9, + codes=[]) + ), + Element( + u'DMG10', Properties( + desc=u'Code List Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'1', u'3'), position=10, + codes=[]) + ), + Element( + u'DMG11', + Properties( + desc=u'Industry Code', req_sit=u'N', data_type=(u'AN', u'1', u'30'), + position=11, + codes=[]) + ), + ), + Segment( + u'INS', Properties( + syntax=u'P1112', position=u'1100', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Relationship'), + Element( + u'INS01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'Y']) + ), + Element( + u'INS02', Properties( + desc=u'Individual Relationship Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[u'18']) + ), + Element( + u'INS03', Properties( + desc=u'Maintenance Type Code', req_sit=u'S', + data_type=(u'ID', u'3', u'3'), position=3, + codes=[u'001']) + ), + Element( + u'INS04', Properties( + desc=u'Maintenance Reason Code', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=4, + codes=[u'25']) + ), + Element( + u'INS05', Properties( + desc=u'Benefit Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=5, + codes=[]) + ), + Composite( + u'C052', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'06', + desc=u'Medicare Status Code'), + ), + Element( + u'INS07', Properties( + desc=u'Consolidated Omnibus Budget Reconciliation Act (COBRA) Qualifying', + req_sit=u'N', data_type=(u'ID', u'1', u'2'), position=7, + codes=[]) + ), + Element( + u'INS08', Properties( + desc=u'Employment Status Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=8, + codes=[]) + ), + Element( + u'INS09', Properties( + desc=u'Student Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=9, + codes=[]) + ), + Element( + u'INS10', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=10, + codes=[]) + ), + Element( + u'INS11', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'INS12', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=12, + codes=[]) + ), + Element( + u'INS13', Properties( + desc=u'Confidentiality Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=13, + codes=[]) + ), + Element( + u'INS14', + Properties( + desc=u'City Name', req_sit=u'N', data_type=(u'AN', u'2', u'30'), + position=14, + codes=[]) + ), + Element( + u'INS15', Properties( + desc=u'State or Province Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=15, + codes=[]) + ), + Element( + u'INS16', + Properties( + desc=u'Country Code', req_sit=u'N', data_type=(u'ID', u'2', u'3'), + position=16, + codes=[]) + ), + Element( + u'INS17', + Properties( + desc=u'Number', req_sit=u'S', data_type=(u'N0', u'1', u'9'), + position=17, + codes=[]) + ), + ), + Segment( + u'HI', Properties( + syntax='', position=u'1150', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Health Care Diagnosis Code'), + Composite( + u'C022', Properties( + req_sit=u'R', repeat='', refdes='', seq=u'01', + desc=u'Health Care Code Information'), + Element( + u'HI01-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABK', u'BK']) + ), + Element( + u'HI01-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI01-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI01-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI01-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI01-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI01-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI01-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI01-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'02', + desc=u'Health Care Code Information'), + Element( + u'HI02-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI02-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI02-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI02-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI02-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI02-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI02-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI02-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI02-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'03', + desc=u'Health Care Code Information'), + Element( + u'HI03-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI03-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI03-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI03-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI03-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI03-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI03-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI03-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI03-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'04', + desc=u'Health Care Code Information'), + Element( + u'HI04-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI04-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI04-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI04-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI04-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI04-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI04-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI04-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI04-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'05', + desc=u'Health Care Code Information'), + Element( + u'HI05-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI05-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI05-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI05-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI05-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI05-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI05-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI05-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI05-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'06', + desc=u'Health Care Code Information'), + Element( + u'HI06-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI06-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI06-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI06-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI06-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI06-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI06-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI06-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI06-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'07', + desc=u'Health Care Code Information'), + Element( + u'HI07-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI07-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI07-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI07-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI07-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI07-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI07-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI07-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI07-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'08', + desc=u'Health Care Code Information'), + Element( + u'HI08-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI08-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI08-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI08-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI08-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI08-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI08-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI08-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI08-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'09', + desc=u'Health Care Code Information'), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'10', + desc=u'Health Care Code Information'), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'11', + desc=u'Health Care Code Information'), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'12', + desc=u'Health Care Code Information'), + ), + ), + Segment( + u'DTP', Properties( + syntax='', position=u'1200', req_sit=u'S', repeat=u'9', + desc=u'Subscriber Date'), + Element( + u'DTP01', Properties( + desc=u'Date/Time Qualifier', req_sit=u'R', + data_type=(u'ID', u'3', u'3'), position=1, + codes=[u'096', u'102', u'152', u'291', u'307', u'318', + u'340', u'341', u'342', u'343', u'346', u'347', + u'356', u'357', u'382', u'435', u'442', u'458', + u'472', u'539', u'540', u'636', u'771']) + ), + Element( + u'DTP02', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'D8', u'RD8']) + ), + Element( + u'DTP03', Properties( + desc=u'Date Time Period', req_sit=u'R', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + ), + Segment( + u'MPI', Properties( + syntax=u'P0607', position=u'1275', req_sit=u'S', repeat=u'1', + desc=u'Subscriber Military Personnel Information'), + Element( + u'MPI01', Properties( + desc=u'Information Status Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'A', u'C', u'L', u'O', u'P', u'S', u'T']) + ), + Element( + u'MPI02', Properties( + desc=u'Employment Status Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[u'AE', u'AO', u'AS', u'AT', u'AU', u'CC', u'DD', + u'HD', u'IR', u'LX', u'PE', u'RE', u'RM', u'RR', + u'RU']) + ), + Element( + u'MPI03', Properties( + desc=u'Government Service Affiliation Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=3, + codes=[u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'H', + u'I', u'J', u'K', u'L', u'M', u'N', u'O', u'Q', + u'R', u'S', u'U', u'W']) + ), + Element( + u'MPI04', + Properties( + desc=u'Description', req_sit=u'S', data_type=(u'AN', u'1', u'80'), + position=4, + codes=[]) + ), + Element( + u'MPI05', Properties( + desc=u'Military Service Rank Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=5, + codes=[u'A1', u'A2', u'A3', u'B1', u'B2', u'C1', u'C2', + u'C3', u'C4', u'C5', u'C6', u'C7', u'C8', u'C9', + u'E1', u'F1', u'F2', u'F3', u'F4', u'G1', u'G4', + u'L1', u'L2', u'L3', u'L4', u'L5', u'L6', u'M1', + u'M2', u'M3', u'M4', u'M5', u'M6', u'P1', u'P2', + u'P3', u'P4', u'P5', u'R1', u'R2', u'S1', u'S2', + u'S3', u'S4', u'S5', u'S6', u'S7', u'S8', u'S9', + u'SA', u'SB', u'SC', u'T1', u'V1', u'W1']) + ), + Element( + u'MPI06', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=6, + codes=[u'D8', u'RD8']) + ), + Element( + u'MPI07', Properties( + desc=u'Date Time Period', req_sit=u'S', + data_type=(u'AN', u'1', u'35'), position=7, + codes=[]) + ), + ), + parsed_271_2110C, +) +parsed_271_2000C = Loop( + u'2000C', + Properties( + position=u'0140', looptype='', repeat=u'>1', req_sit=u'S', desc=u'Subscriber Level'), + Segment( + u'HL', Properties( + syntax='', position=u'0100', req_sit=u'R', repeat=u'1', + desc=u'Subscriber Level'), + Element( + u'HL01', Properties( + desc=u'Hierarchical ID Number', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=1, + codes=[]) + ), + Element( + u'HL02', Properties( + desc=u'Hierarchical Parent ID Number', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=2, + codes=[]) + ), + Element( + u'HL03', Properties( + desc=u'Hierarchical Level Code', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=3, + codes=[u'22']) + ), + Element( + u'HL04', Properties( + desc=u'Hierarchical Child Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'0', u'1']) + ), + ), + Segment( + u'TRN', Properties( + syntax='', position=u'0200', req_sit=u'S', repeat=u'3', + desc=u'Subscriber Trace Number'), + Element( + u'TRN01', + Properties( + desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID', u'1', u'2'), + position=1, + codes=[u'1', u'2']) + ), + Element( + u'TRN02', Properties( + desc=u'Reference Identification', req_sit=u'R', + data_type=(u'AN', u'1', u'50'), position=2, + codes=[]) + ), + Element( + u'TRN03', Properties( + desc=u'Originating Company Identifier', req_sit=u'R', + data_type=(u'AN', u'10', u'10'), position=3, + codes=[]) + ), + Element( + u'TRN04', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=4, + codes=[]) + ), + ), + parsed_271_2100C, +) +parsed_271_2120D = Loop( + u'2120D', Properties( + position=u'1800', looptype='', repeat=u'23', req_sit=u'S', + desc=u'Dependent Benefit Related Entity Name'), + Segment( + u'NM1', + Properties( + syntax=u'P0809 C1110 C1203', position=u'3400', req_sit=u'R', repeat=u'1', + desc=u'Dependent Benefit Related Entity Name'), + Element( + u'NM101', Properties( + desc=u'Entity Identifier Code', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'13', u'1I', u'1P', u'2B', u'36', u'73', u'FA', + u'GP', u'GW', u'I3', u'IL', u'LR', u'OC', u'P3', + u'P4', u'P5', u'PR', u'PRP', u'SEP', u'TTP', u'VER', + u'VN', u'VY', u'X3', u'Y2']) + ), + Element( + u'NM102', Properties( + desc=u'Entity Type Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=2, + codes=[u'1', u'2']) + ), + Element( + u'NM103', Properties( + desc=u'Name Last or Organization Name', req_sit=u'S', + data_type=(u'AN', u'1', u'60'), position=3, + codes=[]) + ), + Element( + u'NM104', + Properties( + desc=u'Name First', req_sit=u'S', data_type=(u'AN', u'1', u'35'), + position=4, + codes=[]) + ), + Element( + u'NM105', + Properties( + desc=u'Name Middle', req_sit=u'S', data_type=(u'AN', u'1', u'25'), + position=5, + codes=[]) + ), + Element( + u'NM106', + Properties( + desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN', u'1', u'10'), + position=6, + codes=[]) + ), + Element( + u'NM107', + Properties( + desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN', u'1', u'10'), + position=7, + codes=[]) + ), + Element( + u'NM108', Properties( + desc=u'Identification Code Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[u'24', u'34', u'46', u'FA', u'FI', u'II', u'MI', + u'NI', u'PI', u'PP', u'SV', u'XV', u'XX']) + ), + Element( + u'NM109', Properties( + desc=u'Identification Code', req_sit=u'S', + data_type=(u'AN', u'2', u'80'), position=9, + codes=[]) + ), + Element( + u'NM110', Properties( + desc=u'Entity Relationship Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=10, + codes=[u'01', u'02', u'27', u'41', u'48', u'65', u'72']) + ), + Element( + u'NM111', Properties( + desc=u'Entity Identifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'NM112', Properties( + desc=u'Name Last or Organization Name', req_sit=u'N', + data_type=(u'AN', u'1', u'60'), position=12, + codes=[]) + ), + ), + Segment( + u'N3', Properties( + syntax='', position=u'3600', req_sit=u'S', repeat=u'1', + desc=u'Dependent Benefit Related Entity Address'), + Element( + u'N301', Properties( + desc=u'Address Information', req_sit=u'R', + data_type=(u'AN', u'1', u'55'), position=1, + codes=[]) + ), + Element( + u'N302', Properties( + desc=u'Address Information', req_sit=u'S', + data_type=(u'AN', u'1', u'55'), position=2, + codes=[]) + ), + ), + Segment( + u'N4', + Properties( + syntax=u'E0207 C0605 C0704', position=u'3700', req_sit=u'S', repeat=u'1', + desc=u'Dependent Benefit Related Entity City, State, ZIP Code'), + Element( + u'N401', + Properties( + desc=u'City Name', req_sit=u'R', data_type=(u'AN', u'2', u'30'), + position=1, + codes=[]) + ), + Element( + u'N402', Properties( + desc=u'State or Province Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'N403', + Properties( + desc=u'Postal Code', req_sit=u'S', data_type=(u'ID', u'3', u'15'), + position=3, + codes=[]) + ), + Element( + u'N404', + Properties( + desc=u'Country Code', req_sit=u'S', data_type=(u'ID', u'2', u'3'), + position=4, + codes=[]) + ), + Element( + u'N405', Properties( + desc=u'Location Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=5, + codes=[u'RJ']) + ), + Element( + u'N406', Properties( + desc=u'Location Identifier', req_sit=u'S', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'N407', Properties( + desc=u'Country Subdivision Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=7, + codes=[]) + ), + ), + Segment( + u'PER', + Properties( + syntax=u'P0304 P0506 P0708', position=u'3800', req_sit=u'S', repeat=u'3', + desc=u'Dependent Benefit Related Entity Contact Information'), + Element( + u'PER01', Properties( + desc=u'Contact Function Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=1, + codes=[u'IC']) + ), + Element( + u'PER02', Properties( + desc=u'Name', req_sit=u'S', data_type=(u'AN', u'1', u'60'), + position=2, + codes=[]) + ), + Element( + u'PER03', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'ED', u'EM', u'FX', u'TE', u'UR', u'WP']) + ), + Element( + u'PER04', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=4, + codes=[]) + ), + Element( + u'PER05', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=5, + codes=[u'ED', u'EM', u'EX', u'FX', u'TE', u'UR', u'WP']) + ), + Element( + u'PER06', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=6, + codes=[]) + ), + Element( + u'PER07', Properties( + desc=u'Communication Number Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=7, + codes=[u'ED', u'EM', u'EX', u'FX', u'TE', u'UR', u'WP']) + ), + Element( + u'PER08', Properties( + desc=u'Communication Number', req_sit=u'S', + data_type=(u'AN', u'1', u'256'), position=8, + codes=[]) + ), + Element( + u'PER09', Properties( + desc=u'Contact Inquiry Reference', req_sit=u'N', + data_type=(u'AN', u'1', u'20'), position=9, + codes=[]) + ), + ), + Segment( + u'PRV', Properties( + syntax=u'P0203', position=u'3900', req_sit=u'S', repeat=u'1', + desc=u'Dependent Benefit Related Provider Information'), + Element( + u'PRV01', + Properties( + desc=u'Provider Code', req_sit=u'R', data_type=(u'ID', u'1', u'3'), + position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', + u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SB', u'SK', + u'SU']) + ), + Element( + u'PRV02', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'PXC']) + ), + Element( + u'PRV03', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=3, + codes=[]) + ), + Element( + u'PRV04', Properties( + desc=u'State or Province Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=4, + codes=[]) + ), + Composite( + u'C035', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'05', + desc=u'Provider Specialty Information'), + ), + Element( + u'PRV06', Properties( + desc=u'Provider Organization Code', req_sit=u'N', + data_type=(u'ID', u'3', u'3'), position=6, + codes=[]) + ), + ), + Segment( + u'LE', Properties( + syntax='', position=u'4000', req_sit=u'S', repeat=u'1', + desc=u'Loop Trailer'), + Element( + u'LE01', Properties( + desc=u'Loop Identifier Code', req_sit=u'R', + data_type=(u'AN', u'1', u'4'), position=1, + codes=[u'2120']) + ), + ), +) +parsed_271_2115D = Loop( + u'2115D', Properties( + position=u'1710', looptype='', repeat=u'10', req_sit=u'S', + desc=u'Dependent Eligibility or Benefit Additional Information'), + Segment( + u'III', Properties( + syntax=u'P0102 L030405', position=u'2600', req_sit=u'S', repeat=u'1', + desc=u'Dependent Eligibility or Benefit Additional Information'), + Element( + u'III01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=1, + codes=[u'GR', u'NI', u'ZZ']) + ), + Element( + u'III02', + Properties( + desc=u'Industry Code', req_sit=u'S', data_type=(u'AN', u'1', u'30'), + position=2, + codes=[]) + ), + Element( + u'III03', + Properties( + desc=u'Code Category', req_sit=u'S', data_type=(u'ID', u'2', u'2'), + position=3, + codes=[u'44']) + ), + Element( + u'III04', Properties( + desc=u'Free-form Message Text', req_sit=u'S', + data_type=(u'AN', u'1', u'264'), position=4, + codes=[]) + ), + Element( + u'III05', + Properties( + desc=u'Quantity', req_sit=u'N', data_type=(u'R', u'1', u'15'), + position=5, + codes=[]) + ), + Composite( + u'C001', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'06', + desc=u'Composite Unit of Measure'), + ), + Element( + u'III07', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=7, + codes=[]) + ), + Element( + u'III08', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=8, + codes=[]) + ), + Element( + u'III09', Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=9, + codes=[]) + ), + ), + Segment( + u'LS', + Properties( + syntax='', position=u'3300', req_sit=u'S', repeat=u'1', desc=u'Loop Header'), + Element( + u'LS01', Properties( + desc=u'Loop Identifier Code', req_sit=u'R', + data_type=(u'AN', u'1', u'4'), position=1, + codes=[u'2120']) + ), + ), + parsed_271_2120D, +) +parsed_271_2110D = Loop( + u'2110D', Properties( + position=u'1300', looptype='', repeat=u'>1', req_sit=u'S', + desc=u'Dependent Eligibility or Benefit Information'), + Segment( + u'EB', Properties( + syntax=u'P0910', position=u'1300', req_sit=u'R', repeat=u'1', + desc=u'Dependent Eligibility or Benefit Information'), + Element( + u'EB01', + Properties( + desc=u'Eligibility or Benefit Information Code', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=1, + codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'A', u'B', + u'C', u'CB', u'D', u'E', u'F', u'G', u'H', u'I', u'J', u'K', + u'L', u'M', u'MC', u'N', u'O', u'P', u'Q', u'R', u'S', u'T', + u'U', u'V', u'W', u'X', u'Y']) + ), + Element( + u'EB02', Properties( + desc=u'Coverage Level Code', req_sit=u'S', + data_type=(u'ID', u'3', u'3'), position=2, + codes=[u'CHD', u'DEP', u'ECH', u'EMP', u'ESP', u'FAM', + u'IND', u'SPC', u'SPO']) + ), + Element( + u'EB03', Properties( + desc=u'Service Type Code', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=3, + codes=[u'1', u'10', u'11', u'12', u'13', u'14', u'15', + u'16', u'17', u'18', u'19', u'2', u'20', u'21', + u'22', u'23', u'24', u'25', u'26', u'27', u'28', + u'3', u'30', u'32', u'33', u'34', u'35', u'36', + u'37', u'38', u'39', u'4', u'40', u'41', u'42', + u'43', u'44', u'45', u'46', u'47', u'48', u'49', + u'5', u'50', u'51', u'52', u'53', u'54', u'55', + u'56', u'57', u'58', u'59', u'6', u'60', u'61', + u'62', u'63', u'64', u'65', u'66', u'67', u'68', + u'69', u'7', u'70', u'71', u'72', u'73', u'74', + u'75', u'76', u'77', u'78', u'79', u'8', u'80', + u'81', u'82', u'83', u'84', u'85', u'86', u'87', + u'88', u'89', u'9', u'90', u'91', u'92', u'93', + u'94', u'95', u'96', u'97', u'98', u'99', u'A0', + u'A1', u'A2', u'A3', u'A4', u'A5', u'A6', u'A7', + u'A8', u'A9', u'AA', u'AB', u'AC', u'AD', u'AE', + u'AF', u'AG', u'AH', u'AI', u'AJ', u'AK', u'AL', + u'AM', u'AN', u'AO', u'AQ', u'AR', u'B1', u'B2', + u'B3', u'BA', u'BB', u'BC', u'BD', u'BE', u'BF', + u'BG', u'BH', u'BI', u'BJ', u'BK', u'BL', u'BM', + u'BN', u'BP', u'BQ', u'BR', u'BS', u'BT', u'BU', + u'BV', u'BW', u'BX', u'BY', u'BZ', u'C1', u'CA', + u'CB', u'CC', u'CD', u'CE', u'CF', u'CG', u'CH', + u'CI', u'CJ', u'CK', u'CL', u'CM', u'CN', u'CO', + u'CP', u'CQ', u'DG', u'DM', u'DS', u'GF', u'GN', + u'GY', u'IC', u'MH', u'NI', u'ON', u'PT', u'PU', + u'RN', u'RT', u'TC', u'TN', u'UC']) + ), + Element( + u'EB04', Properties( + desc=u'Insurance Type Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=4, + codes=[u'12', u'13', u'14', u'15', u'16', u'41', u'42', + u'43', u'47', u'AP', u'C1', u'CO', u'CP', u'D', + u'DB', u'EP', u'FF', u'GP', u'HM', u'HN', u'HS', + u'IN', u'IP', u'LC', u'LD', u'LI', u'LT', u'MA', + u'MB', u'MC', u'MH', u'MI', u'MP', u'OT', u'PE', + u'PL', u'PP', u'PR', u'PS', u'QM', u'RP', u'SP', + u'TF', u'WC', u'WU']) + ), + Element( + u'EB05', Properties( + desc=u'Plan Coverage Description', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=5, + codes=[]) + ), + Element( + u'EB06', Properties( + desc=u'Time Period Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=6, + codes=[u'13', u'21', u'22', u'23', u'24', u'25', u'26', + u'27', u'28', u'29', u'30', u'31', u'32', u'33', + u'34', u'35', u'36', u'6', u'7']) + ), + Element( + u'EB07', + Properties( + desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R', u'1', u'18'), + position=7, + codes=[]) + ), + Element( + u'EB08', Properties( + desc=u'Percentage as Decimal', req_sit=u'S', + data_type=(u'R', u'1', u'10'), position=8, + codes=[]) + ), + Element( + u'EB09', Properties( + desc=u'Quantity Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=9, + codes=[u'8H', u'99', u'CA', u'CE', u'D3', u'DB', u'DY', + u'HS', u'LA', u'LE', u'M2', u'MN', u'P6', u'QA', + u'S7', u'S8', u'VS', u'YY']) + ), + Element( + u'EB10', + Properties( + desc=u'Quantity', req_sit=u'S', data_type=(u'R', u'1', u'15'), + position=10, + codes=[]) + ), + Element( + u'EB11', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'S', + data_type=(u'ID', u'1', u'1'), position=11, + codes=[u'N', u'U', u'Y']) + ), + Element( + u'EB12', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'S', + data_type=(u'ID', u'1', u'1'), position=12, + codes=[u'N', u'U', u'W', u'Y']) + ), + Composite( + u'C003', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'13', + desc=u'Composite Medical Procedure Identifier'), + Element( + u'EB13-01', + Properties( + desc=u'Product/Service ID Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=0, + codes=[u'AD', u'CJ', u'HC', u'ID', u'IV', u'N4', u'ZZ']) + ), + Element( + u'EB13-02', Properties( + desc=u'Product/Service ID', req_sit=u'R', + data_type=(u'AN', u'1', u'48'), position=1, + codes=[]) + ), + Element( + u'EB13-03', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'EB13-04', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=3, + codes=[]) + ), + Element( + u'EB13-05', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=4, + codes=[]) + ), + Element( + u'EB13-06', Properties( + desc=u'Procedure Modifier', req_sit=u'S', + data_type=(u'AN', u'2', u'2'), position=5, + codes=[]) + ), + Element( + u'EB13-07', Properties( + desc=u'Description', req_sit=u'N', + data_type=(u'AN', u'1', u'80'), position=6, + codes=[]) + ), + Element( + u'EB13-08', Properties( + desc=u'Product/Service ID', req_sit=u'S', + data_type=(u'AN', u'1', u'48'), position=7, + codes=[]) + ), + ), + Composite( + u'C004', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'14', + desc=u'Composite Diagnosis Code Pointer'), + Element( + u'EB14-01', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'R', + data_type=(u'N0', u'1', u'2'), position=0, + codes=[]) + ), + Element( + u'EB14-02', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'S', + data_type=(u'N0', u'1', u'2'), position=1, + codes=[]) + ), + Element( + u'EB14-03', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'S', + data_type=(u'N0', u'1', u'2'), position=2, + codes=[]) + ), + Element( + u'EB14-04', Properties( + desc=u'Diagnosis Code Pointer', req_sit=u'S', + data_type=(u'N0', u'1', u'2'), position=3, + codes=[]) + ), + ), + ), + Segment( + u'HSD', Properties( + syntax=u'P0102 C0605', position=u'1350', req_sit=u'S', repeat=u'9', + desc=u'Health Care Services Delivery'), + Element( + u'HSD01', Properties( + desc=u'Quantity Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=1, + codes=[u'DY', u'FL', u'HS', u'MN', u'VS']) + ), + Element( + u'HSD02', + Properties( + desc=u'Quantity', req_sit=u'S', data_type=(u'R', u'1', u'15'), + position=2, + codes=[]) + ), + Element( + u'HSD03', Properties( + desc=u'Unit or Basis for Measurement Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'DA', u'MO', u'VS', u'WK', u'YR']) + ), + Element( + u'HSD04', Properties( + desc=u'Sample Selection Modulus', req_sit=u'S', + data_type=(u'R', u'1', u'6'), position=4, + codes=[]) + ), + Element( + u'HSD05', Properties( + desc=u'Time Period Qualifier', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=5, + codes=[u'21', u'22', u'23', u'24', u'25', u'26', u'27', + u'28', u'29', u'30', u'31', u'32', u'33', u'34', + u'35', u'6', u'7']) + ), + Element( + u'HSD06', Properties( + desc=u'Number of Periods', req_sit=u'S', + data_type=(u'N0', u'1', u'3'), position=6, + codes=[]) + ), + Element( + u'HSD07', + Properties( + desc=u'Ship/Delivery or Calendar Pattern Code', req_sit=u'S', + data_type=(u'ID', u'1', u'2'), position=7, + codes=[u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9', u'A', + u'B', u'C', u'D', u'E', u'F', u'G', u'H', u'J', u'K', u'L', + u'M', u'N', u'O', u'P', u'Q', u'R', u'S', u'SG', u'SL', u'SP', + u'SX', u'SY', u'SZ', u'T', u'U', u'V', u'W', u'X', u'Y']) + ), + Element( + u'HSD08', Properties( + desc=u'Ship/Delivery Pattern Time Code', req_sit=u'S', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'Y']) + ), + ), + Segment( + u'REF', Properties( + syntax=u'R0203', position=u'1400', req_sit=u'S', repeat=u'9', + desc=u'Dependent Additional Identification'), + Element( + u'REF01', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'18', u'1L', u'1W', u'49', u'6P', u'9F', u'ALS', + u'CLI', u'F6', u'FO', u'G1', u'IG', u'N6', u'NQ']) + ), + Element( + u'REF02', Properties( + desc=u'Reference Identification', req_sit=u'R', + data_type=(u'AN', u'1', u'50'), position=2, + codes=[]) + ), + Element( + u'REF03', + Properties( + desc=u'Description', req_sit=u'S', data_type=(u'AN', u'1', u'80'), + position=3, + codes=[]) + ), + Composite( + u'C040', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'04', + desc=u'Reference Identifier'), + ), + ), + Segment( + u'DTP', Properties( + syntax='', position=u'1500', req_sit=u'S', repeat=u'20', + desc=u'Dependent Eligibility/Benefit Date'), + Element( + u'DTP01', Properties( + desc=u'Date/Time Qualifier', req_sit=u'R', + data_type=(u'ID', u'3', u'3'), position=1, + codes=[u'096', u'193', u'194', u'198', u'290', u'291', + u'292', u'295', u'304', u'307', u'318', u'346', + u'348', u'349', u'356', u'357', u'435', u'472', + u'636', u'771']) + ), + Element( + u'DTP02', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'D8', u'RD8']) + ), + Element( + u'DTP03', Properties( + desc=u'Date Time Period', req_sit=u'R', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + ), + Segment( + u'AAA', Properties( + syntax='', position=u'1600', req_sit=u'S', repeat=u'9', + desc=u'Dependent Request Validation'), + Element( + u'AAA01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N', u'Y']) + ), + Element( + u'AAA02', Properties( + desc=u'Agency Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'AAA03', Properties( + desc=u'Reject Reason Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'15', u'33', u'52', u'53', u'54', u'55', u'56', + u'57', u'60', u'61', u'62', u'63', u'69', u'70', + u'98', u'AA', u'AE', u'AF', u'AG', u'AO', u'CI', + u'E8', u'IA', u'MA']) + ), + Element( + u'AAA04', Properties( + desc=u'Follow-up Action Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'C', u'N', u'R', u'W', u'X', u'Y']) + ), + ), + parsed_271_2115D, + Segment( + u'MSG', Properties( + syntax=u'C0302', position=u'2500', req_sit=u'S', repeat=u'10', + desc=u'Message Text'), + Element( + u'MSG01', Properties( + desc=u'Free-form Message Text', req_sit=u'R', + data_type=(u'AN', u'1', u'264'), position=1, + codes=[]) + ), + Element( + u'MSG02', Properties( + desc=u'Printer Carriage Control Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'MSG03', + Properties( + desc=u'Number', req_sit=u'N', data_type=(u'N0', u'1', u'9'), + position=3, + codes=[]) + ), + ), Segment( + u'III', Properties( + syntax=u'P0102 L030405', position=u'2600', req_sit=u'S', + repeat=u'1', + desc=u'Dependent Eligibility or Benefit Additional ' + u'Information'), + Element( + u'III01', + Properties( + desc=u'Code List Qualifier Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=1, + codes=[u'GR', u'NI', u'ZZ']) + ), + Element( + u'III02', Properties( + desc=u'Industry Code', req_sit=u'S', + data_type=(u'AN', u'1', u'30'), position=2, + codes=[]) + ), + Element( + u'III03', Properties( + desc=u'Code Category', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'44']) + ), + Element( + u'III04', Properties( + desc=u'Free-form Message Text', req_sit=u'S', + data_type=(u'AN', u'1', u'264'), position=4, + codes=[]) + ), + Element( + u'III05', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Composite( + u'C001', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'06', + desc=u'Composite Unit of Measure'), + ), + Element( + u'III07', + Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=7, + codes=[]) + ), + Element( + u'III08', + Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=8, + codes=[]) + ), + Element( + u'III09', + Properties( + desc=u'Surface/Layer/Position Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=9, + codes=[]) + ), + ), + Segment( + u'LS', + Properties( + syntax='', position=u'2700', req_sit=u'S', repeat=u'1', desc=u'Loop Header'), + Element( + u'LS01', Properties( + desc=u'Loop Identifier Code', req_sit=u'R', + data_type=(u'AN', u'1', u'4'), position=1, + codes=[u'2120']) + ), + ), + parsed_271_2120D, +) +parsed_271_2100D = Loop( + u'2100D', + Properties( + position=u'0300', looptype='', repeat=u'1', req_sit=u'R', desc=u'Dependent Name'), + Segment( + u'NM1', + Properties( + syntax=u'P0809 C1110 C1203', position=u'0300', req_sit=u'R', repeat=u'1', + desc=u'Dependent Name'), + Element( + u'NM101', Properties( + desc=u'Entity Identifier Code', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'03']) + ), + Element( + u'NM102', Properties( + desc=u'Entity Type Qualifier', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=2, + codes=[u'1']) + ), + Element( + u'NM103', Properties( + desc=u'Name Last or Organization Name', req_sit=u'S', + data_type=(u'AN', u'1', u'60'), position=3, + codes=[]) + ), + Element( + u'NM104', + Properties( + desc=u'Name First', req_sit=u'S', data_type=(u'AN', u'1', u'35'), + position=4, + codes=[]) + ), + Element( + u'NM105', + Properties( + desc=u'Name Middle', req_sit=u'S', data_type=(u'AN', u'1', u'25'), + position=5, + codes=[]) + ), + Element( + u'NM106', + Properties( + desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN', u'1', u'10'), + position=6, + codes=[]) + ), + Element( + u'NM107', + Properties( + desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN', u'1', u'10'), + position=7, + codes=[]) + ), + Element( + u'NM108', Properties( + desc=u'Identification Code Qualifier', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[]) + ), + Element( + u'NM109', Properties( + desc=u'Identification Code', req_sit=u'N', + data_type=(u'AN', u'2', u'80'), position=9, + codes=[]) + ), + Element( + u'NM110', Properties( + desc=u'Entity Relationship Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=10, + codes=[]) + ), + Element( + u'NM111', Properties( + desc=u'Entity Identifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'NM112', Properties( + desc=u'Name Last or Organization Name', req_sit=u'N', + data_type=(u'AN', u'1', u'60'), position=12, + codes=[]) + ), + ), + Segment( + u'REF', Properties( + syntax=u'R0203', position=u'0400', req_sit=u'S', repeat=u'9', + desc=u'Dependent Additional Identification'), + Element( + u'REF01', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'18', u'1L', u'1W', u'49', u'6P', u'CE', u'CT', + u'EA', u'EJ', u'F6', u'GH', u'HJ', u'IF', u'IG', + u'MRC', u'N6', u'NQ', u'Q4', u'SY', u'Y4']) + ), + Element( + u'REF02', Properties( + desc=u'Reference Identification', req_sit=u'R', + data_type=(u'AN', u'1', u'50'), position=2, + codes=[]) + ), + Element( + u'REF03', + Properties( + desc=u'Description', req_sit=u'S', data_type=(u'AN', u'1', u'80'), + position=3, + codes=[]) + ), + Composite( + u'C040', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'04', + desc=u'Reference Identifier'), + ), + ), + Segment( + u'N3', Properties( + syntax='', position=u'0600', req_sit=u'S', repeat=u'1', + desc=u'Dependent Address'), + Element( + u'N301', Properties( + desc=u'Address Information', req_sit=u'R', + data_type=(u'AN', u'1', u'55'), position=1, + codes=[]) + ), + Element( + u'N302', Properties( + desc=u'Address Information', req_sit=u'S', + data_type=(u'AN', u'1', u'55'), position=2, + codes=[]) + ), + ), + Segment( + u'N4', + Properties( + syntax=u'E0207 C0605 C0704', position=u'0700', req_sit=u'S', repeat=u'1', + desc=u'Dependent City, State, ZIP Code'), + Element( + u'N401', + Properties( + desc=u'City Name', req_sit=u'R', data_type=(u'AN', u'2', u'30'), + position=1, + codes=[]) + ), + Element( + u'N402', Properties( + desc=u'State or Province Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'N403', + Properties( + desc=u'Postal Code', req_sit=u'S', data_type=(u'ID', u'3', u'15'), + position=3, + codes=[]) + ), + Element( + u'N404', + Properties( + desc=u'Country Code', req_sit=u'S', data_type=(u'ID', u'2', u'3'), + position=4, + codes=[]) + ), + Element( + u'N405', Properties( + desc=u'Location Qualifier', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=5, + codes=[]) + ), + Element( + u'N406', Properties( + desc=u'Location Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'N407', Properties( + desc=u'Country Subdivision Code', req_sit=u'S', + data_type=(u'ID', u'1', u'3'), position=7, + codes=[]) + ), + ), + Segment( + u'AAA', Properties( + syntax='', position=u'0850', req_sit=u'S', repeat=u'9', + desc=u'Dependent Request Validation'), + Element( + u'AAA01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N', u'Y']) + ), + Element( + u'AAA02', Properties( + desc=u'Agency Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[]) + ), + Element( + u'AAA03', Properties( + desc=u'Reject Reason Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=3, + codes=[u'15', u'35', u'42', u'43', u'45', u'47', u'48', + u'49', u'51', u'52', u'56', u'57', u'58', u'60', + u'61', u'62', u'63', u'64', u'65', u'66', u'67', + u'68', u'71', u'77']) + ), + Element( + u'AAA04', Properties( + desc=u'Follow-up Action Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'C', u'N', u'R', u'S', u'W', u'X', u'Y']) + ), + ), + Segment( + u'PRV', Properties( + syntax=u'P0203', position=u'0900', req_sit=u'S', repeat=u'1', + desc=u'Provider Information'), + Element( + u'PRV01', + Properties( + desc=u'Provider Code', req_sit=u'R', data_type=(u'ID', u'1', u'3'), + position=1, + codes=[u'AD', u'AT', u'BI', u'CO', u'CV', u'H', u'HH', u'LA', u'OT', + u'P1', u'P2', u'PC', u'PE', u'R', u'RF', u'SK', u'SU']) + ), + Element( + u'PRV02', Properties( + desc=u'Reference Identification Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'PXC']) + ), + Element( + u'PRV03', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=3, + codes=[]) + ), + Element( + u'PRV04', Properties( + desc=u'State or Province Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=4, + codes=[]) + ), + Composite( + u'C035', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'05', + desc=u'Provider Specialty Information'), + ), + Element( + u'PRV06', Properties( + desc=u'Provider Organization Code', req_sit=u'N', + data_type=(u'ID', u'3', u'3'), position=6, + codes=[]) + ), + ), + Segment( + u'DMG', + Properties( + syntax=u'P0102 P1011 C1105', position=u'1000', req_sit=u'S', repeat=u'1', + desc=u'Dependent Demographic Information'), + Element( + u'DMG01', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=1, + codes=[u'D8']) + ), + Element( + u'DMG02', Properties( + desc=u'Date Time Period', req_sit=u'S', + data_type=(u'AN', u'1', u'35'), position=2, + codes=[]) + ), + Element( + u'DMG03', + Properties( + desc=u'Gender Code', req_sit=u'S', data_type=(u'ID', u'1', u'1'), + position=3, + codes=[u'F', u'M', u'U']) + ), + Element( + u'DMG04', Properties( + desc=u'Marital Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[]) + ), + Composite( + u'C056', Properties( + req_sit=u'N', repeat=u'10', refdes='', seq=u'05', + desc=u'Composite Race or Ethnicity Information'), + ), + Element( + u'DMG06', Properties( + desc=u'Citizenship Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=6, + codes=[]) + ), + Element( + u'DMG07', + Properties( + desc=u'Country Code', req_sit=u'N', data_type=(u'ID', u'2', u'3'), + position=7, + codes=[]) + ), + Element( + u'DMG08', Properties( + desc=u'Basis of Verification Code', req_sit=u'N', + data_type=(u'ID', u'1', u'2'), position=8, + codes=[]) + ), + Element( + u'DMG09', + Properties( + desc=u'Quantity', req_sit=u'N', data_type=(u'R', u'1', u'15'), + position=9, + codes=[]) + ), + Element( + u'DMG10', Properties( + desc=u'Code List Qualifier Code', req_sit=u'N', + data_type=(u'ID', u'1', u'3'), position=10, + codes=[]) + ), + Element( + u'DMG11', + Properties( + desc=u'Industry Code', req_sit=u'N', data_type=(u'AN', u'1', u'30'), + position=11, + codes=[]) + ), + ), + Segment( + u'INS', Properties( + syntax=u'P1112', position=u'1100', req_sit=u'S', repeat=u'1', + desc=u'Dependent Relationship'), + Element( + u'INS01', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'N']) + ), + Element( + u'INS02', Properties( + desc=u'Individual Relationship Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[u'01', u'19', u'20', u'21', u'39', u'40', u'53', + u'G8']) + ), + Element( + u'INS03', Properties( + desc=u'Maintenance Type Code', req_sit=u'S', + data_type=(u'ID', u'3', u'3'), position=3, + codes=[u'001']) + ), + Element( + u'INS04', Properties( + desc=u'Maintenance Reason Code', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=4, + codes=[u'25']) + ), + Element( + u'INS05', Properties( + desc=u'Benefit Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=5, + codes=[]) + ), + Composite( + u'C052', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'06', + desc=u'Medicare Status Code'), + ), + Element( + u'INS07', Properties( + desc=u'Consolidated Omnibus Budget Reconciliation Act (COBRA) Qualifying', + req_sit=u'N', data_type=(u'ID', u'1', u'2'), position=7, + codes=[]) + ), + Element( + u'INS08', Properties( + desc=u'Employment Status Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=8, + codes=[]) + ), + Element( + u'INS09', Properties( + desc=u'Student Status Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=9, + codes=[]) + ), + Element( + u'INS10', Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=10, + codes=[]) + ), + Element( + u'INS11', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=11, + codes=[]) + ), + Element( + u'INS12', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=12, + codes=[]) + ), + Element( + u'INS13', Properties( + desc=u'Confidentiality Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=13, + codes=[]) + ), + Element( + u'INS14', + Properties( + desc=u'City Name', req_sit=u'N', data_type=(u'AN', u'2', u'30'), + position=14, + codes=[]) + ), + Element( + u'INS15', Properties( + desc=u'State or Province Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=15, + codes=[]) + ), + Element( + u'INS16', + Properties( + desc=u'Country Code', req_sit=u'N', data_type=(u'ID', u'2', u'3'), + position=16, + codes=[]) + ), + Element( + u'INS17', + Properties( + desc=u'Number', req_sit=u'S', data_type=(u'N0', u'1', u'9'), + position=17, + codes=[]) + ), + ), + Segment( + u'HI', Properties( + syntax='', position=u'1150', req_sit=u'S', repeat=u'1', + desc=u'Dependent Health Care Diagnosis Code'), + Composite( + u'C022', Properties( + req_sit=u'R', repeat='', refdes='', seq=u'01', + desc=u'Health Care Code Information'), + Element( + u'HI01-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABK', u'BK']) + ), + Element( + u'HI01-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI01-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI01-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI01-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI01-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI01-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI01-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI01-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'02', + desc=u'Health Care Code Information'), + Element( + u'HI02-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI02-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI02-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI02-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI02-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI02-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI02-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI02-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI02-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'03', + desc=u'Health Care Code Information'), + Element( + u'HI03-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI03-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI03-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI03-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI03-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI03-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI03-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI03-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI03-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'04', + desc=u'Health Care Code Information'), + Element( + u'HI04-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI04-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI04-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI04-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI04-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI04-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI04-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI04-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI04-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'05', + desc=u'Health Care Code Information'), + Element( + u'HI05-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI05-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI05-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI05-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI05-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI05-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI05-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI05-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI05-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'06', + desc=u'Health Care Code Information'), + Element( + u'HI06-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI06-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI06-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI06-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI06-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI06-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI06-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI06-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI06-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'07', + desc=u'Health Care Code Information'), + Element( + u'HI07-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI07-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI07-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI07-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI07-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI07-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI07-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI07-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI07-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'S', repeat='', refdes='', seq=u'08', + desc=u'Health Care Code Information'), + Element( + u'HI08-01', Properties( + desc=u'Code List Qualifier Code', req_sit=u'R', + data_type=(u'ID', u'1', u'3'), position=0, + codes=[u'ABF', u'BF']) + ), + Element( + u'HI08-02', Properties( + desc=u'Industry Code', req_sit=u'R', + data_type=(u'AN', u'1', u'30'), position=1, + codes=[]) + ), + Element( + u'HI08-03', + Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'N', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[]) + ), + Element( + u'HI08-04', Properties( + desc=u'Date Time Period', req_sit=u'N', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + Element( + u'HI08-05', Properties( + desc=u'Monetary Amount', req_sit=u'N', + data_type=(u'R', u'1', u'18'), position=4, + codes=[]) + ), + Element( + u'HI08-06', Properties( + desc=u'Quantity', req_sit=u'N', + data_type=(u'R', u'1', u'15'), position=5, + codes=[]) + ), + Element( + u'HI08-07', Properties( + desc=u'Version Identifier', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=6, + codes=[]) + ), + Element( + u'HI08-08', Properties( + desc=u'Industry Code', req_sit=u'N', + data_type=(u'AN', u'1', u'30'), position=7, + codes=[]) + ), + Element( + u'HI08-09', + Properties( + desc=u'Yes/No Condition or Response Code', req_sit=u'N', + data_type=(u'ID', u'1', u'1'), position=8, + codes=[]) + ), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'09', + desc=u'Health Care Code Information'), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'10', + desc=u'Health Care Code Information'), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'11', + desc=u'Health Care Code Information'), + ), + Composite( + u'C022', Properties( + req_sit=u'N', repeat='', refdes='', seq=u'12', + desc=u'Health Care Code Information'), + ), + ), + Segment( + u'DTP', Properties( + syntax='', position=u'1200', req_sit=u'S', repeat=u'9', + desc=u'Dependent Date'), + Element( + u'DTP01', Properties( + desc=u'Date/Time Qualifier', req_sit=u'R', + data_type=(u'ID', u'3', u'3'), position=1, + codes=[u'096', u'102', u'152', u'291', u'307', u'318', + u'340', u'341', u'342', u'343', u'346', u'347', + u'356', u'357', u'382', u'435', u'442', u'458', + u'472', u'539', u'540', u'636', u'771']) + ), + Element( + u'DTP02', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'R', + data_type=(u'ID', u'2', u'3'), position=2, + codes=[u'D8', u'RD8']) + ), + Element( + u'DTP03', Properties( + desc=u'Date Time Period', req_sit=u'R', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[]) + ), + ), + Segment( + u'MPI', Properties( + syntax=u'P0607', position=u'1275', req_sit=u'S', repeat=u'1', + desc=u'Dependent Military Personnel Information'), + Element( + u'MPI01', Properties( + desc=u'Information Status Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=1, + codes=[u'A', u'C', u'L', u'O', u'P', u'S', u'T']) + ), + Element( + u'MPI02', Properties( + desc=u'Employment Status Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[u'AE', u'AO', u'AS', u'AT', u'AU', u'CC', u'DD', + u'HD', u'IR', u'LX', u'PE', u'RE', u'RM', u'RR', + u'RU']) + ), + Element( + u'MPI03', Properties( + desc=u'Government Service Affiliation Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=3, + codes=[u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'H', + u'I', u'J', u'K', u'L', u'M', u'N', u'O', u'Q', + u'R', u'S', u'U', u'W']) + ), + Element( + u'MPI04', + Properties( + desc=u'Description', req_sit=u'S', data_type=(u'AN', u'1', u'80'), + position=4, + codes=[]) + ), + Element( + u'MPI05', Properties( + desc=u'Military Service Rank Code', req_sit=u'S', + data_type=(u'ID', u'2', u'2'), position=5, + codes=[u'A1', u'A2', u'A3', u'B1', u'B2', u'C1', u'C2', + u'C3', u'C4', u'C5', u'C6', u'C7', u'C8', u'C9', + u'E1', u'F1', u'F2', u'F3', u'F4', u'G1', u'G4', + u'L1', u'L2', u'L3', u'L4', u'L5', u'L6', u'M1', + u'M2', u'M3', u'M4', u'M5', u'M6', u'P1', u'P2', + u'P3', u'P4', u'P5', u'R1', u'R2', u'S1', u'S2', + u'S3', u'S4', u'S5', u'S6', u'S7', u'S8', u'S9', + u'SA', u'SB', u'SC', u'T1', u'V1', u'W1']) + ), + Element( + u'MPI06', Properties( + desc=u'Date Time Period Format Qualifier', req_sit=u'S', + data_type=(u'ID', u'2', u'3'), position=6, + codes=[u'D8', u'RD8']) + ), + Element( + u'MPI07', Properties( + desc=u'Date Time Period', req_sit=u'S', + data_type=(u'AN', u'1', u'35'), position=7, + codes=[]) + ), + ), + parsed_271_2110D, +) +parsed_271_2000D = Loop( + u'2000D', + Properties( + position=u'0150', looptype='', repeat=u'>1', req_sit=u'S', desc=u'Dependent Level'), + Segment( + u'HL', Properties( + syntax='', position=u'0100', req_sit=u'R', repeat=u'1', + desc=u'Dependent Level'), + Element( + u'HL01', Properties( + desc=u'Hierarchical ID Number', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=1, + codes=[]) + ), + Element( + u'HL02', Properties( + desc=u'Hierarchical Parent ID Number', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=2, + codes=[]) + ), + Element( + u'HL03', Properties( + desc=u'Hierarchical Level Code', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=3, + codes=[u'23']) + ), + Element( + u'HL04', Properties( + desc=u'Hierarchical Child Code', req_sit=u'R', + data_type=(u'ID', u'1', u'1'), position=4, + codes=[u'0']) + ), + ), + Segment( + u'TRN', Properties( + syntax='', position=u'0200', req_sit=u'S', repeat=u'3', + desc=u'Dependent Trace Number'), + Element( + u'TRN01', + Properties( + desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID', u'1', u'2'), + position=1, + codes=[u'1', u'2']) + ), + Element( + u'TRN02', Properties( + desc=u'Reference Identification', req_sit=u'R', + data_type=(u'AN', u'1', u'50'), position=2, + codes=[]) + ), + Element( + u'TRN03', Properties( + desc=u'Originating Company Identifier', req_sit=u'R', + data_type=(u'AN', u'10', u'10'), position=3, + codes=[]) + ), + Element( + u'TRN04', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=4, + codes=[]) + ), + ), + parsed_271_2100D, +) +parsed_271_ST_LOOP = Loop( + u'ST_LOOP', Properties( + position=u'0200', looptype=u'explicit', repeat=u'>1', req_sit=u'R', + desc=u'Transaction Set Header'), + Segment( + u'ST', Properties( + syntax='', position=u'0100', req_sit=u'R', repeat=u'1', + desc=u'Transaction Set Header'), + Element( + u'ST01', Properties( + desc=u'Transaction Set Identifier Code', req_sit=u'R', + data_type=(u'ID', u'3', u'3'), position=1, + codes=[u'271']) + ), + Element( + u'ST02', Properties( + desc=u'Transaction Set Control Number', req_sit=u'R', + data_type=(u'AN', u'4', u'9'), position=2, + codes=[]) + ), + Element( + u'ST03', Properties( + desc=u'Implementation Convention Reference', req_sit=u'R', + data_type=(u'AN', u'1', u'35'), position=3, + codes=[u'005010X279A1']) + ), + ), + Segment( + u'BHT', Properties( + syntax='', position=u'0110', req_sit=u'R', repeat=u'1', + desc=u'Beginning of Hierarchical Transaction'), + Element( + u'BHT01', Properties( + desc=u'Hierarchical Structure Code', req_sit=u'R', + data_type=(u'ID', u'4', u'4'), position=1, + codes=[u'0022']) + ), + Element( + u'BHT02', Properties( + desc=u'Transaction Set Purpose Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=2, + codes=[u'06', u'11']) + ), + Element( + u'BHT03', Properties( + desc=u'Reference Identification', req_sit=u'S', + data_type=(u'AN', u'1', u'50'), position=3, + codes=[]) + ), + Element( + u'BHT04', + Properties( + desc=u'Date', req_sit=u'R', data_type=(u'DT', u'8', u'8'), + position=4, + codes=[]) + ), + Element( + u'BHT05', + Properties( + desc=u'Time', req_sit=u'R', data_type=(u'TM', u'4', u'8'), + position=5, + codes=[]) + ), + Element( + u'BHT06', Properties( + desc=u'Transaction Type Code', req_sit=u'N', + data_type=(u'ID', u'2', u'2'), position=6, + codes=[]) + ), + ), + parsed_271_2000A, + parsed_271_2000B, + parsed_271_2000C, + parsed_271_2000D, + Segment( + u'SE', Properties( + syntax='', position=u'4100', req_sit=u'R', repeat=u'1', + desc=u'Transaction Set Trailer'), + Element( + u'SE01', Properties( + desc=u'Number of Included Segments', req_sit=u'R', + data_type=(u'N0', u'1', u'10'), position=1, + codes=[]) + ), + Element( + u'SE02', Properties( + desc=u'Transaction Set Control Number', req_sit=u'R', + data_type=(u'AN', u'4', u'9'), position=2, + codes=[]) + ), + ), +) +parsed_271_GS_LOOP = Loop( + u'GS_LOOP', Properties( + position=u'0200', looptype=u'explicit', repeat=u'>1', req_sit=u'R', + desc=u'Functional Group Header'), + Segment( + u'GS', Properties( + syntax='', position=u'0100', req_sit=u'R', repeat=u'1', + desc=u'Functional Group Header'), + Element( + u'GS01', Properties( + desc=u'Functional Identifier Code', req_sit=u'R', + data_type=(u'ID', u'2', u'2'), position=1, + codes=[u'HB']) + ), + Element( + u'GS02', Properties( + desc=u'Application Senders Code', req_sit=u'R', + data_type=(u'AN', u'2', u'15'), position=2, + codes=[]) + ), + Element( + u'GS03', Properties( + desc=u'124', req_sit=u'R', data_type=(u'AN', u'2', u'15'), + position=3, + codes=[]) + ), + Element( + u'GS04', Properties( + desc=u'Date', req_sit=u'R', data_type=(u'DT', u'8', u'8'), + position=4, + codes=[]) + ), + Element( + u'GS05', Properties( + desc=u'Time', req_sit=u'R', data_type=(u'TM', u'4', u'8'), + position=5, + codes=[]) + ), + Element( + u'GS06', Properties( + desc=u'Group Control Number', req_sit=u'R', + data_type=(u'N0', u'1', u'9'), position=6, + codes=[]) + ), + Element( + u'GS07', Properties( + desc=u'Responsible Agency Code', req_sit=u'R', + data_type=(u'ID', u'1', u'2'), position=7, + codes=[u'X']) + ), + Element( + u'GS08', + Properties( + desc=u'Version / Release / Industry Identifier Code', req_sit=u'R', + data_type=(u'AN', u'1', u'12'), position=8, + codes=[u'005010X279A1']) + ), + ), + parsed_271_ST_LOOP, + Segment( + u'GE', Properties( + syntax='', position=u'0300', req_sit=u'R', repeat=u'1', + desc=u'Functional Group Trailer'), + Element( + u'GE01', Properties( + desc=u'97', req_sit=u'R', data_type=(u'N0', u'1', u'6'), + position=1, + codes=[]) + ), + Element( + u'GE02', Properties( + desc=u'Group Control Number', req_sit=u'R', + data_type=(u'N0', u'1', u'9'), position=2, + codes=[]) + ), + ), +) +parsed_271_ISA_LOOP = Loop( + u'ISA_LOOP', Properties( + position=u'0010', looptype=u'explicit', repeat=u'>1', req_sit=u'R', + desc=u'Interchange Control Header'), + Segment( + u'ISA', Properties( + syntax='', position=u'0100', req_sit=u'R', repeat=u'1', + desc=u'Interchange Control Header'), + Element( + u'ISA01', + Properties( + desc=u'I01', req_sit=u'R', data_type=(u'ID', u'2', u'2'), + position=1, + codes=[u'00', u'03']) + ), + Element( + u'ISA02', + Properties( + desc=u'I02', req_sit=u'R', data_type=(u'AN', u'10', u'10'), + position=2, + codes=[]) + ), + Element( + u'ISA03', + Properties( + desc=u'I03', req_sit=u'R', data_type=(u'ID', u'2', u'2'), + position=3, + codes=[u'00', u'01']) + ), + Element( + u'ISA04', + Properties( + desc=u'I04', req_sit=u'R', data_type=(u'AN', u'10', u'10'), + position=4, + codes=[]) + ), + Element( + u'ISA05', + Properties( + desc=u'I05', req_sit=u'R', data_type=(u'ID', u'2', u'2'), + position=5, + codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', + u'ZZ']) + ), + Element( + u'ISA06', + Properties( + desc=u'I06', req_sit=u'R', data_type=(u'AN', u'15', u'15'), + position=6, + codes=[]) + ), + Element( + u'ISA07', + Properties( + desc=u'I05', req_sit=u'R', data_type=(u'ID', u'2', u'2'), + position=7, + codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', + u'ZZ']) + ), + Element( + u'ISA08', + Properties( + desc=u'I07', req_sit=u'R', data_type=(u'AN', u'15', u'15'), + position=8, + codes=[]) + ), + Element( + u'ISA09', + Properties( + desc=u'I08', req_sit=u'R', data_type=(u'DT', u'6', u'6'), + position=9, + codes=[]) + ), + Element( + u'ISA10', + Properties( + desc=u'I09', req_sit=u'R', data_type=(u'TM', u'4', u'4'), + position=10, + codes=[]) + ), + Element( + u'ISA11', + Properties( + desc=u'I65', req_sit=u'R', data_type=(u'AN', u'1', u'1'), + position=11, + codes=[]) + ), + Element( + u'ISA12', + Properties( + desc=u'I11', req_sit=u'R', data_type=(u'ID', u'5', u'5'), + position=12, + codes=[u'00501']) + ), + Element( + u'ISA13', + Properties( + desc=u'I12', req_sit=u'R', data_type=(u'N0', u'9', u'9'), + position=13, + codes=[]) + ), + Element( + u'ISA14', + Properties( + desc=u'I13', req_sit=u'R', data_type=(u'ID', u'1', u'1'), + position=14, + codes=[u'0', u'1']) + ), + Element( + u'ISA15', + Properties( + desc=u'I14', req_sit=u'R', data_type=(u'ID', u'1', u'1'), + position=15, + codes=[u'P', u'T']) + ), + Element( + u'ISA16', + Properties( + desc=u'I15', req_sit=u'R', data_type=(u'AN', u'1', u'1'), + position=16, + codes=[]) + ), + ), + parsed_271_GS_LOOP, + Segment( + u'TA1', Properties( + syntax='', position=u'0200', req_sit=u'S', repeat=u'1', + desc=u'Interchange Acknowledgement'), + Element( + u'TA101', + Properties( + desc=u'I12', req_sit=u'R', data_type=(u'N0', u'9', u'9'), + position=1, + codes=[]) + ), + Element( + u'TA102', + Properties( + desc=u'I08', req_sit=u'R', data_type=(u'DT', u'6', u'6'), + position=2, + codes=[]) + ), + Element( + u'TA103', + Properties( + desc=u'I09', req_sit=u'R', data_type=(u'TM', u'4', u'4'), + position=3, + codes=[]) + ), + Element( + u'TA104', + Properties( + desc=u'I17', req_sit=u'R', data_type=(u'ID', u'1', u'1'), + position=4, + codes=[u'A', u'E', u'R']) + ), + Element( + u'TA105', + Properties( + desc=u'I18', req_sit=u'R', data_type=(u'ID', u'3', u'3'), + position=5, + codes=[u'000', u'001', u'002', u'003', u'004', u'005', u'006', + u'007', u'008', u'009', u'010', u'011', u'012', u'013', + u'014', u'015', u'016', u'017', u'018', u'019', u'020', + u'021', u'022', u'023', u'024', u'025', u'026', u'027', + u'028', u'029', u'030', u'031']) + ), + ), + Segment( + u'IEA', Properties( + syntax='', position=u'0300', req_sit=u'R', repeat=u'1', + desc=u'Interchange Control Trailer'), + Element( + u'IEA01', + Properties( + desc=u'I16', req_sit=u'R', data_type=(u'N0', u'1', u'5'), + position=1, + codes=[]) + ), + Element( + u'IEA02', + Properties( + desc=u'I12', req_sit=u'R', data_type=(u'N0', u'9', u'9'), + position=2, + codes=[]) + ), + ), +) +parsed_271 = Message( + u'271B1', Properties( + desc=u'HIPAA Health Care Eligibility Benefit Response 005010X279A1 271B1'), + parsed_271_ISA_LOOP, +) diff --git a/tigershark/parsers/M276_4010_X093_A1.py b/tigershark/parsers/M276_4010_X093_A1.py index 741d38c..d7d92f7 100644 --- a/tigershark/parsers/M276_4010_X093_A1.py +++ b/tigershark/parsers/M276_4010_X093_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:58.308041 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_276_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_276_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0010'] ) ), @@ -18,7 +18,7 @@ codes=[] ) ), ), ) -parsed_276_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Payer Name'), +parsed_276_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -64,7 +64,7 @@ codes=[] ) ), ), ) -parsed_276_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Information Receiver Name'), +parsed_276_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Information Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Information Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'41'] ) ), @@ -90,7 +90,7 @@ codes=[] ) ), ), ) -parsed_276_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Provider Name'), +parsed_276_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P'] ) ), @@ -116,7 +116,7 @@ codes=[] ) ), ), ) -parsed_276_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Subscriber Name'), +parsed_276_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL', u'QC'] ) ), @@ -142,7 +142,7 @@ codes=[] ) ), ), ) -parsed_276_2210D = Loop( u'2210D', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Service Line Information'), +parsed_276_2210D = Loop( u'2210D', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, @@ -192,7 +192,7 @@ codes=[] ) ), ), ) -parsed_276_2200D = Loop( u'2200D', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'S',desc=u'Claim Submitter Trace Number'), +parsed_276_2200D = Loop( u'2200D', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'S',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'1'] ) ), @@ -261,7 +261,7 @@ ), parsed_276_2210D, ) -parsed_276_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Dependent Name'), +parsed_276_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -287,7 +287,7 @@ codes=[] ) ), ), ) -parsed_276_2210E = Loop( u'2210E', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Service Line Information'), +parsed_276_2210E = Loop( u'2210E', Properties(looptype='',repeat=u'>1',pos=u'130',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, @@ -337,7 +337,7 @@ codes=[] ) ), ), ) -parsed_276_2200E = Loop( u'2200E', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'R',desc=u'Claim Submitter Trace Number'), +parsed_276_2200E = Loop( u'2200E', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'R',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'1'] ) ), @@ -396,7 +396,7 @@ ), parsed_276_2210E, ) -parsed_276_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'100',req_sit=u'S',desc=u'Dependent Level'), +parsed_276_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'100',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -430,7 +430,7 @@ parsed_276_2100E, parsed_276_2200E, ) -parsed_276_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Subscriber Level'), +parsed_276_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -465,7 +465,7 @@ parsed_276_2200D, parsed_276_2000E, ) -parsed_276_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Service Provider Level'), +parsed_276_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Service Provider Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Provider Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -479,7 +479,7 @@ parsed_276_2100C, parsed_276_2000D, ) -parsed_276_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Information Receiver Level'), +parsed_276_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Information Receiver Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Receiver Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -493,7 +493,7 @@ parsed_276_2100B, parsed_276_2000C, ) -parsed_276_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), +parsed_276_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Source Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -507,10 +507,10 @@ parsed_276_2100A, parsed_276_2000B, ) -parsed_276_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_276_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_276_2000A, ) -parsed_276_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_276_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'276'] ) ), @@ -526,7 +526,7 @@ codes=[] ) ), ), ) -parsed_276_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_276_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HN', u'HR'] ) ), @@ -553,7 +553,7 @@ codes=[] ) ), ), ) -parsed_276_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_276_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -608,7 +608,7 @@ codes=[] ) ), ), ) -parsed_276 = Message( u'276', Properties(desc=u'HIPAA Health Care Claim Status Request X093A1-276'), +parsed_276 = Message( u'276', Properties(desc=u'HIPAA Health Care Claim Status Request X093A1-276'), parsed_276_ISA_LOOP, ) diff --git a/tigershark/parsers/M277U_4010_X070.py b/tigershark/parsers/M277U_4010_X070.py index a0bb005..5696fba 100644 --- a/tigershark/parsers/M277U_4010_X070.py +++ b/tigershark/parsers/M277U_4010_X070.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:58.682345 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_277U_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_277U_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0010'] ) ), @@ -18,7 +18,7 @@ codes=[u'NO'] ) ), ), ) -parsed_277U_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Payer Name'), +parsed_277U_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -64,7 +64,7 @@ codes=[] ) ), ), ) -parsed_277U_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Information Receiver Name'), +parsed_277U_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Information Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Information Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'41'] ) ), @@ -90,7 +90,7 @@ codes=[] ) ), ), ) -parsed_277U_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Provider Name'), +parsed_277U_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P'] ) ), @@ -116,7 +116,7 @@ codes=[] ) ), ), ) -parsed_277U_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Subscriber Name'), +parsed_277U_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL', u'QC'] ) ), @@ -142,7 +142,7 @@ codes=[] ) ), ), ) -parsed_277U_2220D = Loop( u'2220D', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), +parsed_277U_2220D = Loop( u'2220D', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'180',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, @@ -236,7 +236,7 @@ codes=[] ) ), ), ) -parsed_277U_2200D = Loop( u'2200D', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'S',desc=u'Claim Submitter Trace Number'), +parsed_277U_2200D = Loop( u'2200D', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'S',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'2'] ) ), @@ -331,7 +331,7 @@ ), parsed_277U_2220D, ) -parsed_277U_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Dependent Name'), +parsed_277U_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -357,7 +357,7 @@ codes=[] ) ), ), ) -parsed_277U_2220E = Loop( u'2220E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), +parsed_277U_2220E = Loop( u'2220E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'180',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, @@ -451,7 +451,7 @@ codes=[] ) ), ), ) -parsed_277U_2200E = Loop( u'2200E', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'R',desc=u'Claim Submitter Trace Number'), +parsed_277U_2200E = Loop( u'2200E', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'R',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'2'] ) ), @@ -546,7 +546,7 @@ ), parsed_277U_2220E, ) -parsed_277U_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'100',req_sit=u'S',desc=u'Dependent Level'), +parsed_277U_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'100',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -580,7 +580,7 @@ parsed_277U_2100E, parsed_277U_2200E, ) -parsed_277U_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Subscriber Level'), +parsed_277U_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -615,7 +615,7 @@ parsed_277U_2200D, parsed_277U_2000E, ) -parsed_277U_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Service Provider Level'), +parsed_277U_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Service Provider Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Provider Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -629,7 +629,7 @@ parsed_277U_2100C, parsed_277U_2000D, ) -parsed_277U_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Information Receiver Level'), +parsed_277U_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Information Receiver Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Receiver Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -643,7 +643,7 @@ parsed_277U_2100B, parsed_277U_2000C, ) -parsed_277U_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), +parsed_277U_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Source Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -657,10 +657,10 @@ parsed_277U_2100A, parsed_277U_2000B, ) -parsed_277U_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_277U_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_277U_2000A, ) -parsed_277U_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_277U_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'277'] ) ), @@ -676,7 +676,7 @@ codes=[] ) ), ), ) -parsed_277U_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_277U_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HN'] ) ), @@ -703,7 +703,7 @@ codes=[] ) ), ), ) -parsed_277U_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_277U_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -758,7 +758,7 @@ codes=[] ) ), ), ) -parsed_277U = Message( u'277', Properties(desc=u'HIPAA Health Care Claim Unsolicited Status Response X070-277U'), +parsed_277U = Message( u'277', Properties(desc=u'HIPAA Health Care Claim Unsolicited Status Response X070-277U'), parsed_277U_ISA_LOOP, ) diff --git a/tigershark/parsers/M277_4010_X093_A1.py b/tigershark/parsers/M277_4010_X093_A1.py index 1280af9..ca97fe5 100644 --- a/tigershark/parsers/M277_4010_X093_A1.py +++ b/tigershark/parsers/M277_4010_X093_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:58.460993 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_277_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_277_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0010'] ) ), @@ -18,7 +18,7 @@ codes=[u'DG'] ) ), ), ) -parsed_277_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Payer Name'), +parsed_277_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -64,7 +64,7 @@ codes=[] ) ), ), ) -parsed_277_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Information Receiver Name'), +parsed_277_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Information Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Information Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'41'] ) ), @@ -90,7 +90,7 @@ codes=[] ) ), ), ) -parsed_277_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Provider Name'), +parsed_277_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'>1',pos=u'050',req_sit=u'R',desc=u'Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P'] ) ), @@ -116,7 +116,7 @@ codes=[] ) ), ), ) -parsed_277_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Subscriber Name'), +parsed_277_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL', u'QC'] ) ), @@ -142,7 +142,7 @@ codes=[] ) ), ), ) -parsed_277_2220D = Loop( u'2220D', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), +parsed_277_2220D = Loop( u'2220D', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'180',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, @@ -236,7 +236,7 @@ codes=[] ) ), ), ) -parsed_277_2200D = Loop( u'2200D', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'S',desc=u'Claim Submitter Trace Number'), +parsed_277_2200D = Loop( u'2200D', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'S',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'2'] ) ), @@ -331,7 +331,7 @@ ), parsed_277_2220D, ) -parsed_277_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Dependent Name'), +parsed_277_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'1',pos=u'050',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'050',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -357,7 +357,7 @@ codes=[] ) ), ), ) -parsed_277_2220E = Loop( u'2220E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), +parsed_277_2220E = Loop( u'2220E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'S',desc=u'Service Line Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'180',desc=u'Service Line Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, @@ -451,7 +451,7 @@ codes=[] ) ), ), ) -parsed_277_2200E = Loop( u'2200E', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'R',desc=u'Claim Submitter Trace Number'), +parsed_277_2200E = Loop( u'2200E', Properties(looptype='',repeat=u'>1',pos=u'090',req_sit=u'R',desc=u'Claim Submitter Trace Number'), Segment( u'TRN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'090',desc=u'Claim Submitter Trace Number'), Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'2'] ) ), @@ -546,7 +546,7 @@ ), parsed_277_2220E, ) -parsed_277_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'100',req_sit=u'S',desc=u'Dependent Level'), +parsed_277_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'100',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -580,7 +580,7 @@ parsed_277_2100E, parsed_277_2200E, ) -parsed_277_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Subscriber Level'), +parsed_277_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -615,7 +615,7 @@ parsed_277_2200D, parsed_277_2000E, ) -parsed_277_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Service Provider Level'), +parsed_277_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Service Provider Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Provider Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -629,7 +629,7 @@ parsed_277_2100C, parsed_277_2000D, ) -parsed_277_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Information Receiver Level'), +parsed_277_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'060',req_sit=u'R',desc=u'Information Receiver Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Receiver Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -643,7 +643,7 @@ parsed_277_2100B, parsed_277_2000C, ) -parsed_277_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), +parsed_277_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Information Source Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Information Source Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -657,10 +657,10 @@ parsed_277_2100A, parsed_277_2000B, ) -parsed_277_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_277_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_277_2000A, ) -parsed_277_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_277_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'277'] ) ), @@ -676,7 +676,7 @@ codes=[] ) ), ), ) -parsed_277_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_277_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HN', u'HR'] ) ), @@ -703,7 +703,7 @@ codes=[] ) ), ), ) -parsed_277_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_277_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -758,7 +758,7 @@ codes=[] ) ), ), ) -parsed_277 = Message( u'277', Properties(desc=u'HIPAA Health Care Claim Status Response X093A1-277'), +parsed_277 = Message( u'277', Properties(desc=u'HIPAA Health Care Claim Status Response X093A1-277'), parsed_277_ISA_LOOP, ) diff --git a/tigershark/parsers/M278_4010_X094_27_A1.py b/tigershark/parsers/M278_4010_X094_27_A1.py index 42e3666..fbe8109 100644 --- a/tigershark/parsers/M278_4010_X094_27_A1.py +++ b/tigershark/parsers/M278_4010_X094_27_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:58.981434 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_278_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_278_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0078'] ) ), @@ -18,7 +18,7 @@ codes=[u'18', u'19', u'AT'] ) ), ), ) -parsed_278_2010A = Loop( u'2010A', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Utilization Management Organization (UMO) Name'), +parsed_278_2010A = Loop( u'2010A', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Utilization Management Organization (UMO) Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Utilization Management Organization (UMO) Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'X3'] ) ), @@ -74,7 +74,7 @@ codes=[u'N', u'P', u'Y'] ) ), ), ) -parsed_278_2010B = Loop( u'2010B', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Requester Name'), +parsed_278_2010B = Loop( u'2010B', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Requester Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Requester Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P', u'FA'] ) ), @@ -134,7 +134,7 @@ codes=[] ) ), ), ) -parsed_278_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Subscriber Name'), +parsed_278_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -200,7 +200,7 @@ codes=[] ) ), ), ) -parsed_278_2010CB = Loop( u'2010CB', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'S',desc=u'Additional Patient Information Contact Name'), +parsed_278_2010CB = Loop( u'2010CB', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'S',desc=u'Additional Patient Information Contact Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Additional Patient Information Contact Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P', u'2B', u'ABG', u'FA', u'PR', u'X3'] ) ), @@ -266,7 +266,7 @@ codes=[] ) ), ), ) -parsed_278_2010DA = Loop( u'2010DA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Dependent Name'), +parsed_278_2010DA = Loop( u'2010DA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -368,7 +368,7 @@ codes=[] ) ), ), ) -parsed_278_2010DB = Loop( u'2010DB', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'S',desc=u'Additional Patient Information Contact Name'), +parsed_278_2010DB = Loop( u'2010DB', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'S',desc=u'Additional Patient Information Contact Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Additional Patient Information Contact Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P', u'2B', u'ABG', u'FA', u'PR', u'X3'] ) ), @@ -434,7 +434,7 @@ codes=[] ) ), ), ) -parsed_278_2010E = Loop( u'2010E', Properties(looptype='',repeat=u'3',pos=u'170',req_sit=u'R',desc=u'Service Provider Name'), +parsed_278_2010E = Loop( u'2010E', Properties(looptype='',repeat=u'3',pos=u'170',req_sit=u'R',desc=u'Service Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Service Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1T', u'FA', u'SJ'] ) ), @@ -534,7 +534,7 @@ codes=[] ) ), ), ) -parsed_278_2010F = Loop( u'2010F', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'S',desc=u'Additional Service Information Contact Name'), +parsed_278_2010F = Loop( u'2010F', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'S',desc=u'Additional Service Information Contact Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'S',repeat=u'>1',pos=u'170',desc=u'Additional Service Information Contact Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P', u'2B', u'ABG', u'FA', u'PR', u'X3'] ) ), @@ -600,7 +600,7 @@ codes=[] ) ), ), ) -parsed_278_2000F = Loop( u'2000F', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Level'), +parsed_278_2000F = Loop( u'2000F', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1117,7 +1117,7 @@ ), parsed_278_2010F, ) -parsed_278_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Provider Level'), +parsed_278_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Provider Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Provider Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1139,7 +1139,7 @@ parsed_278_2010E, parsed_278_2000F, ) -parsed_278_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'S',desc=u'Dependent Level'), +parsed_278_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1420,7 +1420,7 @@ parsed_278_2010DB, parsed_278_2000E, ) -parsed_278_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Subscriber Level'), +parsed_278_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1701,7 +1701,7 @@ parsed_278_2010CB, parsed_278_2000D, ) -parsed_278_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Requester Level'), +parsed_278_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Requester Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Requester Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1715,7 +1715,7 @@ parsed_278_2010B, parsed_278_2000C, ) -parsed_278_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Utilization Management Organization (UMO) Level'), +parsed_278_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Utilization Management Organization (UMO) Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Utilization Management Organization (UMO) Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1739,10 +1739,10 @@ parsed_278_2010A, parsed_278_2000B, ) -parsed_278_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_278_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_278_2000A, ) -parsed_278_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_278_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'278'] ) ), @@ -1758,7 +1758,7 @@ codes=[] ) ), ), ) -parsed_278_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_278_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HI'] ) ), @@ -1785,7 +1785,7 @@ codes=[] ) ), ), ) -parsed_278_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_278_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -1840,7 +1840,7 @@ codes=[] ) ), ), ) -parsed_278 = Message( u'278', Properties(desc=u'HIPAA Health Care Services Review: Response X094A1-278'), +parsed_278 = Message( u'278', Properties(desc=u'HIPAA Health Care Services Review: Response X094A1-278'), parsed_278_ISA_LOOP, ) diff --git a/tigershark/parsers/M278_4010_X094_A1.py b/tigershark/parsers/M278_4010_X094_A1.py index e456c0c..000ecad 100644 --- a/tigershark/parsers/M278_4010_X094_A1.py +++ b/tigershark/parsers/M278_4010_X094_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:59.421571 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_278_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_278_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0078'] ) ), @@ -18,7 +18,7 @@ codes=[] ) ), ), ) -parsed_278_2010A = Loop( u'2010A', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Utilization Management Organizational (UMO) Name'), +parsed_278_2010A = Loop( u'2010A', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Utilization Management Organizational (UMO) Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Utilization Management Organizational (UMO) Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'X3'] ) ), @@ -44,7 +44,7 @@ codes=[] ) ), ), ) -parsed_278_2010B = Loop( u'2010B', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Requester Name'), +parsed_278_2010B = Loop( u'2010B', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Requester Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Requester Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1P', u'FA'] ) ), @@ -134,7 +134,7 @@ codes=[] ) ), ), ) -parsed_278_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Subscriber Name'), +parsed_278_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -190,7 +190,7 @@ codes=[] ) ), ), ) -parsed_278_2010DA = Loop( u'2010DA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Dependent Name'), +parsed_278_2010DA = Loop( u'2010DA', Properties(looptype='',repeat=u'1',pos=u'170',req_sit=u'R',desc=u'Dependent Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Dependent Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -282,7 +282,7 @@ codes=[] ) ), ), ) -parsed_278_2010E = Loop( u'2010E', Properties(looptype='',repeat=u'3',pos=u'170',req_sit=u'R',desc=u'Service Provider Name'), +parsed_278_2010E = Loop( u'2010E', Properties(looptype='',repeat=u'3',pos=u'170',req_sit=u'R',desc=u'Service Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Service Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1T', u'FA', u'SJ'] ) ), @@ -372,7 +372,7 @@ codes=[] ) ), ), ) -parsed_278_2000F = Loop( u'2000F', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Level'), +parsed_278_2000F = Loop( u'2000F', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -870,7 +870,7 @@ codes=[] ) ), ), ) -parsed_278_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Provider Level'), +parsed_278_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Provider Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Provider Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -892,7 +892,7 @@ parsed_278_2010E, parsed_278_2000F, ) -parsed_278_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'S',desc=u'Dependent Level'), +parsed_278_2000D = Loop( u'2000D', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'S',desc=u'Dependent Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Dependent Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1162,7 +1162,7 @@ parsed_278_2010DA, parsed_278_2000E, ) -parsed_278_2010E = Loop( u'2010E', Properties(looptype='',repeat=u'3',pos=u'170',req_sit=u'R',desc=u'Service Provider Name'), +parsed_278_2010E = Loop( u'2010E', Properties(looptype='',repeat=u'3',pos=u'170',req_sit=u'R',desc=u'Service Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'170',desc=u'Service Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'1T', u'FA', u'SJ'] ) ), @@ -1252,7 +1252,7 @@ codes=[] ) ), ), ) -parsed_278_2000F = Loop( u'2000F', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Level'), +parsed_278_2000F = Loop( u'2000F', Properties(looptype='',repeat=u'>1',pos=u'180',req_sit=u'R',desc=u'Service Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1750,7 +1750,7 @@ codes=[] ) ), ), ) -parsed_278_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'181',req_sit=u'R',desc=u'Service Provider Level'), +parsed_278_2000E = Loop( u'2000E', Properties(looptype='',repeat=u'>1',pos=u'181',req_sit=u'R',desc=u'Service Provider Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Service Provider Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -1772,7 +1772,7 @@ parsed_278_2010E, parsed_278_2000F, ) -parsed_278_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Subscriber Level'), +parsed_278_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Subscriber Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Subscriber Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -2043,7 +2043,7 @@ parsed_278_2000D, parsed_278_2000E, ) -parsed_278_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Requester Level'), +parsed_278_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'1',pos=u'180',req_sit=u'R',desc=u'Requester Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Requester Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -2057,7 +2057,7 @@ parsed_278_2010B, parsed_278_2000C, ) -parsed_278_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Utilization Management Organization (UMO) Level'), +parsed_278_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Utilization Management Organization (UMO) Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Utilization Management Organization (UMO) Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -2071,10 +2071,10 @@ parsed_278_2010A, parsed_278_2000B, ) -parsed_278_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_278_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_278_2000A, ) -parsed_278_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_278_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'278'] ) ), @@ -2090,7 +2090,7 @@ codes=[] ) ), ), ) -parsed_278_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_278_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HI'] ) ), @@ -2117,7 +2117,7 @@ codes=[] ) ), ), ) -parsed_278_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_278_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -2172,7 +2172,7 @@ codes=[] ) ), ), ) -parsed_278 = Message( u'278', Properties(desc=u'HIPAA Health Care Services Review: Request X094A1-278'), +parsed_278 = Message( u'278', Properties(desc=u'HIPAA Health Care Services Review: Request X094A1-278'), parsed_278_ISA_LOOP, ) diff --git a/tigershark/parsers/M820_4010_X061_A1.py b/tigershark/parsers/M820_4010_X061_A1.py index ca8666f..9cbdbef 100644 --- a/tigershark/parsers/M820_4010_X061_A1.py +++ b/tigershark/parsers/M820_4010_X061_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:59.666466 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_820_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u"Premium Receiver's Name"), +parsed_820_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u"Premium Receiver's Name"), Segment( u'N1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'070',desc=u"Premium Receiver's Name"), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PE'] ) ), @@ -44,7 +44,7 @@ codes=[] ) ), ), ) -parsed_820_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u"Premium Payer's Name"), +parsed_820_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u"Premium Payer's Name"), Segment( u'N1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'070',desc=u"Premium Payer's Name"), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -106,7 +106,7 @@ codes=[] ) ), ), ) -parsed_820_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_820_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BPR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Financial Information'), Element( u'BPR01', Properties(desc=u'Transaction Handling Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'C', u'D', u'I', u'P', u'U', u'X'] ) ), @@ -260,7 +260,7 @@ parsed_820_1000A, parsed_820_1000B, ) -parsed_820_2315A = Loop( u'2315A', Properties(looptype='',repeat=u'>1',pos=u'204',req_sit=u'S',desc=u'Member Count'), +parsed_820_2315A = Loop( u'2315A', Properties(looptype='',repeat=u'>1',pos=u'204',req_sit=u'S',desc=u'Member Count'), Segment( u'SLN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'204',desc=u'Member Count'), Element( u'SLN01', Properties(desc=u'Assigned Identification', req_sit=u'R', data_type=(u'AN',u'1',u'20'), position=1, codes=[] ) ), @@ -350,7 +350,7 @@ codes=[] ) ), ), ) -parsed_820_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'1',pos=u'190',req_sit=u'S',desc=u'Summary Line Item'), +parsed_820_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'1',pos=u'190',req_sit=u'S',desc=u'Summary Line Item'), Segment( u'IT1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'190',desc=u'Summary Line Item'), Element( u'IT101', Properties(desc=u'Assigned Identification', req_sit=u'R', data_type=(u'AN',u'1',u'20'), position=1, codes=[] ) ), @@ -405,7 +405,7 @@ ), parsed_820_2315A, ) -parsed_820_2320A = Loop( u'2320A', Properties(looptype='',repeat=u'>1',pos=u'210',req_sit=u'S',desc=u'Organization Summary Remittance Level Adjustment'), +parsed_820_2320A = Loop( u'2320A', Properties(looptype='',repeat=u'>1',pos=u'210',req_sit=u'S',desc=u'Organization Summary Remittance Level Adjustment'), Segment( u'ADX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'210',desc=u'Organization Summary Remittance Level Adjustment'), Element( u'ADX01', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=1, codes=[] ) ), @@ -417,7 +417,7 @@ codes=[] ) ), ), ) -parsed_820_2300A = Loop( u'2300A', Properties(looptype='',repeat=u'>1',pos=u'150',req_sit=u'R',desc=u'Organization Summary Remittance Detail'), +parsed_820_2300A = Loop( u'2300A', Properties(looptype='',repeat=u'>1',pos=u'150',req_sit=u'R',desc=u'Organization Summary Remittance Detail'), Segment( u'RMR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'150',desc=u'Organization Summary Remittance Detail'), Element( u'RMR01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'11', u'1L', u'CT', u'IK'] ) ), @@ -439,7 +439,7 @@ parsed_820_2310A, parsed_820_2320A, ) -parsed_820_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'1',pos=u'010',req_sit=u'S',desc=u'Organization Summary Remittance'), +parsed_820_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'1',pos=u'010',req_sit=u'S',desc=u'Organization Summary Remittance'), Segment( u'ENT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Organization Summary Remittance'), Element( u'ENT01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -462,7 +462,7 @@ ), parsed_820_2300A, ) -parsed_820_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Individual Name'), +parsed_820_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Individual Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Individual Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'EY', u'QE'] ) ), @@ -488,7 +488,7 @@ codes=[] ) ), ), ) -parsed_820_2320B = Loop( u'2320B', Properties(looptype='',repeat=u'>1',pos=u'210',req_sit=u'S',desc=u'Individual Premium Adjustment'), +parsed_820_2320B = Loop( u'2320B', Properties(looptype='',repeat=u'>1',pos=u'210',req_sit=u'S',desc=u'Individual Premium Adjustment'), Segment( u'ADX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'210',desc=u'Individual Premium Adjustment'), Element( u'ADX01', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=1, codes=[] ) ), @@ -500,7 +500,7 @@ codes=[] ) ), ), ) -parsed_820_2300B = Loop( u'2300B', Properties(looptype='',repeat=u'>1',pos=u'150',req_sit=u'S',desc=u'Individual Premium Remittance Detail'), +parsed_820_2300B = Loop( u'2300B', Properties(looptype='',repeat=u'>1',pos=u'150',req_sit=u'S',desc=u'Individual Premium Remittance Detail'), Segment( u'RMR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'150',desc=u'Individual Premium Remittance Detail'), Element( u'RMR01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'11', u'9J', u'AZ', u'B7', u'CT', u'ID', u'IG', u'IK', u'KW'] ) ), @@ -535,7 +535,7 @@ ), parsed_820_2320B, ) -parsed_820_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'160',req_sit=u'S',desc=u'Individual Remittance'), +parsed_820_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'160',req_sit=u'S',desc=u'Individual Remittance'), Segment( u'ENT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Individual Remittance'), Element( u'ENT01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -559,11 +559,11 @@ parsed_820_2100B, parsed_820_2300B, ) -parsed_820_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_820_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_820_2000A, parsed_820_2000B, ) -parsed_820_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_820_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'820 Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'820'] ) ), @@ -579,7 +579,7 @@ codes=[] ) ), ), ) -parsed_820_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_820_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'RA'] ) ), @@ -606,7 +606,7 @@ codes=[] ) ), ), ) -parsed_820_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_820_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -661,7 +661,7 @@ codes=[] ) ), ), ) -parsed_820 = Message( u'820', Properties(desc=u'HIPAA Payment Deducted and Other Group Premium Payment for Insurance Products X061A1-820'), +parsed_820 = Message( u'820', Properties(desc=u'HIPAA Payment Deducted and Other Group Premium Payment for Insurance Products X061A1-820'), parsed_820_ISA_LOOP, ) diff --git a/tigershark/parsers/M834_4010_X095_A1.py b/tigershark/parsers/M834_4010_X095_A1.py index 2cbe42b..e620b06 100644 --- a/tigershark/parsers/M834_4010_X095_A1.py +++ b/tigershark/parsers/M834_4010_X095_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:29:59.832222 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_834_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u'Sponsor Name'), +parsed_834_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u'Sponsor Name'), Segment( u'N1', Properties(syntax=u'R0203 P0304',req_sit=u'R',repeat=u'1',pos=u'070',desc=u'Sponsor Name'), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'P5'] ) ), @@ -18,7 +18,7 @@ codes=[] ) ), ), ) -parsed_834_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u'Payer'), +parsed_834_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'070',req_sit=u'R',desc=u'Payer'), Segment( u'N1', Properties(syntax=u'R0203 P0304',req_sit=u'R',repeat=u'1',pos=u'070',desc=u'Payer'), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IN'] ) ), @@ -34,7 +34,7 @@ codes=[] ) ), ), ) -parsed_834_1100C = Loop( u'1100C', Properties(looptype='',repeat=u'1',pos=u'120',req_sit=u'S',desc=u'TPA/Broker Account Information'), +parsed_834_1100C = Loop( u'1100C', Properties(looptype='',repeat=u'1',pos=u'120',req_sit=u'S',desc=u'TPA/Broker Account Information'), Segment( u'ACT', Properties(syntax=u'P0304 C0506 C0705',req_sit=u'R',repeat=u'1',pos=u'120',desc=u'TPA/Broker Account Information'), Element( u'ACT01', Properties(desc=u'Account Number', req_sit=u'R', data_type=(u'AN',u'1',u'35'), position=1, codes=[] ) ), @@ -56,7 +56,7 @@ codes=[] ) ), ), ) -parsed_834_1000C = Loop( u'1000C', Properties(looptype='',repeat=u'2',pos=u'070',req_sit=u'S',desc=u'TPA/Broker Name'), +parsed_834_1000C = Loop( u'1000C', Properties(looptype='',repeat=u'2',pos=u'070',req_sit=u'S',desc=u'TPA/Broker Name'), Segment( u'N1', Properties(syntax=u'R0203 P0304',req_sit=u'R',repeat=u'1',pos=u'070',desc=u'TPA/Broker Name'), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'BO', u'TV'] ) ), @@ -73,7 +73,7 @@ ), parsed_834_1100C, ) -parsed_834_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_834_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BGN', Properties(syntax=u'C0504',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Beginning Segment'), Element( u'BGN01', Properties(desc=u'Transaction Set Purpose Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'15', u'22'] ) ), @@ -116,7 +116,7 @@ parsed_834_1000B, parsed_834_1000C, ) -parsed_834_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Member Name'), +parsed_834_2100A = Loop( u'2100A', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'R',desc=u'Member Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Member Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'74', u'IL'] ) ), @@ -252,7 +252,7 @@ codes=[] ) ), ), ) -parsed_834_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Incorrect Member Name'), +parsed_834_2100B = Loop( u'2100B', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Incorrect Member Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Incorrect Member Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'70'] ) ), @@ -298,7 +298,7 @@ codes=[] ) ), ), ) -parsed_834_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Member Mailing Address'), +parsed_834_2100C = Loop( u'2100C', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Member Mailing Address'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Member Mailing Address'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'31'] ) ), @@ -344,7 +344,7 @@ codes=[] ) ), ), ) -parsed_834_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'3',pos=u'030',req_sit=u'S',desc=u'Member Employer'), +parsed_834_2100D = Loop( u'2100D', Properties(looptype='',repeat=u'3',pos=u'030',req_sit=u'S',desc=u'Member Employer'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Member Employer'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'ES'] ) ), @@ -410,7 +410,7 @@ codes=[] ) ), ), ) -parsed_834_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'3',pos=u'030',req_sit=u'S',desc=u'Member School'), +parsed_834_2100E = Loop( u'2100E', Properties(looptype='',repeat=u'3',pos=u'030',req_sit=u'S',desc=u'Member School'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Member School'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'M8'] ) ), @@ -476,7 +476,7 @@ codes=[] ) ), ), ) -parsed_834_2100F = Loop( u'2100F', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Custodial Parent'), +parsed_834_2100F = Loop( u'2100F', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Custodial Parent'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Custodial Parent'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'S3'] ) ), @@ -542,7 +542,7 @@ codes=[] ) ), ), ) -parsed_834_2100G = Loop( u'2100G', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Responsible Person'), +parsed_834_2100G = Loop( u'2100G', Properties(looptype='',repeat=u'1',pos=u'030',req_sit=u'S',desc=u'Responsible Person'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'030',desc=u'Responsible Person'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'E1', u'EI', u'EXS', u'GD', u'J6', u'QD'] ) ), @@ -608,7 +608,7 @@ codes=[] ) ), ), ) -parsed_834_2200 = Loop( u'2200', Properties(looptype='',repeat=u'1',pos=u'200',req_sit=u'S',desc=u'Disability Information'), +parsed_834_2200 = Loop( u'2200', Properties(looptype='',repeat=u'1',pos=u'200',req_sit=u'S',desc=u'Disability Information'), Segment( u'DSB', Properties(syntax=u'P0708',req_sit=u'R',repeat=u'1',pos=u'200',desc=u'Disability Information'), Element( u'DSB01', Properties(desc=u'Disability Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'1', u'2', u'3', u'4'] ) ), @@ -636,7 +636,7 @@ codes=[] ) ), ), ) -parsed_834_2310 = Loop( u'2310', Properties(looptype='',repeat=u'30',pos=u'310',req_sit=u'S',desc=u'Provider Information'), +parsed_834_2310 = Loop( u'2310', Properties(looptype='',repeat=u'30',pos=u'310',req_sit=u'S',desc=u'Provider Information'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'310',desc=u'Provider Information'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -712,7 +712,7 @@ codes=[u'14', u'22', u'46', u'AA', u'AB', u'AC', u'AD', u'AE', u'AF', u'AG', u'AH', u'AI', u'AJ'] ) ), ), ) -parsed_834_2320 = Loop( u'2320', Properties(looptype='',repeat=u'5',pos=u'400',req_sit=u'S',desc=u'Coordination of Benefits'), +parsed_834_2320 = Loop( u'2320', Properties(looptype='',repeat=u'5',pos=u'400',req_sit=u'S',desc=u'Coordination of Benefits'), Segment( u'COB', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'400',desc=u'Coordination of Benefits'), Element( u'COB01', Properties(desc=u'Payer Responsibility Sequence Number Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'P', u'S', u'T', u'U'] ) ), @@ -754,7 +754,7 @@ codes=[] ) ), ), ) -parsed_834_2300 = Loop( u'2300', Properties(looptype='',repeat=u'99',pos=u'260',req_sit=u'S',desc=u'Health Coverage'), +parsed_834_2300 = Loop( u'2300', Properties(looptype='',repeat=u'99',pos=u'260',req_sit=u'S',desc=u'Health Coverage'), Segment( u'HD', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'260',desc=u'Health Coverage'), Element( u'HD01', Properties(desc=u'Maintenance Type Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'001', u'002', u'021', u'024', u'025', u'026', u'030', u'032'] ) ), @@ -818,7 +818,7 @@ parsed_834_2310, parsed_834_2320, ) -parsed_834_2000 = Loop( u'2000', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Member Level Detail'), +parsed_834_2000 = Loop( u'2000', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Member Level Detail'), Segment( u'INS', Properties(syntax=u'P1112',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Member Level Detail'), Element( u'INS01', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'N', u'Y'] ) ), @@ -913,10 +913,10 @@ parsed_834_2200, parsed_834_2300, ) -parsed_834_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_834_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_834_2000, ) -parsed_834_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_834_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'834'] ) ), @@ -932,7 +932,7 @@ codes=[] ) ), ), ) -parsed_834_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_834_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'BE'] ) ), @@ -959,7 +959,7 @@ codes=[] ) ), ), ) -parsed_834_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_834_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -1014,7 +1014,7 @@ codes=[] ) ), ), ) -parsed_834 = Message( u'834', Properties(desc=u'HIPAA Benefit Enrollment and Maintenance X095A1-834'), +parsed_834 = Message( u'834', Properties(desc=u'HIPAA Benefit Enrollment and Maintenance X095A1-834'), parsed_834_ISA_LOOP, ) diff --git a/tigershark/parsers/M835_4010_X091_A1.py b/tigershark/parsers/M835_4010_X091_A1.py index 59bef41..3455794 100644 --- a/tigershark/parsers/M835_4010_X091_A1.py +++ b/tigershark/parsers/M835_4010_X091_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-10-15 15:31:48.524770 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_835_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'080',req_sit=u'R',desc=u'Payer Identification'), +parsed_835_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'080',req_sit=u'R',desc=u'Payer Identification'), Segment( u'N1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'080',desc=u'Payer Identification'), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -68,7 +68,7 @@ codes=[] ) ), ), ) -parsed_835_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'080',req_sit=u'R',desc=u'Payee Identification'), +parsed_835_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'080',req_sit=u'R',desc=u'Payee Identification'), Segment( u'N1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'080',desc=u'Payee Identification'), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PE'] ) ), @@ -114,7 +114,7 @@ ), ), ) -parsed_835_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_835_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BPR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Financial Information'), Element( u'BPR01', Properties(desc=u'Transaction Handling Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, codes=[u'C', u'D', u'H', u'I', u'P', u'U', u'X'] ) ), @@ -250,7 +250,7 @@ parsed_835_1000A, parsed_835_1000B, ) -parsed_835_2110 = Loop( u'2110', Properties(looptype='',repeat=u'999',pos=u'070',req_sit=u'S',desc=u'Service Payment Information'), +parsed_835_2110 = Loop( u'2110', Properties(looptype='',repeat=u'999',pos=u'070',req_sit=u'S',desc=u'Service Payment Information'), Segment( u'SVC', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'070',desc=u'Service Payment Information'), Composite( u'C003', Properties(req_sit=u'R',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, @@ -394,7 +394,7 @@ codes=[] ) ), ), ) -parsed_835_2100 = Loop( u'2100', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Claim Payment Information'), +parsed_835_2100 = Loop( u'2100', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Claim Payment Information'), Segment( u'CLP', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Claim Payment Information'), Element( u'CLP01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, codes=[] ) ), @@ -751,7 +751,7 @@ ), parsed_835_2110, ) -parsed_835_2000 = Loop( u'2000', Properties(looptype='',repeat=u'>1',pos=u'003',req_sit=u'S',desc=u'Header Number'), +parsed_835_2000 = Loop( u'2000', Properties(looptype='',repeat=u'>1',pos=u'003',req_sit=u'S',desc=u'Header Number'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'003',desc=u'Header Number'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -848,10 +848,10 @@ ), parsed_835_2100, ) -parsed_835_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_835_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_835_2000, ) -parsed_835_FOOTER = Loop( u'FOOTER', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'030',req_sit=u'S',desc=u'Table 3 - Footer'), +parsed_835_FOOTER = Loop( u'FOOTER', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'030',req_sit=u'S',desc=u'Table 3 - Footer'), Segment( u'PLB', Properties(syntax='',req_sit=u'S',repeat=u'>1',pos=u'010',desc=u'Provider Adjustment'), Element( u'PLB01', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=1, codes=[] ) ), @@ -907,7 +907,7 @@ codes=[] ) ), ), ) -parsed_835_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_835_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'835'] ) ), @@ -924,7 +924,7 @@ codes=[] ) ), ), ) -parsed_835_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_835_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HP'] ) ), @@ -951,7 +951,7 @@ codes=[] ) ), ), ) -parsed_835_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_835_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -1006,7 +1006,7 @@ codes=[] ) ), ), ) -parsed_835 = Message( u'835', Properties(desc=u'HIPAA Health Care Claim Payment/Advice X091-835'), +parsed_835 = Message( u'835', Properties(desc=u'HIPAA Health Care Claim Payment/Advice X091-835'), parsed_835_ISA_LOOP, ) diff --git a/tigershark/parsers/M835_5010_X221_A1.py b/tigershark/parsers/M835_5010_X221_A1.py new file mode 100644 index 0000000..1343a08 --- /dev/null +++ b/tigershark/parsers/M835_5010_X221_A1.py @@ -0,0 +1,1162 @@ +# +# Generated by TigerShark.tools.convertPyX12 on 2014-09-26 07:26:39.089319 +# +from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties +parsed_835_1000A = Loop( u'1000A', Properties(position=u'0800',looptype='',repeat=u'1',req_sit=u'R',desc=u'Payer Identification'), +Segment( u'N1', Properties(syntax=u'R0203 P0304',position=u'0800',req_sit=u'R',repeat=u'1',desc=u'Payer Identification'), + Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'PR'] ) ), + Element( u'N102', Properties(desc=u'Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=2, + codes=[] ) ), + Element( u'N103', Properties(desc=u'Identification Code Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=3, + codes=[u'XV'] ) ), + Element( u'N104', Properties(desc=u'Identification Code', req_sit=u'S', data_type=(u'AN',u'2',u'80'), position=4, + codes=[] ) ), + Element( u'N105', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=5, + codes=[] ) ), + Element( u'N106', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=6, + codes=[] ) ), +), +Segment( u'N3', Properties(syntax='',position=u'1000',req_sit=u'R',repeat=u'1',desc=u'Payer Address'), + Element( u'N301', Properties(desc=u'Address Information', req_sit=u'R', data_type=(u'AN',u'1',u'55'), position=1, + codes=[] ) ), + Element( u'N302', Properties(desc=u'Address Information', req_sit=u'S', data_type=(u'AN',u'1',u'55'), position=2, + codes=[] ) ), +), +Segment( u'N4', Properties(syntax=u'E0207 C0605 C0704',position=u'1100',req_sit=u'R',repeat=u'1',desc=u'Payer City, State, ZIP Code'), + Element( u'N401', Properties(desc=u'City Name', req_sit=u'R', data_type=(u'AN',u'2',u'30'), position=1, + codes=[] ) ), + Element( u'N402', Properties(desc=u'State or Province Code', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'N403', Properties(desc=u'Postal Code', req_sit=u'S', data_type=(u'ID',u'3',u'15'), position=3, + codes=[] ) ), + Element( u'N404', Properties(desc=u'Country Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'N405', Properties(desc=u'Location Qualifier', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=5, + codes=[] ) ), + Element( u'N406', Properties(desc=u'Location Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'N407', Properties(desc=u'Country Subdivision Code', req_sit=u'S', data_type=(u'ID',u'1',u'3'), position=7, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1200',req_sit=u'S',repeat=u'4',desc=u'Additional Payer Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'2U', u'EO', u'HI', u'NF'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'PER', Properties(syntax=u'P0304 P0506 P0708',position=u'1300',req_sit=u'S',repeat=u'1',desc=u'Payer Business Contact Information'), + Element( u'PER01', Properties(desc=u'Contact Function Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'CX'] ) ), + Element( u'PER02', Properties(desc=u'Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=2, + codes=[] ) ), + Element( u'PER03', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=3, + codes=[u'EM', u'FX', u'TE'] ) ), + Element( u'PER04', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=4, + codes=[] ) ), + Element( u'PER05', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=5, + codes=[u'EM', u'EX', u'FX', u'TE'] ) ), + Element( u'PER06', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=6, + codes=[] ) ), + Element( u'PER07', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=7, + codes=[u'EX'] ) ), + Element( u'PER08', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=8, + codes=[] ) ), + Element( u'PER09', Properties(desc=u'Contact Inquiry Reference', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=9, + codes=[] ) ), +), +Segment( u'PER', Properties(syntax=u'P0304 P0506 P0708',position=u'1300',req_sit=u'R',repeat=u'>1',desc=u'Payer Technical Contact Information'), + Element( u'PER01', Properties(desc=u'Contact Function Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'BL'] ) ), + Element( u'PER02', Properties(desc=u'Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=2, + codes=[] ) ), + Element( u'PER03', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=3, + codes=[u'EM', u'TE', u'UR'] ) ), + Element( u'PER04', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=4, + codes=[] ) ), + Element( u'PER05', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=5, + codes=[u'EM', u'EX', u'FX', u'TE', u'UR'] ) ), + Element( u'PER06', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=6, + codes=[] ) ), + Element( u'PER07', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=7, + codes=[u'EM', u'EX', u'FX', u'UR'] ) ), + Element( u'PER08', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=8, + codes=[] ) ), + Element( u'PER09', Properties(desc=u'Contact Inquiry Reference', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=9, + codes=[] ) ), +), +Segment( u'PER', Properties(syntax=u'P0304 P0506 P0708',position=u'1300',req_sit=u'S',repeat=u'1',desc=u'Payer WEB Site'), + Element( u'PER01', Properties(desc=u'Contact Function Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'IC'] ) ), + Element( u'PER02', Properties(desc=u'Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=2, + codes=[] ) ), + Element( u'PER03', Properties(desc=u'Communication Number Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=3, + codes=[u'UR'] ) ), + Element( u'PER04', Properties(desc=u'Communication Number', req_sit=u'R', data_type=(u'AN',u'1',u'256'), position=4, + codes=[] ) ), + Element( u'PER05', Properties(desc=u'Communication Number Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=5, + codes=[] ) ), + Element( u'PER06', Properties(desc=u'Communication Number', req_sit=u'N', data_type=(u'AN',u'1',u'256'), position=6, + codes=[] ) ), + Element( u'PER07', Properties(desc=u'Communication Number Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=7, + codes=[] ) ), + Element( u'PER08', Properties(desc=u'Communication Number', req_sit=u'N', data_type=(u'AN',u'1',u'256'), position=8, + codes=[] ) ), + Element( u'PER09', Properties(desc=u'Contact Inquiry Reference', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=9, + codes=[] ) ), +), +) +parsed_835_1000B = Loop( u'1000B', Properties(position=u'1400',looptype='',repeat=u'1',req_sit=u'R',desc=u'Payee Identification'), +Segment( u'N1', Properties(syntax=u'R0203 P0304',position=u'0800',req_sit=u'R',repeat=u'1',desc=u'Payee Identification'), + Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'PE'] ) ), + Element( u'N102', Properties(desc=u'Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=2, + codes=[] ) ), + Element( u'N103', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=3, + codes=[u'FI', u'XV', u'XX'] ) ), + Element( u'N104', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=4, + codes=[] ) ), + Element( u'N105', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=5, + codes=[] ) ), + Element( u'N106', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=6, + codes=[] ) ), +), +Segment( u'N3', Properties(syntax='',position=u'1000',req_sit=u'S',repeat=u'1',desc=u'Payee Address'), + Element( u'N301', Properties(desc=u'Address Information', req_sit=u'R', data_type=(u'AN',u'1',u'55'), position=1, + codes=[] ) ), + Element( u'N302', Properties(desc=u'Address Information', req_sit=u'S', data_type=(u'AN',u'1',u'55'), position=2, + codes=[] ) ), +), +Segment( u'N4', Properties(syntax=u'E0207 C0605 C0704',position=u'1100',req_sit=u'S',repeat=u'1',desc=u'Payee City, State, ZIP Code'), + Element( u'N401', Properties(desc=u'City Name', req_sit=u'R', data_type=(u'AN',u'2',u'30'), position=1, + codes=[] ) ), + Element( u'N402', Properties(desc=u'State or Province Code', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'N403', Properties(desc=u'Postal Code', req_sit=u'S', data_type=(u'ID',u'3',u'15'), position=3, + codes=[] ) ), + Element( u'N404', Properties(desc=u'Country Code', req_sit=u'S', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'N405', Properties(desc=u'Location Qualifier', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=5, + codes=[] ) ), + Element( u'N406', Properties(desc=u'Location Identifier', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=6, + codes=[] ) ), + Element( u'N407', Properties(desc=u'Country Subdivision Code', req_sit=u'S', data_type=(u'ID',u'1',u'3'), position=7, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1200',req_sit=u'S',repeat=u'>1',desc=u'Payee Additional Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'0B', u'D3', u'PQ', u'TJ'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'RDM', Properties(syntax='',position=u'1400',req_sit=u'S',repeat=u'1',desc=u'Remittance Delivery Method'), + Element( u'RDM01', Properties(desc=u'Report Transmission Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'BM', u'EM', u'FT', u'OL'] ) ), + Element( u'RDM02', Properties(desc=u'Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=2, + codes=[] ) ), + Element( u'RDM03', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'05',desc=u'Reference Identifier'), + ), +), +) +parsed_835_HEADER = Loop( u'HEADER', Properties(position=u'0110',looptype=u'wrapper',repeat=u'1',req_sit=u'R',desc=u'Header'), +Segment( u'BPR', Properties(syntax=u'P0607 C0809 P1213 C1415 P1819 C2021',position=u'0200',req_sit=u'R',repeat=u'1',desc=u'Financial Information'), + Element( u'BPR01', Properties(desc=u'Transaction Handling Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'C', u'D', u'H', u'I', u'P', u'U', u'X'] ) ), + Element( u'BPR02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'BPR03', Properties(desc=u'Credit/Debit Flag Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=3, + codes=[u'C', u'D'] ) ), + Element( u'BPR04', Properties(desc=u'Payment Method Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=4, + codes=[u'ACH', u'BOP', u'CHK', u'FWT', u'NON'] ) ), + Element( u'BPR05', Properties(desc=u'Payment Format Code', req_sit=u'S', data_type=(u'ID',u'1',u'10'), position=5, + codes=[u'CCP', u'CTX'] ) ), + Element( u'BPR06', Properties(desc=u'(DFI) ID Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=6, + codes=[u'01', u'04'] ) ), + Element( u'BPR07', Properties(desc=u'(DFI) Identification Number', req_sit=u'S', data_type=(u'AN',u'3',u'12'), position=7, + codes=[] ) ), + Element( u'BPR08', Properties(desc=u'Account Number Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'3'), position=8, + codes=[u'DA'] ) ), + Element( u'BPR09', Properties(desc=u'Account Number', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=9, + codes=[] ) ), + Element( u'BPR10', Properties(desc=u'Originating Company Identifier', req_sit=u'S', data_type=(u'AN',u'10',u'10'), position=10, + codes=[] ) ), + Element( u'BPR11', Properties(desc=u'Originating Company Supplemental Code', req_sit=u'S', data_type=(u'AN',u'9',u'9'), position=11, + codes=[] ) ), + Element( u'BPR12', Properties(desc=u'(DFI) ID Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=12, + codes=[u'01', u'04'] ) ), + Element( u'BPR13', Properties(desc=u'(DFI) Identification Number', req_sit=u'S', data_type=(u'AN',u'3',u'12'), position=13, + codes=[] ) ), + Element( u'BPR14', Properties(desc=u'Account Number Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'3'), position=14, + codes=[u'DA', u'SG'] ) ), + Element( u'BPR15', Properties(desc=u'Account Number', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=15, + codes=[] ) ), + Element( u'BPR16', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=16, + codes=[] ) ), + Element( u'BPR17', Properties(desc=u'Business Function Code', req_sit=u'N', data_type=(u'ID',u'1',u'3'), position=17, + codes=[] ) ), + Element( u'BPR18', Properties(desc=u'(DFI) ID Number Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=18, + codes=[] ) ), + Element( u'BPR19', Properties(desc=u'(DFI) Identification Number', req_sit=u'N', data_type=(u'AN',u'3',u'12'), position=19, + codes=[] ) ), + Element( u'BPR20', Properties(desc=u'Account Number Qualifier', req_sit=u'N', data_type=(u'ID',u'1',u'3'), position=20, + codes=[] ) ), + Element( u'BPR21', Properties(desc=u'Account Number', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=21, + codes=[] ) ), +), +Segment( u'TRN', Properties(syntax='',position=u'0400',req_sit=u'R',repeat=u'1',desc=u'Reassociation Trace Number'), + Element( u'TRN01', Properties(desc=u'Trace Type Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'1'] ) ), + Element( u'TRN02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'TRN03', Properties(desc=u'Originating Company Identifier', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=3, + codes=[] ) ), + Element( u'TRN04', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=4, + codes=[] ) ), +), +Segment( u'CUR', Properties(syntax=u'C0807 C0907 L101112 C1110 C1210 L131415 C1413 C1513 L161718 C1716 C1816 L192021 C2019 C2119',position=u'0500',req_sit=u'S',repeat=u'1',desc=u'Foreign Currency Information'), + Element( u'CUR01', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'PR'] ) ), + Element( u'CUR02', Properties(desc=u'Currency Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=2, + codes=[] ) ), + Element( u'CUR03', Properties(desc=u'Exchange Rate', req_sit=u'N', data_type=(u'R',u'4',u'10'), position=3, + codes=[] ) ), + Element( u'CUR04', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=4, + codes=[] ) ), + Element( u'CUR05', Properties(desc=u'Currency Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=5, + codes=[] ) ), + Element( u'CUR06', Properties(desc=u'Currency Market/Exchange Code', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=6, + codes=[] ) ), + Element( u'CUR07', Properties(desc=u'Date/Time Qualifier', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=7, + codes=[] ) ), + Element( u'CUR08', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=8, + codes=[] ) ), + Element( u'CUR09', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=9, + codes=[] ) ), + Element( u'CUR10', Properties(desc=u'Date/Time Qualifier', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=10, + codes=[] ) ), + Element( u'CUR11', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=11, + codes=[] ) ), + Element( u'CUR12', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=12, + codes=[] ) ), + Element( u'CUR13', Properties(desc=u'Date/Time Qualifier', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=13, + codes=[] ) ), + Element( u'CUR14', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=14, + codes=[] ) ), + Element( u'CUR15', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=15, + codes=[] ) ), + Element( u'CUR16', Properties(desc=u'Date/Time Qualifier', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=16, + codes=[] ) ), + Element( u'CUR17', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=17, + codes=[] ) ), + Element( u'CUR18', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=18, + codes=[] ) ), + Element( u'CUR19', Properties(desc=u'Date/Time Qualifier', req_sit=u'N', data_type=(u'ID',u'3',u'3'), position=19, + codes=[] ) ), + Element( u'CUR20', Properties(desc=u'Date', req_sit=u'N', data_type=(u'DT',u'8',u'8'), position=20, + codes=[] ) ), + Element( u'CUR21', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=21, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'0600',req_sit=u'S',repeat=u'1',desc=u'Receiver Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'EV'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'0600',req_sit=u'S',repeat=u'1',desc=u'Version Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'F2'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'DTM', Properties(syntax=u'R020305 C0403 P0506',position=u'0700',req_sit=u'S',repeat=u'1',desc=u'Production Date'), + Element( u'DTM01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'405'] ) ), + Element( u'DTM02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, + codes=[] ) ), + Element( u'DTM03', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=3, + codes=[] ) ), + Element( u'DTM04', Properties(desc=u'Time Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'DTM05', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=5, + codes=[] ) ), + Element( u'DTM06', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=6, + codes=[] ) ), +), +parsed_835_1000A, +parsed_835_1000B, +) +parsed_835_2110 = Loop( u'2110', Properties(position=u'0700',looptype='',repeat=u'999',req_sit=u'S',desc=u'Service Payment Information'), +Segment( u'SVC', Properties(syntax='',position=u'0700',req_sit=u'R',repeat=u'1',desc=u'Service Payment Information'), + Composite( u'C003', Properties(req_sit=u'R',repeat='',refdes='',seq=u'01',desc=u'Composite Medical Procedure Identifier'), + Element( u'SVC01-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[u'AD', u'ER', u'HC', u'HP', u'IV', u'N4', u'N6', u'NU', u'UI', u'WK'] ) ), + Element( u'SVC01-02', Properties(desc=u'Product/Service ID', req_sit=u'R', data_type=(u'AN',u'1',u'48'), position=1, + codes=[] ) ), + Element( u'SVC01-03', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'SVC01-04', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=3, + codes=[] ) ), + Element( u'SVC01-05', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'SVC01-06', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=5, + codes=[] ) ), + Element( u'SVC01-07', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=6, + codes=[] ) ), + Element( u'SVC01-08', Properties(desc=u'Product/Service ID', req_sit=u'N', data_type=(u'AN',u'1',u'48'), position=7, + codes=[] ) ), + ), + Element( u'SVC02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'SVC03', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=3, + codes=[] ) ), + Element( u'SVC04', Properties(desc=u'Product/Service ID', req_sit=u'S', data_type=(u'AN',u'1',u'48'), position=4, + codes=[] ) ), + Element( u'SVC05', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=5, + codes=[] ) ), + Composite( u'C003', Properties(req_sit=u'S',repeat='',refdes='',seq=u'06',desc=u'Composite Medical Procedure Identifier'), + Element( u'SVC06-01', Properties(desc=u'Product/Service ID Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[u'AD', u'ER', u'HC', u'HP', u'IV', u'N4', u'NU', u'WK'] ) ), + Element( u'SVC06-02', Properties(desc=u'Product/Service ID', req_sit=u'R', data_type=(u'AN',u'1',u'48'), position=1, + codes=[] ) ), + Element( u'SVC06-03', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=2, + codes=[] ) ), + Element( u'SVC06-04', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=3, + codes=[] ) ), + Element( u'SVC06-05', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'SVC06-06', Properties(desc=u'Procedure Modifier', req_sit=u'S', data_type=(u'AN',u'2',u'2'), position=5, + codes=[] ) ), + Element( u'SVC06-07', Properties(desc=u'Description', req_sit=u'S', data_type=(u'AN',u'1',u'80'), position=6, + codes=[] ) ), + Element( u'SVC06-08', Properties(desc=u'Product/Service ID', req_sit=u'N', data_type=(u'AN',u'1',u'48'), position=7, + codes=[] ) ), + ), + Element( u'SVC07', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=7, + codes=[] ) ), +), +Segment( u'DTM', Properties(syntax=u'R020305 C0403 P0506',position=u'0800',req_sit=u'S',repeat=u'2',desc=u'Service Date'), + Element( u'DTM01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'150', u'151', u'472'] ) ), + Element( u'DTM02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, + codes=[] ) ), + Element( u'DTM03', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=3, + codes=[] ) ), + Element( u'DTM04', Properties(desc=u'Time Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'DTM05', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=5, + codes=[] ) ), + Element( u'DTM06', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=6, + codes=[] ) ), +), +Segment( u'CAS', Properties(syntax=u'L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917',position=u'0900',req_sit=u'S',repeat=u'99',desc=u'Service Adjustment'), + Element( u'CAS01', Properties(desc=u'Claim Adjustment Group Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'CO', u'OA', u'PI', u'PR'] ) ), + Element( u'CAS02', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'1',u'5'), position=2, + codes=[] ) ), + Element( u'CAS03', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=3, + codes=[] ) ), + Element( u'CAS04', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=4, + codes=[] ) ), + Element( u'CAS05', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=5, + codes=[] ) ), + Element( u'CAS06', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=6, + codes=[] ) ), + Element( u'CAS07', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=7, + codes=[] ) ), + Element( u'CAS08', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=8, + codes=[] ) ), + Element( u'CAS09', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=9, + codes=[] ) ), + Element( u'CAS10', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=10, + codes=[] ) ), + Element( u'CAS11', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=11, + codes=[] ) ), + Element( u'CAS12', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=12, + codes=[] ) ), + Element( u'CAS13', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=13, + codes=[] ) ), + Element( u'CAS14', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=14, + codes=[] ) ), + Element( u'CAS15', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=15, + codes=[] ) ), + Element( u'CAS16', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=16, + codes=[] ) ), + Element( u'CAS17', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=17, + codes=[] ) ), + Element( u'CAS18', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=18, + codes=[] ) ), + Element( u'CAS19', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=19, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1000',req_sit=u'S',repeat=u'8',desc=u'Service Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'1S', u'APC', u'BB', u'E9', u'G1', u'G3', u'LU', u'RB'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1000',req_sit=u'S',repeat=u'1',desc=u'Line Item Control Number'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'6R'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1000',req_sit=u'S',repeat=u'10',desc=u'Rendering Provider Information'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'0B', u'1A', u'1B', u'1C', u'1D', u'1G', u'1H', u'1J', u'D3', u'G2', u'HPI', u'SY', u'TJ'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'1000',req_sit=u'S',repeat=u'5',desc=u'HealthCare Policy Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'0K'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'AMT', Properties(syntax='',position=u'1100',req_sit=u'S',repeat=u'9',desc=u'Service Supplemental Amount'), + Element( u'AMT01', Properties(desc=u'Amount Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'B6', u'KH', u'T', u'T2', u'ZK', u'ZL', u'ZM', u'ZN', u'ZO'] ) ), + Element( u'AMT02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'AMT03', Properties(desc=u'Credit/Debit Flag Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=3, + codes=[] ) ), +), +Segment( u'QTY', Properties(syntax=u'E0204 R0204',position=u'1200',req_sit=u'S',repeat=u'6',desc=u'Service Supplemental Quantity'), + Element( u'QTY01', Properties(desc=u'Quantity Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'ZK', u'ZL', u'ZM', u'ZN', u'ZO'] ) ), + Element( u'QTY02', Properties(desc=u'Quantity', req_sit=u'R', data_type=(u'R',u'1',u'15'), position=2, + codes=[] ) ), + Composite( u'C001', Properties(req_sit=u'N',repeat='',refdes='',seq=u'03',desc=u'Composite Unit of Measure'), + ), + Element( u'QTY04', Properties(desc=u'Free-form Information', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=4, + codes=[] ) ), +), +Segment( u'LQ', Properties(syntax=u'C0102',position=u'1300',req_sit=u'S',repeat=u'99',desc=u'Health Care Remark Codes'), + Element( u'LQ01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'HE', u'RX'] ) ), + Element( u'LQ02', Properties(desc=u'Industry Code', req_sit=u'R', data_type=(u'AN',u'1',u'30'), position=2, + codes=[] ) ), +), +) +parsed_835_2100 = Loop( u'2100', Properties(position=u'0100',looptype='',repeat=u'>1',req_sit=u'R',desc=u'Claim Payment Information'), +Segment( u'CLP', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Claim Payment Information'), + Element( u'CLP01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, + codes=[] ) ), + Element( u'CLP02', Properties(desc=u'Claim Status Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=2, + codes=[u'1', u'19', u'2', u'20', u'21', u'22', u'23', u'25', u'3', u'4'] ) ), + Element( u'CLP03', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=3, + codes=[] ) ), + Element( u'CLP04', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'CLP05', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=5, + codes=[] ) ), + Element( u'CLP06', Properties(desc=u'Claim Filing Indicator Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=6, + codes=[u'12', u'13', u'14', u'15', u'16', u'17', u'AM', u'CH', u'DS', u'HM', u'LM', u'MA', u'MB', u'MC', u'OF', u'TV', u'VA', u'WC', u'ZZ'] ) ), + Element( u'CLP07', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=7, + codes=[] ) ), + Element( u'CLP08', Properties(desc=u'Facility Code Value', req_sit=u'S', data_type=(u'AN',u'1',u'2'), position=8, + codes=[] ) ), + Element( u'CLP09', Properties(desc=u'Claim Frequency Type Code', req_sit=u'S', data_type=(u'ID',u'1',u'1'), position=9, + codes=[] ) ), + Element( u'CLP10', Properties(desc=u'Patient Status Code', req_sit=u'N', data_type=(u'ID',u'1',u'2'), position=10, + codes=[] ) ), + Element( u'CLP11', Properties(desc=u'Diagnosis Related Group (DRG) Code', req_sit=u'S', data_type=(u'ID',u'1',u'4'), position=11, + codes=[] ) ), + Element( u'CLP12', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=12, + codes=[] ) ), + Element( u'CLP13', Properties(desc=u'Percentage as Decimal', req_sit=u'S', data_type=(u'R',u'1',u'10'), position=13, + codes=[] ) ), + Element( u'CLP14', Properties(desc=u'Yes/No Condition or Response Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=14, + codes=[] ) ), +), +Segment( u'CAS', Properties(syntax=u'L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917',position=u'0200',req_sit=u'S',repeat=u'99',desc=u'Claim Adjustment'), + Element( u'CAS01', Properties(desc=u'Claim Adjustment Group Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=1, + codes=[u'CO', u'OA', u'PI', u'PR'] ) ), + Element( u'CAS02', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'1',u'5'), position=2, + codes=[] ) ), + Element( u'CAS03', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=3, + codes=[] ) ), + Element( u'CAS04', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=4, + codes=[] ) ), + Element( u'CAS05', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=5, + codes=[] ) ), + Element( u'CAS06', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=6, + codes=[] ) ), + Element( u'CAS07', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=7, + codes=[] ) ), + Element( u'CAS08', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=8, + codes=[] ) ), + Element( u'CAS09', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=9, + codes=[] ) ), + Element( u'CAS10', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=10, + codes=[] ) ), + Element( u'CAS11', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=11, + codes=[] ) ), + Element( u'CAS12', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=12, + codes=[] ) ), + Element( u'CAS13', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=13, + codes=[] ) ), + Element( u'CAS14', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=14, + codes=[] ) ), + Element( u'CAS15', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=15, + codes=[] ) ), + Element( u'CAS16', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=16, + codes=[] ) ), + Element( u'CAS17', Properties(desc=u'Claim Adjustment Reason Code', req_sit=u'S', data_type=(u'ID',u'1',u'5'), position=17, + codes=[] ) ), + Element( u'CAS18', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=18, + codes=[] ) ), + Element( u'CAS19', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=19, + codes=[] ) ), +), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Patient Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'QC'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'34', u'HN', u'II', u'MI', u'MR'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'S', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'S',repeat=u'1',desc=u'Insured Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'IL'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1', u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'FI', u'II', u'MI'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'S',repeat=u'1',desc=u'Corrected Patient/Insured Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'74'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1', u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'C'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'S', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'S',repeat=u'1',desc=u'Service Provider Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'82'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1', u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'BD', u'BS', u'FI', u'MC', u'PC', u'SL', u'UP', u'XX'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'S',repeat=u'1',desc=u'Crossover Carrier Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'TT'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'N', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'AD', u'FI', u'NI', u'PI', u'PP', u'XV'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'S',repeat=u'1',desc=u'Corrected Priority Payer Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'PR'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'R', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'N', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'AD', u'FI', u'NI', u'PI', u'PP', u'XV'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'NM1', Properties(syntax=u'P0809 C1110 C1203',position=u'0300',req_sit=u'S',repeat=u'1',desc=u'Other Subscriber Name'), + Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'GB'] ) ), + Element( u'NM102', Properties(desc=u'Entity Type Qualifier', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=2, + codes=[u'1', u'2'] ) ), + Element( u'NM103', Properties(desc=u'Name Last or Organization Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=3, + codes=[] ) ), + Element( u'NM104', Properties(desc=u'Name First', req_sit=u'S', data_type=(u'AN',u'1',u'35'), position=4, + codes=[] ) ), + Element( u'NM105', Properties(desc=u'Name Middle', req_sit=u'S', data_type=(u'AN',u'1',u'25'), position=5, + codes=[] ) ), + Element( u'NM106', Properties(desc=u'Name Prefix', req_sit=u'N', data_type=(u'AN',u'1',u'10'), position=6, + codes=[] ) ), + Element( u'NM107', Properties(desc=u'Name Suffix', req_sit=u'S', data_type=(u'AN',u'1',u'10'), position=7, + codes=[] ) ), + Element( u'NM108', Properties(desc=u'Identification Code Qualifier', req_sit=u'S', data_type=(u'ID',u'1',u'2'), position=8, + codes=[u'FI', u'II', u'MI'] ) ), + Element( u'NM109', Properties(desc=u'Identification Code', req_sit=u'S', data_type=(u'AN',u'2',u'80'), position=9, + codes=[] ) ), + Element( u'NM110', Properties(desc=u'Entity Relationship Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=10, + codes=[] ) ), + Element( u'NM111', Properties(desc=u'Entity Identifier Code', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=11, + codes=[] ) ), + Element( u'NM112', Properties(desc=u'Name Last or Organization Name', req_sit=u'N', data_type=(u'AN',u'1',u'60'), position=12, + codes=[] ) ), +), +Segment( u'MIA', Properties(syntax='',position=u'0330',req_sit=u'S',repeat=u'1',desc=u'Inpatient Adjudication Information'), + Element( u'MIA01', Properties(desc=u'Quantity', req_sit=u'R', data_type=(u'R',u'1',u'15'), position=1, + codes=[] ) ), + Element( u'MIA02', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'MIA03', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=3, + codes=[] ) ), + Element( u'MIA04', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'MIA05', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=5, + codes=[] ) ), + Element( u'MIA06', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=6, + codes=[] ) ), + Element( u'MIA07', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=7, + codes=[] ) ), + Element( u'MIA08', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=8, + codes=[] ) ), + Element( u'MIA09', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=9, + codes=[] ) ), + Element( u'MIA10', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=10, + codes=[] ) ), + Element( u'MIA11', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=11, + codes=[] ) ), + Element( u'MIA12', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=12, + codes=[] ) ), + Element( u'MIA13', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=13, + codes=[] ) ), + Element( u'MIA14', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=14, + codes=[] ) ), + Element( u'MIA15', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=15, + codes=[] ) ), + Element( u'MIA16', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=16, + codes=[] ) ), + Element( u'MIA17', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=17, + codes=[] ) ), + Element( u'MIA18', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=18, + codes=[] ) ), + Element( u'MIA19', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=19, + codes=[] ) ), + Element( u'MIA20', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=20, + codes=[] ) ), + Element( u'MIA21', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=21, + codes=[] ) ), + Element( u'MIA22', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=22, + codes=[] ) ), + Element( u'MIA23', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=23, + codes=[] ) ), + Element( u'MIA24', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=24, + codes=[] ) ), +), +Segment( u'MOA', Properties(syntax='',position=u'0350',req_sit=u'S',repeat=u'1',desc=u'Outpatient Adjudication Information'), + Element( u'MOA01', Properties(desc=u'Percentage as Decimal', req_sit=u'S', data_type=(u'R',u'1',u'10'), position=1, + codes=[] ) ), + Element( u'MOA02', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'MOA03', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=3, + codes=[] ) ), + Element( u'MOA04', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=4, + codes=[] ) ), + Element( u'MOA05', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=5, + codes=[] ) ), + Element( u'MOA06', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=6, + codes=[] ) ), + Element( u'MOA07', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=7, + codes=[] ) ), + Element( u'MOA08', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=8, + codes=[] ) ), + Element( u'MOA09', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=9, + codes=[] ) ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'0400',req_sit=u'S',repeat=u'5',desc=u'Other Claim Related Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'1L', u'1W', u'28', u'6P', u'9A', u'9C', u'BB', u'CE', u'EA', u'F8', u'G1', u'G3', u'IG', u'SY'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'REF', Properties(syntax=u'R0203',position=u'0400',req_sit=u'S',repeat=u'10',desc=u'Rendering Provider Identification'), + Element( u'REF01', Properties(desc=u'Reference Identification Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, + codes=[u'0B', u'1A', u'1B', u'1C', u'1D', u'1G', u'1H', u'1J', u'D3', u'G2', u'LU'] ) ), + Element( u'REF02', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=2, + codes=[] ) ), + Element( u'REF03', Properties(desc=u'Description', req_sit=u'N', data_type=(u'AN',u'1',u'80'), position=3, + codes=[] ) ), + Composite( u'C040', Properties(req_sit=u'N',repeat='',refdes='',seq=u'04',desc=u'Reference Identifier'), + ), +), +Segment( u'DTM', Properties(syntax=u'R020305 C0403 P0506',position=u'0500',req_sit=u'S',repeat=u'2',desc=u'Statement From or To Date'), + Element( u'DTM01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'232', u'233'] ) ), + Element( u'DTM02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, + codes=[] ) ), + Element( u'DTM03', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=3, + codes=[] ) ), + Element( u'DTM04', Properties(desc=u'Time Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'DTM05', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=5, + codes=[] ) ), + Element( u'DTM06', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=6, + codes=[] ) ), +), +Segment( u'DTM', Properties(syntax=u'R020305 C0403 P0506',position=u'0500',req_sit=u'S',repeat=u'1',desc=u'Coverage Expiration Date'), + Element( u'DTM01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'036'] ) ), + Element( u'DTM02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, + codes=[] ) ), + Element( u'DTM03', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=3, + codes=[] ) ), + Element( u'DTM04', Properties(desc=u'Time Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'DTM05', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=5, + codes=[] ) ), + Element( u'DTM06', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=6, + codes=[] ) ), +), +Segment( u'DTM', Properties(syntax=u'R020305 C0403 P0506',position=u'0500',req_sit=u'S',repeat=u'1',desc=u'Claim Received Date'), + Element( u'DTM01', Properties(desc=u'Date/Time Qualifier', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'050'] ) ), + Element( u'DTM02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, + codes=[] ) ), + Element( u'DTM03', Properties(desc=u'Time', req_sit=u'N', data_type=(u'TM',u'4',u'8'), position=3, + codes=[] ) ), + Element( u'DTM04', Properties(desc=u'Time Code', req_sit=u'N', data_type=(u'ID',u'2',u'2'), position=4, + codes=[] ) ), + Element( u'DTM05', Properties(desc=u'Date Time Period Format Qualifier', req_sit=u'N', data_type=(u'ID',u'2',u'3'), position=5, + codes=[] ) ), + Element( u'DTM06', Properties(desc=u'Date Time Period', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=6, + codes=[] ) ), +), +Segment( u'PER', Properties(syntax=u'P0304 P0506 P0708',position=u'0600',req_sit=u'S',repeat=u'2',desc=u'Claim Contact Information'), + Element( u'PER01', Properties(desc=u'Contact Function Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'CX'] ) ), + Element( u'PER02', Properties(desc=u'Name', req_sit=u'S', data_type=(u'AN',u'1',u'60'), position=2, + codes=[] ) ), + Element( u'PER03', Properties(desc=u'Communication Number Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=3, + codes=[u'EM', u'FX', u'TE'] ) ), + Element( u'PER04', Properties(desc=u'Communication Number', req_sit=u'R', data_type=(u'AN',u'1',u'256'), position=4, + codes=[] ) ), + Element( u'PER05', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=5, + codes=[u'EM', u'EX', u'FX', u'TE'] ) ), + Element( u'PER06', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=6, + codes=[] ) ), + Element( u'PER07', Properties(desc=u'Communication Number Qualifier', req_sit=u'S', data_type=(u'ID',u'2',u'2'), position=7, + codes=[u'EX'] ) ), + Element( u'PER08', Properties(desc=u'Communication Number', req_sit=u'S', data_type=(u'AN',u'1',u'256'), position=8, + codes=[] ) ), + Element( u'PER09', Properties(desc=u'Contact Inquiry Reference', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=9, + codes=[] ) ), +), +Segment( u'AMT', Properties(syntax='',position=u'0620',req_sit=u'S',repeat=u'13',desc=u'Claim Supplemental Information'), + Element( u'AMT01', Properties(desc=u'Amount Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, + codes=[u'AU', u'D8', u'DY', u'F5', u'I', u'NL', u'T', u'T2', u'ZK', u'ZL', u'ZM', u'ZN', u'ZO'] ) ), + Element( u'AMT02', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'AMT03', Properties(desc=u'Credit/Debit Flag Code', req_sit=u'N', data_type=(u'ID',u'1',u'1'), position=3, + codes=[] ) ), +), +Segment( u'QTY', Properties(syntax=u'E0204 R0204',position=u'0640',req_sit=u'S',repeat=u'14',desc=u'Claim Supplemental Information Quantity'), + Element( u'QTY01', Properties(desc=u'Quantity Qualifier', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'CA', u'CD', u'LA', u'LE', u'NE', u'NR', u'OU', u'PS', u'VS', u'ZK', u'ZL', u'ZM', u'ZN', u'ZO'] ) ), + Element( u'QTY02', Properties(desc=u'Quantity', req_sit=u'R', data_type=(u'R',u'1',u'15'), position=2, + codes=[] ) ), + Composite( u'C001', Properties(req_sit=u'N',repeat='',refdes='',seq=u'03',desc=u'Composite Unit of Measure'), + ), + Element( u'QTY04', Properties(desc=u'Free-form Information', req_sit=u'N', data_type=(u'AN',u'1',u'30'), position=4, + codes=[] ) ), +), +parsed_835_2110, +) +parsed_835_2000 = Loop( u'2000', Properties(position=u'0030',looptype='',repeat=u'>1',req_sit=u'S',desc=u'Header Number'), +Segment( u'LX', Properties(syntax='',position=u'0030',req_sit=u'R',repeat=u'1',desc=u'Header Number'), + Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, + codes=[] ) ), +), +Segment( u'TS3', Properties(syntax='',position=u'0050',req_sit=u'S',repeat=u'1',desc=u'Provider Summary Information'), + Element( u'TS301', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + Element( u'TS302', Properties(desc=u'Facility Code Value', req_sit=u'R', data_type=(u'AN',u'1',u'2'), position=2, + codes=[] ) ), + Element( u'TS303', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=3, + codes=[] ) ), + Element( u'TS304', Properties(desc=u'Quantity', req_sit=u'R', data_type=(u'R',u'1',u'15'), position=4, + codes=[] ) ), + Element( u'TS305', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=5, + codes=[] ) ), + Element( u'TS306', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=6, + codes=[] ) ), + Element( u'TS307', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=7, + codes=[] ) ), + Element( u'TS308', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=8, + codes=[] ) ), + Element( u'TS309', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=9, + codes=[] ) ), + Element( u'TS310', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=10, + codes=[] ) ), + Element( u'TS311', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=11, + codes=[] ) ), + Element( u'TS312', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=12, + codes=[] ) ), + Element( u'TS313', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=13, + codes=[] ) ), + Element( u'TS314', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=14, + codes=[] ) ), + Element( u'TS315', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=15, + codes=[] ) ), + Element( u'TS316', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=16, + codes=[] ) ), + Element( u'TS317', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=17, + codes=[] ) ), + Element( u'TS318', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=18, + codes=[] ) ), + Element( u'TS319', Properties(desc=u'Monetary Amount', req_sit=u'N', data_type=(u'R',u'1',u'18'), position=19, + codes=[] ) ), + Element( u'TS320', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=20, + codes=[] ) ), + Element( u'TS321', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=21, + codes=[] ) ), + Element( u'TS322', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=22, + codes=[] ) ), + Element( u'TS323', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=23, + codes=[] ) ), + Element( u'TS324', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=24, + codes=[] ) ), +), +Segment( u'TS2', Properties(syntax='',position=u'0070',req_sit=u'S',repeat=u'1',desc=u'Provider Supplemental Summary Information'), + Element( u'TS201', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=1, + codes=[] ) ), + Element( u'TS202', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=2, + codes=[] ) ), + Element( u'TS203', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=3, + codes=[] ) ), + Element( u'TS204', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Element( u'TS205', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=5, + codes=[] ) ), + Element( u'TS206', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=6, + codes=[] ) ), + Element( u'TS207', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=7, + codes=[] ) ), + Element( u'TS208', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=8, + codes=[] ) ), + Element( u'TS209', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=9, + codes=[] ) ), + Element( u'TS210', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=10, + codes=[] ) ), + Element( u'TS211', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=11, + codes=[] ) ), + Element( u'TS212', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=12, + codes=[] ) ), + Element( u'TS213', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=13, + codes=[] ) ), + Element( u'TS214', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=14, + codes=[] ) ), + Element( u'TS215', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=15, + codes=[] ) ), + Element( u'TS216', Properties(desc=u'Quantity', req_sit=u'S', data_type=(u'R',u'1',u'15'), position=16, + codes=[] ) ), + Element( u'TS217', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=17, + codes=[] ) ), + Element( u'TS218', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=18, + codes=[] ) ), + Element( u'TS219', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=19, + codes=[] ) ), +), +parsed_835_2100, +) +parsed_835_DETAIL = Loop( u'DETAIL', Properties(position=u'0120',looptype=u'wrapper',repeat=u'>1',req_sit=u'S',desc=u'Table2 - Detail'), +parsed_835_2000, +) +parsed_835_FOOTER = Loop( u'FOOTER', Properties(position=u'0130',looptype=u'wrapper',repeat=u'1',req_sit=u'S',desc=u'Footer'), +Segment( u'PLB', Properties(syntax=u'P0506 P0708 P0910 P1112 P1314',position=u'0100',req_sit=u'S',repeat=u'>1',desc=u'Provider Adjustment'), + Element( u'PLB01', Properties(desc=u'Reference Identification', req_sit=u'R', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + Element( u'PLB02', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=2, + codes=[] ) ), + Composite( u'C042', Properties(req_sit=u'R',repeat='',refdes='',seq=u'03',desc=u'Adjustment Identifier'), + Element( u'PLB03-01', Properties(desc=u'Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[u'50', u'51', u'72', u'90', u'AH', u'AM', u'AP', u'B2', u'B3', u'BD', u'BN', u'C5', u'CR', u'CS', u'CT', u'CV', u'CW', u'DM', u'E3', u'FB', u'FC', u'GO', u'HM', u'IP', u'IR', u'IS', u'J1', u'L3', u'L6', u'LE', u'LS', u'OA', u'OB', u'PI', u'PL', u'RA', u'RE', u'SL', u'TL', u'WO', u'WU'] ) ), + Element( u'PLB03-02', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + ), + Element( u'PLB04', Properties(desc=u'Monetary Amount', req_sit=u'R', data_type=(u'R',u'1',u'18'), position=4, + codes=[] ) ), + Composite( u'C042', Properties(req_sit=u'S',repeat='',refdes='',seq=u'05',desc=u'Adjustment Identifier'), + Element( u'PLB05-01', Properties(desc=u'Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[] ) ), + Element( u'PLB05-02', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + ), + Element( u'PLB06', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=6, + codes=[] ) ), + Composite( u'C042', Properties(req_sit=u'S',repeat='',refdes='',seq=u'07',desc=u'Adjustment Identifier'), + Element( u'PLB07-01', Properties(desc=u'Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[] ) ), + Element( u'PLB07-02', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + ), + Element( u'PLB08', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=8, + codes=[] ) ), + Composite( u'C042', Properties(req_sit=u'S',repeat='',refdes='',seq=u'09',desc=u'Adjustment Identifier'), + Element( u'PLB09-01', Properties(desc=u'Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[] ) ), + Element( u'PLB09-02', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + ), + Element( u'PLB10', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=10, + codes=[] ) ), + Composite( u'C042', Properties(req_sit=u'S',repeat='',refdes='',seq=u'11',desc=u'Adjustment Identifier'), + Element( u'PLB11-01', Properties(desc=u'Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[] ) ), + Element( u'PLB11-02', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + ), + Element( u'PLB12', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=12, + codes=[] ) ), + Composite( u'C042', Properties(req_sit=u'S',repeat='',refdes='',seq=u'13',desc=u'Adjustment Identifier'), + Element( u'PLB13-01', Properties(desc=u'Adjustment Reason Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=0, + codes=[] ) ), + Element( u'PLB13-02', Properties(desc=u'Reference Identification', req_sit=u'S', data_type=(u'AN',u'1',u'50'), position=1, + codes=[] ) ), + ), + Element( u'PLB14', Properties(desc=u'Monetary Amount', req_sit=u'S', data_type=(u'R',u'1',u'18'), position=14, + codes=[] ) ), +), +) +parsed_835_ST_LOOP = Loop( u'ST_LOOP', Properties(position=u'0200',looptype=u'explicit',repeat=u'>1',req_sit=u'R',desc=u'Transaction Set Header'), +Segment( u'ST', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Transaction Set Header'), + Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, + codes=[u'835'] ) ), + Element( u'ST02', Properties(desc=u'Transaction Set Control Number', req_sit=u'R', data_type=(u'AN',u'4',u'9'), position=2, + codes=[] ) ), + Element( u'ST03', Properties(desc=u'Implementation Convention Reference', req_sit=u'N', data_type=(u'AN',u'1',u'35'), position=3, + codes=[u'005010X221A1'] ) ), +), +parsed_835_HEADER, +parsed_835_DETAIL, +parsed_835_FOOTER, +Segment( u'SE', Properties(syntax='',position=u'0200',req_sit=u'R',repeat=u'1',desc=u'Transaction Set Trailer'), + Element( u'SE01', Properties(desc=u'Number of Included Segments', req_sit=u'R', data_type=(u'N0',u'1',u'10'), position=1, + codes=[] ) ), + Element( u'SE02', Properties(desc=u'Transaction Set Control Number', req_sit=u'R', data_type=(u'AN',u'4',u'9'), position=2, + codes=[] ) ), +), +) +parsed_835_GS_LOOP = Loop( u'GS_LOOP', Properties(position=u'0200',looptype=u'explicit',repeat=u'>1',req_sit=u'R',desc=u'Functional Group Header'), +Segment( u'GS', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Functional Group Header'), + Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'HP'] ) ), + Element( u'GS02', Properties(desc=u'Application Senders Code', req_sit=u'R', data_type=(u'AN',u'2',u'15'), position=2, + codes=[] ) ), + Element( u'GS03', Properties(desc=u'124', req_sit=u'R', data_type=(u'AN',u'2',u'15'), position=3, + codes=[] ) ), + Element( u'GS04', Properties(desc=u'Date', req_sit=u'R', data_type=(u'DT',u'8',u'8'), position=4, + codes=[] ) ), + Element( u'GS05', Properties(desc=u'Time', req_sit=u'R', data_type=(u'TM',u'4',u'8'), position=5, + codes=[] ) ), + Element( u'GS06', Properties(desc=u'Group Control Number', req_sit=u'R', data_type=(u'N0',u'1',u'9'), position=6, + codes=[] ) ), + Element( u'GS07', Properties(desc=u'Responsible Agency Code', req_sit=u'R', data_type=(u'ID',u'1',u'2'), position=7, + codes=[u'X'] ) ), + Element( u'GS08', Properties(desc=u'Version / Release / Industry Identifier Code', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=8, + codes=[u'005010X221A1'] ) ), +), +parsed_835_ST_LOOP, +Segment( u'GE', Properties(syntax='',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Functional Group Trailer'), + Element( u'GE01', Properties(desc=u'97', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, + codes=[] ) ), + Element( u'GE02', Properties(desc=u'Group Control Number', req_sit=u'R', data_type=(u'N0',u'1',u'9'), position=2, + codes=[] ) ), +), +) +parsed_835_ISA_LOOP = Loop( u'ISA_LOOP', Properties(position=u'0010',looptype=u'explicit',repeat=u'>1',req_sit=u'R',desc=u'Interchange Control Header'), +Segment( u'ISA', Properties(syntax='',position=u'0100',req_sit=u'R',repeat=u'1',desc=u'Interchange Control Header'), + Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, + codes=[u'00', u'03'] ) ), + Element( u'ISA02', Properties(desc=u'I02', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=2, + codes=[] ) ), + Element( u'ISA03', Properties(desc=u'I03', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=3, + codes=[u'00', u'01'] ) ), + Element( u'ISA04', Properties(desc=u'I04', req_sit=u'R', data_type=(u'AN',u'10',u'10'), position=4, + codes=[] ) ), + Element( u'ISA05', Properties(desc=u'I05', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=5, + codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', u'ZZ'] ) ), + Element( u'ISA06', Properties(desc=u'I06', req_sit=u'R', data_type=(u'AN',u'15',u'15'), position=6, + codes=[] ) ), + Element( u'ISA07', Properties(desc=u'I05', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=7, + codes=[u'01', u'14', u'20', u'27', u'28', u'29', u'30', u'33', u'ZZ'] ) ), + Element( u'ISA08', Properties(desc=u'I07', req_sit=u'R', data_type=(u'AN',u'15',u'15'), position=8, + codes=[] ) ), + Element( u'ISA09', Properties(desc=u'I08', req_sit=u'R', data_type=(u'DT',u'6',u'6'), position=9, + codes=[] ) ), + Element( u'ISA10', Properties(desc=u'I09', req_sit=u'R', data_type=(u'TM',u'4',u'4'), position=10, + codes=[] ) ), + Element( u'ISA11', Properties(desc=u'I65', req_sit=u'R', data_type=(u'AN',u'1',u'1'), position=11, + codes=[] ) ), + Element( u'ISA12', Properties(desc=u'I11', req_sit=u'R', data_type=(u'ID',u'5',u'5'), position=12, + codes=[u'00501'] ) ), + Element( u'ISA13', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=13, + codes=[] ) ), + Element( u'ISA14', Properties(desc=u'I13', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=14, + codes=[u'0', u'1'] ) ), + Element( u'ISA15', Properties(desc=u'I14', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=15, + codes=[u'P', u'T'] ) ), + Element( u'ISA16', Properties(desc=u'I15', req_sit=u'R', data_type=(u'AN',u'1',u'1'), position=16, + codes=[] ) ), +), +parsed_835_GS_LOOP, +Segment( u'TA1', Properties(syntax='',position=u'0200',req_sit=u'S',repeat=u'1',desc=u'Interchange Acknowledgement'), + Element( u'TA101', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=1, + codes=[] ) ), + Element( u'TA102', Properties(desc=u'I08', req_sit=u'R', data_type=(u'DT',u'6',u'6'), position=2, + codes=[] ) ), + Element( u'TA103', Properties(desc=u'I09', req_sit=u'R', data_type=(u'TM',u'4',u'4'), position=3, + codes=[] ) ), + Element( u'TA104', Properties(desc=u'I17', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=4, + codes=[u'A', u'E', u'R'] ) ), + Element( u'TA105', Properties(desc=u'I18', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=5, + codes=[u'000', u'001', u'002', u'003', u'004', u'005', u'006', u'007', u'008', u'009', u'010', u'011', u'012', u'013', u'014', u'015', u'016', u'017', u'018', u'019', u'020', u'021', u'022', u'023', u'024', u'025', u'026', u'027', u'028', u'029', u'030', u'031'] ) ), +), +Segment( u'IEA', Properties(syntax='',position=u'0300',req_sit=u'R',repeat=u'1',desc=u'Interchange Control Trailer'), + Element( u'IEA01', Properties(desc=u'I16', req_sit=u'R', data_type=(u'N0',u'1',u'5'), position=1, + codes=[] ) ), + Element( u'IEA02', Properties(desc=u'I12', req_sit=u'R', data_type=(u'N0',u'9',u'9'), position=2, + codes=[] ) ), +), +) +parsed_835 = Message( u'835W1', Properties(desc=u'HIPAA Health Care Claim Payment/Advice 005010X221A1 835W1'), +parsed_835_ISA_LOOP, +) + diff --git a/tigershark/parsers/M837_4010_X096_A1.py b/tigershark/parsers/M837_4010_X096_A1.py index 3eb5f1a..5f61d59 100644 --- a/tigershark/parsers/M837_4010_X096_A1.py +++ b/tigershark/parsers/M837_4010_X096_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:30:01.728840 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_837_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Submitter Name'), +parsed_837_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Submitter Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Submitter Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'41'] ) ), @@ -48,7 +48,7 @@ codes=[] ) ), ), ) -parsed_837_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Receiver Name'), +parsed_837_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'40'] ) ), @@ -74,7 +74,7 @@ codes=[] ) ), ), ) -parsed_837_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_837_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0019'] ) ), @@ -102,7 +102,7 @@ parsed_837_1000A, parsed_837_1000B, ) -parsed_837_2010AA = Loop( u'2010AA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Billing Provider Name'), +parsed_837_2010AA = Loop( u'2010AA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Billing Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Billing Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'85'] ) ), @@ -188,7 +188,7 @@ codes=[] ) ), ), ) -parsed_837_2010AB = Loop( u'2010AB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Pay-To Provider Name'), +parsed_837_2010AB = Loop( u'2010AB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Pay-To Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Pay-To Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'87'] ) ), @@ -244,7 +244,7 @@ ), ), ) -parsed_837_2010BA = Loop( u'2010BA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Subscriber Name'), +parsed_837_2010BA = Loop( u'2010BA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -330,7 +330,7 @@ ), ), ) -parsed_837_2010BB = Loop( u'2010BB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Credit/Debit Card Account Holder Name'), +parsed_837_2010BB = Loop( u'2010BB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Credit/Debit Card Account Holder Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Credit/Debit Card Account Holder Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'AO'] ) ), @@ -366,7 +366,7 @@ ), ), ) -parsed_837_2010BC = Loop( u'2010BC', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Payer Name'), +parsed_837_2010BC = Loop( u'2010BC', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -422,7 +422,7 @@ ), ), ) -parsed_837_2010BD = Loop( u'2010BD', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Responsible Party Name'), +parsed_837_2010BD = Loop( u'2010BD', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Responsible Party Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Responsible Party Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QD'] ) ), @@ -468,7 +468,7 @@ codes=[] ) ), ), ) -parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), +parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), Segment( u'CR7', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'242',desc=u'Home Health Care Plan Information'), Element( u'CR701', Properties(desc=u'Discipline Type Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'AI', u'MS', u'OT', u'PT', u'SN', u'ST'] ) ), @@ -496,7 +496,7 @@ codes=[u'D', u'E', u'F'] ) ), ), ) -parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Attending Physician Name'), +parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Attending Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Attending Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'71'] ) ), @@ -546,7 +546,7 @@ ), ), ) -parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Operating Physician Name'), +parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Operating Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Operating Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'72'] ) ), @@ -596,7 +596,7 @@ ), ), ) -parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Other Provider Name'), +parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Other Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Other Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'73'] ) ), @@ -646,7 +646,7 @@ ), ), ) -parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Name'), +parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Service Facility Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FA'] ) ), @@ -716,7 +716,7 @@ ), ), ) -parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), +parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -772,7 +772,7 @@ ), ), ) -parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), +parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -846,7 +846,7 @@ ), ), ) -parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), +parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Patient Information'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -882,7 +882,7 @@ ), ), ) -parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Attending Provider'), +parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Attending Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Attending Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'71'] ) ), @@ -918,7 +918,7 @@ ), ), ) -parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Operating Provider'), +parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Operating Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Operating Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'72'] ) ), @@ -954,7 +954,7 @@ ), ), ) -parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Other Provider'), +parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Other Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Other Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'73'] ) ), @@ -990,7 +990,7 @@ ), ), ) -parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Provider'), +parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Service Facility Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FA'] ) ), @@ -1026,7 +1026,7 @@ ), ), ) -parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), +parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), Segment( u'SBR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'290',desc=u'Other Subscriber Information'), Element( u'SBR01', Properties(desc=u'Payer Responsibility Sequence Number Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'P', u'S', u'T'] ) ), @@ -1287,7 +1287,7 @@ parsed_837_2330F, parsed_837_2330H, ) -parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), +parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), Segment( u'LIN', Properties(syntax=u'P0405 P0607 P0809 P1011 P1213 P1415 P1617 P1819 P2021 P2223 P2425 P2627 P2829 P3031',req_sit=u'S',repeat=u'1',pos=u'494',desc=u'Drug Identification'), Element( u'LIN01', Properties(desc=u'Assigned Identification', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=1, codes=[] ) ), @@ -1417,7 +1417,7 @@ ), ), ) -parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Attending Physician Name'), +parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Attending Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Attending Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'71'] ) ), @@ -1467,7 +1467,7 @@ ), ), ) -parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Operating Physician Name'), +parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Operating Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Operating Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'72'] ) ), @@ -1517,7 +1517,7 @@ ), ), ) -parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Provider Name'), +parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Other Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'73'] ) ), @@ -1567,7 +1567,7 @@ ), ), ) -parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Service Line Adjudication Information'), +parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Service Line Adjudication Information'), Segment( u'SVD', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Service Line Adjudication Information'), Element( u'SVD01', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=1, codes=[] ) ), @@ -1645,7 +1645,7 @@ codes=[] ) ), ), ) -parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'999',pos=u'365',req_sit=u'R',desc=u'Service Line Number'), +parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'999',pos=u'365',req_sit=u'R',desc=u'Service Line Number'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Service Line Number'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -1776,7 +1776,7 @@ parsed_837_2420C, parsed_837_2430, ) -parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), +parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), Segment( u'CLM', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information'), Element( u'CLM01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, codes=[] ) ), @@ -3733,7 +3733,7 @@ parsed_837_2320, parsed_837_2400, ) -parsed_837_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Patient Name'), +parsed_837_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Patient Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Patient Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -3819,7 +3819,7 @@ ), ), ) -parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), +parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), Segment( u'CR7', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'242',desc=u'Home Health Care Plan Information'), Element( u'CR701', Properties(desc=u'Discipline Type Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'AI', u'MS', u'OT', u'PT', u'SN', u'ST'] ) ), @@ -3847,7 +3847,7 @@ codes=[u'D', u'E', u'F'] ) ), ), ) -parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Attending Physician Name'), +parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Attending Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Attending Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'71'] ) ), @@ -3897,7 +3897,7 @@ ), ), ) -parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Operating Physician Name'), +parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Operating Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Operating Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'72'] ) ), @@ -3947,7 +3947,7 @@ ), ), ) -parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Other Provider Name'), +parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Other Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Other Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'73'] ) ), @@ -3997,7 +3997,7 @@ ), ), ) -parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Name'), +parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Service Facility Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FA'] ) ), @@ -4067,7 +4067,7 @@ ), ), ) -parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), +parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -4123,7 +4123,7 @@ ), ), ) -parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), +parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -4197,7 +4197,7 @@ ), ), ) -parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), +parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Patient Information'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -4233,7 +4233,7 @@ ), ), ) -parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Attending Provider'), +parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Attending Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Attending Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'71'] ) ), @@ -4269,7 +4269,7 @@ ), ), ) -parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Operating Provider'), +parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Operating Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Operating Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'72'] ) ), @@ -4305,7 +4305,7 @@ ), ), ) -parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Other Provider'), +parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Other Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Other Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'73'] ) ), @@ -4341,7 +4341,7 @@ ), ), ) -parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Provider'), +parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Service Facility Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FA'] ) ), @@ -4377,7 +4377,7 @@ ), ), ) -parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), +parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), Segment( u'SBR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'290',desc=u'Other Subscriber Information'), Element( u'SBR01', Properties(desc=u'Payer Responsibility Sequence Number Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'P', u'S', u'T'] ) ), @@ -4638,7 +4638,7 @@ parsed_837_2330F, parsed_837_2330H, ) -parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), +parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), Segment( u'LIN', Properties(syntax=u'P0405 P0607 P0809 P1011 P1213 P1415 P1617 P1819 P2021 P2223 P2425 P2627 P2829 P3031',req_sit=u'S',repeat=u'1',pos=u'494',desc=u'Drug Identification'), Element( u'LIN01', Properties(desc=u'Assigned Identification', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=1, codes=[] ) ), @@ -4758,7 +4758,7 @@ codes=[] ) ), ), ) -parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Attending Physician Name'), +parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Attending Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Attending Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'71'] ) ), @@ -4808,7 +4808,7 @@ ), ), ) -parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Operating Physician Name'), +parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Operating Physician Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Operating Physician Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'72'] ) ), @@ -4858,7 +4858,7 @@ ), ), ) -parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Provider Name'), +parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Other Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'73'] ) ), @@ -4908,7 +4908,7 @@ ), ), ) -parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Service Line Adjudication Information'), +parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Service Line Adjudication Information'), Segment( u'SVD', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Service Line Adjudication Information'), Element( u'SVD01', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=1, codes=[] ) ), @@ -4986,7 +4986,7 @@ codes=[] ) ), ), ) -parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'999',pos=u'365',req_sit=u'R',desc=u'Service Line Number'), +parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'999',pos=u'365',req_sit=u'R',desc=u'Service Line Number'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Service Line Number'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -5117,7 +5117,7 @@ parsed_837_2420C, parsed_837_2430, ) -parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'R',desc=u'Claim Information'), +parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'R',desc=u'Claim Information'), Segment( u'CLM', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information'), Element( u'CLM01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, codes=[] ) ), @@ -7074,7 +7074,7 @@ parsed_837_2320, parsed_837_2400, ) -parsed_837_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'160',req_sit=u'S',desc=u'Patient Hierarchical Level'), +parsed_837_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'160',req_sit=u'S',desc=u'Patient Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Patient Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -7108,7 +7108,7 @@ parsed_837_2010CA, parsed_837_2300, ) -parsed_837_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Subscriber Hierarchichal Level'), +parsed_837_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Subscriber Hierarchichal Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Subscriber Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -7146,7 +7146,7 @@ parsed_837_2300, parsed_837_2000C, ) -parsed_837_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Billing/Pay-To Provider Hierarchical Level'), +parsed_837_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Billing/Pay-To Provider Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Billing/Pay-To Provider Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -7219,10 +7219,10 @@ parsed_837_2010AB, parsed_837_2000B, ) -parsed_837_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_837_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_837_2000A, ) -parsed_837_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_837_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'837'] ) ), @@ -7238,7 +7238,7 @@ codes=[] ) ), ), ) -parsed_837_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_837_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HC'] ) ), @@ -7265,7 +7265,7 @@ codes=[] ) ), ), ) -parsed_837_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_837_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -7320,7 +7320,7 @@ codes=[] ) ), ), ) -parsed_837 = Message( u'837', Properties(desc=u'HIPAA Health Care Claim: Institutional X096A1-837'), +parsed_837 = Message( u'837', Properties(desc=u'HIPAA Health Care Claim: Institutional X096A1-837'), parsed_837_ISA_LOOP, ) diff --git a/tigershark/parsers/M837_4010_X097_A1.py b/tigershark/parsers/M837_4010_X097_A1.py index 0796783..8536571 100644 --- a/tigershark/parsers/M837_4010_X097_A1.py +++ b/tigershark/parsers/M837_4010_X097_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:30:02.716575 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_837_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Submitter Name'), +parsed_837_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Submitter Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Submitter Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'41'] ) ), @@ -48,7 +48,7 @@ codes=[] ) ), ), ) -parsed_837_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Receiver Name'), +parsed_837_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Receiver Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'40'] ) ), @@ -74,7 +74,7 @@ codes=[] ) ), ), ) -parsed_837_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_837_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0019'] ) ), @@ -102,7 +102,7 @@ parsed_837_1000A, parsed_837_1000B, ) -parsed_837_2010AA = Loop( u'2010AA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Billing Provider Name'), +parsed_837_2010AA = Loop( u'2010AA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Billing Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Billing Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'85'] ) ), @@ -168,7 +168,7 @@ ), ), ) -parsed_837_2010AB = Loop( u'2010AB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u"Pay-To Provider's Name"), +parsed_837_2010AB = Loop( u'2010AB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u"Pay-To Provider's Name"), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u"Pay-To Provider's Name"), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'87'] ) ), @@ -224,7 +224,7 @@ ), ), ) -parsed_837_2010BA = Loop( u'2010BA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Subscriber Name'), +parsed_837_2010BA = Loop( u'2010BA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -310,7 +310,7 @@ ), ), ) -parsed_837_2010BB = Loop( u'2010BB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Payer Name'), +parsed_837_2010BB = Loop( u'2010BB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -366,7 +366,7 @@ ), ), ) -parsed_837_2010BC = Loop( u'2010BC', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Credit/Debit Card Holder Name'), +parsed_837_2010BC = Loop( u'2010BC', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Credit/Debit Card Holder Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Credit/Debit Card Holder Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'AO'] ) ), @@ -402,7 +402,7 @@ ), ), ) -parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), +parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Referring Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -452,7 +452,7 @@ ), ), ) -parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -502,7 +502,7 @@ ), ), ) -parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), +parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FA'] ) ), @@ -538,7 +538,7 @@ ), ), ) -parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Assistant Surgeon Name'), +parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Assistant Surgeon Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Assistant Surgeon Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DD'] ) ), @@ -588,7 +588,7 @@ ), ), ) -parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), +parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -644,7 +644,7 @@ ), ), ) -parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), +parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -728,7 +728,7 @@ ), ), ) -parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), +parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Patient Information'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -764,7 +764,7 @@ ), ), ) -parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), +parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Referring Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -800,7 +800,7 @@ ), ), ) -parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), +parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Rendering Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -836,7 +836,7 @@ ), ), ) -parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), +parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), Segment( u'SBR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'290',desc=u'Other Subscriber Information'), Element( u'SBR01', Properties(desc=u'Payer Responsibility Sequence Number Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'P', u'S', u'T'] ) ), @@ -993,7 +993,7 @@ parsed_837_2330D, parsed_837_2330E, ) -parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -1043,7 +1043,7 @@ ), ), ) -parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), +parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Other Payer Prior Authorization or Referral Number'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -1079,7 +1079,7 @@ ), ), ) -parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Assistant Surgeon Name'), +parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Assistant Surgeon Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'500',desc=u'Assistant Surgeon Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DD'] ) ), @@ -1129,7 +1129,7 @@ ), ), ) -parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), +parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), Segment( u'SVD', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Line Adjudication Information'), Element( u'SVD01', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=1, codes=[] ) ), @@ -1207,7 +1207,7 @@ codes=[] ) ), ), ) -parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Line Counter'), +parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Line Counter'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Line Counter'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -1377,7 +1377,7 @@ parsed_837_2420C, parsed_837_2430, ) -parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), +parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), Segment( u'CLM', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information'), Element( u'CLM01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, codes=[] ) ), @@ -1605,7 +1605,7 @@ parsed_837_2320, parsed_837_2400, ) -parsed_837_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Patient Name'), +parsed_837_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Patient Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Patient Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -1691,7 +1691,7 @@ ), ), ) -parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), +parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Referring Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -1741,7 +1741,7 @@ ), ), ) -parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -1791,7 +1791,7 @@ ), ), ) -parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), +parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'FA'] ) ), @@ -1827,7 +1827,7 @@ ), ), ) -parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Assistant Surgeon Name'), +parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Assistant Surgeon Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Assistant Surgeon Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DD'] ) ), @@ -1877,7 +1877,7 @@ ), ), ) -parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), +parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -1933,7 +1933,7 @@ ), ), ) -parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), +parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -2017,7 +2017,7 @@ ), ), ) -parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), +parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Patient Information'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -2053,7 +2053,7 @@ ), ), ) -parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), +parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Referring Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -2089,7 +2089,7 @@ ), ), ) -parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), +parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Rendering Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -2125,7 +2125,7 @@ ), ), ) -parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), +parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), Segment( u'SBR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'290',desc=u'Other Subscriber Information'), Element( u'SBR01', Properties(desc=u'Payer Responsibility Sequence Number Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'P', u'S', u'T'] ) ), @@ -2282,7 +2282,7 @@ parsed_837_2330D, parsed_837_2330E, ) -parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -2332,7 +2332,7 @@ ), ), ) -parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), +parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), Segment( u'NM1', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Other Payer Prior Authorization or Referral Number'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -2368,7 +2368,7 @@ ), ), ) -parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Assistant Surgeon Name'), +parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Assistant Surgeon Name'), Segment( u'NM1', Properties(syntax='',req_sit=u'S',repeat=u'1',pos=u'500',desc=u'Assistant Surgeon Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DD'] ) ), @@ -2418,7 +2418,7 @@ ), ), ) -parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), +parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), Segment( u'SVD', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Line Adjudication Information'), Element( u'SVD01', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=1, codes=[] ) ), @@ -2496,7 +2496,7 @@ codes=[] ) ), ), ) -parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Line Counter'), +parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Line Counter'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Line Counter'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -2666,7 +2666,7 @@ parsed_837_2420C, parsed_837_2430, ) -parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'R',desc=u'Claim Information'), +parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'R',desc=u'Claim Information'), Segment( u'CLM', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information'), Element( u'CLM01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, codes=[] ) ), @@ -2894,7 +2894,7 @@ parsed_837_2320, parsed_837_2400, ) -parsed_837_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'140',req_sit=u'S',desc=u'Patient Hierarchical Level'), +parsed_837_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'140',req_sit=u'S',desc=u'Patient Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Patient Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -2928,7 +2928,7 @@ parsed_837_2010CA, parsed_837_2300, ) -parsed_837_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Subscriber Hierarchical Level'), +parsed_837_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Subscriber Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Subscriber Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -2965,7 +2965,7 @@ parsed_837_2300, parsed_837_2000C, ) -parsed_837_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Billing/Pay-To Provider Hierarchical Level'), +parsed_837_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Billing/Pay-To Provider Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Billing/Pay-To Provider Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -3038,10 +3038,10 @@ parsed_837_2010AB, parsed_837_2000B, ) -parsed_837_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_837_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_837_2000A, ) -parsed_837_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_837_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'837'] ) ), @@ -3057,7 +3057,7 @@ codes=[] ) ), ), ) -parsed_837_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_837_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HC'] ) ), @@ -3084,7 +3084,7 @@ codes=[] ) ), ), ) -parsed_837_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_837_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -3139,7 +3139,7 @@ codes=[] ) ), ), ) -parsed_837 = Message( u'837', Properties(desc=u'HIPAA Health Care Claim: Dental X097A1-837'), +parsed_837 = Message( u'837', Properties(desc=u'HIPAA Health Care Claim: Dental X097A1-837'), parsed_837_ISA_LOOP, ) diff --git a/tigershark/parsers/M837_4010_X098_A1.py b/tigershark/parsers/M837_4010_X098_A1.py index 4f1cb94..542f124 100644 --- a/tigershark/parsers/M837_4010_X098_A1.py +++ b/tigershark/parsers/M837_4010_X098_A1.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:30:03.615673 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_837_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Submitter Name'), +parsed_837_1000A = Loop( u'1000A', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Submitter Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Submitter Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'41'] ) ), @@ -48,7 +48,7 @@ codes=[] ) ), ), ) -parsed_837_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Receiver Name'), +parsed_837_1000B = Loop( u'1000B', Properties(looptype='',repeat=u'1',pos=u'020',req_sit=u'R',desc=u'Receiver Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Receiver Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'40'] ) ), @@ -74,7 +74,7 @@ codes=[] ) ), ), ) -parsed_837_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_837_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), Segment( u'BHT', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Beginning of Hierarchical Transaction'), Element( u'BHT01', Properties(desc=u'Hierarchical Structure Code', req_sit=u'R', data_type=(u'ID',u'4',u'4'), position=1, codes=[u'0019'] ) ), @@ -102,7 +102,7 @@ parsed_837_1000A, parsed_837_1000B, ) -parsed_837_2010AA = Loop( u'2010AA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Billing Provider Name'), +parsed_837_2010AA = Loop( u'2010AA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Billing Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Billing Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'85'] ) ), @@ -188,7 +188,7 @@ codes=[] ) ), ), ) -parsed_837_2010AB = Loop( u'2010AB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Pay-To Provider Name'), +parsed_837_2010AB = Loop( u'2010AB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Pay-To Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Pay-To Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'87'] ) ), @@ -244,7 +244,7 @@ ), ), ) -parsed_837_2010BA = Loop( u'2010BA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Subscriber Name'), +parsed_837_2010BA = Loop( u'2010BA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Subscriber Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -330,7 +330,7 @@ ), ), ) -parsed_837_2010BB = Loop( u'2010BB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Destination Payer'), +parsed_837_2010BB = Loop( u'2010BB', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Destination Payer'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Destination Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -386,7 +386,7 @@ ), ), ) -parsed_837_2010BC = Loop( u'2010BC', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Responsible Party Name'), +parsed_837_2010BC = Loop( u'2010BC', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Responsible Party Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Responsible Party Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QD'] ) ), @@ -432,7 +432,7 @@ codes=[] ) ), ), ) -parsed_837_2010BD = Loop( u'2010BD', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Credit/Debit Card Holder Name'), +parsed_837_2010BD = Loop( u'2010BD', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'S',desc=u'Credit/Debit Card Holder Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Credit/Debit Card Holder Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'AO'] ) ), @@ -468,7 +468,7 @@ ), ), ) -parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), +parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), Segment( u'CR7', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'242',desc=u'Home Health Care Plan Information'), Element( u'CR701', Properties(desc=u'Discipline Type Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'AI', u'MS', u'OT', u'PT', u'SN', u'ST'] ) ), @@ -496,7 +496,7 @@ codes=[u'D', u'E', u'F'] ) ), ), ) -parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), +parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Referring Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -546,7 +546,7 @@ ), ), ) -parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -596,7 +596,7 @@ ), ), ) -parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Purchased Service Provider Name'), +parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Purchased Service Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Purchased Service Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QB'] ) ), @@ -632,7 +632,7 @@ ), ), ) -parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), +parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'77', u'FA', u'LI', u'TL'] ) ), @@ -688,7 +688,7 @@ ), ), ) -parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Supervising Provider Name'), +parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Supervising Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Supervising Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DQ'] ) ), @@ -724,7 +724,7 @@ ), ), ) -parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), +parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -780,7 +780,7 @@ ), ), ) -parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), +parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -864,7 +864,7 @@ ), ), ) -parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), +parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Patient Information'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -900,7 +900,7 @@ ), ), ) -parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'2',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), +parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'2',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Referring Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -936,7 +936,7 @@ ), ), ) -parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), +parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Rendering Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -972,7 +972,7 @@ ), ), ) -parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Purchased Service Provider'), +parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Purchased Service Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Purchased Service Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QB'] ) ), @@ -1008,7 +1008,7 @@ ), ), ) -parsed_837_2330G = Loop( u'2330G', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Location'), +parsed_837_2330G = Loop( u'2330G', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Location'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'77', u'FA', u'LI', u'TL'] ) ), @@ -1044,7 +1044,7 @@ ), ), ) -parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Supervising Provider'), +parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Supervising Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Supervising Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DQ'] ) ), @@ -1080,7 +1080,7 @@ ), ), ) -parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), +parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), Segment( u'SBR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'290',desc=u'Other Subscriber Information'), Element( u'SBR01', Properties(desc=u'Payer Responsibility Sequence Number Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'P', u'S', u'T'] ) ), @@ -1284,7 +1284,7 @@ parsed_837_2330G, parsed_837_2330H, ) -parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), +parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), Segment( u'LIN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'494',desc=u'Drug Identification'), Element( u'LIN01', Properties(desc=u'Assigned Identification', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=1, codes=[] ) ), @@ -1414,7 +1414,7 @@ ), ), ) -parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -1464,7 +1464,7 @@ ), ), ) -parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Purchased Service Provider Name'), +parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Purchased Service Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Purchased Service Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QB'] ) ), @@ -1500,7 +1500,7 @@ ), ), ) -parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Service Facility Location'), +parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Service Facility Location'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'77', u'FA', u'LI', u'TL'] ) ), @@ -1556,7 +1556,7 @@ ), ), ) -parsed_837_2420D = Loop( u'2420D', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Supervising Provider Name'), +parsed_837_2420D = Loop( u'2420D', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Supervising Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Supervising Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DQ'] ) ), @@ -1592,7 +1592,7 @@ ), ), ) -parsed_837_2420E = Loop( u'2420E', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Ordering Provider Name'), +parsed_837_2420E = Loop( u'2420E', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Ordering Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Ordering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DK'] ) ), @@ -1668,7 +1668,7 @@ codes=[] ) ), ), ) -parsed_837_2420F = Loop( u'2420F', Properties(looptype='',repeat=u'2',pos=u'500',req_sit=u'S',desc=u'Referring Provider Name'), +parsed_837_2420F = Loop( u'2420F', Properties(looptype='',repeat=u'2',pos=u'500',req_sit=u'S',desc=u'Referring Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Referring Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -1718,7 +1718,7 @@ ), ), ) -parsed_837_2420G = Loop( u'2420G', Properties(looptype='',repeat=u'4',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), +parsed_837_2420G = Loop( u'2420G', Properties(looptype='',repeat=u'4',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Other Payer Prior Authorization or Referral Number'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -1754,7 +1754,7 @@ ), ), ) -parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), +parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), Segment( u'SVD', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Line Adjudication Information'), Element( u'SVD01', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=1, codes=[] ) ), @@ -1832,7 +1832,7 @@ codes=[] ) ), ), ) -parsed_837_2440 = Loop( u'2440', Properties(looptype='',repeat=u'5',pos=u'551',req_sit=u'S',desc=u'Form Identification Code'), +parsed_837_2440 = Loop( u'2440', Properties(looptype='',repeat=u'5',pos=u'551',req_sit=u'S',desc=u'Form Identification Code'), Segment( u'LQ', Properties(syntax=u'C0102',req_sit=u'R',repeat=u'1',pos=u'551',desc=u'Form Identification Code'), Element( u'LQ01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, codes=[u'AS', u'UT'] ) ), @@ -1852,7 +1852,7 @@ codes=[] ) ), ), ) -parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Service Line'), +parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Service Line'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Service Line'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -2476,7 +2476,7 @@ parsed_837_2430, parsed_837_2440, ) -parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), +parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), Segment( u'CLM', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information'), Element( u'CLM01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, codes=[] ) ), @@ -3156,7 +3156,7 @@ parsed_837_2320, parsed_837_2400, ) -parsed_837_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Patient Name'), +parsed_837_2010CA = Loop( u'2010CA', Properties(looptype='',repeat=u'1',pos=u'015',req_sit=u'R',desc=u'Patient Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'015',desc=u'Patient Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -3242,7 +3242,7 @@ ), ), ) -parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), +parsed_837_2305 = Loop( u'2305', Properties(looptype='',repeat=u'6',pos=u'242',req_sit=u'S',desc=u'Home Health Care Plan Information'), Segment( u'CR7', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'242',desc=u'Home Health Care Plan Information'), Element( u'CR701', Properties(desc=u'Discipline Type Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'AI', u'MS', u'OT', u'PT', u'SN', u'ST'] ) ), @@ -3270,7 +3270,7 @@ codes=[u'D', u'E', u'F'] ) ), ), ) -parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), +parsed_837_2310A = Loop( u'2310A', Properties(looptype='',repeat=u'2',pos=u'250',req_sit=u'S',desc=u'Referring Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Referring Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -3320,7 +3320,7 @@ ), ), ) -parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2310B = Loop( u'2310B', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -3370,7 +3370,7 @@ ), ), ) -parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Purchased Service Provider Name'), +parsed_837_2310C = Loop( u'2310C', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Purchased Service Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Purchased Service Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QB'] ) ), @@ -3406,7 +3406,7 @@ ), ), ) -parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), +parsed_837_2310D = Loop( u'2310D', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Service Facility Location'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'77', u'FA', u'LI', u'TL'] ) ), @@ -3462,7 +3462,7 @@ ), ), ) -parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Supervising Provider Name'), +parsed_837_2310E = Loop( u'2310E', Properties(looptype='',repeat=u'1',pos=u'250',req_sit=u'S',desc=u'Supervising Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'250',desc=u'Supervising Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DQ'] ) ), @@ -3498,7 +3498,7 @@ ), ), ) -parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), +parsed_837_2330A = Loop( u'2330A', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Subscriber Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Subscriber Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'IL'] ) ), @@ -3554,7 +3554,7 @@ ), ), ) -parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), +parsed_837_2330B = Loop( u'2330B', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'R',desc=u'Other Payer Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -3638,7 +3638,7 @@ ), ), ) -parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), +parsed_837_2330C = Loop( u'2330C', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Patient Information'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Patient Information'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QC'] ) ), @@ -3674,7 +3674,7 @@ ), ), ) -parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'2',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), +parsed_837_2330D = Loop( u'2330D', Properties(looptype='',repeat=u'2',pos=u'325',req_sit=u'S',desc=u'Other Payer Referring Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Referring Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -3710,7 +3710,7 @@ ), ), ) -parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), +parsed_837_2330E = Loop( u'2330E', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Rendering Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Rendering Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -3746,7 +3746,7 @@ ), ), ) -parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Purchased Service Provider'), +parsed_837_2330F = Loop( u'2330F', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Purchased Service Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Purchased Service Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QB'] ) ), @@ -3782,7 +3782,7 @@ ), ), ) -parsed_837_2330G = Loop( u'2330G', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Location'), +parsed_837_2330G = Loop( u'2330G', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Service Facility Location'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'77', u'FA', u'LI', u'TL'] ) ), @@ -3818,7 +3818,7 @@ ), ), ) -parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Supervising Provider'), +parsed_837_2330H = Loop( u'2330H', Properties(looptype='',repeat=u'1',pos=u'325',req_sit=u'S',desc=u'Other Payer Supervising Provider'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'325',desc=u'Other Payer Supervising Provider'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DQ'] ) ), @@ -3854,7 +3854,7 @@ ), ), ) -parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), +parsed_837_2320 = Loop( u'2320', Properties(looptype='',repeat=u'10',pos=u'290',req_sit=u'S',desc=u'Other Subscriber Information'), Segment( u'SBR', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'290',desc=u'Other Subscriber Information'), Element( u'SBR01', Properties(desc=u'Payer Responsibility Sequence Number Code', req_sit=u'R', data_type=(u'ID',u'1',u'1'), position=1, codes=[u'P', u'S', u'T'] ) ), @@ -4058,7 +4058,7 @@ parsed_837_2330G, parsed_837_2330H, ) -parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), +parsed_837_2410 = Loop( u'2410', Properties(looptype='',repeat=u'25',pos=u'494',req_sit=u'S',desc=u'Drug Identification'), Segment( u'LIN', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'494',desc=u'Drug Identification'), Element( u'LIN01', Properties(desc=u'Assigned Identification', req_sit=u'N', data_type=(u'AN',u'1',u'20'), position=1, codes=[] ) ), @@ -4188,7 +4188,7 @@ ), ), ) -parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), +parsed_837_2420A = Loop( u'2420A', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Rendering Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Rendering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'82'] ) ), @@ -4238,7 +4238,7 @@ ), ), ) -parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Purchased Service Provider Name'), +parsed_837_2420B = Loop( u'2420B', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Purchased Service Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Purchased Service Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'QB'] ) ), @@ -4274,7 +4274,7 @@ ), ), ) -parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Service Facility Location'), +parsed_837_2420C = Loop( u'2420C', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Service Facility Location'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Service Facility Location'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'77', u'FA', u'LI', u'TL'] ) ), @@ -4330,7 +4330,7 @@ ), ), ) -parsed_837_2420D = Loop( u'2420D', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Supervising Provider Name'), +parsed_837_2420D = Loop( u'2420D', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Supervising Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Supervising Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DQ'] ) ), @@ -4366,7 +4366,7 @@ ), ), ) -parsed_837_2420E = Loop( u'2420E', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Ordering Provider Name'), +parsed_837_2420E = Loop( u'2420E', Properties(looptype='',repeat=u'1',pos=u'500',req_sit=u'S',desc=u'Ordering Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Ordering Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DK'] ) ), @@ -4442,7 +4442,7 @@ codes=[] ) ), ), ) -parsed_837_2420F = Loop( u'2420F', Properties(looptype='',repeat=u'2',pos=u'500',req_sit=u'S',desc=u'Referring Provider Name'), +parsed_837_2420F = Loop( u'2420F', Properties(looptype='',repeat=u'2',pos=u'500',req_sit=u'S',desc=u'Referring Provider Name'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Referring Provider Name'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'DN', u'P3'] ) ), @@ -4492,7 +4492,7 @@ ), ), ) -parsed_837_2420G = Loop( u'2420G', Properties(looptype='',repeat=u'4',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), +parsed_837_2420G = Loop( u'2420G', Properties(looptype='',repeat=u'4',pos=u'500',req_sit=u'S',desc=u'Other Payer Prior Authorization or Referral Number'), Segment( u'NM1', Properties(syntax=u'P0809 C1110',req_sit=u'R',repeat=u'1',pos=u'500',desc=u'Other Payer Prior Authorization or Referral Number'), Element( u'NM101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'PR'] ) ), @@ -4528,7 +4528,7 @@ ), ), ) -parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), +parsed_837_2430 = Loop( u'2430', Properties(looptype='',repeat=u'25',pos=u'540',req_sit=u'S',desc=u'Line Adjudication Information'), Segment( u'SVD', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'540',desc=u'Line Adjudication Information'), Element( u'SVD01', Properties(desc=u'Identification Code', req_sit=u'R', data_type=(u'AN',u'2',u'80'), position=1, codes=[] ) ), @@ -4606,7 +4606,7 @@ codes=[] ) ), ), ) -parsed_837_2440 = Loop( u'2440', Properties(looptype='',repeat=u'5',pos=u'551',req_sit=u'S',desc=u'Form Identification Code'), +parsed_837_2440 = Loop( u'2440', Properties(looptype='',repeat=u'5',pos=u'551',req_sit=u'S',desc=u'Form Identification Code'), Segment( u'LQ', Properties(syntax=u'C0102',req_sit=u'R',repeat=u'1',pos=u'551',desc=u'Form Identification Code'), Element( u'LQ01', Properties(desc=u'Code List Qualifier Code', req_sit=u'R', data_type=(u'ID',u'1',u'3'), position=1, codes=[u'AS', u'UT'] ) ), @@ -4626,7 +4626,7 @@ codes=[] ) ), ), ) -parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Service Line'), +parsed_837_2400 = Loop( u'2400', Properties(looptype='',repeat=u'50',pos=u'365',req_sit=u'R',desc=u'Service Line'), Segment( u'LX', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'365',desc=u'Service Line'), Element( u'LX01', Properties(desc=u'Assigned Number', req_sit=u'R', data_type=(u'N0',u'1',u'6'), position=1, codes=[] ) ), @@ -5250,7 +5250,7 @@ parsed_837_2430, parsed_837_2440, ) -parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), +parsed_837_2300 = Loop( u'2300', Properties(looptype='',repeat=u'100',pos=u'130',req_sit=u'S',desc=u'Claim Information'), Segment( u'CLM', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'130',desc=u'Claim Information'), Element( u'CLM01', Properties(desc=u"Claim Submitter's Identifier", req_sit=u'R', data_type=(u'AN',u'1',u'38'), position=1, codes=[] ) ), @@ -5930,7 +5930,7 @@ parsed_837_2320, parsed_837_2400, ) -parsed_837_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'140',req_sit=u'S',desc=u'Patient Hierarchical Level'), +parsed_837_2000C = Loop( u'2000C', Properties(looptype='',repeat=u'>1',pos=u'140',req_sit=u'S',desc=u'Patient Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Patient Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -5964,7 +5964,7 @@ parsed_837_2010CA, parsed_837_2300, ) -parsed_837_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Subscriber Hierarchical Level'), +parsed_837_2000B = Loop( u'2000B', Properties(looptype='',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Subscriber Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Subscriber Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -6022,7 +6022,7 @@ parsed_837_2300, parsed_837_2000C, ) -parsed_837_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Billing/Pay-To Provider Hierarchical Level'), +parsed_837_2000A = Loop( u'2000A', Properties(looptype='',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Billing/Pay-To Provider Hierarchical Level'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'001',desc=u'Billing/Pay-To Provider Hierarchical Level'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[] ) ), @@ -6095,10 +6095,10 @@ parsed_837_2010AB, parsed_837_2000B, ) -parsed_837_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_837_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_837_2000A, ) -parsed_837_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_837_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'837'] ) ), @@ -6114,7 +6114,7 @@ codes=[] ) ), ), ) -parsed_837_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_837_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'HC'] ) ), @@ -6141,7 +6141,7 @@ codes=[] ) ), ), ) -parsed_837_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_837_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -6196,7 +6196,7 @@ codes=[] ) ), ), ) -parsed_837 = Message( u'837', Properties(desc=u'HIPAA Health Care Claim: Professional X098A1-837'), +parsed_837 = Message( u'837', Properties(desc=u'HIPAA Health Care Claim: Professional X098A1-837'), parsed_837_ISA_LOOP, ) diff --git a/tigershark/parsers/M837_5010_X222_A1.py b/tigershark/parsers/M837_5010_X222_A1.py new file mode 100644 index 0000000..31d88c9 --- /dev/null +++ b/tigershark/parsers/M837_5010_X222_A1.py @@ -0,0 +1,35666 @@ +# +# Generated by TigerShark.tools.convertPyX12 on 2021-05-10 10:26:14.167130 +# +from tigershark.X12.parse import Composite, Element, Loop, Message, Properties, Segment + +parsed_837_1000A = Loop( + "1000A", + Properties( + desc="Submitter Name", looptype="", position="0200", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Submitter Name", + position="0200", + repeat="1", + req_sit="R", + syntax="P0809 C1110", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["41"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["46"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PER", + Properties( + desc="Submitter EDI Contact Information", + position="0450", + repeat="2", + req_sit="R", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["ED", "EM", "FX", "TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["ED", "EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["ED", "EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_1000B = Loop( + "1000B", + Properties( + desc="Receiver Name", looptype="", position="0200", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Receiver Name", + position="0200", + repeat="1", + req_sit="R", + syntax="P0809 C1110", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["40"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["46"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), +) +parsed_837_HEADER = Loop( + "HEADER", + Properties( + desc="Table 1 - Header", + looptype="wrapper", + position="0100", + repeat="1", + req_sit="R", + ), + Segment( + "BHT", + Properties( + desc="Beginning of Hierarchical Transaction", + position="0100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "BHT01", + Properties( + desc="Hierarchical Structure Code", + req_sit="R", + data_type=("ID", "4", "4"), + position=1, + codes=["0019"], + ), + ), + Element( + "BHT02", + Properties( + desc="Transaction Set Purpose Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["00", "18"], + ), + ), + Element( + "BHT03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "BHT04", + Properties( + desc="Date", + req_sit="R", + data_type=("DT", "8", "8"), + position=4, + codes=[], + ), + ), + Element( + "BHT05", + Properties( + desc="Time", + req_sit="R", + data_type=("TM", "4", "8"), + position=5, + codes=[], + ), + ), + Element( + "BHT06", + Properties( + desc="Transaction Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=6, + codes=["CH", "RP"], + ), + ), + ), + parsed_837_1000A, + parsed_837_1000B, +) +parsed_837_2010AA = Loop( + "2010AA", + Properties( + desc="Billing Provider Name", + looptype="", + position="0150", + repeat="1", + req_sit="R", + ), + Segment( + "NM1", + Properties( + desc="Billing Provider Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Billing Provider Address", + position="0250", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Billing Provider City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Billing Provider Tax Identification", + position="0350", + repeat="1", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EI", "SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Billing Provider UPIN/License Information", + position="0350", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "PER", + Properties( + desc="Billing Provider Contact Information", + position="0400", + repeat="2", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["EM", "FX", "TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2010AB = Loop( + "2010AB", + Properties( + desc="Pay-to Address Name", + looptype="", + position="0150", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Pay-to Address Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["87"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Pay-to Address - ADDRESS", + position="0250", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Pay-To Address City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2010AC = Loop( + "2010AC", + Properties( + desc="Pay-To Plan Name", looptype="", position="0150", repeat="1", req_sit="S" + ), + Segment( + "NM1", + Properties( + desc="Pay-To Plan Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PE"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Pay-to Plan Address", + position="0250", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Pay-To Plan City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Pay-to Plan Secondary Identification", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Pay-To Plan Tax Identification Number", + position="0350", + repeat="1", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EI"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2010BA = Loop( + "2010BA", + Properties( + desc="Subscriber Name", looptype="", position="0150", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Subscriber Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["IL"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["II", "MI"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Subscriber Address", + position="0250", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Subscriber City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DMG", + Properties( + desc="Subscriber Demographic Information", + position="0320", + repeat="1", + req_sit="S", + syntax="P0102 P1011 C1105", + ), + Element( + "DMG01", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D8"], + ), + ), + Element( + "DMG02", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=2, + codes=[], + ), + ), + Element( + "DMG03", + Properties( + desc="Gender Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["F", "M", "U"], + ), + ), + Element( + "DMG04", + Properties( + desc="Marital Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Composite( + "C056", + Properties( + desc="Composite Race or Ethnicity Information", + refdes="", + repeat="10", + req_sit="N", + seq="05", + ), + ), + Element( + "DMG06", + Properties( + desc="Citizenship Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=6, + codes=[], + ), + ), + Element( + "DMG07", + Properties( + desc="Country Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + Element( + "DMG08", + Properties( + desc="Basis of Verification Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "DMG09", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=9, + codes=[], + ), + ), + Element( + "DMG10", + Properties( + desc="Code List Qualifier Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=10, + codes=[], + ), + ), + Element( + "DMG11", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Subscriber Secondary Identification", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Property and Casualty Claim Number", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["Y4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "PER", + Properties( + desc="Property and Casualty Subscriber Contact Information", + position="0400", + repeat="1", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EX"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=7, + codes=[], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="N", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2010BB = Loop( + "2010BB", + Properties( + desc="Payer Name", looptype="", position="0150", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Payer Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PR"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Payer Address", position="0250", repeat="1", req_sit="S", syntax="" + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Payer City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Payer Secondary Identification", + position="0350", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "EI", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Billing Provider Secondary Identification", + position="0350", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310A = Loop( + "2310A", + Properties( + desc="Referring Provider Name", + looptype="", + position="2500", + repeat="2", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN", "P3"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310B = Loop( + "2310B", + Properties( + desc="Rendering Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Rendering Provider Specialty Information", + position="2550", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["PE"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310C = Loop( + "2310C", + Properties( + desc="Service Facility Location Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Service Facility Location Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Service Facility Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Service Facility Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Facility Location Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "PER", + Properties( + desc="Service Facility Contact Information", + position="2750", + repeat="1", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EX"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=7, + codes=[], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="N", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2310D = Loop( + "2310D", + Properties( + desc="Supervising Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Supervising Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DQ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Supervising Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310E = Loop( + "2310E", + Properties( + desc="Ambulance Pick-up Location", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Pick-up Location", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PW"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Pick-up Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Pick-up Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2310F = Loop( + "2310F", + Properties( + desc="Ambulance Drop-off Location", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Drop-off Location", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["45"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Drop-off Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Drop-off Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2330A = Loop( + "2330A", + Properties( + desc="Other Subscriber Name", + looptype="", + position="3250", + repeat="1", + req_sit="R", + ), + Segment( + "NM1", + Properties( + desc="Other Subscriber Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["IL"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["II", "MI"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Subscriber Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Subscriber City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Subscriber Secondary Identification", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330B = Loop( + "2330B", + Properties( + desc="Other Payer Name", looptype="", position="3250", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Other Payer Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PR"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Payer Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Payer City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Claim Check or Remittance Date", + position="3450", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Secondary Identifier", + position="3550", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "EI", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Prior Authorization Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referral Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Adjustment Indicator", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["T4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Control Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330C = Loop( + "2330C", + Properties( + desc="Other Payer Referring Provider", + looptype="", + position="3250", + repeat="2", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Referring Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN", "P3"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referring Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330D = Loop( + "2330D", + Properties( + desc="Other Payer Rendering Provider", + looptype="", + position="3650", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Rendering Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Rendering Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330E = Loop( + "2330E", + Properties( + desc="Other Payer Service Facility Location", + looptype="", + position="4650", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Service Facility Location", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Service Facility Location Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330F = Loop( + "2330F", + Properties( + desc="Other Payer Supervising Provider", + looptype="", + position="5650", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Supervising Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DQ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Supervising Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330G = Loop( + "2330G", + Properties( + desc="Other Payer Billing Provider", + looptype="", + position="6350", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Billing Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Billing Provider Secondary Identification", + position="3550", + repeat="2", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2320 = Loop( + "2320", + Properties( + desc="Other Subscriber Information", + looptype="", + position="2900", + repeat="10", + req_sit="S", + ), + Segment( + "SBR", + Properties( + desc="Other Subscriber Information", + position="2900", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SBR01", + Properties( + desc="Payer Responsibility Sequence Number Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U"], + ), + ), + Element( + "SBR02", + Properties( + desc="Individual Relationship Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["01", "18", "19", "20", "21", "39", "40", "53", "G8"], + ), + ), + Element( + "SBR03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "SBR04", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=4, + codes=[], + ), + ), + Element( + "SBR05", + Properties( + desc="Insurance Type Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=5, + codes=["12", "13", "14", "15", "16", "41", "42", "43", "47"], + ), + ), + Element( + "SBR06", + Properties( + desc="Coordination of Benefits Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "SBR07", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + Element( + "SBR08", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "SBR09", + Properties( + desc="Claim Filing Indicator Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=9, + codes=[ + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "AM", + "BL", + "CH", + "CI", + "DS", + "FI", + "HM", + "LM", + "MA", + "MB", + "MC", + "OF", + "TV", + "VA", + "WC", + "ZZ", + ], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Claim Level Adjustments", + position="2950", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Payer Paid Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["D"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Total Non-Covered Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["A8"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "OI", + Properties( + desc="Other Insurance Coverage Information", + position="3100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "OI01", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=1, + codes=[], + ), + ), + Element( + "OI02", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "OI03", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["N", "W", "Y"], + ), + ), + Element( + "OI04", + Properties( + desc="Patient Signature Source Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=4, + codes=["P"], + ), + ), + Element( + "OI05", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=5, + codes=[], + ), + ), + Element( + "OI06", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["I", "Y"], + ), + ), + ), + Segment( + "MOA", + Properties( + desc="Outpatient Adjudication Information", + position="3200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "MOA01", + Properties( + desc="Percentage as Decimal", + req_sit="S", + data_type=("R", "1", "10"), + position=1, + codes=[], + ), + ), + Element( + "MOA02", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "MOA03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "MOA04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "MOA05", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + Element( + "MOA06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "MOA07", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=7, + codes=[], + ), + ), + Element( + "MOA08", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "MOA09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + ), + parsed_837_2330A, + parsed_837_2330B, + parsed_837_2330C, + parsed_837_2330D, + parsed_837_2330E, + parsed_837_2330F, + parsed_837_2330G, +) +parsed_837_2410 = Loop( + "2410", + Properties( + desc="Drug Identification", + looptype="", + position="4940", + repeat="1", + req_sit="S", + ), + Segment( + "LIN", + Properties( + desc="Drug Identification", + position="4930", + repeat="1", + req_sit="R", + syntax="P0405 P0607 P0809 P1011 P1213 P1415 P1617 P1819 P2021 P2223 P2425 P2627 P2829 P3031", + ), + Element( + "LIN01", + Properties( + desc="Assigned Identification", + req_sit="N", + data_type=("AN", "1", "20"), + position=1, + codes=[], + ), + ), + Element( + "LIN02", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["EN", "EO", "HI", "N4", "ON", "UK", "UP"], + ), + ), + Element( + "LIN03", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=3, + codes=[], + ), + ), + Element( + "LIN04", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "LIN05", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=5, + codes=[], + ), + ), + Element( + "LIN06", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "LIN07", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + Element( + "LIN08", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "LIN09", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=9, + codes=[], + ), + ), + Element( + "LIN10", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "LIN11", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=11, + codes=[], + ), + ), + Element( + "LIN12", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "LIN13", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=13, + codes=[], + ), + ), + Element( + "LIN14", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=14, + codes=[], + ), + ), + Element( + "LIN15", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=15, + codes=[], + ), + ), + Element( + "LIN16", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=16, + codes=[], + ), + ), + Element( + "LIN17", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=17, + codes=[], + ), + ), + Element( + "LIN18", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=18, + codes=[], + ), + ), + Element( + "LIN19", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=19, + codes=[], + ), + ), + Element( + "LIN20", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=20, + codes=[], + ), + ), + Element( + "LIN21", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=21, + codes=[], + ), + ), + Element( + "LIN22", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=22, + codes=[], + ), + ), + Element( + "LIN23", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=23, + codes=[], + ), + ), + Element( + "LIN24", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=24, + codes=[], + ), + ), + Element( + "LIN25", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=25, + codes=[], + ), + ), + Element( + "LIN26", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=26, + codes=[], + ), + ), + Element( + "LIN27", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=27, + codes=[], + ), + ), + Element( + "LIN28", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=28, + codes=[], + ), + ), + Element( + "LIN29", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=29, + codes=[], + ), + ), + Element( + "LIN30", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=30, + codes=[], + ), + ), + Element( + "LIN31", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=31, + codes=[], + ), + ), + ), + Segment( + "CTP", + Properties( + desc="Drug Quantity", + position="4940", + repeat="1", + req_sit="R", + syntax="P0405 C0607 C0902 C1002 C1103", + ), + Element( + "CTP01", + Properties( + desc="Class of Trade Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=1, + codes=[], + ), + ), + Element( + "CTP02", + Properties( + desc="Price Identifier Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=2, + codes=[], + ), + ), + Element( + "CTP03", + Properties( + desc="Unit Price", + req_sit="N", + data_type=("R", "1", "17"), + position=3, + codes=[], + ), + ), + Element( + "CTP04", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CTP05-01", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["F2", "GR", "ME", "ML", "UN"], + ), + ), + Element( + "CTP05-02", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=1, + codes=[], + ), + ), + Element( + "CTP05-03", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CTP05-04", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "CTP05-05", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CTP05-06", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=5, + codes=[], + ), + ), + Element( + "CTP05-07", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "CTP05-08", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CTP05-09", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=8, + codes=[], + ), + ), + Element( + "CTP05-10", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP05-11", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CTP05-12", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=11, + codes=[], + ), + ), + Element( + "CTP05-13", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "CTP05-14", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CTP05-15", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=14, + codes=[], + ), + ), + ), + Element( + "CTP06", + Properties( + desc="Price Multiplier Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + Element( + "CTP07", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "CTP08", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "CTP09", + Properties( + desc="Basis of Unit Price Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP10", + Properties( + desc="Condition Value", + req_sit="N", + data_type=("AN", "1", "10"), + position=10, + codes=[], + ), + ), + Element( + "CTP11", + Properties( + desc="Multiple Price Quantity", + req_sit="N", + data_type=("N0", "1", "2"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prescription or Compound Drug Association Number", + position="4950", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["VY", "XZ"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2420A = Loop( + "2420A", + Properties( + desc="Rendering Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Rendering Provider Specialty Information", + position="5050", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["PE"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420B = Loop( + "2420B", + Properties( + desc="Purchased Service Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Purchased Service Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["QB"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Purchased Service Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420C = Loop( + "2420C", + Properties( + desc="Service Facility Location Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Service Facility Location Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Service Facility Location Address", + position="5140", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Service Facility Location City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Facility Location Secondary Identification", + position="5250", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420D = Loop( + "2420D", + Properties( + desc="Supervising Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Supervising Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DQ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Supervising Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420E = Loop( + "2420E", + Properties( + desc="Ordering Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ordering Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DK"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ordering Provider Address", + position="5140", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ordering Provider City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Ordering Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), + Segment( + "PER", + Properties( + desc="Ordering Provider Contact Information", + position="5300", + repeat="1", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["EM", "FX", "TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2420F = Loop( + "2420F", + Properties( + desc="Referring Provider Name", + looptype="", + position="5000", + repeat="2", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN", "P3"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420G = Loop( + "2420G", + Properties( + desc="Ambulance Pick-up Location", + looptype="", + position="5310", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Pick-up Location", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PW"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Pick-up Location Address", + position="5140", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Pick-up Location City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2420H = Loop( + "2420H", + Properties( + desc="Ambulance Drop-off Location", + looptype="", + position="5380", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Drop-off Location", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["45"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Drop-off Location Address", + position="5140", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Drop-off Location City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2430 = Loop( + "2430", + Properties( + desc="Line Adjudication Information", + looptype="", + position="5400", + repeat="15", + req_sit="S", + ), + Segment( + "SVD", + Properties( + desc="Line Adjudication Information", + position="5400", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SVD01", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=1, + codes=[], + ), + ), + Element( + "SVD02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="R", + seq="03", + ), + Element( + "SVD03-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "IV", "WK"], + ), + ), + Element( + "SVD03-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SVD03-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SVD03-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SVD03-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SVD03-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SVD03-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SVD03-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SVD04", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=4, + codes=[], + ), + ), + Element( + "SVD05", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "SVD06", + Properties( + desc="Assigned Number", + req_sit="S", + data_type=("N0", "1", "6"), + position=6, + codes=[], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Line Adjustment", + position="5450", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Line Check or Remittance Date", + position="5500", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="5505", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), +) +parsed_837_2440 = Loop( + "2440", + Properties( + desc="Form Identification Code", + looptype="", + position="5510", + repeat=">1", + req_sit="S", + ), + Segment( + "LQ", + Properties( + desc="Form Identification Code", + position="5510", + repeat="1", + req_sit="R", + syntax="C0102", + ), + Element( + "LQ01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["AS", "UT"], + ), + ), + Element( + "LQ02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=2, + codes=[], + ), + ), + ), + Segment( + "FRM", + Properties( + desc="Supporting Documentation", + position="5520", + repeat="99", + req_sit="R", + syntax="R02030405", + ), + Element( + "FRM01", + Properties( + desc="Assigned Identification", + req_sit="R", + data_type=("AN", "1", "20"), + position=1, + codes=[], + ), + ), + Element( + "FRM02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "W", "Y"], + ), + ), + Element( + "FRM03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "FRM04", + Properties( + desc="Date", + req_sit="S", + data_type=("DT", "8", "8"), + position=4, + codes=[], + ), + ), + Element( + "FRM05", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + ), +) +parsed_837_2400 = Loop( + "2400", + Properties( + desc="Service Line Number", + looptype="", + position="3650", + repeat="50", + req_sit="R", + ), + Segment( + "LX", + Properties( + desc="Service Line Number", + position="3650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "LX01", + Properties( + desc="Assigned Number", + req_sit="R", + data_type=("N0", "1", "6"), + position=1, + codes=[], + ), + ), + ), + Segment( + "SV1", + Properties( + desc="Professional Service", + position="3700", + repeat="1", + req_sit="R", + syntax="P0304", + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "SV101-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "IV", "WK"], + ), + ), + Element( + "SV101-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SV101-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SV101-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SV101-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SV101-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV101-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SV101-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SV102", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "SV103", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["MJ", "UN"], + ), + ), + Element( + "SV104", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "SV105", + Properties( + desc="Facility Code Value", + req_sit="S", + data_type=("AN", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV106", + Properties( + desc="Service Type Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=6, + codes=[], + ), + ), + Composite( + "C004", + Properties( + desc="Composite Diagnosis Code Pointer", + refdes="", + repeat="", + req_sit="R", + seq="07", + ), + Element( + "SV107-01", + Properties( + desc="Diagnosis Code Pointer", + req_sit="R", + data_type=("N0", "1", "2"), + position=0, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + Element( + "SV107-02", + Properties( + desc="Diagnosis Code Pointer", + req_sit="S", + data_type=("N0", "1", "2"), + position=1, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + Element( + "SV107-03", + Properties( + desc="Diagnosis Code Pointer", + req_sit="S", + data_type=("N0", "1", "2"), + position=2, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + Element( + "SV107-04", + Properties( + desc="Diagnosis Code Pointer", + req_sit="S", + data_type=("N0", "1", "2"), + position=3, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + ), + Element( + "SV108", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "SV109", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=9, + codes=["Y"], + ), + ), + Element( + "SV110", + Properties( + desc="Multiple Procedure Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=10, + codes=[], + ), + ), + Element( + "SV111", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=11, + codes=["Y"], + ), + ), + Element( + "SV112", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=12, + codes=["Y"], + ), + ), + Element( + "SV113", + Properties( + desc="Review Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=13, + codes=[], + ), + ), + Element( + "SV114", + Properties( + desc="National or Local Assigned Review Value", + req_sit="N", + data_type=("AN", "1", "2"), + position=14, + codes=[], + ), + ), + Element( + "SV115", + Properties( + desc="Copay Status Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=15, + codes=["0"], + ), + ), + Element( + "SV116", + Properties( + desc="Health Care Professional Shortage Area Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=16, + codes=[], + ), + ), + Element( + "SV117", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=17, + codes=[], + ), + ), + Element( + "SV118", + Properties( + desc="Postal Code", + req_sit="N", + data_type=("ID", "3", "15"), + position=18, + codes=[], + ), + ), + Element( + "SV119", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=19, + codes=[], + ), + ), + Element( + "SV120", + Properties( + desc="Level of Care Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=20, + codes=[], + ), + ), + Element( + "SV121", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=21, + codes=[], + ), + ), + ), + Segment( + "SV5", + Properties( + desc="Durable Medical Equipment Service", + position="4000", + repeat="1", + req_sit="S", + syntax="R0405 C0604", + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "SV501-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["HC"], + ), + ), + Element( + "SV501-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SV501-03", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SV501-04", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SV501-05", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SV501-06", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV501-07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SV501-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SV502", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["DA"], + ), + ), + Element( + "SV503", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=3, + codes=[], + ), + ), + Element( + "SV504", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "SV505", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=5, + codes=[], + ), + ), + Element( + "SV506", + Properties( + desc="Frequency Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["1", "4", "6"], + ), + ), + Element( + "SV507", + Properties( + desc="Prognosis Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Line Supplemental Information", + position="4200", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Durable Medical Equipment Certificate of Medical Necessity Indicator", + position="4200", + repeat="1", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["CT"], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AB", "AD", "AF", "AG", "NS"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "CR1", + Properties( + desc="Ambulance Transport Information", + position="4250", + repeat="1", + req_sit="S", + syntax="P0102 P0506", + ), + Element( + "CR101", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=1, + codes=["LB"], + ), + ), + Element( + "CR102", + Properties( + desc="Weight", + req_sit="S", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CR103", + Properties( + desc="Ambulance Transport Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + Element( + "CR104", + Properties( + desc="Ambulance Transport Reason Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["A", "B", "C", "D", "E"], + ), + ), + Element( + "CR105", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=5, + codes=["DH"], + ), + ), + Element( + "CR106", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=6, + codes=[], + ), + ), + Element( + "CR107", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=7, + codes=[], + ), + ), + Element( + "CR108", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=8, + codes=[], + ), + ), + Element( + "CR109", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=9, + codes=[], + ), + ), + Element( + "CR110", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=10, + codes=[], + ), + ), + ), + Segment( + "CR3", + Properties( + desc="Durable Medical Equipment Certification", + position="4350", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "CR301", + Properties( + desc="Certification Type Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["I", "R", "S"], + ), + ), + Element( + "CR302", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["MO"], + ), + ), + Element( + "CR303", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=3, + codes=[], + ), + ), + Element( + "CR304", + Properties( + desc="Insulin Dependent Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Element( + "CR305", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=5, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Ambulance Certification", + position="4500", + repeat="3", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["07"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=6, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=7, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Hospice Employee Indicator", + position="4500", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["70"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["65"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=5, + codes=[], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Condition Indicator/Durable Medical Equipment", + position="4500", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["09"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["38", "ZV"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["38", "ZV"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=5, + codes=["38", "ZV"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=["38", "ZV"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=["38", "ZV"], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Service Date", + position="4550", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["472"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Prescription Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["471"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="DATE - Certification Revision/Recertification Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["607"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Begin Therapy Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["463"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Certification Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["461"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Seen Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["304"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Test Date", position="4550", repeat="2", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["738", "739"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Shipped Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["011"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last X-ray Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["455"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Initial Treatment Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["454"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "QTY", + Properties( + desc="Ambulance Patient Count", + position="4600", + repeat="1", + req_sit="S", + syntax="E0204 R0204", + ), + Element( + "QTY01", + Properties( + desc="Quantity Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["PT"], + ), + ), + Element( + "QTY02", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Element( + "QTY04", + Properties( + desc="Free-form Information", + req_sit="N", + data_type=("AN", "1", "30"), + position=4, + codes=[], + ), + ), + ), + Segment( + "QTY", + Properties( + desc="Obstetric Anesthesia Additional Units", + position="4600", + repeat="1", + req_sit="S", + syntax="E0204 R0204", + ), + Element( + "QTY01", + Properties( + desc="Quantity Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["FL"], + ), + ), + Element( + "QTY02", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Element( + "QTY04", + Properties( + desc="Free-form Information", + req_sit="N", + data_type=("AN", "1", "30"), + position=4, + codes=[], + ), + ), + ), + Segment( + "MEA", + Properties( + desc="Test Result", + position="4620", + repeat="5", + req_sit="S", + syntax="R03050608 L050412 L060412 L07030506 E0803 P1112", + ), + Element( + "MEA01", + Properties( + desc="Measurement Reference ID Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["OG", "TR"], + ), + ), + Element( + "MEA02", + Properties( + desc="Measurement Qualifier", + req_sit="R", + data_type=("ID", "1", "3"), + position=2, + codes=["HT", "R1", "R2", "R3", "R4"], + ), + ), + Element( + "MEA03", + Properties( + desc="Measurement Value", + req_sit="R", + data_type=("R", "1", "20"), + position=3, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Element( + "MEA05", + Properties( + desc="Range Minimum", + req_sit="N", + data_type=("R", "1", "20"), + position=5, + codes=[], + ), + ), + Element( + "MEA06", + Properties( + desc="Range Maximum", + req_sit="N", + data_type=("R", "1", "20"), + position=6, + codes=[], + ), + ), + Element( + "MEA07", + Properties( + desc="Measurement Significance Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=7, + codes=[], + ), + ), + Element( + "MEA08", + Properties( + desc="Measurement Attribute Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "MEA09", + Properties( + desc="Surface/Layer/Position Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "MEA10", + Properties( + desc="Measurement Method or Device", + req_sit="N", + data_type=("ID", "2", "4"), + position=10, + codes=[], + ), + ), + Element( + "MEA11", + Properties( + desc="Code List Qualifier Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=11, + codes=[], + ), + ), + Element( + "MEA12", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=12, + codes=[], + ), + ), + ), + Segment( + "CN1", + Properties( + desc="Contract Information", + position="4650", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CN101", + Properties( + desc="Contract Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "02", "03", "04", "05", "06", "09"], + ), + ), + Element( + "CN102", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CN103", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=3, + codes=[], + ), + ), + Element( + "CN104", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "CN105", + Properties( + desc="Terms Discount Percent", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + Element( + "CN106", + Properties( + desc="Version Identifier", + req_sit="S", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9B"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9D"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prior Authorization", + position="4700", + repeat="5", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), + Segment( + "REF", + Properties( + desc="Line Item Control Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["6R"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Mammography Certification Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EW"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Clinical Laboratory Improvement Amendment (CLIA) Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["X4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Clinical Laboratory Improvement Amendment (CLIA) Facility Identification", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Immunization Batch Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["BT"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referral Number", + position="4700", + repeat="5", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Sales Tax Amount", position="4750", repeat="1", req_sit="S", syntax="" + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["T"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Postage Claimed Amount", + position="4750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["F4"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "K3", + Properties( + desc="File Information", + position="4800", + repeat="10", + req_sit="S", + syntax="", + ), + Element( + "K301", + Properties( + desc="Fixed Format Information", + req_sit="R", + data_type=("AN", "1", "80"), + position=1, + codes=[], + ), + ), + Element( + "K302", + Properties( + desc="Record Format Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Line Note", position="4850", repeat="1", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["ADD", "DCP"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Third Party Organization Notes", + position="4850", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["TPO"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "PS1", + Properties( + desc="Purchased Service Information", + position="4880", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "PS101", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "PS102", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "PS103", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Line Pricing/Repricing Information", + position="4920", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=9, + codes=["ER", "HC", "IV", "WK"], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=11, + codes=["MJ", "UN"], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2410, + parsed_837_2420A, + parsed_837_2420B, + parsed_837_2420C, + parsed_837_2420D, + parsed_837_2420E, + parsed_837_2420F, + parsed_837_2420G, + parsed_837_2420H, + parsed_837_2430, + parsed_837_2440, +) +parsed_837_2300 = Loop( + "2300", + Properties( + desc="Claim Information", + looptype="", + position="1300", + repeat="100", + req_sit="S", + ), + Segment( + "CLM", + Properties( + desc="Claim Information", + position="1300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "CLM01", + Properties( + desc="Claim Submitter's Identifier", + req_sit="R", + data_type=("AN", "1", "38"), + position=1, + codes=[], + ), + ), + Element( + "CLM02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CLM03", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "CLM04", + Properties( + desc="Non-Institutional Claim Type Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C023", + Properties( + desc="Health Care Service Location Information", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CLM05-01", + Properties( + desc="Facility Code Value", + req_sit="R", + data_type=("AN", "1", "2"), + position=0, + codes=[], + ), + ), + Element( + "CLM05-02", + Properties( + desc="Facility Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["B"], + ), + ), + Element( + "CLM05-03", + Properties( + desc="Claim Frequency Type Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + ), + Element( + "CLM06", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["N", "Y"], + ), + ), + Element( + "CLM07", + Properties( + desc="Provider Accept Assignment Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=7, + codes=["A", "B", "C"], + ), + ), + Element( + "CLM08", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "W", "Y"], + ), + ), + Element( + "CLM09", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=9, + codes=["I", "Y"], + ), + ), + Element( + "CLM10", + Properties( + desc="Patient Signature Source Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=10, + codes=["P"], + ), + ), + Composite( + "C024", + Properties( + desc="Related Causes Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "CLM11-01", + Properties( + desc="Related-Causes Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["AA", "EM", "OA"], + ), + ), + Element( + "CLM11-02", + Properties( + desc="Related-Causes Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=1, + codes=["AA", "EM", "OA"], + ), + ), + Element( + "CLM11-03", + Properties( + desc="Related-Causes Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "CLM11-04", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "CLM11-05", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + ), + Element( + "CLM12", + Properties( + desc="Special Program Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=12, + codes=["02", "03", "05", "09"], + ), + ), + Element( + "CLM13", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=13, + codes=[], + ), + ), + Element( + "CLM14", + Properties( + desc="Level of Service Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=14, + codes=[], + ), + ), + Element( + "CLM15", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=15, + codes=[], + ), + ), + Element( + "CLM16", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=16, + codes=[], + ), + ), + Element( + "CLM17", + Properties( + desc="Claim Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=17, + codes=[], + ), + ), + Element( + "CLM18", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=18, + codes=[], + ), + ), + Element( + "CLM19", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=19, + codes=[], + ), + ), + Element( + "CLM20", + Properties( + desc="Delay Reason Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=20, + codes=["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "15"], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Onset of Current Illness or Symptom", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["431"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Initial Treatment Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["454"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Seen Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["304"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Acute Manifestation", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["453"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Accident", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["439"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Menstrual Period", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["484"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last X-ray Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["455"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Hearing and Vision Prescription Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["471"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Disability Dates", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["314", "360", "361"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Worked", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["297"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Authorized Return to Work", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["296"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Admission", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["435"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Discharge", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["096"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Assumed and Relinquished Care Dates", + position="1350", + repeat="2", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["090", "091"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Property and Casualty Date of First Contact", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["444"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Repricer Received Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["050"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Claim Supplemental Information", + position="1550", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "CN1", + Properties( + desc="Contract Information", + position="1600", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CN101", + Properties( + desc="Contract Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "02", "03", "04", "05", "06", "09"], + ), + ), + Element( + "CN102", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CN103", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=3, + codes=[], + ), + ), + Element( + "CN104", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "CN105", + Properties( + desc="Terms Discount Percent", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + Element( + "CN106", + Properties( + desc="Version Identifier", + req_sit="S", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Patient Amount Paid", + position="1750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["F5"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Authorization Exception Code", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["4N"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Mandatory Medicare (Section 4081) Crossover Indicator", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F5"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Mammography Certification Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EW"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referral Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prior Authorization", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Payer Claim Control Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Clinical Laboratory Improvement Amendment (CLIA) Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["X4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9A"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9C"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Investigational Device Exemption Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["LX"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Claim Identifier For Transmission Intermediaries", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D9"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Medical Record Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EA"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Demonstration Project Identifier", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["P4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Care Plan Oversight", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["1J"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "K3", + Properties( + desc="File Information", + position="1850", + repeat="10", + req_sit="S", + syntax="", + ), + Element( + "K301", + Properties( + desc="Fixed Format Information", + req_sit="R", + data_type=("AN", "1", "80"), + position=1, + codes=[], + ), + ), + Element( + "K302", + Properties( + desc="Record Format Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Claim Note", position="1900", repeat="1", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["ADD", "CER", "DCP", "DGN", "TPO"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "CR1", + Properties( + desc="Ambulance Transport Information", + position="1950", + repeat="1", + req_sit="S", + syntax="P0102 P0506", + ), + Element( + "CR101", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=1, + codes=["LB"], + ), + ), + Element( + "CR102", + Properties( + desc="Weight", + req_sit="S", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CR103", + Properties( + desc="Ambulance Transport Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + Element( + "CR104", + Properties( + desc="Ambulance Transport Reason Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["A", "B", "C", "D", "E"], + ), + ), + Element( + "CR105", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=5, + codes=["DH"], + ), + ), + Element( + "CR106", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=6, + codes=[], + ), + ), + Element( + "CR107", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=7, + codes=[], + ), + ), + Element( + "CR108", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=8, + codes=[], + ), + ), + Element( + "CR109", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=9, + codes=[], + ), + ), + Element( + "CR110", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=10, + codes=[], + ), + ), + ), + Segment( + "CR2", + Properties( + desc="Spinal Manipulation Service Information", + position="2000", + repeat="1", + req_sit="S", + syntax="P0102 C0403 P0506", + ), + Element( + "CR201", + Properties( + desc="Count", + req_sit="N", + data_type=("N0", "1", "9"), + position=1, + codes=[], + ), + ), + Element( + "CR202", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=2, + codes=[], + ), + ), + Element( + "CR203", + Properties( + desc="Subluxation Level Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=3, + codes=[], + ), + ), + Element( + "CR204", + Properties( + desc="Subluxation Level Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CR205", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "CR206", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=6, + codes=[], + ), + ), + Element( + "CR207", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CR208", + Properties( + desc="Nature of Condition Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=8, + codes=["A", "C", "D", "E", "F", "G", "M"], + ), + ), + Element( + "CR209", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=9, + codes=[], + ), + ), + Element( + "CR210", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=10, + codes=[], + ), + ), + Element( + "CR211", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=11, + codes=[], + ), + ), + Element( + "CR212", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=12, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Ambulance Certification", + position="2200", + repeat="3", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["07"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=6, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=7, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Patient Condition Information: Vision", + position="2200", + repeat="3", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["E1", "E2", "E3"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=6, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=7, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Homebound Indicator", + position="2200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["75"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["IH"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=5, + codes=[], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="EPSDT Referral", position="2200", repeat="1", req_sit="S", syntax="" + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "HI", + Properties( + desc="Health Care Diagnosis Code", + position="2310", + repeat="1", + req_sit="R", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABK", "BK"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Anesthesia Related Procedure", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BP"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BO"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Condition Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Claim Pricing/Repricing Information", + position="2410", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=11, + codes=[], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2310A, + parsed_837_2310B, + parsed_837_2310C, + parsed_837_2310D, + parsed_837_2310E, + parsed_837_2310F, + parsed_837_2320, + parsed_837_2400, +) +parsed_837_2010CA = Loop( + "2010CA", + Properties( + desc="Patient Name", looptype="", position="0150", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Patient Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["QC"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Patient Address", position="0250", repeat="1", req_sit="R", syntax="" + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Patient City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DMG", + Properties( + desc="Patient Demographic Information", + position="0320", + repeat="1", + req_sit="R", + syntax="P0102 P1011 C1105", + ), + Element( + "DMG01", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D8"], + ), + ), + Element( + "DMG02", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=2, + codes=[], + ), + ), + Element( + "DMG03", + Properties( + desc="Gender Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["F", "M", "U"], + ), + ), + Element( + "DMG04", + Properties( + desc="Marital Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Composite( + "C056", + Properties( + desc="Composite Race or Ethnicity Information", + refdes="", + repeat="10", + req_sit="N", + seq="05", + ), + ), + Element( + "DMG06", + Properties( + desc="Citizenship Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=6, + codes=[], + ), + ), + Element( + "DMG07", + Properties( + desc="Country Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + Element( + "DMG08", + Properties( + desc="Basis of Verification Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "DMG09", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=9, + codes=[], + ), + ), + Element( + "DMG10", + Properties( + desc="Code List Qualifier Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=10, + codes=[], + ), + ), + Element( + "DMG11", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Property and Casualty Claim Number", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["Y4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Property and Casualty Patient Identifier", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["1W", "SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "PER", + Properties( + desc="Property and Casualty Patient Contact Information", + position="0400", + repeat="1", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EX"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=7, + codes=[], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="N", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2310A = Loop( + "2310A", + Properties( + desc="Referring Provider Name", + looptype="", + position="2500", + repeat="2", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN", "P3"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310B = Loop( + "2310B", + Properties( + desc="Rendering Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Rendering Provider Specialty Information", + position="2550", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["PE"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310C = Loop( + "2310C", + Properties( + desc="Service Facility Location Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Service Facility Location Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Service Facility Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Service Facility Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Facility Location Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "PER", + Properties( + desc="Service Facility Contact Information", + position="2750", + repeat="1", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EX"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=7, + codes=[], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="N", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2310D = Loop( + "2310D", + Properties( + desc="Supervising Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Supervising Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DQ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Supervising Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310E = Loop( + "2310E", + Properties( + desc="Ambulance Pick-up Location", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Pick-up Location", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PW"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Pick-up Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Pick-up Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2310F = Loop( + "2310F", + Properties( + desc="Ambulance Drop-off Location", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Drop-off Location", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["45"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Drop-off Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Drop-off Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2330A = Loop( + "2330A", + Properties( + desc="Other Subscriber Name", + looptype="", + position="3250", + repeat="1", + req_sit="R", + ), + Segment( + "NM1", + Properties( + desc="Other Subscriber Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["IL"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["II", "MI"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Subscriber Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Subscriber City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Subscriber Secondary Identification", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330B = Loop( + "2330B", + Properties( + desc="Other Payer Name", looptype="", position="3250", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Other Payer Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PR"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Payer Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Payer City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Claim Check or Remittance Date", + position="3450", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Secondary Identifier", + position="3550", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "EI", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Prior Authorization Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referral Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Adjustment Indicator", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["T4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Control Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330C = Loop( + "2330C", + Properties( + desc="Other Payer Referring Provider", + looptype="", + position="3250", + repeat="2", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Referring Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN", "P3"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referring Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330D = Loop( + "2330D", + Properties( + desc="Other Payer Rendering Provider", + looptype="", + position="3650", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Rendering Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Rendering Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330E = Loop( + "2330E", + Properties( + desc="Other Payer Service Facility Location", + looptype="", + position="4650", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Service Facility Location", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Service Facility Location Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330F = Loop( + "2330F", + Properties( + desc="Other Payer Supervising Provider", + looptype="", + position="5650", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Supervising Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DQ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Supervising Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330G = Loop( + "2330G", + Properties( + desc="Other Payer Billing Provider", + looptype="", + position="6350", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Billing Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Billing Provider Secondary Identification", + position="3550", + repeat="2", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2320 = Loop( + "2320", + Properties( + desc="Other Subscriber Information", + looptype="", + position="2900", + repeat="10", + req_sit="S", + ), + Segment( + "SBR", + Properties( + desc="Other Subscriber Information", + position="2900", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SBR01", + Properties( + desc="Payer Responsibility Sequence Number Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U"], + ), + ), + Element( + "SBR02", + Properties( + desc="Individual Relationship Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["01", "18", "19", "20", "21", "39", "40", "53", "G8"], + ), + ), + Element( + "SBR03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "SBR04", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=4, + codes=[], + ), + ), + Element( + "SBR05", + Properties( + desc="Insurance Type Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=5, + codes=["12", "13", "14", "15", "16", "41", "42", "43", "47"], + ), + ), + Element( + "SBR06", + Properties( + desc="Coordination of Benefits Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "SBR07", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + Element( + "SBR08", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "SBR09", + Properties( + desc="Claim Filing Indicator Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=9, + codes=[ + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "AM", + "BL", + "CH", + "CI", + "DS", + "FI", + "HM", + "LM", + "MA", + "MB", + "MC", + "OF", + "TV", + "VA", + "WC", + "ZZ", + ], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Claim Level Adjustments", + position="2950", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Payer Paid Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["D"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Total Non-Covered Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["A8"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "OI", + Properties( + desc="Other Insurance Coverage Information", + position="3100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "OI01", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=1, + codes=[], + ), + ), + Element( + "OI02", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "OI03", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["N", "W", "Y"], + ), + ), + Element( + "OI04", + Properties( + desc="Patient Signature Source Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=4, + codes=["P"], + ), + ), + Element( + "OI05", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=5, + codes=[], + ), + ), + Element( + "OI06", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["I", "Y"], + ), + ), + ), + Segment( + "MOA", + Properties( + desc="Outpatient Adjudication Information", + position="3200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "MOA01", + Properties( + desc="Percentage as Decimal", + req_sit="S", + data_type=("R", "1", "10"), + position=1, + codes=[], + ), + ), + Element( + "MOA02", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "MOA03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "MOA04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "MOA05", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + Element( + "MOA06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "MOA07", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=7, + codes=[], + ), + ), + Element( + "MOA08", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "MOA09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + ), + parsed_837_2330A, + parsed_837_2330B, + parsed_837_2330C, + parsed_837_2330D, + parsed_837_2330E, + parsed_837_2330F, + parsed_837_2330G, +) +parsed_837_2410 = Loop( + "2410", + Properties( + desc="Drug Identification", + looptype="", + position="4940", + repeat="1", + req_sit="S", + ), + Segment( + "LIN", + Properties( + desc="Drug Identification", + position="4930", + repeat="1", + req_sit="R", + syntax="P0405 P0607 P0809 P1011 P1213 P1415 P1617 P1819 P2021 P2223 P2425 P2627 P2829 P3031", + ), + Element( + "LIN01", + Properties( + desc="Assigned Identification", + req_sit="N", + data_type=("AN", "1", "20"), + position=1, + codes=[], + ), + ), + Element( + "LIN02", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["EN", "EO", "HI", "N4", "ON", "UK", "UP"], + ), + ), + Element( + "LIN03", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=3, + codes=[], + ), + ), + Element( + "LIN04", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "LIN05", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=5, + codes=[], + ), + ), + Element( + "LIN06", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "LIN07", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + Element( + "LIN08", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "LIN09", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=9, + codes=[], + ), + ), + Element( + "LIN10", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "LIN11", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=11, + codes=[], + ), + ), + Element( + "LIN12", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "LIN13", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=13, + codes=[], + ), + ), + Element( + "LIN14", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=14, + codes=[], + ), + ), + Element( + "LIN15", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=15, + codes=[], + ), + ), + Element( + "LIN16", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=16, + codes=[], + ), + ), + Element( + "LIN17", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=17, + codes=[], + ), + ), + Element( + "LIN18", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=18, + codes=[], + ), + ), + Element( + "LIN19", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=19, + codes=[], + ), + ), + Element( + "LIN20", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=20, + codes=[], + ), + ), + Element( + "LIN21", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=21, + codes=[], + ), + ), + Element( + "LIN22", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=22, + codes=[], + ), + ), + Element( + "LIN23", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=23, + codes=[], + ), + ), + Element( + "LIN24", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=24, + codes=[], + ), + ), + Element( + "LIN25", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=25, + codes=[], + ), + ), + Element( + "LIN26", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=26, + codes=[], + ), + ), + Element( + "LIN27", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=27, + codes=[], + ), + ), + Element( + "LIN28", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=28, + codes=[], + ), + ), + Element( + "LIN29", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=29, + codes=[], + ), + ), + Element( + "LIN30", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=30, + codes=[], + ), + ), + Element( + "LIN31", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=31, + codes=[], + ), + ), + ), + Segment( + "CTP", + Properties( + desc="Drug Quantity", + position="4940", + repeat="1", + req_sit="R", + syntax="P0405 C0607 C0902 C1002 C1103", + ), + Element( + "CTP01", + Properties( + desc="Class of Trade Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=1, + codes=[], + ), + ), + Element( + "CTP02", + Properties( + desc="Price Identifier Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=2, + codes=[], + ), + ), + Element( + "CTP03", + Properties( + desc="Unit Price", + req_sit="N", + data_type=("R", "1", "17"), + position=3, + codes=[], + ), + ), + Element( + "CTP04", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CTP05-01", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["F2", "GR", "ME", "ML", "UN"], + ), + ), + Element( + "CTP05-02", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=1, + codes=[], + ), + ), + Element( + "CTP05-03", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CTP05-04", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "CTP05-05", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CTP05-06", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=5, + codes=[], + ), + ), + Element( + "CTP05-07", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "CTP05-08", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CTP05-09", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=8, + codes=[], + ), + ), + Element( + "CTP05-10", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP05-11", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CTP05-12", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=11, + codes=[], + ), + ), + Element( + "CTP05-13", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "CTP05-14", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CTP05-15", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=14, + codes=[], + ), + ), + ), + Element( + "CTP06", + Properties( + desc="Price Multiplier Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + Element( + "CTP07", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "CTP08", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "CTP09", + Properties( + desc="Basis of Unit Price Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP10", + Properties( + desc="Condition Value", + req_sit="N", + data_type=("AN", "1", "10"), + position=10, + codes=[], + ), + ), + Element( + "CTP11", + Properties( + desc="Multiple Price Quantity", + req_sit="N", + data_type=("N0", "1", "2"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prescription or Compound Drug Association Number", + position="4950", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["VY", "XZ"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2420A = Loop( + "2420A", + Properties( + desc="Rendering Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Rendering Provider Specialty Information", + position="5050", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["PE"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420B = Loop( + "2420B", + Properties( + desc="Purchased Service Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Purchased Service Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["QB"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Purchased Service Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420C = Loop( + "2420C", + Properties( + desc="Service Facility Location Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Service Facility Location Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Service Facility Location Address", + position="5140", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Service Facility Location City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Facility Location Secondary Identification", + position="5250", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420D = Loop( + "2420D", + Properties( + desc="Supervising Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Supervising Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DQ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Supervising Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420E = Loop( + "2420E", + Properties( + desc="Ordering Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ordering Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DK"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ordering Provider Address", + position="5140", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ordering Provider City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Ordering Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), + Segment( + "PER", + Properties( + desc="Ordering Provider Contact Information", + position="5300", + repeat="1", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["EM", "FX", "TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2420F = Loop( + "2420F", + Properties( + desc="Referring Provider Name", + looptype="", + position="5000", + repeat="2", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN", "P3"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420G = Loop( + "2420G", + Properties( + desc="Ambulance Pick-up Location", + looptype="", + position="5310", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Pick-up Location", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PW"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Pick-up Location Address", + position="5140", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Pick-up Location City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2420H = Loop( + "2420H", + Properties( + desc="Ambulance Drop-off Location", + looptype="", + position="5380", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Ambulance Drop-off Location", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["45"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Ambulance Drop-off Location Address", + position="5140", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Ambulance Drop-off Location City, State, ZIP Code", + position="5200", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2430 = Loop( + "2430", + Properties( + desc="Line Adjudication Information", + looptype="", + position="5400", + repeat="15", + req_sit="S", + ), + Segment( + "SVD", + Properties( + desc="Line Adjudication Information", + position="5400", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SVD01", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=1, + codes=[], + ), + ), + Element( + "SVD02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="R", + seq="03", + ), + Element( + "SVD03-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "IV", "WK"], + ), + ), + Element( + "SVD03-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SVD03-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SVD03-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SVD03-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SVD03-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SVD03-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SVD03-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SVD04", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=4, + codes=[], + ), + ), + Element( + "SVD05", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "SVD06", + Properties( + desc="Assigned Number", + req_sit="S", + data_type=("N0", "1", "6"), + position=6, + codes=[], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Line Adjustment", + position="5450", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Line Check or Remittance Date", + position="5500", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="5505", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), +) +parsed_837_2440 = Loop( + "2440", + Properties( + desc="Form Identification Code", + looptype="", + position="5510", + repeat=">1", + req_sit="S", + ), + Segment( + "LQ", + Properties( + desc="Form Identification Code", + position="5510", + repeat="1", + req_sit="R", + syntax="C0102", + ), + Element( + "LQ01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["AS", "UT"], + ), + ), + Element( + "LQ02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=2, + codes=[], + ), + ), + ), + Segment( + "FRM", + Properties( + desc="Supporting Documentation", + position="5520", + repeat="99", + req_sit="R", + syntax="R02030405", + ), + Element( + "FRM01", + Properties( + desc="Assigned Identification", + req_sit="R", + data_type=("AN", "1", "20"), + position=1, + codes=[], + ), + ), + Element( + "FRM02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "W", "Y"], + ), + ), + Element( + "FRM03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "FRM04", + Properties( + desc="Date", + req_sit="S", + data_type=("DT", "8", "8"), + position=4, + codes=[], + ), + ), + Element( + "FRM05", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + ), +) +parsed_837_2400 = Loop( + "2400", + Properties( + desc="Service Line Number", + looptype="", + position="3650", + repeat="50", + req_sit="R", + ), + Segment( + "LX", + Properties( + desc="Service Line Number", + position="3650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "LX01", + Properties( + desc="Assigned Number", + req_sit="R", + data_type=("N0", "1", "6"), + position=1, + codes=[], + ), + ), + ), + Segment( + "SV1", + Properties( + desc="Professional Service", + position="3700", + repeat="1", + req_sit="R", + syntax="P0304", + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "SV101-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "IV", "WK"], + ), + ), + Element( + "SV101-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SV101-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SV101-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SV101-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SV101-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV101-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SV101-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SV102", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "SV103", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["MJ", "UN"], + ), + ), + Element( + "SV104", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "SV105", + Properties( + desc="Facility Code Value", + req_sit="S", + data_type=("AN", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV106", + Properties( + desc="Service Type Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=6, + codes=[], + ), + ), + Composite( + "C004", + Properties( + desc="Composite Diagnosis Code Pointer", + refdes="", + repeat="", + req_sit="R", + seq="07", + ), + Element( + "SV107-01", + Properties( + desc="Diagnosis Code Pointer", + req_sit="R", + data_type=("N0", "1", "2"), + position=0, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + Element( + "SV107-02", + Properties( + desc="Diagnosis Code Pointer", + req_sit="S", + data_type=("N0", "1", "2"), + position=1, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + Element( + "SV107-03", + Properties( + desc="Diagnosis Code Pointer", + req_sit="S", + data_type=("N0", "1", "2"), + position=2, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + Element( + "SV107-04", + Properties( + desc="Diagnosis Code Pointer", + req_sit="S", + data_type=("N0", "1", "2"), + position=3, + codes=[ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10", + "11", + "12", + ], + ), + ), + ), + Element( + "SV108", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "SV109", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=9, + codes=["Y"], + ), + ), + Element( + "SV110", + Properties( + desc="Multiple Procedure Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=10, + codes=[], + ), + ), + Element( + "SV111", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=11, + codes=["Y"], + ), + ), + Element( + "SV112", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=12, + codes=["Y"], + ), + ), + Element( + "SV113", + Properties( + desc="Review Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=13, + codes=[], + ), + ), + Element( + "SV114", + Properties( + desc="National or Local Assigned Review Value", + req_sit="N", + data_type=("AN", "1", "2"), + position=14, + codes=[], + ), + ), + Element( + "SV115", + Properties( + desc="Copay Status Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=15, + codes=["0"], + ), + ), + Element( + "SV116", + Properties( + desc="Health Care Professional Shortage Area Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=16, + codes=[], + ), + ), + Element( + "SV117", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=17, + codes=[], + ), + ), + Element( + "SV118", + Properties( + desc="Postal Code", + req_sit="N", + data_type=("ID", "3", "15"), + position=18, + codes=[], + ), + ), + Element( + "SV119", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=19, + codes=[], + ), + ), + Element( + "SV120", + Properties( + desc="Level of Care Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=20, + codes=[], + ), + ), + Element( + "SV121", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=21, + codes=[], + ), + ), + ), + Segment( + "SV5", + Properties( + desc="Durable Medical Equipment Service", + position="4000", + repeat="1", + req_sit="S", + syntax="R0405 C0604", + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "SV501-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["HC"], + ), + ), + Element( + "SV501-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SV501-03", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SV501-04", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SV501-05", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SV501-06", + Properties( + desc="Procedure Modifier", + req_sit="N", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV501-07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SV501-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SV502", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["DA"], + ), + ), + Element( + "SV503", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=3, + codes=[], + ), + ), + Element( + "SV504", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "SV505", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=5, + codes=[], + ), + ), + Element( + "SV506", + Properties( + desc="Frequency Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["1", "4", "6"], + ), + ), + Element( + "SV507", + Properties( + desc="Prognosis Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Line Supplemental Information", + position="4200", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Durable Medical Equipment Certificate of Medical Necessity Indicator", + position="4200", + repeat="1", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["CT"], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AB", "AD", "AF", "AG", "NS"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "CR1", + Properties( + desc="Ambulance Transport Information", + position="4250", + repeat="1", + req_sit="S", + syntax="P0102 P0506", + ), + Element( + "CR101", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=1, + codes=["LB"], + ), + ), + Element( + "CR102", + Properties( + desc="Weight", + req_sit="S", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CR103", + Properties( + desc="Ambulance Transport Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + Element( + "CR104", + Properties( + desc="Ambulance Transport Reason Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["A", "B", "C", "D", "E"], + ), + ), + Element( + "CR105", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=5, + codes=["DH"], + ), + ), + Element( + "CR106", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=6, + codes=[], + ), + ), + Element( + "CR107", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=7, + codes=[], + ), + ), + Element( + "CR108", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=8, + codes=[], + ), + ), + Element( + "CR109", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=9, + codes=[], + ), + ), + Element( + "CR110", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=10, + codes=[], + ), + ), + ), + Segment( + "CR3", + Properties( + desc="Durable Medical Equipment Certification", + position="4350", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "CR301", + Properties( + desc="Certification Type Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["I", "R", "S"], + ), + ), + Element( + "CR302", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["MO"], + ), + ), + Element( + "CR303", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=3, + codes=[], + ), + ), + Element( + "CR304", + Properties( + desc="Insulin Dependent Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Element( + "CR305", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=5, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Ambulance Certification", + position="4500", + repeat="3", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["07"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=6, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=7, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Hospice Employee Indicator", + position="4500", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["70"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["65"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=5, + codes=[], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Condition Indicator/Durable Medical Equipment", + position="4500", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["09"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["38", "ZV"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["38", "ZV"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=5, + codes=["38", "ZV"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=["38", "ZV"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=["38", "ZV"], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Service Date", + position="4550", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["472"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Prescription Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["471"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="DATE - Certification Revision/Recertification Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["607"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Begin Therapy Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["463"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Certification Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["461"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Seen Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["304"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Test Date", position="4550", repeat="2", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["738", "739"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Shipped Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["011"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last X-ray Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["455"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Initial Treatment Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["454"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "QTY", + Properties( + desc="Ambulance Patient Count", + position="4600", + repeat="1", + req_sit="S", + syntax="E0204 R0204", + ), + Element( + "QTY01", + Properties( + desc="Quantity Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["PT"], + ), + ), + Element( + "QTY02", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Element( + "QTY04", + Properties( + desc="Free-form Information", + req_sit="N", + data_type=("AN", "1", "30"), + position=4, + codes=[], + ), + ), + ), + Segment( + "QTY", + Properties( + desc="Obstetric Anesthesia Additional Units", + position="4600", + repeat="1", + req_sit="S", + syntax="E0204 R0204", + ), + Element( + "QTY01", + Properties( + desc="Quantity Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["FL"], + ), + ), + Element( + "QTY02", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Element( + "QTY04", + Properties( + desc="Free-form Information", + req_sit="N", + data_type=("AN", "1", "30"), + position=4, + codes=[], + ), + ), + ), + Segment( + "MEA", + Properties( + desc="Test Result", + position="4620", + repeat="5", + req_sit="S", + syntax="R03050608 L050412 L060412 L07030506 E0803 P1112", + ), + Element( + "MEA01", + Properties( + desc="Measurement Reference ID Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["OG", "TR"], + ), + ), + Element( + "MEA02", + Properties( + desc="Measurement Qualifier", + req_sit="R", + data_type=("ID", "1", "3"), + position=2, + codes=["HT", "R1", "R2", "R3", "R4"], + ), + ), + Element( + "MEA03", + Properties( + desc="Measurement Value", + req_sit="R", + data_type=("R", "1", "20"), + position=3, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Element( + "MEA05", + Properties( + desc="Range Minimum", + req_sit="N", + data_type=("R", "1", "20"), + position=5, + codes=[], + ), + ), + Element( + "MEA06", + Properties( + desc="Range Maximum", + req_sit="N", + data_type=("R", "1", "20"), + position=6, + codes=[], + ), + ), + Element( + "MEA07", + Properties( + desc="Measurement Significance Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=7, + codes=[], + ), + ), + Element( + "MEA08", + Properties( + desc="Measurement Attribute Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "MEA09", + Properties( + desc="Surface/Layer/Position Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "MEA10", + Properties( + desc="Measurement Method or Device", + req_sit="N", + data_type=("ID", "2", "4"), + position=10, + codes=[], + ), + ), + Element( + "MEA11", + Properties( + desc="Code List Qualifier Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=11, + codes=[], + ), + ), + Element( + "MEA12", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=12, + codes=[], + ), + ), + ), + Segment( + "CN1", + Properties( + desc="Contract Information", + position="4650", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CN101", + Properties( + desc="Contract Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "02", "03", "04", "05", "06", "09"], + ), + ), + Element( + "CN102", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CN103", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=3, + codes=[], + ), + ), + Element( + "CN104", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "CN105", + Properties( + desc="Terms Discount Percent", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + Element( + "CN106", + Properties( + desc="Version Identifier", + req_sit="S", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9B"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9D"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prior Authorization", + position="4700", + repeat="5", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), + Segment( + "REF", + Properties( + desc="Line Item Control Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["6R"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Mammography Certification Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EW"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Clinical Laboratory Improvement Amendment (CLIA) Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["X4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Clinical Laboratory Improvement Amendment (CLIA) Facility Identification", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Immunization Batch Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["BT"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referral Number", + position="4700", + repeat="5", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Sales Tax Amount", position="4750", repeat="1", req_sit="S", syntax="" + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["T"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Postage Claimed Amount", + position="4750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["F4"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "K3", + Properties( + desc="File Information", + position="4800", + repeat="10", + req_sit="S", + syntax="", + ), + Element( + "K301", + Properties( + desc="Fixed Format Information", + req_sit="R", + data_type=("AN", "1", "80"), + position=1, + codes=[], + ), + ), + Element( + "K302", + Properties( + desc="Record Format Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Line Note", position="4850", repeat="1", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["ADD", "DCP"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Third Party Organization Notes", + position="4850", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["TPO"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "PS1", + Properties( + desc="Purchased Service Information", + position="4880", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "PS101", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "PS102", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "PS103", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Line Pricing/Repricing Information", + position="4920", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=9, + codes=["ER", "HC", "IV", "WK"], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=11, + codes=["MJ", "UN"], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2410, + parsed_837_2420A, + parsed_837_2420B, + parsed_837_2420C, + parsed_837_2420D, + parsed_837_2420E, + parsed_837_2420F, + parsed_837_2420G, + parsed_837_2420H, + parsed_837_2430, + parsed_837_2440, +) +parsed_837_2300 = Loop( + "2300", + Properties( + desc="Claim Information", + looptype="", + position="1300", + repeat="100", + req_sit="R", + ), + Segment( + "CLM", + Properties( + desc="Claim Information", + position="1300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "CLM01", + Properties( + desc="Claim Submitter's Identifier", + req_sit="R", + data_type=("AN", "1", "38"), + position=1, + codes=[], + ), + ), + Element( + "CLM02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CLM03", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "CLM04", + Properties( + desc="Non-Institutional Claim Type Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C023", + Properties( + desc="Health Care Service Location Information", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CLM05-01", + Properties( + desc="Facility Code Value", + req_sit="R", + data_type=("AN", "1", "2"), + position=0, + codes=[], + ), + ), + Element( + "CLM05-02", + Properties( + desc="Facility Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["B"], + ), + ), + Element( + "CLM05-03", + Properties( + desc="Claim Frequency Type Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + ), + Element( + "CLM06", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["N", "Y"], + ), + ), + Element( + "CLM07", + Properties( + desc="Provider Accept Assignment Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=7, + codes=["A", "B", "C"], + ), + ), + Element( + "CLM08", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "W", "Y"], + ), + ), + Element( + "CLM09", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=9, + codes=["I", "Y"], + ), + ), + Element( + "CLM10", + Properties( + desc="Patient Signature Source Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=10, + codes=["P"], + ), + ), + Composite( + "C024", + Properties( + desc="Related Causes Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "CLM11-01", + Properties( + desc="Related-Causes Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["AA", "EM", "OA"], + ), + ), + Element( + "CLM11-02", + Properties( + desc="Related-Causes Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=1, + codes=["AA", "EM", "OA"], + ), + ), + Element( + "CLM11-03", + Properties( + desc="Related-Causes Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "CLM11-04", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "CLM11-05", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + ), + Element( + "CLM12", + Properties( + desc="Special Program Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=12, + codes=["02", "03", "05", "09"], + ), + ), + Element( + "CLM13", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=13, + codes=[], + ), + ), + Element( + "CLM14", + Properties( + desc="Level of Service Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=14, + codes=[], + ), + ), + Element( + "CLM15", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=15, + codes=[], + ), + ), + Element( + "CLM16", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=16, + codes=[], + ), + ), + Element( + "CLM17", + Properties( + desc="Claim Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=17, + codes=[], + ), + ), + Element( + "CLM18", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=18, + codes=[], + ), + ), + Element( + "CLM19", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=19, + codes=[], + ), + ), + Element( + "CLM20", + Properties( + desc="Delay Reason Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=20, + codes=["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "15"], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Onset of Current Illness or Symptom", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["431"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Initial Treatment Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["454"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Seen Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["304"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Acute Manifestation", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["453"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Accident", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["439"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Menstrual Period", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["484"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last X-ray Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["455"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Hearing and Vision Prescription Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["471"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Disability Dates", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["314", "360", "361"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Last Worked", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["297"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Authorized Return to Work", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["296"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Admission", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["435"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Discharge", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["096"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Assumed and Relinquished Care Dates", + position="1350", + repeat="2", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["090", "091"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Property and Casualty Date of First Contact", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["444"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Repricer Received Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["050"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Claim Supplemental Information", + position="1550", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "CN1", + Properties( + desc="Contract Information", + position="1600", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CN101", + Properties( + desc="Contract Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "02", "03", "04", "05", "06", "09"], + ), + ), + Element( + "CN102", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CN103", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=3, + codes=[], + ), + ), + Element( + "CN104", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "CN105", + Properties( + desc="Terms Discount Percent", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + Element( + "CN106", + Properties( + desc="Version Identifier", + req_sit="S", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Patient Amount Paid", + position="1750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["F5"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Authorization Exception Code", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["4N"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Mandatory Medicare (Section 4081) Crossover Indicator", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F5"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Mammography Certification Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EW"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referral Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prior Authorization", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Payer Claim Control Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Clinical Laboratory Improvement Amendment (CLIA) Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["X4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9A"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9C"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Investigational Device Exemption Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["LX"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Claim Identifier For Transmission Intermediaries", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D9"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Medical Record Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EA"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Demonstration Project Identifier", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["P4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Care Plan Oversight", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["1J"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "K3", + Properties( + desc="File Information", + position="1850", + repeat="10", + req_sit="S", + syntax="", + ), + Element( + "K301", + Properties( + desc="Fixed Format Information", + req_sit="R", + data_type=("AN", "1", "80"), + position=1, + codes=[], + ), + ), + Element( + "K302", + Properties( + desc="Record Format Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Claim Note", position="1900", repeat="1", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["ADD", "CER", "DCP", "DGN", "TPO"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "CR1", + Properties( + desc="Ambulance Transport Information", + position="1950", + repeat="1", + req_sit="S", + syntax="P0102 P0506", + ), + Element( + "CR101", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=1, + codes=["LB"], + ), + ), + Element( + "CR102", + Properties( + desc="Weight", + req_sit="S", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CR103", + Properties( + desc="Ambulance Transport Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + Element( + "CR104", + Properties( + desc="Ambulance Transport Reason Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["A", "B", "C", "D", "E"], + ), + ), + Element( + "CR105", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=5, + codes=["DH"], + ), + ), + Element( + "CR106", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=6, + codes=[], + ), + ), + Element( + "CR107", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=7, + codes=[], + ), + ), + Element( + "CR108", + Properties( + desc="Address Information", + req_sit="N", + data_type=("AN", "1", "55"), + position=8, + codes=[], + ), + ), + Element( + "CR109", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=9, + codes=[], + ), + ), + Element( + "CR110", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=10, + codes=[], + ), + ), + ), + Segment( + "CR2", + Properties( + desc="Spinal Manipulation Service Information", + position="2000", + repeat="1", + req_sit="S", + syntax="P0102 C0403 P0506", + ), + Element( + "CR201", + Properties( + desc="Count", + req_sit="N", + data_type=("N0", "1", "9"), + position=1, + codes=[], + ), + ), + Element( + "CR202", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=2, + codes=[], + ), + ), + Element( + "CR203", + Properties( + desc="Subluxation Level Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=3, + codes=[], + ), + ), + Element( + "CR204", + Properties( + desc="Subluxation Level Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CR205", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "CR206", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=6, + codes=[], + ), + ), + Element( + "CR207", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CR208", + Properties( + desc="Nature of Condition Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=8, + codes=["A", "C", "D", "E", "F", "G", "M"], + ), + ), + Element( + "CR209", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=9, + codes=[], + ), + ), + Element( + "CR210", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=10, + codes=[], + ), + ), + Element( + "CR211", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=11, + codes=[], + ), + ), + Element( + "CR212", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=12, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Ambulance Certification", + position="2200", + repeat="3", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["07"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=6, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=7, + codes=["01", "04", "05", "06", "07", "08", "09", "12"], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Patient Condition Information: Vision", + position="2200", + repeat="3", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["E1", "E2", "E3"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=6, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=7, + codes=["L1", "L2", "L3", "L4", "L5"], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="Homebound Indicator", + position="2200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["75"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["IH"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=5, + codes=[], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="EPSDT Referral", position="2200", repeat="1", req_sit="S", syntax="" + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "HI", + Properties( + desc="Health Care Diagnosis Code", + position="2310", + repeat="1", + req_sit="R", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABK", "BK"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Anesthesia Related Procedure", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BP"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BO"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Condition Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Claim Pricing/Repricing Information", + position="2410", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=11, + codes=[], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2310A, + parsed_837_2310B, + parsed_837_2310C, + parsed_837_2310D, + parsed_837_2310E, + parsed_837_2310F, + parsed_837_2320, + parsed_837_2400, +) +parsed_837_2000C = Loop( + "2000C", + Properties( + desc="Patient Hierarchical Level", + looptype="", + position="1400", + repeat=">1", + req_sit="S", + ), + Segment( + "HL", + Properties( + desc="Patient Hierarchical Level", + position="0010", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "HL01", + Properties( + desc="Hierarchical ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=1, + codes=[], + ), + ), + Element( + "HL02", + Properties( + desc="Hierarchical Parent ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=2, + codes=[], + ), + ), + Element( + "HL03", + Properties( + desc="Hierarchical Level Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=["23"], + ), + ), + Element( + "HL04", + Properties( + desc="Hierarchical Child Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["0"], + ), + ), + ), + Segment( + "PAT", + Properties( + desc="Patient Information", + position="0070", + repeat="1", + req_sit="R", + syntax="P0506 P0708", + ), + Element( + "PAT01", + Properties( + desc="Individual Relationship Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "19", "20", "21", "39", "40", "53", "G8"], + ), + ), + Element( + "PAT02", + Properties( + desc="Patient Location Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + Element( + "PAT03", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "PAT04", + Properties( + desc="Student Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Element( + "PAT05", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["D8"], + ), + ), + Element( + "PAT06", + Properties( + desc="Date Time Period", + req_sit="S", + data_type=("AN", "1", "35"), + position=6, + codes=[], + ), + ), + Element( + "PAT07", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["01"], + ), + ), + Element( + "PAT08", + Properties( + desc="Weight", + req_sit="S", + data_type=("R", "1", "10"), + position=8, + codes=[], + ), + ), + Element( + "PAT09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=9, + codes=["Y"], + ), + ), + ), + parsed_837_2010CA, + parsed_837_2300, +) +parsed_837_2000B = Loop( + "2000B", + Properties( + desc="Subscriber Hierarchical Level", + looptype="", + position="0200", + repeat=">1", + req_sit="R", + ), + Segment( + "HL", + Properties( + desc="Subscriber Hierarchical Level", + position="0010", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "HL01", + Properties( + desc="Hierarchical ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=1, + codes=[], + ), + ), + Element( + "HL02", + Properties( + desc="Hierarchical Parent ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=2, + codes=[], + ), + ), + Element( + "HL03", + Properties( + desc="Hierarchical Level Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=["22"], + ), + ), + Element( + "HL04", + Properties( + desc="Hierarchical Child Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["0", "1"], + ), + ), + ), + Segment( + "SBR", + Properties( + desc="Subscriber Information", + position="0050", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SBR01", + Properties( + desc="Payer Responsibility Sequence Number Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U"], + ), + ), + Element( + "SBR02", + Properties( + desc="Individual Relationship Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=["18"], + ), + ), + Element( + "SBR03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "SBR04", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=4, + codes=[], + ), + ), + Element( + "SBR05", + Properties( + desc="Insurance Type Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=5, + codes=["12", "13", "14", "15", "16", "41", "42", "43", "47"], + ), + ), + Element( + "SBR06", + Properties( + desc="Coordination of Benefits Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "SBR07", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + Element( + "SBR08", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "SBR09", + Properties( + desc="Claim Filing Indicator Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=9, + codes=[ + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "AM", + "BL", + "CH", + "CI", + "DS", + "FI", + "HM", + "LM", + "MA", + "MB", + "MC", + "OF", + "TV", + "VA", + "WC", + "ZZ", + ], + ), + ), + ), + Segment( + "PAT", + Properties( + desc="Patient Information", + position="0070", + repeat="1", + req_sit="S", + syntax="P0506 P0708", + ), + Element( + "PAT01", + Properties( + desc="Individual Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=1, + codes=[], + ), + ), + Element( + "PAT02", + Properties( + desc="Patient Location Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + Element( + "PAT03", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "PAT04", + Properties( + desc="Student Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Element( + "PAT05", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=["D8"], + ), + ), + Element( + "PAT06", + Properties( + desc="Date Time Period", + req_sit="S", + data_type=("AN", "1", "35"), + position=6, + codes=[], + ), + ), + Element( + "PAT07", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["01"], + ), + ), + Element( + "PAT08", + Properties( + desc="Weight", + req_sit="S", + data_type=("R", "1", "10"), + position=8, + codes=[], + ), + ), + Element( + "PAT09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=9, + codes=["Y"], + ), + ), + ), + parsed_837_2010BA, + parsed_837_2010BB, + parsed_837_2300, + parsed_837_2000C, +) +parsed_837_2000A = Loop( + "2000A", + Properties( + desc="Billing Provider Hierarchical Level", + looptype="", + position="0010", + repeat=">1", + req_sit="R", + ), + Segment( + "HL", + Properties( + desc="Billing Provider Hierarchical Level", + position="0010", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "HL01", + Properties( + desc="Hierarchical ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=1, + codes=[], + ), + ), + Element( + "HL02", + Properties( + desc="Hierarchical Parent ID Number", + req_sit="N", + data_type=("AN", "1", "12"), + position=2, + codes=[], + ), + ), + Element( + "HL03", + Properties( + desc="Hierarchical Level Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=["20"], + ), + ), + Element( + "HL04", + Properties( + desc="Hierarchical Child Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["1"], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Billing Provider Specialty Information", + position="0030", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["BI"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "CUR", + Properties( + desc="Foreign Currency Information", + position="0100", + repeat="1", + req_sit="S", + syntax="C0807 C0907 L101112 C1110 C1210 L131415 C1413 C1513 L161718 C1716 C1816 L192021 C2019 C2119", + ), + Element( + "CUR01", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "CUR02", + Properties( + desc="Currency Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=2, + codes=[], + ), + ), + Element( + "CUR03", + Properties( + desc="Exchange Rate", + req_sit="N", + data_type=("R", "4", "10"), + position=3, + codes=[], + ), + ), + Element( + "CUR04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CUR05", + Properties( + desc="Currency Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=5, + codes=[], + ), + ), + Element( + "CUR06", + Properties( + desc="Currency Market/Exchange Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + Element( + "CUR07", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=7, + codes=[], + ), + ), + Element( + "CUR08", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=8, + codes=[], + ), + ), + Element( + "CUR09", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=9, + codes=[], + ), + ), + Element( + "CUR10", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=10, + codes=[], + ), + ), + Element( + "CUR11", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=11, + codes=[], + ), + ), + Element( + "CUR12", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=12, + codes=[], + ), + ), + Element( + "CUR13", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=13, + codes=[], + ), + ), + Element( + "CUR14", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=14, + codes=[], + ), + ), + Element( + "CUR15", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=15, + codes=[], + ), + ), + Element( + "CUR16", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=16, + codes=[], + ), + ), + Element( + "CUR17", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=17, + codes=[], + ), + ), + Element( + "CUR18", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=18, + codes=[], + ), + ), + Element( + "CUR19", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=19, + codes=[], + ), + ), + Element( + "CUR20", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=20, + codes=[], + ), + ), + Element( + "CUR21", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=21, + codes=[], + ), + ), + ), + parsed_837_2010AA, + parsed_837_2010AB, + parsed_837_2010AC, + parsed_837_2000B, +) +parsed_837_DETAIL = Loop( + "DETAIL", + Properties( + desc="Table 2 - Detail", + looptype="wrapper", + position="0200", + repeat=">1", + req_sit="S", + ), + parsed_837_2000A, +) +parsed_837_ST_LOOP = Loop( + "ST_LOOP", + Properties( + desc="Transaction Set Header", + looptype="explicit", + position="0200", + repeat=">1", + req_sit="R", + ), + Segment( + "ST", + Properties( + desc="Transaction Set Header", + position="0050", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "ST01", + Properties( + desc="Transaction Set Identifier Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["837"], + ), + ), + Element( + "ST02", + Properties( + desc="Transaction Set Control Number", + req_sit="R", + data_type=("AN", "4", "9"), + position=2, + codes=[], + ), + ), + Element( + "ST03", + Properties( + desc="Implementation Convention Reference", + req_sit="S", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + parsed_837_HEADER, + parsed_837_DETAIL, + Segment( + "SE", + Properties( + desc="Transaction Set Trailer", + position="5550", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SE01", + Properties( + desc="Number of Included Segments", + req_sit="R", + data_type=("N0", "1", "10"), + position=1, + codes=[], + ), + ), + Element( + "SE02", + Properties( + desc="Transaction Set Control Number", + req_sit="R", + data_type=("AN", "4", "9"), + position=2, + codes=[], + ), + ), + ), +) +parsed_837_GS_LOOP = Loop( + "GS_LOOP", + Properties( + desc="Functional Group Header", + looptype="explicit", + position="0200", + repeat=">1", + req_sit="R", + ), + Segment( + "GS", + Properties( + desc="Functional Group Header", + position="0100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "GS01", + Properties( + desc="Functional Identifier Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["HC"], + ), + ), + Element( + "GS02", + Properties( + desc="Application Senders Code", + req_sit="R", + data_type=("AN", "2", "15"), + position=2, + codes=[], + ), + ), + Element( + "GS03", + Properties( + desc="124", + req_sit="R", + data_type=("AN", "2", "15"), + position=3, + codes=[], + ), + ), + Element( + "GS04", + Properties( + desc="Date", + req_sit="R", + data_type=("DT", "8", "8"), + position=4, + codes=[], + ), + ), + Element( + "GS05", + Properties( + desc="Time", + req_sit="R", + data_type=("TM", "4", "8"), + position=5, + codes=[], + ), + ), + Element( + "GS06", + Properties( + desc="Group Control Number", + req_sit="R", + data_type=("N0", "1", "9"), + position=6, + codes=[], + ), + ), + Element( + "GS07", + Properties( + desc="Responsible Agency Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=7, + codes=["X"], + ), + ), + Element( + "GS08", + Properties( + desc="Version / Release / Industry Identifier Code", + req_sit="R", + data_type=("AN", "1", "12"), + position=8, + codes=["005010X222A1"], + ), + ), + ), + parsed_837_ST_LOOP, + Segment( + "GE", + Properties( + desc="Functional Group Trailer", + position="0300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "GE01", + Properties( + desc="97", req_sit="R", data_type=("N0", "1", "6"), position=1, codes=[] + ), + ), + Element( + "GE02", + Properties( + desc="Group Control Number", + req_sit="R", + data_type=("N0", "1", "9"), + position=2, + codes=[], + ), + ), + ), +) +parsed_837_ISA_LOOP = Loop( + "ISA_LOOP", + Properties( + desc="Interchange Control Header", + looptype="explicit", + position="0010", + repeat=">1", + req_sit="R", + ), + Segment( + "ISA", + Properties( + desc="Interchange Control Header", + position="0100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "ISA01", + Properties( + desc="I01", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["00", "03"], + ), + ), + Element( + "ISA02", + Properties( + desc="I02", + req_sit="R", + data_type=("AN", "10", "10"), + position=2, + codes=[], + ), + ), + Element( + "ISA03", + Properties( + desc="I03", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["00", "01"], + ), + ), + Element( + "ISA04", + Properties( + desc="I04", + req_sit="R", + data_type=("AN", "10", "10"), + position=4, + codes=[], + ), + ), + Element( + "ISA05", + Properties( + desc="I05", + req_sit="R", + data_type=("ID", "2", "2"), + position=5, + codes=["01", "14", "20", "27", "28", "29", "30", "33", "ZZ"], + ), + ), + Element( + "ISA06", + Properties( + desc="I06", + req_sit="R", + data_type=("AN", "15", "15"), + position=6, + codes=[], + ), + ), + Element( + "ISA07", + Properties( + desc="I05", + req_sit="R", + data_type=("ID", "2", "2"), + position=7, + codes=["01", "14", "20", "27", "28", "29", "30", "33", "ZZ"], + ), + ), + Element( + "ISA08", + Properties( + desc="I07", + req_sit="R", + data_type=("AN", "15", "15"), + position=8, + codes=[], + ), + ), + Element( + "ISA09", + Properties( + desc="I08", + req_sit="R", + data_type=("DT", "6", "6"), + position=9, + codes=[], + ), + ), + Element( + "ISA10", + Properties( + desc="I09", + req_sit="R", + data_type=("TM", "4", "4"), + position=10, + codes=[], + ), + ), + Element( + "ISA11", + Properties( + desc="I10", + req_sit="R", + data_type=("ID", "1", "1"), + position=11, + codes=[], + ), + ), + Element( + "ISA12", + Properties( + desc="I11", + req_sit="R", + data_type=("ID", "5", "5"), + position=12, + codes=["00501"], + ), + ), + Element( + "ISA13", + Properties( + desc="I12", + req_sit="R", + data_type=("N0", "9", "9"), + position=13, + codes=[], + ), + ), + Element( + "ISA14", + Properties( + desc="I13", + req_sit="R", + data_type=("ID", "1", "1"), + position=14, + codes=["0", "1"], + ), + ), + Element( + "ISA15", + Properties( + desc="I14", + req_sit="R", + data_type=("ID", "1", "1"), + position=15, + codes=["P", "T"], + ), + ), + Element( + "ISA16", + Properties( + desc="I15", + req_sit="R", + data_type=("AN", "1", "1"), + position=16, + codes=[], + ), + ), + ), + parsed_837_GS_LOOP, + Segment( + "TA1", + Properties( + desc="Interchange Acknowledgement", + position="0200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "TA101", + Properties( + desc="I12", + req_sit="R", + data_type=("N0", "9", "9"), + position=1, + codes=[], + ), + ), + Element( + "TA102", + Properties( + desc="I08", + req_sit="R", + data_type=("DT", "6", "6"), + position=2, + codes=[], + ), + ), + Element( + "TA103", + Properties( + desc="I09", + req_sit="R", + data_type=("TM", "4", "4"), + position=3, + codes=[], + ), + ), + Element( + "TA104", + Properties( + desc="I17", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["A", "E", "R"], + ), + ), + Element( + "TA105", + Properties( + desc="I18", + req_sit="R", + data_type=("ID", "3", "3"), + position=5, + codes=[ + "000", + "001", + "002", + "003", + "004", + "005", + "006", + "007", + "008", + "009", + "010", + "011", + "012", + "013", + "014", + "015", + "016", + "017", + "018", + "019", + "020", + "021", + "022", + "023", + "024", + "025", + "026", + "027", + "028", + "029", + "030", + "031", + ], + ), + ), + ), + Segment( + "IEA", + Properties( + desc="Interchange Control Trailer", + position="0300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "IEA01", + Properties( + desc="I16", + req_sit="R", + data_type=("N0", "1", "5"), + position=1, + codes=[], + ), + ), + Element( + "IEA02", + Properties( + desc="I12", + req_sit="R", + data_type=("N0", "9", "9"), + position=2, + codes=[], + ), + ), + ), +) +parsed_837 = Message( + "837", + Properties(desc="HIPAA Health Care Claim: Professional X222A1-837"), + parsed_837_ISA_LOOP, +) diff --git a/tigershark/parsers/M837_5010_X223_A1.py b/tigershark/parsers/M837_5010_X223_A1.py new file mode 100644 index 0000000..31d935e --- /dev/null +++ b/tigershark/parsers/M837_5010_X223_A1.py @@ -0,0 +1,43538 @@ +# +# Generated by TigerShark.tools.convertPyX12 on 2021-05-10 10:26:14.592328 +# +from tigershark.X12.parse import Composite, Element, Loop, Message, Properties, Segment + +parsed_837_1000A = Loop( + "1000A", + Properties( + desc="Submitter Name", looptype="", position="0200", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Submitter Name", + position="0200", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["41"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["46"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PER", + Properties( + desc="Submitter EDI Contact Information", + position="0450", + repeat="2", + req_sit="R", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["EM", "FX", "TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_1000B = Loop( + "1000B", + Properties( + desc="Receiver Name", looptype="", position="0500", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Receiver Name", + position="0200", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["40"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["46"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), +) +parsed_837_HEADER = Loop( + "HEADER", + Properties( + desc="Header", looptype="wrapper", position="0110", repeat="1", req_sit="R" + ), + Segment( + "BHT", + Properties( + desc="Beginning of Hierarchical Transaction", + position="0100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "BHT01", + Properties( + desc="Hierarchical Structure Code", + req_sit="R", + data_type=("ID", "4", "4"), + position=1, + codes=["0019"], + ), + ), + Element( + "BHT02", + Properties( + desc="Transaction Set Purpose Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["00", "18"], + ), + ), + Element( + "BHT03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "BHT04", + Properties( + desc="Date", + req_sit="R", + data_type=("DT", "8", "8"), + position=4, + codes=[], + ), + ), + Element( + "BHT05", + Properties( + desc="Time", + req_sit="R", + data_type=("TM", "4", "8"), + position=5, + codes=[], + ), + ), + Element( + "BHT06", + Properties( + desc="Transaction Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=6, + codes=["31", "CH", "RP"], + ), + ), + ), + parsed_837_1000A, + parsed_837_1000B, +) +parsed_837_2010AA = Loop( + "2010AA", + Properties( + desc="Billing Provider Name", + looptype="", + position="0150", + repeat="1", + req_sit="R", + ), + Segment( + "NM1", + Properties( + desc="Billing Provider Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Billing Provider Address", + position="0250", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Billing Provider City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Billing Provider Tax Identification", + position="0350", + repeat="1", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EI"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "PER", + Properties( + desc="Billing Provider Contact Information", + position="0400", + repeat="2", + req_sit="S", + syntax="P0304 P0506 P0708", + ), + Element( + "PER01", + Properties( + desc="Contact Function Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["IC"], + ), + ), + Element( + "PER02", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=2, + codes=[], + ), + ), + Element( + "PER03", + Properties( + desc="Communication Number Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["EM", "FX", "TE"], + ), + ), + Element( + "PER04", + Properties( + desc="Communication Number", + req_sit="R", + data_type=("AN", "1", "256"), + position=4, + codes=[], + ), + ), + Element( + "PER05", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=5, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER06", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=6, + codes=[], + ), + ), + Element( + "PER07", + Properties( + desc="Communication Number Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=7, + codes=["EM", "EX", "FX", "TE"], + ), + ), + Element( + "PER08", + Properties( + desc="Communication Number", + req_sit="S", + data_type=("AN", "1", "256"), + position=8, + codes=[], + ), + ), + Element( + "PER09", + Properties( + desc="Contact Inquiry Reference", + req_sit="N", + data_type=("AN", "1", "20"), + position=9, + codes=[], + ), + ), + ), +) +parsed_837_2010AB = Loop( + "2010AB", + Properties( + desc="Pay-to Address Name", + looptype="", + position="0150", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Pay-to Address Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["87"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Pay-to Address - ADDRESS", + position="0250", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Pay-To Address City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), +) +parsed_837_2010AC = Loop( + "2010AC", + Properties( + desc="Pay-To Plan Name", looptype="", position="0500", repeat="1", req_sit="S" + ), + Segment( + "NM1", + Properties( + desc="Pay-To Plan Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PE"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Pay-to Plan Address", + position="0250", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Pay-To Plan City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Pay-to Plan Secondary Identification", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Pay-To Plan Tax Identification Number", + position="0350", + repeat="1", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EI"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2010BA = Loop( + "2010BA", + Properties( + desc="Subscriber Name", looptype="", position="0150", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Subscriber Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["IL"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["II", "MI"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Subscriber Address", + position="0250", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Subscriber City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DMG", + Properties( + desc="Subscriber Demographic Information", + position="0320", + repeat="1", + req_sit="S", + syntax="P0102 P1011 C1105", + ), + Element( + "DMG01", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D8"], + ), + ), + Element( + "DMG02", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=2, + codes=[], + ), + ), + Element( + "DMG03", + Properties( + desc="Gender Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["F", "M", "U"], + ), + ), + Element( + "DMG04", + Properties( + desc="Marital Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Composite( + "C056", + Properties( + desc="Composite Race or Ethnicity Information", + refdes="", + repeat="10", + req_sit="N", + seq="05", + ), + ), + Element( + "DMG06", + Properties( + desc="Citizenship Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=6, + codes=[], + ), + ), + Element( + "DMG07", + Properties( + desc="Country Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + Element( + "DMG08", + Properties( + desc="Basis of Verification Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "DMG09", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=9, + codes=[], + ), + ), + Element( + "DMG10", + Properties( + desc="Code List Qualifier Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=10, + codes=[], + ), + ), + Element( + "DMG11", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Subscriber Secondary Identification", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Property and Casualty Claim Number", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["Y4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2010BB = Loop( + "2010BB", + Properties( + desc="Payer Name", looptype="", position="0150", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Payer Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PR"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Payer Address", position="0250", repeat="1", req_sit="S", syntax="" + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Payer City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Payer Secondary Identification", + position="0350", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "EI", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Billing Provider Secondary Identification", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310A = Loop( + "2310A", + Properties( + desc="Attending Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Attending Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["71"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Attending Provider Specialty Information", + position="2550", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["AT"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Attending Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310B = Loop( + "2310B", + Properties( + desc="Operating Physician Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Operating Physician Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["72"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Operating Physician Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310C = Loop( + "2310C", + Properties( + desc="Other Operating Physician Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Operating Physician Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Operating Physician Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310D = Loop( + "2310D", + Properties( + desc="Rendering Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310E = Loop( + "2310E", + Properties( + desc="Service Facility Location Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Service Facility Location Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Service Facility Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Service Facility Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Facility Location Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310F = Loop( + "2310F", + Properties( + desc="Referring Provider Name", + looptype="", + position="2800", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330A = Loop( + "2330A", + Properties( + desc="Other Subscriber Name", + looptype="", + position="3250", + repeat="1", + req_sit="R", + ), + Segment( + "NM1", + Properties( + desc="Other Subscriber Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["IL"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["II", "MI"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Subscriber Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Subscriber City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Subscriber Secondary Identification", + position="3550", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330B = Loop( + "2330B", + Properties( + desc="Other Payer Name", looptype="", position="3250", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Other Payer Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PR"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Payer Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Payer City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Claim Check or Remittance Date", + position="3500", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Secondary Identifier", + position="3550", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "EI", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Prior Authorization Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referral Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Adjustment Indicator", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["T4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Control Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330C = Loop( + "2330C", + Properties( + desc="Other Payer Attending Provider", + looptype="", + position="3250", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Attending Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["71"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Attending Provider Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330D = Loop( + "2330D", + Properties( + desc="Other Payer Operating Physician", + looptype="", + position="3600", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Operating Physician", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["72"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Operating Physician Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330E = Loop( + "2330E", + Properties( + desc="Other Payer Other Operating Physician", + looptype="", + position="3700", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Other Operating Physician", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Other Operating Physician Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330F = Loop( + "2330F", + Properties( + desc="Other Payer Service Facility Location", + looptype="", + position="3900", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Service Facility Location", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Service Facility Location Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330G = Loop( + "2330G", + Properties( + desc="Other Payer Rendering Provider Name", + looptype="", + position="4000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Rendering Provider Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Rendering Provider Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330H = Loop( + "2330H", + Properties( + desc="Other Payer Referring Provider", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Referring Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referring Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330I = Loop( + "2330I", + Properties( + desc="Other Payer Billing Provider", + looptype="", + position="6000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Billing Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Billing Provider Secondary Identification", + position="3550", + repeat="2", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2320 = Loop( + "2320", + Properties( + desc="Other Subscriber Information", + looptype="", + position="2900", + repeat="10", + req_sit="S", + ), + Segment( + "SBR", + Properties( + desc="Other Subscriber Information", + position="2900", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SBR01", + Properties( + desc="Payer Responsibility Sequence Number Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U"], + ), + ), + Element( + "SBR02", + Properties( + desc="Individual Relationship Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["01", "18", "19", "20", "21", "39", "40", "53", "G8"], + ), + ), + Element( + "SBR03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "SBR04", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=4, + codes=[], + ), + ), + Element( + "SBR05", + Properties( + desc="Insurance Type Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=5, + codes=[], + ), + ), + Element( + "SBR06", + Properties( + desc="Coordination of Benefits Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "SBR07", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + Element( + "SBR08", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "SBR09", + Properties( + desc="Claim Filing Indicator Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=9, + codes=[ + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "AM", + "BL", + "CH", + "CI", + "DS", + "FI", + "HM", + "LM", + "MA", + "MB", + "MC", + "OF", + "TV", + "VA", + "WC", + "ZZ", + ], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Claim Level Adjustments", + position="2950", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Payer Paid Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["D"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Total Non-Covered Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["A8"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "OI", + Properties( + desc="Other Insurance Coverage Information", + position="3100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "OI01", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=1, + codes=[], + ), + ), + Element( + "OI02", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "OI03", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["N", "W", "Y"], + ), + ), + Element( + "OI04", + Properties( + desc="Patient Signature Source Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Element( + "OI05", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=5, + codes=[], + ), + ), + Element( + "OI06", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["I", "Y"], + ), + ), + ), + Segment( + "MIA", + Properties( + desc="Inpatient Adjudication Information", + position="3150", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "MIA01", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=1, + codes=[], + ), + ), + Element( + "MIA02", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "MIA03", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=3, + codes=[], + ), + ), + Element( + "MIA04", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "MIA05", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + Element( + "MIA06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "MIA07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "MIA08", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "MIA09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "MIA10", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=10, + codes=[], + ), + ), + Element( + "MIA11", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=11, + codes=[], + ), + ), + Element( + "MIA12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "MIA13", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=13, + codes=[], + ), + ), + Element( + "MIA14", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=14, + codes=[], + ), + ), + Element( + "MIA15", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=15, + codes=[], + ), + ), + Element( + "MIA16", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=16, + codes=[], + ), + ), + Element( + "MIA17", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=17, + codes=[], + ), + ), + Element( + "MIA18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "MIA19", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=19, + codes=[], + ), + ), + Element( + "MIA20", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=20, + codes=[], + ), + ), + Element( + "MIA21", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=21, + codes=[], + ), + ), + Element( + "MIA22", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=22, + codes=[], + ), + ), + Element( + "MIA23", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=23, + codes=[], + ), + ), + Element( + "MIA24", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=24, + codes=[], + ), + ), + ), + Segment( + "MOA", + Properties( + desc="Outpatient Adjudication Information", + position="3200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "MOA01", + Properties( + desc="Percentage as Decimal", + req_sit="S", + data_type=("R", "1", "10"), + position=1, + codes=[], + ), + ), + Element( + "MOA02", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "MOA03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "MOA04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "MOA05", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + Element( + "MOA06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "MOA07", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=7, + codes=[], + ), + ), + Element( + "MOA08", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "MOA09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + ), + parsed_837_2330A, + parsed_837_2330B, + parsed_837_2330C, + parsed_837_2330D, + parsed_837_2330E, + parsed_837_2330F, + parsed_837_2330G, + parsed_837_2330H, + parsed_837_2330I, +) +parsed_837_2410 = Loop( + "2410", + Properties( + desc="Drug Identification", + looptype="", + position="4940", + repeat="1", + req_sit="S", + ), + Segment( + "LIN", + Properties( + desc="Drug Identification", + position="4930", + repeat="1", + req_sit="R", + syntax="P0405 P0607 P0809 P1011 P1213 P1415 P1617 P1819 P2021 P2223 P2425 P2627 P2829 P3031", + ), + Element( + "LIN01", + Properties( + desc="Assigned Identification", + req_sit="N", + data_type=("AN", "1", "20"), + position=1, + codes=[], + ), + ), + Element( + "LIN02", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["N4"], + ), + ), + Element( + "LIN03", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=3, + codes=[], + ), + ), + Element( + "LIN04", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "LIN05", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=5, + codes=[], + ), + ), + Element( + "LIN06", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "LIN07", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + Element( + "LIN08", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "LIN09", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=9, + codes=[], + ), + ), + Element( + "LIN10", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "LIN11", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=11, + codes=[], + ), + ), + Element( + "LIN12", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "LIN13", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=13, + codes=[], + ), + ), + Element( + "LIN14", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=14, + codes=[], + ), + ), + Element( + "LIN15", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=15, + codes=[], + ), + ), + Element( + "LIN16", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=16, + codes=[], + ), + ), + Element( + "LIN17", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=17, + codes=[], + ), + ), + Element( + "LIN18", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=18, + codes=[], + ), + ), + Element( + "LIN19", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=19, + codes=[], + ), + ), + Element( + "LIN20", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=20, + codes=[], + ), + ), + Element( + "LIN21", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=21, + codes=[], + ), + ), + Element( + "LIN22", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=22, + codes=[], + ), + ), + Element( + "LIN23", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=23, + codes=[], + ), + ), + Element( + "LIN24", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=24, + codes=[], + ), + ), + Element( + "LIN25", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=25, + codes=[], + ), + ), + Element( + "LIN26", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=26, + codes=[], + ), + ), + Element( + "LIN27", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=27, + codes=[], + ), + ), + Element( + "LIN28", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=28, + codes=[], + ), + ), + Element( + "LIN29", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=29, + codes=[], + ), + ), + Element( + "LIN30", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=30, + codes=[], + ), + ), + Element( + "LIN31", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=31, + codes=[], + ), + ), + ), + Segment( + "CTP", + Properties( + desc="Drug Quantity", + position="4940", + repeat="1", + req_sit="R", + syntax="P0405 C0607 C0902 C1002 C1103", + ), + Element( + "CTP01", + Properties( + desc="Class of Trade Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=1, + codes=[], + ), + ), + Element( + "CTP02", + Properties( + desc="Price Identifier Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=2, + codes=[], + ), + ), + Element( + "CTP03", + Properties( + desc="Unit Price", + req_sit="N", + data_type=("R", "1", "17"), + position=3, + codes=[], + ), + ), + Element( + "CTP04", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CTP05-01", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["F2", "GR", "ME", "ML", "UN"], + ), + ), + Element( + "CTP05-02", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=1, + codes=[], + ), + ), + Element( + "CTP05-03", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CTP05-04", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "CTP05-05", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CTP05-06", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=5, + codes=[], + ), + ), + Element( + "CTP05-07", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "CTP05-08", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CTP05-09", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=8, + codes=[], + ), + ), + Element( + "CTP05-10", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP05-11", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CTP05-12", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=11, + codes=[], + ), + ), + Element( + "CTP05-13", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "CTP05-14", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CTP05-15", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=14, + codes=[], + ), + ), + ), + Element( + "CTP06", + Properties( + desc="Price Multiplier Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + Element( + "CTP07", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "CTP08", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "CTP09", + Properties( + desc="Basis of Unit Price Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP10", + Properties( + desc="Condition Value", + req_sit="N", + data_type=("AN", "1", "10"), + position=10, + codes=[], + ), + ), + Element( + "CTP11", + Properties( + desc="Multiple Price Quantity", + req_sit="N", + data_type=("N0", "1", "2"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prescription or Compound Drug Association Number", + position="4950", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["VY", "XZ"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2420A = Loop( + "2420A", + Properties( + desc="Operating Physician Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Operating Physician Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["72"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Operating Physician Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420B = Loop( + "2420B", + Properties( + desc="Other Operating Physician Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Operating Physician Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Operating Physician Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420C = Loop( + "2420C", + Properties( + desc="Rendering Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420D = Loop( + "2420D", + Properties( + desc="Referring Provider Name", + looptype="", + position="5300", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2430 = Loop( + "2430", + Properties( + desc="Line Adjudication Information", + looptype="", + position="5400", + repeat="15", + req_sit="S", + ), + Segment( + "SVD", + Properties( + desc="Line Adjudication Information", + position="5400", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SVD01", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=1, + codes=[], + ), + ), + Element( + "SVD02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "SVD03-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "HP", "IV", "WK"], + ), + ), + Element( + "SVD03-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SVD03-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SVD03-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SVD03-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SVD03-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SVD03-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SVD03-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SVD04", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=4, + codes=[], + ), + ), + Element( + "SVD05", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "SVD06", + Properties( + desc="Assigned Number", + req_sit="S", + data_type=("N0", "1", "6"), + position=6, + codes=[], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Line Adjustment", + position="5450", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Line Check or Remittance Date", + position="5500", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="5505", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), +) +parsed_837_2400 = Loop( + "2400", + Properties( + desc="Service Line Number", + looptype="", + position="3650", + repeat="999", + req_sit="R", + ), + Segment( + "LX", + Properties( + desc="Service Line Number", + position="3650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "LX01", + Properties( + desc="Assigned Number", + req_sit="R", + data_type=("N0", "1", "6"), + position=1, + codes=[], + ), + ), + ), + Segment( + "SV2", + Properties( + desc="Institutional Service Line", + position="3750", + repeat="1", + req_sit="R", + syntax="R0102 P0405", + ), + Element( + "SV201", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "SV202-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "HP", "IV", "WK"], + ), + ), + Element( + "SV202-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SV202-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SV202-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SV202-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SV202-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV202-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SV202-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SV203", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "SV204", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=4, + codes=["DA", "UN"], + ), + ), + Element( + "SV205", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "SV206", + Properties( + desc="Unit Rate", + req_sit="N", + data_type=("R", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "SV207", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "SV208", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + Element( + "SV209", + Properties( + desc="Nursing Home Residential Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=9, + codes=[], + ), + ), + Element( + "SV210", + Properties( + desc="Level of Care Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=10, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Line Supplemental Information", + position="4200", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Service Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["472"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Line Item Control Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["6R"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9B"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9D"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Service Tax Amount", + position="4750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["GT"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Facility Tax Amount", + position="4750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["N8"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Third Party Organization Notes", + position="4850", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["TPO"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Line Pricing/Repricing Information", + position="4920", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=9, + codes=["ER", "HC", "HP", "IV", "WK"], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=11, + codes=["DA", "UN"], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2410, + parsed_837_2420A, + parsed_837_2420B, + parsed_837_2420C, + parsed_837_2420D, + parsed_837_2430, +) +parsed_837_2300 = Loop( + "2300", + Properties( + desc="Claim Information", + looptype="", + position="1300", + repeat="100", + req_sit="S", + ), + Segment( + "CLM", + Properties( + desc="Claim Information", + position="1300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "CLM01", + Properties( + desc="Claim Submitter's Identifier", + req_sit="R", + data_type=("AN", "1", "38"), + position=1, + codes=[], + ), + ), + Element( + "CLM02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CLM03", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "CLM04", + Properties( + desc="Non-Institutional Claim Type Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C023", + Properties( + desc="Health Care Service Location Information", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CLM05-01", + Properties( + desc="Facility Code Value", + req_sit="R", + data_type=("AN", "1", "2"), + position=0, + codes=[], + ), + ), + Element( + "CLM05-02", + Properties( + desc="Facility Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["A"], + ), + ), + Element( + "CLM05-03", + Properties( + desc="Claim Frequency Type Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + ), + Element( + "CLM06", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "CLM07", + Properties( + desc="Provider Accept Assignment Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=7, + codes=["A", "B", "C"], + ), + ), + Element( + "CLM08", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "W", "Y"], + ), + ), + Element( + "CLM09", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=9, + codes=["I", "Y"], + ), + ), + Element( + "CLM10", + Properties( + desc="Patient Signature Source Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=10, + codes=[], + ), + ), + Composite( + "C024", + Properties( + desc="Related Causes Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Element( + "CLM12", + Properties( + desc="Special Program Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=12, + codes=[], + ), + ), + Element( + "CLM13", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=13, + codes=[], + ), + ), + Element( + "CLM14", + Properties( + desc="Level of Service Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=14, + codes=[], + ), + ), + Element( + "CLM15", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=15, + codes=[], + ), + ), + Element( + "CLM16", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=16, + codes=[], + ), + ), + Element( + "CLM17", + Properties( + desc="Claim Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=17, + codes=[], + ), + ), + Element( + "CLM18", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=18, + codes=[], + ), + ), + Element( + "CLM19", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=19, + codes=[], + ), + ), + Element( + "CLM20", + Properties( + desc="Delay Reason Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=20, + codes=["1", "10", "11", "15", "2", "3", "4", "5", "6", "7", "8", "9"], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Discharge Hour", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["096"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["TM"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Statement Dates", position="1350", repeat="1", req_sit="R", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["434"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Admission Date/Hour", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["435"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "DT"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Repricer Received Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["050"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "CL1", + Properties( + desc="Institutional Claim Code", + position="1400", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "CL101", + Properties( + desc="Admission Type Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=1, + codes=[], + ), + ), + Element( + "CL102", + Properties( + desc="Admission Source Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + Element( + "CL103", + Properties( + desc="Patient Status Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "CL104", + Properties( + desc="Nursing Home Residential Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Claim Supplemental Information", + position="1550", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "CN1", + Properties( + desc="Contract Information", + position="1600", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CN101", + Properties( + desc="Contract Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "02", "03", "04", "05", "06", "09"], + ), + ), + Element( + "CN102", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CN103", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=3, + codes=[], + ), + ), + Element( + "CN104", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "CN105", + Properties( + desc="Terms Discount Percent", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + Element( + "CN106", + Properties( + desc="Version Identifier", + req_sit="S", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Patient Estimated Amount Due", + position="1750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["F3"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Authorization Exception Code", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["4N"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referral Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prior Authorization", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Payer Claim Control Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9A"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9C"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Investigational Device Exemption Number", + position="1800", + repeat="5", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["LX"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Claim Identifier For Transmission Intermediaries", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D9"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Auto Accident State", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Medical Record Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EA"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Demonstration Project Identifier", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["P4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Peer Review Organization (PRO) Approval Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "K3", + Properties( + desc="File Information", + position="1850", + repeat="10", + req_sit="S", + syntax="", + ), + Element( + "K301", + Properties( + desc="Fixed Format Information", + req_sit="R", + data_type=("AN", "1", "80"), + position=1, + codes=[], + ), + ), + Element( + "K302", + Properties( + desc="Record Format Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Claim Note", position="1900", repeat="10", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=[ + "ALG", + "DCP", + "DGN", + "DME", + "MED", + "NTR", + "ODT", + "RHB", + "RLH", + "RNH", + "SET", + "SFM", + "SPT", + "UPI", + ], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Billing Note", position="1900", repeat="1", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["ADD"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="EPSDT Referral", position="2200", repeat="1", req_sit="S", syntax="" + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=[], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "HI", + Properties( + desc="Principal Diagnosis", + position="2310", + repeat="1", + req_sit="R", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABK", "BK"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Admitting Diagnosis", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABJ", "BJ"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Patient's Reason For Visit", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["APR", "PR"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["APR", "PR"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["APR", "PR"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="External Cause of Injury", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Diagnosis Related Group (DRG) Information", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["DR"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Other Diagnosis Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Principal Procedure Information", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBR", "BR", "CAH"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Other Procedure Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Occurrence Span Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Occurrence Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Value Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Condition Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Treatment Code Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Claim Pricing/Repricing Information", + position="2410", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=11, + codes=["DA", "UN"], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2310A, + parsed_837_2310B, + parsed_837_2310C, + parsed_837_2310D, + parsed_837_2310E, + parsed_837_2310F, + parsed_837_2320, + parsed_837_2400, +) +parsed_837_2010CA = Loop( + "2010CA", + Properties( + desc="Patient Name", looptype="", position="0150", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Patient Name", + position="0150", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["QC"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Patient Address", position="0250", repeat="1", req_sit="R", syntax="" + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Patient City, State, ZIP Code", + position="0300", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DMG", + Properties( + desc="Patient Demographic Information", + position="0320", + repeat="1", + req_sit="R", + syntax="P0102 P1011 C1105", + ), + Element( + "DMG01", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D8"], + ), + ), + Element( + "DMG02", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=2, + codes=[], + ), + ), + Element( + "DMG03", + Properties( + desc="Gender Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["F", "M", "U"], + ), + ), + Element( + "DMG04", + Properties( + desc="Marital Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Composite( + "C056", + Properties( + desc="Composite Race or Ethnicity Information", + refdes="", + repeat="10", + req_sit="N", + seq="05", + ), + ), + Element( + "DMG06", + Properties( + desc="Citizenship Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=6, + codes=[], + ), + ), + Element( + "DMG07", + Properties( + desc="Country Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + Element( + "DMG08", + Properties( + desc="Basis of Verification Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "DMG09", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=9, + codes=[], + ), + ), + Element( + "DMG10", + Properties( + desc="Code List Qualifier Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=10, + codes=[], + ), + ), + Element( + "DMG11", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Property and Casualty Claim Number", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["Y4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Property and Casualty Patient Identifier", + position="0350", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["1W", "SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310A = Loop( + "2310A", + Properties( + desc="Attending Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Attending Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["71"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Attending Provider Specialty Information", + position="2550", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["AT"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Attending Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310B = Loop( + "2310B", + Properties( + desc="Operating Physician Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Operating Physician Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["72"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Operating Physician Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310C = Loop( + "2310C", + Properties( + desc="Other Operating Physician Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Operating Physician Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Operating Physician Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310D = Loop( + "2310D", + Properties( + desc="Rendering Provider Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="2710", + repeat="4", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310E = Loop( + "2310E", + Properties( + desc="Service Facility Location Name", + looptype="", + position="2500", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Service Facility Location Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Service Facility Location Address", + position="2650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Service Facility Location City, State, ZIP Code", + position="2700", + repeat="1", + req_sit="R", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Facility Location Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2310F = Loop( + "2310F", + Properties( + desc="Referring Provider Name", + looptype="", + position="2800", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="2500", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="2710", + repeat="3", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330A = Loop( + "2330A", + Properties( + desc="Other Subscriber Name", + looptype="", + position="3250", + repeat="1", + req_sit="R", + ), + Segment( + "NM1", + Properties( + desc="Other Subscriber Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["IL"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1", "2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["II", "MI"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Subscriber Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Subscriber City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Subscriber Secondary Identification", + position="3550", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["SY"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330B = Loop( + "2330B", + Properties( + desc="Other Payer Name", looptype="", position="3250", repeat="1", req_sit="R" + ), + Segment( + "NM1", + Properties( + desc="Other Payer Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["PR"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=8, + codes=["PI", "XV"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "N3", + Properties( + desc="Other Payer Address", + position="3320", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "N301", + Properties( + desc="Address Information", + req_sit="R", + data_type=("AN", "1", "55"), + position=1, + codes=[], + ), + ), + Element( + "N302", + Properties( + desc="Address Information", + req_sit="S", + data_type=("AN", "1", "55"), + position=2, + codes=[], + ), + ), + ), + Segment( + "N4", + Properties( + desc="Other Payer City, State, ZIP Code", + position="3400", + repeat="1", + req_sit="S", + syntax="E0207 C0605 C0704", + ), + Element( + "N401", + Properties( + desc="City Name", + req_sit="R", + data_type=("AN", "2", "30"), + position=1, + codes=[], + ), + ), + Element( + "N402", + Properties( + desc="State or Province Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "N403", + Properties( + desc="Postal Code", + req_sit="S", + data_type=("ID", "3", "15"), + position=3, + codes=[], + ), + ), + Element( + "N404", + Properties( + desc="Country Code", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "N405", + Properties( + desc="Location Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=5, + codes=[], + ), + ), + Element( + "N406", + Properties( + desc="Location Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "N407", + Properties( + desc="Country Subdivision Code", + req_sit="S", + data_type=("ID", "1", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Claim Check or Remittance Date", + position="3500", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Secondary Identifier", + position="3550", + repeat="2", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["2U", "EI", "FY", "NF"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Prior Authorization Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referral Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Adjustment Indicator", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["T4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Claim Control Number", + position="3550", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330C = Loop( + "2330C", + Properties( + desc="Other Payer Attending Provider", + looptype="", + position="3250", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Attending Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["71"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Attending Provider Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330D = Loop( + "2330D", + Properties( + desc="Other Payer Operating Physician", + looptype="", + position="3600", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Operating Physician", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["72"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Operating Physician Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330E = Loop( + "2330E", + Properties( + desc="Other Payer Other Operating Physician", + looptype="", + position="3700", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Other Operating Physician", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Other Operating Physician Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330F = Loop( + "2330F", + Properties( + desc="Other Payer Service Facility Location", + looptype="", + position="3900", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Service Facility Location", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["77"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Service Facility Location Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330G = Loop( + "2330G", + Properties( + desc="Other Payer Rendering Provider Name", + looptype="", + position="4000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Rendering Provider Name", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Rendering Provider Secondary Identification", + position="3550", + repeat="4", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330H = Loop( + "2330H", + Properties( + desc="Other Payer Referring Provider", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Referring Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Referring Provider Secondary Identification", + position="3550", + repeat="3", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2330I = Loop( + "2330I", + Properties( + desc="Other Payer Billing Provider", + looptype="", + position="6000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Payer Billing Provider", + position="3250", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["2"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="N", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="N", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="N", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="N", + data_type=("ID", "1", "2"), + position=8, + codes=[], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="N", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Payer Billing Provider Secondary Identification", + position="3550", + repeat="2", + req_sit="R", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2320 = Loop( + "2320", + Properties( + desc="Other Subscriber Information", + looptype="", + position="2900", + repeat="10", + req_sit="S", + ), + Segment( + "SBR", + Properties( + desc="Other Subscriber Information", + position="2900", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SBR01", + Properties( + desc="Payer Responsibility Sequence Number Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U"], + ), + ), + Element( + "SBR02", + Properties( + desc="Individual Relationship Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["01", "18", "19", "20", "21", "39", "40", "53", "G8"], + ), + ), + Element( + "SBR03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "SBR04", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=4, + codes=[], + ), + ), + Element( + "SBR05", + Properties( + desc="Insurance Type Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=5, + codes=[], + ), + ), + Element( + "SBR06", + Properties( + desc="Coordination of Benefits Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "SBR07", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + Element( + "SBR08", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "SBR09", + Properties( + desc="Claim Filing Indicator Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=9, + codes=[ + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "AM", + "BL", + "CH", + "CI", + "DS", + "FI", + "HM", + "LM", + "MA", + "MB", + "MC", + "OF", + "TV", + "VA", + "WC", + "ZZ", + ], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Claim Level Adjustments", + position="2950", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Payer Paid Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["D"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Coordination of Benefits (COB) Total Non-Covered Amount", + position="3000", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["A8"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "OI", + Properties( + desc="Other Insurance Coverage Information", + position="3100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "OI01", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=1, + codes=[], + ), + ), + Element( + "OI02", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "OI03", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=3, + codes=["N", "W", "Y"], + ), + ), + Element( + "OI04", + Properties( + desc="Patient Signature Source Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Element( + "OI05", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=5, + codes=[], + ), + ), + Element( + "OI06", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=6, + codes=["I", "Y"], + ), + ), + ), + Segment( + "MIA", + Properties( + desc="Inpatient Adjudication Information", + position="3150", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "MIA01", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=1, + codes=[], + ), + ), + Element( + "MIA02", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "MIA03", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=3, + codes=[], + ), + ), + Element( + "MIA04", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "MIA05", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + Element( + "MIA06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "MIA07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "MIA08", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "MIA09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "MIA10", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=10, + codes=[], + ), + ), + Element( + "MIA11", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=11, + codes=[], + ), + ), + Element( + "MIA12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "MIA13", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=13, + codes=[], + ), + ), + Element( + "MIA14", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=14, + codes=[], + ), + ), + Element( + "MIA15", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=15, + codes=[], + ), + ), + Element( + "MIA16", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=16, + codes=[], + ), + ), + Element( + "MIA17", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=17, + codes=[], + ), + ), + Element( + "MIA18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "MIA19", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=19, + codes=[], + ), + ), + Element( + "MIA20", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=20, + codes=[], + ), + ), + Element( + "MIA21", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=21, + codes=[], + ), + ), + Element( + "MIA22", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=22, + codes=[], + ), + ), + Element( + "MIA23", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=23, + codes=[], + ), + ), + Element( + "MIA24", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=24, + codes=[], + ), + ), + ), + Segment( + "MOA", + Properties( + desc="Outpatient Adjudication Information", + position="3200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "MOA01", + Properties( + desc="Percentage as Decimal", + req_sit="S", + data_type=("R", "1", "10"), + position=1, + codes=[], + ), + ), + Element( + "MOA02", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "MOA03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "MOA04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "MOA05", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + Element( + "MOA06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "MOA07", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=7, + codes=[], + ), + ), + Element( + "MOA08", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "MOA09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + ), + parsed_837_2330A, + parsed_837_2330B, + parsed_837_2330C, + parsed_837_2330D, + parsed_837_2330E, + parsed_837_2330F, + parsed_837_2330G, + parsed_837_2330H, + parsed_837_2330I, +) +parsed_837_2410 = Loop( + "2410", + Properties( + desc="Drug Identification", + looptype="", + position="4940", + repeat="1", + req_sit="S", + ), + Segment( + "LIN", + Properties( + desc="Drug Identification", + position="4930", + repeat="1", + req_sit="R", + syntax="P0405 P0607 P0809 P1011 P1213 P1415 P1617 P1819 P2021 P2223 P2425 P2627 P2829 P3031", + ), + Element( + "LIN01", + Properties( + desc="Assigned Identification", + req_sit="N", + data_type=("AN", "1", "20"), + position=1, + codes=[], + ), + ), + Element( + "LIN02", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=2, + codes=["N4"], + ), + ), + Element( + "LIN03", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=3, + codes=[], + ), + ), + Element( + "LIN04", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "LIN05", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=5, + codes=[], + ), + ), + Element( + "LIN06", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "LIN07", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + Element( + "LIN08", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "LIN09", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=9, + codes=[], + ), + ), + Element( + "LIN10", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "LIN11", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=11, + codes=[], + ), + ), + Element( + "LIN12", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "LIN13", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=13, + codes=[], + ), + ), + Element( + "LIN14", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=14, + codes=[], + ), + ), + Element( + "LIN15", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=15, + codes=[], + ), + ), + Element( + "LIN16", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=16, + codes=[], + ), + ), + Element( + "LIN17", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=17, + codes=[], + ), + ), + Element( + "LIN18", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=18, + codes=[], + ), + ), + Element( + "LIN19", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=19, + codes=[], + ), + ), + Element( + "LIN20", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=20, + codes=[], + ), + ), + Element( + "LIN21", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=21, + codes=[], + ), + ), + Element( + "LIN22", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=22, + codes=[], + ), + ), + Element( + "LIN23", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=23, + codes=[], + ), + ), + Element( + "LIN24", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=24, + codes=[], + ), + ), + Element( + "LIN25", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=25, + codes=[], + ), + ), + Element( + "LIN26", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=26, + codes=[], + ), + ), + Element( + "LIN27", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=27, + codes=[], + ), + ), + Element( + "LIN28", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=28, + codes=[], + ), + ), + Element( + "LIN29", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=29, + codes=[], + ), + ), + Element( + "LIN30", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=30, + codes=[], + ), + ), + Element( + "LIN31", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=31, + codes=[], + ), + ), + ), + Segment( + "CTP", + Properties( + desc="Drug Quantity", + position="4940", + repeat="1", + req_sit="R", + syntax="P0405 C0607 C0902 C1002 C1103", + ), + Element( + "CTP01", + Properties( + desc="Class of Trade Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=1, + codes=[], + ), + ), + Element( + "CTP02", + Properties( + desc="Price Identifier Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=2, + codes=[], + ), + ), + Element( + "CTP03", + Properties( + desc="Unit Price", + req_sit="N", + data_type=("R", "1", "17"), + position=3, + codes=[], + ), + ), + Element( + "CTP04", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CTP05-01", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["F2", "GR", "ME", "ML", "UN"], + ), + ), + Element( + "CTP05-02", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=1, + codes=[], + ), + ), + Element( + "CTP05-03", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=2, + codes=[], + ), + ), + Element( + "CTP05-04", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "CTP05-05", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CTP05-06", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=5, + codes=[], + ), + ), + Element( + "CTP05-07", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=6, + codes=[], + ), + ), + Element( + "CTP05-08", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CTP05-09", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=8, + codes=[], + ), + ), + Element( + "CTP05-10", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP05-11", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CTP05-12", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=11, + codes=[], + ), + ), + Element( + "CTP05-13", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=12, + codes=[], + ), + ), + Element( + "CTP05-14", + Properties( + desc="Exponent", + req_sit="N", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CTP05-15", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=14, + codes=[], + ), + ), + ), + Element( + "CTP06", + Properties( + desc="Price Multiplier Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + Element( + "CTP07", + Properties( + desc="Multiplier", + req_sit="N", + data_type=("R", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "CTP08", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=8, + codes=[], + ), + ), + Element( + "CTP09", + Properties( + desc="Basis of Unit Price Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "CTP10", + Properties( + desc="Condition Value", + req_sit="N", + data_type=("AN", "1", "10"), + position=10, + codes=[], + ), + ), + Element( + "CTP11", + Properties( + desc="Multiple Price Quantity", + req_sit="N", + data_type=("N0", "1", "2"), + position=11, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prescription or Compound Drug Association Number", + position="4950", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["VY", "XZ"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), +) +parsed_837_2420A = Loop( + "2420A", + Properties( + desc="Operating Physician Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Operating Physician Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["72"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Operating Physician Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420B = Loop( + "2420B", + Properties( + desc="Other Operating Physician Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Other Operating Physician Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Other Operating Physician Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420C = Loop( + "2420C", + Properties( + desc="Rendering Provider Name", + looptype="", + position="5000", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Rendering Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["82"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Rendering Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2", "LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2420D = Loop( + "2420D", + Properties( + desc="Referring Provider Name", + looptype="", + position="5300", + repeat="1", + req_sit="S", + ), + Segment( + "NM1", + Properties( + desc="Referring Provider Name", + position="5000", + repeat="1", + req_sit="R", + syntax="P0809 C1110 C1203", + ), + Element( + "NM101", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["DN"], + ), + ), + Element( + "NM102", + Properties( + desc="Entity Type Qualifier", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["1"], + ), + ), + Element( + "NM103", + Properties( + desc="Name Last or Organization Name", + req_sit="R", + data_type=("AN", "1", "60"), + position=3, + codes=[], + ), + ), + Element( + "NM104", + Properties( + desc="Name First", + req_sit="S", + data_type=("AN", "1", "35"), + position=4, + codes=[], + ), + ), + Element( + "NM105", + Properties( + desc="Name Middle", + req_sit="S", + data_type=("AN", "1", "25"), + position=5, + codes=[], + ), + ), + Element( + "NM106", + Properties( + desc="Name Prefix", + req_sit="N", + data_type=("AN", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "NM107", + Properties( + desc="Name Suffix", + req_sit="S", + data_type=("AN", "1", "10"), + position=7, + codes=[], + ), + ), + Element( + "NM108", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=8, + codes=["XX"], + ), + ), + Element( + "NM109", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=9, + codes=[], + ), + ), + Element( + "NM110", + Properties( + desc="Entity Relationship Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=10, + codes=[], + ), + ), + Element( + "NM111", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=11, + codes=[], + ), + ), + Element( + "NM112", + Properties( + desc="Name Last or Organization Name", + req_sit="N", + data_type=("AN", "1", "60"), + position=12, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referring Provider Secondary Identification", + position="5250", + repeat="20", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["0B", "1G", "G2"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="S", seq="04" + ), + Element( + "REF04-01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=0, + codes=["2U"], + ), + ), + Element( + "REF04-02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=1, + codes=[], + ), + ), + Element( + "REF04-03", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "REF04-04", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "REF04-05", + Properties( + desc="Reference Identification Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "REF04-06", + Properties( + desc="Reference Identification", + req_sit="N", + data_type=("AN", "1", "50"), + position=5, + codes=[], + ), + ), + ), + ), +) +parsed_837_2430 = Loop( + "2430", + Properties( + desc="Line Adjudication Information", + looptype="", + position="5400", + repeat="15", + req_sit="S", + ), + Segment( + "SVD", + Properties( + desc="Line Adjudication Information", + position="5400", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SVD01", + Properties( + desc="Identification Code", + req_sit="R", + data_type=("AN", "2", "80"), + position=1, + codes=[], + ), + ), + Element( + "SVD02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "SVD03-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "HP", "IV", "WK"], + ), + ), + Element( + "SVD03-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SVD03-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SVD03-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SVD03-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SVD03-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SVD03-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SVD03-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SVD04", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=4, + codes=[], + ), + ), + Element( + "SVD05", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "SVD06", + Properties( + desc="Assigned Number", + req_sit="S", + data_type=("N0", "1", "6"), + position=6, + codes=[], + ), + ), + ), + Segment( + "CAS", + Properties( + desc="Line Adjustment", + position="5450", + repeat="5", + req_sit="S", + syntax="L050607 C0605 C0705 L080910 C0908 C1008 L111213 C1211 C1311 L141516 C1514 C1614 L171819 C1817 C1917", + ), + Element( + "CAS01", + Properties( + desc="Claim Adjustment Group Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["CO", "CR", "OA", "PI", "PR"], + ), + ), + Element( + "CAS02", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="R", + data_type=("ID", "1", "5"), + position=2, + codes=[], + ), + ), + Element( + "CAS03", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "CAS04", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=4, + codes=[], + ), + ), + Element( + "CAS05", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=5, + codes=[], + ), + ), + Element( + "CAS06", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=6, + codes=[], + ), + ), + Element( + "CAS07", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=7, + codes=[], + ), + ), + Element( + "CAS08", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=8, + codes=[], + ), + ), + Element( + "CAS09", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=9, + codes=[], + ), + ), + Element( + "CAS10", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=10, + codes=[], + ), + ), + Element( + "CAS11", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=11, + codes=[], + ), + ), + Element( + "CAS12", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=12, + codes=[], + ), + ), + Element( + "CAS13", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=13, + codes=[], + ), + ), + Element( + "CAS14", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=14, + codes=[], + ), + ), + Element( + "CAS15", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=15, + codes=[], + ), + ), + Element( + "CAS16", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=16, + codes=[], + ), + ), + Element( + "CAS17", + Properties( + desc="Claim Adjustment Reason Code", + req_sit="S", + data_type=("ID", "1", "5"), + position=17, + codes=[], + ), + ), + Element( + "CAS18", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=18, + codes=[], + ), + ), + Element( + "CAS19", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=19, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Line Check or Remittance Date", + position="5500", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["573"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Remaining Patient Liability", + position="5505", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["EAF"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), +) +parsed_837_2400 = Loop( + "2400", + Properties( + desc="Service Line Number", + looptype="", + position="3650", + repeat="999", + req_sit="R", + ), + Segment( + "LX", + Properties( + desc="Service Line Number", + position="3650", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "LX01", + Properties( + desc="Assigned Number", + req_sit="R", + data_type=("N0", "1", "6"), + position=1, + codes=[], + ), + ), + ), + Segment( + "SV2", + Properties( + desc="Institutional Service Line", + position="3750", + repeat="1", + req_sit="R", + syntax="R0102 P0405", + ), + Element( + "SV201", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Composite( + "C003", + Properties( + desc="Composite Medical Procedure Identifier", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "SV202-01", + Properties( + desc="Product/Service ID Qualifier", + req_sit="R", + data_type=("ID", "2", "2"), + position=0, + codes=["ER", "HC", "HP", "IV", "WK"], + ), + ), + Element( + "SV202-02", + Properties( + desc="Product/Service ID", + req_sit="R", + data_type=("AN", "1", "48"), + position=1, + codes=[], + ), + ), + Element( + "SV202-03", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=2, + codes=[], + ), + ), + Element( + "SV202-04", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "SV202-05", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=4, + codes=[], + ), + ), + Element( + "SV202-06", + Properties( + desc="Procedure Modifier", + req_sit="S", + data_type=("AN", "2", "2"), + position=5, + codes=[], + ), + ), + Element( + "SV202-07", + Properties( + desc="Description", + req_sit="S", + data_type=("AN", "1", "80"), + position=6, + codes=[], + ), + ), + Element( + "SV202-08", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=7, + codes=[], + ), + ), + ), + Element( + "SV203", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "SV204", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=4, + codes=["DA", "UN"], + ), + ), + Element( + "SV205", + Properties( + desc="Quantity", + req_sit="R", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "SV206", + Properties( + desc="Unit Rate", + req_sit="N", + data_type=("R", "1", "10"), + position=6, + codes=[], + ), + ), + Element( + "SV207", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "SV208", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + Element( + "SV209", + Properties( + desc="Nursing Home Residential Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=9, + codes=[], + ), + ), + Element( + "SV210", + Properties( + desc="Level of Care Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=10, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Line Supplemental Information", + position="4200", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Service Date", + position="4550", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["472"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Line Item Control Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["6R"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9B"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Line Item Reference Number", + position="4700", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9D"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Service Tax Amount", + position="4750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["GT"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Facility Tax Amount", + position="4750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["N8"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Third Party Organization Notes", + position="4850", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["TPO"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Line Pricing/Repricing Information", + position="4920", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="S", + data_type=("ID", "2", "2"), + position=9, + codes=["ER", "HC", "HP", "IV", "WK"], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=11, + codes=["DA", "UN"], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2410, + parsed_837_2420A, + parsed_837_2420B, + parsed_837_2420C, + parsed_837_2420D, + parsed_837_2430, +) +parsed_837_2300 = Loop( + "2300", + Properties( + desc="Claim Information", + looptype="", + position="1300", + repeat="100", + req_sit="R", + ), + Segment( + "CLM", + Properties( + desc="Claim Information", + position="1300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "CLM01", + Properties( + desc="Claim Submitter's Identifier", + req_sit="R", + data_type=("AN", "1", "38"), + position=1, + codes=[], + ), + ), + Element( + "CLM02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CLM03", + Properties( + desc="Claim Filing Indicator Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "CLM04", + Properties( + desc="Non-Institutional Claim Type Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C023", + Properties( + desc="Health Care Service Location Information", + refdes="", + repeat="", + req_sit="R", + seq="05", + ), + Element( + "CLM05-01", + Properties( + desc="Facility Code Value", + req_sit="R", + data_type=("AN", "1", "2"), + position=0, + codes=[], + ), + ), + Element( + "CLM05-02", + Properties( + desc="Facility Code Qualifier", + req_sit="R", + data_type=("ID", "1", "2"), + position=1, + codes=["A"], + ), + ), + Element( + "CLM05-03", + Properties( + desc="Claim Frequency Type Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + ), + Element( + "CLM06", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "CLM07", + Properties( + desc="Provider Accept Assignment Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=7, + codes=["A", "B", "C"], + ), + ), + Element( + "CLM08", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "W", "Y"], + ), + ), + Element( + "CLM09", + Properties( + desc="Release of Information Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=9, + codes=["I", "Y"], + ), + ), + Element( + "CLM10", + Properties( + desc="Patient Signature Source Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=10, + codes=[], + ), + ), + Composite( + "C024", + Properties( + desc="Related Causes Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Element( + "CLM12", + Properties( + desc="Special Program Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=12, + codes=[], + ), + ), + Element( + "CLM13", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=13, + codes=[], + ), + ), + Element( + "CLM14", + Properties( + desc="Level of Service Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=14, + codes=[], + ), + ), + Element( + "CLM15", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=15, + codes=[], + ), + ), + Element( + "CLM16", + Properties( + desc="Provider Agreement Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=16, + codes=[], + ), + ), + Element( + "CLM17", + Properties( + desc="Claim Status Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=17, + codes=[], + ), + ), + Element( + "CLM18", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=18, + codes=[], + ), + ), + Element( + "CLM19", + Properties( + desc="Claim Submission Reason Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=19, + codes=[], + ), + ), + Element( + "CLM20", + Properties( + desc="Delay Reason Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=20, + codes=["1", "10", "11", "15", "2", "3", "4", "5", "6", "7", "8", "9"], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Discharge Hour", position="1350", repeat="1", req_sit="S", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["096"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["TM"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Statement Dates", position="1350", repeat="1", req_sit="R", syntax="" + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["434"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Admission Date/Hour", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["435"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8", "DT"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "DTP", + Properties( + desc="Date - Repricer Received Date", + position="1350", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "DTP01", + Properties( + desc="Date/Time Qualifier", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["050"], + ), + ), + Element( + "DTP02", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "DTP03", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + ), + Segment( + "CL1", + Properties( + desc="Institutional Claim Code", + position="1400", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "CL101", + Properties( + desc="Admission Type Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=1, + codes=[], + ), + ), + Element( + "CL102", + Properties( + desc="Admission Source Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + Element( + "CL103", + Properties( + desc="Patient Status Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "CL104", + Properties( + desc="Nursing Home Residential Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + ), + Segment( + "PWK", + Properties( + desc="Claim Supplemental Information", + position="1550", + repeat="10", + req_sit="S", + syntax="P0506", + ), + Element( + "PWK01", + Properties( + desc="Report Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "13", + "15", + "21", + "A3", + "A4", + "AM", + "AS", + "B2", + "B3", + "B4", + "BR", + "BS", + "BT", + "CB", + "CK", + "CT", + "D2", + "DA", + "DB", + "DG", + "DJ", + "DS", + "EB", + "HC", + "HR", + "I5", + "IR", + "LA", + "M1", + "MT", + "NN", + "OB", + "OC", + "OD", + "OE", + "OX", + "OZ", + "P4", + "P5", + "PE", + "PN", + "PO", + "PQ", + "PY", + "PZ", + "RB", + "RR", + "RT", + "RX", + "SG", + "V5", + "XP", + ], + ), + ), + Element( + "PWK02", + Properties( + desc="Report Transmission Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=2, + codes=["AA", "BM", "EL", "EM", "FT", "FX"], + ), + ), + Element( + "PWK03", + Properties( + desc="Report Copies Needed", + req_sit="N", + data_type=("N0", "1", "2"), + position=3, + codes=[], + ), + ), + Element( + "PWK04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "PWK05", + Properties( + desc="Identification Code Qualifier", + req_sit="S", + data_type=("ID", "1", "2"), + position=5, + codes=["AC"], + ), + ), + Element( + "PWK06", + Properties( + desc="Identification Code", + req_sit="S", + data_type=("AN", "2", "80"), + position=6, + codes=[], + ), + ), + Element( + "PWK07", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=7, + codes=[], + ), + ), + Composite( + "C002", + Properties( + desc="Actions Indicated", refdes="", repeat="", req_sit="N", seq="08" + ), + ), + Element( + "PWK09", + Properties( + desc="Request Category Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=9, + codes=[], + ), + ), + ), + Segment( + "CN1", + Properties( + desc="Contract Information", + position="1600", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "CN101", + Properties( + desc="Contract Type Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "02", "03", "04", "05", "06", "09"], + ), + ), + Element( + "CN102", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "CN103", + Properties( + desc="Percent, Decimal Format", + req_sit="S", + data_type=("R", "1", "6"), + position=3, + codes=[], + ), + ), + Element( + "CN104", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "CN105", + Properties( + desc="Terms Discount Percent", + req_sit="S", + data_type=("R", "1", "6"), + position=5, + codes=[], + ), + ), + Element( + "CN106", + Properties( + desc="Version Identifier", + req_sit="S", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + ), + Segment( + "AMT", + Properties( + desc="Patient Estimated Amount Due", + position="1750", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "AMT01", + Properties( + desc="Amount Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["F3"], + ), + ), + Element( + "AMT02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "AMT03", + Properties( + desc="Credit/Debit Flag Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=3, + codes=[], + ), + ), + ), + Segment( + "REF", + Properties( + desc="Service Authorization Exception Code", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["4N"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Referral Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9F"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Prior Authorization", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G1"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Payer Claim Control Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["F8"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9A"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Adjusted Repriced Claim Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["9C"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Investigational Device Exemption Number", + position="1800", + repeat="5", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["LX"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Claim Identifier For Transmission Intermediaries", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["D9"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Auto Accident State", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["LU"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Medical Record Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["EA"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Demonstration Project Identifier", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["P4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "REF", + Properties( + desc="Peer Review Organization (PRO) Approval Number", + position="1800", + repeat="1", + req_sit="S", + syntax="R0203", + ), + Element( + "REF01", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["G4"], + ), + ), + Element( + "REF02", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=2, + codes=[], + ), + ), + Element( + "REF03", + Properties( + desc="Description", + req_sit="N", + data_type=("AN", "1", "80"), + position=3, + codes=[], + ), + ), + Composite( + "C040", + Properties( + desc="Reference Identifier", refdes="", repeat="", req_sit="N", seq="04" + ), + ), + ), + Segment( + "K3", + Properties( + desc="File Information", + position="1850", + repeat="10", + req_sit="S", + syntax="", + ), + Element( + "K301", + Properties( + desc="Fixed Format Information", + req_sit="R", + data_type=("AN", "1", "80"), + position=1, + codes=[], + ), + ), + Element( + "K302", + Properties( + desc="Record Format Code", + req_sit="N", + data_type=("ID", "1", "2"), + position=2, + codes=[], + ), + ), + Composite( + "C001", + Properties( + desc="Composite Unit of Measure", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Claim Note", position="1900", repeat="10", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=[ + "ALG", + "DCP", + "DGN", + "DME", + "MED", + "NTR", + "ODT", + "RHB", + "RLH", + "RNH", + "SET", + "SFM", + "SPT", + "UPI", + ], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "NTE", + Properties( + desc="Billing Note", position="1900", repeat="1", req_sit="S", syntax="" + ), + Element( + "NTE01", + Properties( + desc="Note Reference Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["ADD"], + ), + ), + Element( + "NTE02", + Properties( + desc="Description", + req_sit="R", + data_type=("AN", "1", "80"), + position=2, + codes=[], + ), + ), + ), + Segment( + "CRC", + Properties( + desc="EPSDT Referral", position="2200", repeat="1", req_sit="S", syntax="" + ), + Element( + "CRC01", + Properties( + desc="Code Category", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["ZZ"], + ), + ), + Element( + "CRC02", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=2, + codes=["N", "Y"], + ), + ), + Element( + "CRC03", + Properties( + desc="Condition Indicator", + req_sit="R", + data_type=("ID", "2", "3"), + position=3, + codes=["AV", "NU", "S2", "ST"], + ), + ), + Element( + "CRC04", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CRC05", + Properties( + desc="Condition Indicator", + req_sit="S", + data_type=("ID", "2", "3"), + position=5, + codes=[], + ), + ), + Element( + "CRC06", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=6, + codes=[], + ), + ), + Element( + "CRC07", + Properties( + desc="Condition Indicator", + req_sit="N", + data_type=("ID", "2", "3"), + position=7, + codes=[], + ), + ), + ), + Segment( + "HI", + Properties( + desc="Principal Diagnosis", + position="2310", + repeat="1", + req_sit="R", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABK", "BK"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Admitting Diagnosis", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABJ", "BJ"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Patient's Reason For Visit", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["APR", "PR"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["APR", "PR"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["APR", "PR"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="External Cause of Injury", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABN", "BN"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Diagnosis Related Group (DRG) Information", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["DR"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Other Diagnosis Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["ABF", "BF"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="S", + data_type=("ID", "1", "1"), + position=8, + codes=["N", "U", "W", "Y"], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Principal Procedure Information", + position="2310", + repeat="1", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBR", "BR", "CAH"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="02", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="03", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="04", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="06", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="07", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="08", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="09", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="10", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="11", + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="N", + seq="12", + ), + ), + ), + Segment( + "HI", + Properties( + desc="Other Procedure Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BBQ", "BQ"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Occurrence Span Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BI"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["RD8"], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Occurrence Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BH"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["D8"], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Value Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BE"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Condition Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["BG"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HI", + Properties( + desc="Treatment Code Information", + position="2310", + repeat="2", + req_sit="S", + syntax="", + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="R", + seq="01", + ), + Element( + "HI01-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI01-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI01-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI01-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI01-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI01-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI01-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI01-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI01-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="02", + ), + Element( + "HI02-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI02-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI02-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI02-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI02-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI02-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI02-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI02-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI02-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="03", + ), + Element( + "HI03-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI03-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI03-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI03-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI03-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI03-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI03-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI03-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI03-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="04", + ), + Element( + "HI04-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI04-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI04-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI04-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI04-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI04-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI04-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI04-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI04-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="05", + ), + Element( + "HI05-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI05-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI05-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI05-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI05-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI05-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI05-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI05-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI05-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="06", + ), + Element( + "HI06-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI06-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI06-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI06-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI06-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI06-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI06-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI06-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI06-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="07", + ), + Element( + "HI07-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI07-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI07-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI07-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI07-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI07-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI07-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI07-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI07-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="08", + ), + Element( + "HI08-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI08-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI08-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI08-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI08-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI08-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI08-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI08-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI08-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="09", + ), + Element( + "HI09-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI09-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI09-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI09-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI09-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI09-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI09-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI09-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI09-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="10", + ), + Element( + "HI10-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI10-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI10-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI10-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI10-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI10-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI10-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI10-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI10-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="11", + ), + Element( + "HI11-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI11-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI11-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI11-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI11-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI11-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI11-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI11-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI11-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + Composite( + "C022", + Properties( + desc="Health Care Code Information", + refdes="", + repeat="", + req_sit="S", + seq="12", + ), + Element( + "HI12-01", + Properties( + desc="Code List Qualifier Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=0, + codes=["TC"], + ), + ), + Element( + "HI12-02", + Properties( + desc="Industry Code", + req_sit="R", + data_type=("AN", "1", "30"), + position=1, + codes=[], + ), + ), + Element( + "HI12-03", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=2, + codes=[], + ), + ), + Element( + "HI12-04", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=3, + codes=[], + ), + ), + Element( + "HI12-05", + Properties( + desc="Monetary Amount", + req_sit="N", + data_type=("R", "1", "18"), + position=4, + codes=[], + ), + ), + Element( + "HI12-06", + Properties( + desc="Quantity", + req_sit="N", + data_type=("R", "1", "15"), + position=5, + codes=[], + ), + ), + Element( + "HI12-07", + Properties( + desc="Version Identifier", + req_sit="N", + data_type=("AN", "1", "30"), + position=6, + codes=[], + ), + ), + Element( + "HI12-08", + Properties( + desc="Industry Code", + req_sit="N", + data_type=("AN", "1", "30"), + position=7, + codes=[], + ), + ), + Element( + "HI12-09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=8, + codes=[], + ), + ), + ), + ), + Segment( + "HCP", + Properties( + desc="Claim Pricing/Repricing Information", + position="2410", + repeat="1", + req_sit="S", + syntax="R0113 P0910 P1112", + ), + Element( + "HCP01", + Properties( + desc="Pricing Methodology", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=[ + "00", + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + ], + ), + ), + Element( + "HCP02", + Properties( + desc="Monetary Amount", + req_sit="R", + data_type=("R", "1", "18"), + position=2, + codes=[], + ), + ), + Element( + "HCP03", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=3, + codes=[], + ), + ), + Element( + "HCP04", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=4, + codes=[], + ), + ), + Element( + "HCP05", + Properties( + desc="Rate", + req_sit="S", + data_type=("R", "1", "9"), + position=5, + codes=[], + ), + ), + Element( + "HCP06", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=6, + codes=[], + ), + ), + Element( + "HCP07", + Properties( + desc="Monetary Amount", + req_sit="S", + data_type=("R", "1", "18"), + position=7, + codes=[], + ), + ), + Element( + "HCP08", + Properties( + desc="Product/Service ID", + req_sit="S", + data_type=("AN", "1", "48"), + position=8, + codes=[], + ), + ), + Element( + "HCP09", + Properties( + desc="Product/Service ID Qualifier", + req_sit="N", + data_type=("ID", "2", "2"), + position=9, + codes=[], + ), + ), + Element( + "HCP10", + Properties( + desc="Product/Service ID", + req_sit="N", + data_type=("AN", "1", "48"), + position=10, + codes=[], + ), + ), + Element( + "HCP11", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=11, + codes=["DA", "UN"], + ), + ), + Element( + "HCP12", + Properties( + desc="Quantity", + req_sit="S", + data_type=("R", "1", "15"), + position=12, + codes=[], + ), + ), + Element( + "HCP13", + Properties( + desc="Reject Reason Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=13, + codes=["T1", "T2", "T3", "T4", "T5", "T6"], + ), + ), + Element( + "HCP14", + Properties( + desc="Policy Compliance Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=14, + codes=["1", "2", "3", "4", "5"], + ), + ), + Element( + "HCP15", + Properties( + desc="Exception Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=15, + codes=["1", "2", "3", "4", "5", "6"], + ), + ), + ), + parsed_837_2310A, + parsed_837_2310B, + parsed_837_2310C, + parsed_837_2310D, + parsed_837_2310E, + parsed_837_2310F, + parsed_837_2320, + parsed_837_2400, +) +parsed_837_2000C = Loop( + "2000C", + Properties( + desc="Patient Hierarchical Level", + looptype="", + position="0200", + repeat=">1", + req_sit="S", + ), + Segment( + "HL", + Properties( + desc="Patient Hierarchical Level", + position="0010", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "HL01", + Properties( + desc="Hierarchical ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=1, + codes=[], + ), + ), + Element( + "HL02", + Properties( + desc="Hierarchical Parent ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=2, + codes=[], + ), + ), + Element( + "HL03", + Properties( + desc="Hierarchical Level Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=["23"], + ), + ), + Element( + "HL04", + Properties( + desc="Hierarchical Child Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["0"], + ), + ), + ), + Segment( + "PAT", + Properties( + desc="Patient Information", + position="0070", + repeat="1", + req_sit="R", + syntax="P0506 P0708", + ), + Element( + "PAT01", + Properties( + desc="Individual Relationship Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["01", "19", "20", "21", "39", "40", "53", "G8"], + ), + ), + Element( + "PAT02", + Properties( + desc="Patient Location Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=2, + codes=[], + ), + ), + Element( + "PAT03", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=3, + codes=[], + ), + ), + Element( + "PAT04", + Properties( + desc="Student Status Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=4, + codes=[], + ), + ), + Element( + "PAT05", + Properties( + desc="Date Time Period Format Qualifier", + req_sit="N", + data_type=("ID", "2", "3"), + position=5, + codes=[], + ), + ), + Element( + "PAT06", + Properties( + desc="Date Time Period", + req_sit="N", + data_type=("AN", "1", "35"), + position=6, + codes=[], + ), + ), + Element( + "PAT07", + Properties( + desc="Unit or Basis for Measurement Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=7, + codes=[], + ), + ), + Element( + "PAT08", + Properties( + desc="Weight", + req_sit="N", + data_type=("R", "1", "10"), + position=8, + codes=[], + ), + ), + Element( + "PAT09", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=9, + codes=[], + ), + ), + ), + parsed_837_2010CA, + parsed_837_2300, +) +parsed_837_2000B = Loop( + "2000B", + Properties( + desc="Subscriber Hierarchical Level", + looptype="", + position="0700", + repeat=">1", + req_sit="R", + ), + Segment( + "HL", + Properties( + desc="Subscriber Hierarchical Level", + position="0010", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "HL01", + Properties( + desc="Hierarchical ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=1, + codes=[], + ), + ), + Element( + "HL02", + Properties( + desc="Hierarchical Parent ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=2, + codes=[], + ), + ), + Element( + "HL03", + Properties( + desc="Hierarchical Level Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=["22"], + ), + ), + Element( + "HL04", + Properties( + desc="Hierarchical Child Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["0", "1"], + ), + ), + ), + Segment( + "SBR", + Properties( + desc="Subscriber Information", + position="0050", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SBR01", + Properties( + desc="Payer Responsibility Sequence Number Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=1, + codes=["A", "B", "C", "D", "E", "F", "G", "H", "P", "S", "T", "U"], + ), + ), + Element( + "SBR02", + Properties( + desc="Individual Relationship Code", + req_sit="S", + data_type=("ID", "2", "2"), + position=2, + codes=["18"], + ), + ), + Element( + "SBR03", + Properties( + desc="Reference Identification", + req_sit="S", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "SBR04", + Properties( + desc="Name", + req_sit="S", + data_type=("AN", "1", "60"), + position=4, + codes=[], + ), + ), + Element( + "SBR05", + Properties( + desc="Insurance Type Code", + req_sit="N", + data_type=("ID", "1", "3"), + position=5, + codes=[], + ), + ), + Element( + "SBR06", + Properties( + desc="Coordination of Benefits Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=6, + codes=[], + ), + ), + Element( + "SBR07", + Properties( + desc="Yes/No Condition or Response Code", + req_sit="N", + data_type=("ID", "1", "1"), + position=7, + codes=[], + ), + ), + Element( + "SBR08", + Properties( + desc="Employment Status Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=8, + codes=[], + ), + ), + Element( + "SBR09", + Properties( + desc="Claim Filing Indicator Code", + req_sit="S", + data_type=("ID", "1", "2"), + position=9, + codes=[ + "11", + "12", + "13", + "14", + "15", + "16", + "17", + "AM", + "BL", + "CH", + "CI", + "DS", + "FI", + "HM", + "LM", + "MA", + "MB", + "MC", + "OF", + "TV", + "VA", + "WC", + "ZZ", + ], + ), + ), + ), + parsed_837_2010BA, + parsed_837_2010BB, + parsed_837_2300, + parsed_837_2000C, +) +parsed_837_2000A = Loop( + "2000A", + Properties( + desc="Billing Provider Hierarchical Level", + looptype="", + position="0010", + repeat=">1", + req_sit="R", + ), + Segment( + "HL", + Properties( + desc="Billing Provider Hierarchical Level", + position="0010", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "HL01", + Properties( + desc="Hierarchical ID Number", + req_sit="R", + data_type=("AN", "1", "12"), + position=1, + codes=[], + ), + ), + Element( + "HL02", + Properties( + desc="Hierarchical Parent ID Number", + req_sit="N", + data_type=("AN", "1", "12"), + position=2, + codes=[], + ), + ), + Element( + "HL03", + Properties( + desc="Hierarchical Level Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=3, + codes=["20"], + ), + ), + Element( + "HL04", + Properties( + desc="Hierarchical Child Code", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["1"], + ), + ), + ), + Segment( + "PRV", + Properties( + desc="Billing Provider Specialty Information", + position="0030", + repeat="1", + req_sit="S", + syntax="P0203", + ), + Element( + "PRV01", + Properties( + desc="Provider Code", + req_sit="R", + data_type=("ID", "1", "3"), + position=1, + codes=["BI"], + ), + ), + Element( + "PRV02", + Properties( + desc="Reference Identification Qualifier", + req_sit="R", + data_type=("ID", "2", "3"), + position=2, + codes=["PXC"], + ), + ), + Element( + "PRV03", + Properties( + desc="Reference Identification", + req_sit="R", + data_type=("AN", "1", "50"), + position=3, + codes=[], + ), + ), + Element( + "PRV04", + Properties( + desc="State or Province Code", + req_sit="N", + data_type=("ID", "2", "2"), + position=4, + codes=[], + ), + ), + Composite( + "C035", + Properties( + desc="Provider Specialty Information", + refdes="", + repeat="", + req_sit="N", + seq="05", + ), + ), + Element( + "PRV06", + Properties( + desc="Provider Organization Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + ), + Segment( + "CUR", + Properties( + desc="Foreign Currency Information", + position="0100", + repeat="1", + req_sit="S", + syntax="C0807 C0907 L101112 C1110 C1210 L131415 C1413 C1513 L161718 C1716 C1816 L192021 C2019 C2119", + ), + Element( + "CUR01", + Properties( + desc="Entity Identifier Code", + req_sit="R", + data_type=("ID", "2", "3"), + position=1, + codes=["85"], + ), + ), + Element( + "CUR02", + Properties( + desc="Currency Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=2, + codes=[], + ), + ), + Element( + "CUR03", + Properties( + desc="Exchange Rate", + req_sit="N", + data_type=("R", "4", "10"), + position=3, + codes=[], + ), + ), + Element( + "CUR04", + Properties( + desc="Entity Identifier Code", + req_sit="N", + data_type=("ID", "2", "3"), + position=4, + codes=[], + ), + ), + Element( + "CUR05", + Properties( + desc="Currency Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=5, + codes=[], + ), + ), + Element( + "CUR06", + Properties( + desc="Currency Market/Exchange Code", + req_sit="N", + data_type=("ID", "3", "3"), + position=6, + codes=[], + ), + ), + Element( + "CUR07", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=7, + codes=[], + ), + ), + Element( + "CUR08", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=8, + codes=[], + ), + ), + Element( + "CUR09", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=9, + codes=[], + ), + ), + Element( + "CUR10", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=10, + codes=[], + ), + ), + Element( + "CUR11", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=11, + codes=[], + ), + ), + Element( + "CUR12", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=12, + codes=[], + ), + ), + Element( + "CUR13", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=13, + codes=[], + ), + ), + Element( + "CUR14", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=14, + codes=[], + ), + ), + Element( + "CUR15", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=15, + codes=[], + ), + ), + Element( + "CUR16", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=16, + codes=[], + ), + ), + Element( + "CUR17", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=17, + codes=[], + ), + ), + Element( + "CUR18", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=18, + codes=[], + ), + ), + Element( + "CUR19", + Properties( + desc="Date/Time Qualifier", + req_sit="N", + data_type=("ID", "3", "3"), + position=19, + codes=[], + ), + ), + Element( + "CUR20", + Properties( + desc="Date", + req_sit="N", + data_type=("DT", "8", "8"), + position=20, + codes=[], + ), + ), + Element( + "CUR21", + Properties( + desc="Time", + req_sit="N", + data_type=("TM", "4", "8"), + position=21, + codes=[], + ), + ), + ), + parsed_837_2010AA, + parsed_837_2010AB, + parsed_837_2010AC, + parsed_837_2000B, +) +parsed_837_DETAIL = Loop( + "DETAIL", + Properties( + desc="Table 2 - Detail", + looptype="wrapper", + position="0120", + repeat=">1", + req_sit="R", + ), + parsed_837_2000A, +) +parsed_837_ST_LOOP = Loop( + "ST_LOOP", + Properties( + desc="Transaction Set Header", + looptype="explicit", + position="0200", + repeat=">1", + req_sit="R", + ), + Segment( + "ST", + Properties( + desc="Transaction Set Header", + position="0050", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "ST01", + Properties( + desc="Transaction Set Identifier Code", + req_sit="R", + data_type=("ID", "3", "3"), + position=1, + codes=["837"], + ), + ), + Element( + "ST02", + Properties( + desc="Transaction Set Control Number", + req_sit="R", + data_type=("AN", "4", "9"), + position=2, + codes=[], + ), + ), + Element( + "ST03", + Properties( + desc="Implementation Convention Reference", + req_sit="R", + data_type=("AN", "1", "35"), + position=3, + codes=["005010X223A2"], + ), + ), + ), + parsed_837_HEADER, + parsed_837_DETAIL, + Segment( + "SE", + Properties( + desc="Transaction Set Trailer", + position="5550", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "SE01", + Properties( + desc="Number of Included Segments", + req_sit="R", + data_type=("N0", "1", "10"), + position=1, + codes=[], + ), + ), + Element( + "SE02", + Properties( + desc="Transaction Set Control Number", + req_sit="R", + data_type=("AN", "4", "9"), + position=2, + codes=[], + ), + ), + ), +) +parsed_837_GS_LOOP = Loop( + "GS_LOOP", + Properties( + desc="Functional Group Header", + looptype="explicit", + position="0200", + repeat=">1", + req_sit="R", + ), + Segment( + "GS", + Properties( + desc="Functional Group Header", + position="0100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "GS01", + Properties( + desc="Functional Identifier Code", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["HC"], + ), + ), + Element( + "GS02", + Properties( + desc="Application Senders Code", + req_sit="R", + data_type=("AN", "2", "15"), + position=2, + codes=[], + ), + ), + Element( + "GS03", + Properties( + desc="124", + req_sit="R", + data_type=("AN", "2", "15"), + position=3, + codes=[], + ), + ), + Element( + "GS04", + Properties( + desc="Date", + req_sit="R", + data_type=("DT", "8", "8"), + position=4, + codes=[], + ), + ), + Element( + "GS05", + Properties( + desc="Time", + req_sit="R", + data_type=("TM", "4", "8"), + position=5, + codes=[], + ), + ), + Element( + "GS06", + Properties( + desc="Group Control Number", + req_sit="R", + data_type=("N0", "1", "9"), + position=6, + codes=[], + ), + ), + Element( + "GS07", + Properties( + desc="Responsible Agency Code", + req_sit="R", + data_type=("ID", "1", "2"), + position=7, + codes=["X"], + ), + ), + Element( + "GS08", + Properties( + desc="Version / Release / Industry Identifier Code", + req_sit="R", + data_type=("AN", "1", "12"), + position=8, + codes=["005010X223A2"], + ), + ), + ), + parsed_837_ST_LOOP, + Segment( + "GE", + Properties( + desc="Functional Group Trailer", + position="0300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "GE01", + Properties( + desc="97", req_sit="R", data_type=("N0", "1", "6"), position=1, codes=[] + ), + ), + Element( + "GE02", + Properties( + desc="Group Control Number", + req_sit="R", + data_type=("N0", "1", "9"), + position=2, + codes=[], + ), + ), + ), +) +parsed_837_ISA_LOOP = Loop( + "ISA_LOOP", + Properties( + desc="Interchange Control Header", + looptype="explicit", + position="0010", + repeat=">1", + req_sit="R", + ), + Segment( + "ISA", + Properties( + desc="Interchange Control Header", + position="0100", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "ISA01", + Properties( + desc="I01", + req_sit="R", + data_type=("ID", "2", "2"), + position=1, + codes=["00", "03"], + ), + ), + Element( + "ISA02", + Properties( + desc="I02", + req_sit="R", + data_type=("AN", "10", "10"), + position=2, + codes=[], + ), + ), + Element( + "ISA03", + Properties( + desc="I03", + req_sit="R", + data_type=("ID", "2", "2"), + position=3, + codes=["00", "01"], + ), + ), + Element( + "ISA04", + Properties( + desc="I04", + req_sit="R", + data_type=("AN", "10", "10"), + position=4, + codes=[], + ), + ), + Element( + "ISA05", + Properties( + desc="I05", + req_sit="R", + data_type=("ID", "2", "2"), + position=5, + codes=["01", "14", "20", "27", "28", "29", "30", "33", "ZZ"], + ), + ), + Element( + "ISA06", + Properties( + desc="I06", + req_sit="R", + data_type=("AN", "15", "15"), + position=6, + codes=[], + ), + ), + Element( + "ISA07", + Properties( + desc="I05", + req_sit="R", + data_type=("ID", "2", "2"), + position=7, + codes=["01", "14", "20", "27", "28", "29", "30", "33", "ZZ"], + ), + ), + Element( + "ISA08", + Properties( + desc="I07", + req_sit="R", + data_type=("AN", "15", "15"), + position=8, + codes=[], + ), + ), + Element( + "ISA09", + Properties( + desc="I08", + req_sit="R", + data_type=("DT", "6", "6"), + position=9, + codes=[], + ), + ), + Element( + "ISA10", + Properties( + desc="I09", + req_sit="R", + data_type=("TM", "4", "4"), + position=10, + codes=[], + ), + ), + Element( + "ISA11", + Properties( + desc="I65", + req_sit="R", + data_type=("AN", "1", "1"), + position=11, + codes=[], + ), + ), + Element( + "ISA12", + Properties( + desc="I11", + req_sit="R", + data_type=("ID", "5", "5"), + position=12, + codes=["00501"], + ), + ), + Element( + "ISA13", + Properties( + desc="I12", + req_sit="R", + data_type=("N0", "9", "9"), + position=13, + codes=[], + ), + ), + Element( + "ISA14", + Properties( + desc="I13", + req_sit="R", + data_type=("ID", "1", "1"), + position=14, + codes=["0", "1"], + ), + ), + Element( + "ISA15", + Properties( + desc="I14", + req_sit="R", + data_type=("ID", "1", "1"), + position=15, + codes=["P", "T"], + ), + ), + Element( + "ISA16", + Properties( + desc="I15", + req_sit="R", + data_type=("AN", "1", "1"), + position=16, + codes=[], + ), + ), + ), + parsed_837_GS_LOOP, + Segment( + "TA1", + Properties( + desc="Interchange Acknowledgement", + position="0200", + repeat="1", + req_sit="S", + syntax="", + ), + Element( + "TA101", + Properties( + desc="I12", + req_sit="R", + data_type=("N0", "9", "9"), + position=1, + codes=[], + ), + ), + Element( + "TA102", + Properties( + desc="I08", + req_sit="R", + data_type=("DT", "6", "6"), + position=2, + codes=[], + ), + ), + Element( + "TA103", + Properties( + desc="I09", + req_sit="R", + data_type=("TM", "4", "4"), + position=3, + codes=[], + ), + ), + Element( + "TA104", + Properties( + desc="I17", + req_sit="R", + data_type=("ID", "1", "1"), + position=4, + codes=["A", "E", "R"], + ), + ), + Element( + "TA105", + Properties( + desc="I18", + req_sit="R", + data_type=("ID", "3", "3"), + position=5, + codes=[ + "000", + "001", + "002", + "003", + "004", + "005", + "006", + "007", + "008", + "009", + "010", + "011", + "012", + "013", + "014", + "015", + "016", + "017", + "018", + "019", + "020", + "021", + "022", + "023", + "024", + "025", + "026", + "027", + "028", + "029", + "030", + "031", + ], + ), + ), + ), + Segment( + "IEA", + Properties( + desc="Interchange Control Trailer", + position="0300", + repeat="1", + req_sit="R", + syntax="", + ), + Element( + "IEA01", + Properties( + desc="I16", + req_sit="R", + data_type=("N0", "1", "5"), + position=1, + codes=[], + ), + ), + Element( + "IEA02", + Properties( + desc="I12", + req_sit="R", + data_type=("N0", "9", "9"), + position=2, + codes=[], + ), + ), + ), +) +parsed_837 = Message( + "837", + Properties(desc="HIPAA Health Care Claim - Institutional 005010X223A2 837"), + parsed_837_ISA_LOOP, +) diff --git a/tigershark/parsers/M841_4010_XXXC.py b/tigershark/parsers/M841_4010_XXXC.py index 009bf79..bef46cc 100644 --- a/tigershark/parsers/M841_4010_XXXC.py +++ b/tigershark/parsers/M841_4010_XXXC.py @@ -2,7 +2,7 @@ # Generated by TigerShark.tools.convertPyX12 on 2012-07-10 16:30:03.879137 # from tigershark.X12.parse import Message, Loop, Segment, Composite, Element, Properties -parsed_841_1100 = Loop( u'1100', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'R',desc=u'Code List Source'), +parsed_841_1100 = Loop( u'1100', Properties(looptype='',repeat=u'>1',pos=u'040',req_sit=u'R',desc=u'Code List Source'), Segment( u'N1', Properties(syntax=u'R0203 P0304',req_sit=u'S',repeat=u'1',pos=u'120',desc=u'Code List Source'), Element( u'N101', Properties(desc=u'Entity Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'3'), position=1, codes=[u'0F'] ) ), @@ -18,7 +18,7 @@ codes=[] ) ), ), ) -parsed_841_1000 = Loop( u'1000', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Code List'), +parsed_841_1000 = Loop( u'1000', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Code List'), Segment( u'SPI', Properties(syntax=u'P0203',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Code List'), Element( u'SPI01', Properties(desc=u'Security Level Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00'] ) ), @@ -81,10 +81,10 @@ ), parsed_841_1100, ) -parsed_841_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), +parsed_841_HEADER = Loop( u'HEADER', Properties(looptype=u'wrapper',repeat=u'1',pos=u'010',req_sit=u'R',desc=u'Table 1 - Header'), parsed_841_1000, ) -parsed_841_2100 = Loop( u'2100', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Code List Value and Definition'), +parsed_841_2100 = Loop( u'2100', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Code List Value and Definition'), Segment( u'SPI', Properties(syntax=u'P0203',req_sit=u'R',repeat=u'1',pos=u'020',desc=u'Code List Value and Definition'), Element( u'SPI01', Properties(desc=u'Security Level Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00'] ) ), @@ -126,7 +126,7 @@ codes=[] ) ), ), ) -parsed_841_2000 = Loop( u'2000', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Code List Header'), +parsed_841_2000 = Loop( u'2000', Properties(looptype='',repeat=u'>1',pos=u'010',req_sit=u'R',desc=u'Code List Header'), Segment( u'HL', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Code List Header'), Element( u'HL01', Properties(desc=u'Hierarchical ID Number', req_sit=u'R', data_type=(u'AN',u'1',u'12'), position=1, codes=[u'1'] ) ), @@ -139,10 +139,10 @@ ), parsed_841_2100, ) -parsed_841_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), +parsed_841_DETAIL = Loop( u'DETAIL', Properties(looptype=u'wrapper',repeat=u'>1',pos=u'020',req_sit=u'S',desc=u'Table 2 - Detail'), parsed_841_2000, ) -parsed_841_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), +parsed_841_ST_LOOP = Loop( u'ST_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Transaction Set Header'), Segment( u'ST', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'005',desc=u'Transaction Set Header'), Element( u'ST01', Properties(desc=u'Transaction Set Identifier Code', req_sit=u'R', data_type=(u'ID',u'3',u'3'), position=1, codes=[u'841'] ) ), @@ -158,7 +158,7 @@ codes=[] ) ), ), ) -parsed_841_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), +parsed_841_GS_LOOP = Loop( u'GS_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'020',req_sit=u'R',desc=u'Functional Group Header'), Segment( u'GS', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Functional Group Header'), Element( u'GS01', Properties(desc=u'Functional Identifier Code', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'SP'] ) ), @@ -185,7 +185,7 @@ codes=[] ) ), ), ) -parsed_841_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), +parsed_841_ISA_LOOP = Loop( u'ISA_LOOP', Properties(looptype=u'explicit',repeat=u'>1',pos=u'001',req_sit=u'R',desc=u'Interchange Control Header'), Segment( u'ISA', Properties(syntax='',req_sit=u'R',repeat=u'1',pos=u'010',desc=u'Interchange Control Header'), Element( u'ISA01', Properties(desc=u'I01', req_sit=u'R', data_type=(u'ID',u'2',u'2'), position=1, codes=[u'00', u'03'] ) ), @@ -240,7 +240,7 @@ codes=[] ) ), ), ) -parsed_841 = Message( u'841', Properties(desc=u'HIPAA Related Code Lists'), +parsed_841 = Message( u'841', Properties(desc=u'HIPAA Related Code Lists'), parsed_841_ISA_LOOP, ) diff --git a/tigershark/parsers/__init__.py b/tigershark/parsers/__init__.py index e69de29..e3f47af 100644 --- a/tigershark/parsers/__init__.py +++ b/tigershark/parsers/__init__.py @@ -0,0 +1,168 @@ +from tigershark import ( + X12_4010_X061A1, + X12_4010_X070, + X12_4010_X091A1, + X12_4010_X092A1, + X12_4010_X093A1, + X12_4010_X094A1, + X12_4010_X095A1, + X12_4010_X096A1, + X12_4010_X097A1, + X12_4010_X098A1, + X12_4010_XXXC, + X12_5010_X221A1, + X12_5010_X279A1, + X12_5010_X222A1, + X12_5010_X223A1, +) +from tigershark.extras import standardSegment +from tigershark.X12.parse import ( + Loop, + Message, + ParseError, + Properties +) + +# Transaction Set ID -> X12VersionTuple -> [(parser module, parser name)] +PARSER_MAP = { + '270': { + X12_4010_X092A1: [('M270_4010_X092_A1', 'parsed_270')], + X12_5010_X279A1: [('M270_5010_X279_A1', 'parsed_270')], + }, + '271': { + X12_4010_X092A1: [('M271_4010_X092_A1', 'parsed_271')], + X12_5010_X279A1: [('M271_5010_X279_A1', 'parsed_271')], + }, + '276': { + X12_4010_X093A1: [('M276_4010_X093_A1', 'parsed_276')], + }, + '277U': { + X12_4010_X070: [('M277U_4010_X070', 'parsed_277U')], + }, + '277': { + X12_4010_X093A1: [('M277_4010_X093_A1', 'parsed_277')], + }, + '278': { + X12_4010_X094A1: [('M278_4010_X094_27_A1', 'parsed_278'), + ('M278_4010_X094_A1', 'parsed_278')], + }, + '820': { + X12_4010_X061A1: [('M820_4010_X061_A1', 'parsed_820')], + }, + '834': { + X12_4010_X095A1: [('M834_4010_X095_A1', 'parsed_834')], + }, + '835': { + X12_4010_X091A1: [('M835_4010_X091_A1', 'parsed_835')], + X12_5010_X221A1: [('M835_5010_X221_A1', 'parsed_835')], + }, + '837': { + X12_4010_X096A1: [('M837_4010_X096_A1', 'parsed_837')], + X12_4010_X097A1: [('M837_4010_X097_A1', 'parsed_837')], + X12_4010_X098A1: [('M837_4010_X098_A1', 'parsed_837')], + X12_5010_X222A1: [('M837_5010_X222_A1', 'parsed_837')], # Professional Claims + X12_5010_X223A1: [('M837_5010_X223_A1', 'parsed_837')], # Institutional Claims + }, + '841': { + X12_4010_XXXC: [('M841_4010_XXXC', 'parsed_841')], + }, +} + + +def get_parsers(transaction_set_id, version_tuple): + """ + Generate the parsers to try for a given transaction_set and version. + + The parsers should be tried in the given order. + """ + try: + parsers = PARSER_MAP[transaction_set_id][version_tuple] + except KeyError: + raise ValueError("Unsupported transaction set and version.", + transaction_set_id, version_tuple) + + for index, (module_name, parser_name) in enumerate(parsers): + module = __import__('tigershark.parsers.' + module_name, + fromlist=[parser_name]) + yield getattr(module, parser_name) + + +class SimpleParser(object): + """ + A parser for a particular transaction set and version. + """ + def __init__(self, transaction_set_id, version_tuple): + self.transaction_set_id = transaction_set_id + self.version_tuple = version_tuple + + def unmarshall(self, x12_contents, **kwargs): + for parser in get_parsers(self.transaction_set_id, self.version_tuple): + try: + return parser.unmarshall(x12_contents, **kwargs) + except ParseError: + continue + else: + # Let the last parser raise. + return parser.unmarshall(x12_contents, **kwargs) + + +STLoop = Loop( + u'ST_LOOP', + Properties( + position=u'0200', + looptype=u'explicit', + repeat=u'>1', + req_sit=u'R', + desc=u'Transaction Set Header', + ), + standardSegment.st, +) + +GSLoop = Loop( + u'GS_LOOP', + Properties( + position=u'0200', + looptype=u'explicit', + repeat=u'>1', + req_sit=u'R', + desc=u'Functional Group Header', + ), + standardSegment.gs, + STLoop, +) + +ISALoop = Loop( + u'ISA_LOOP', + Properties( + position=u'0010', + looptype=u'explicit', + repeat=u'>1', + req_sit=u'R', + desc=u'Interchange Control Header', + ), + standardSegment.isa, + GSLoop, +) + +ControlParser = Message( + u'ASC X12 Interchange Control Structure', + Properties( + desc=u'ASC X12 Control Structure', + ), + ISALoop, +) + + +def parse_control_headers(x12_contents): + """Parse only the control headers of an X12 message. + + This parses the three outer control headers of the given X12 message: + + * Interchange Control (ISA) + * Functional Group (GS) + * Transaction Set (ST). + + These can be used to identify the X12 versions and transaction set types + contained in the message. + """ + return ControlParser.unmarshall(x12_contents, ignoreExtra=True) diff --git a/tigershark/tools/convertPyX12.py b/tigershark/tools/convertPyX12.py index 0fbc1f2..f0fd357 100755 --- a/tigershark/tools/convertPyX12.py +++ b/tigershark/tools/convertPyX12.py @@ -224,7 +224,7 @@ def getValidCodes( self, aNode ): """Parse a :samp:`` node, building a list of valid codes for an Element. This will examine only :samp:`` elements found under the :samp:`` element. - + :param aNode: a :mod:`xml.dom` Element with a name of :samp:`valid_codes` :returns: list of code values """ @@ -269,17 +269,18 @@ def buildComposite( self, compositeNode, context, nesting=0 ): seq= self.getChildTextValue( compositeNode, "seq" ) data_ele= self.getChildTextValue( compositeNode, "data_ele" ) refdes= self.getChildTextValue( compositeNode, "refdes" ) + repeat= self.getChildTextValue( compositeNode, "repeat" ) # TODO add support self.log.debug( "%*sComposite name %r usage %r seq %r data_ele %r refdes %r", nesting*2, '', name, usage, seq, data_ele, refdes ) theComposite= Composite( data_ele, - Properties( desc=name, req_sit=usage, seq=seq, refdes=refdes ) ) + Properties( desc=name, req_sit=usage, seq=seq, refdes=refdes, repeat=repeat ) ) for c in compositeNode.childNodes: # Want to preserve the original XML order of if c.nodeType != DOM.Node.ELEMENT_NODE: continue if c.nodeName == "element": self.buildElement( c, theComposite, nesting+1 ) - elif c.nodeName in ( "name", "usage", "seq", "data_ele", 'refdes',): + elif c.nodeName in ( "name", "usage", "seq", "data_ele", 'refdes', 'repeat'): pass # already consumed else: warnings.warn( XMLWarning("Unexpected %r" % (c,) ) ) @@ -289,9 +290,9 @@ def buildElement( self, elementNode, context, nesting=0 ): """Element is the fundamental piece of data in a Segment or Composite. Elements can have code definitions or can reference external code definitions. - + .. todo:: XXX - Use external code definitions. - + :param elementNode: a :mod:`xml.dom` Element with a name of :samp:`element` :param context: The Segment or Composite which contains this Element :param nesting: The current nesting level used to indent the log messages. @@ -302,9 +303,10 @@ def buildElement( self, elementNode, context, nesting=0 ): usage= self.getChildTextValue( elementNode, "usage" ) seq= self.getChildTextValue( elementNode, "seq" ) data_ele= self.getChildTextValue( elementNode, "data_ele" ) + repeat= self.getChildTextValue( elementNode, "repeat" ) # TODO add support self.log.debug( "%*sElement id %r name %r usage %r seq %r data_ele %r", nesting*2, '', eltXid, name, usage, seq, data_ele ) - if not self.dataDictionary.has_key( data_ele ): + if data_ele not in self.dataDictionary: warnings.warn( UnknownElementWarning("No Data Element %r %r %r" % ( eltXid, data_ele, name ,) ) ) data_type_tuple= (None,None,None) else: @@ -320,7 +322,7 @@ def buildElement( self, elementNode, context, nesting=0 ): warnings.warn( Extension("External Codes Not Implemented") ) else: codes= self.getValidCodes( c ) - elif c.nodeName in ( "name", "usage", "seq", "data_ele", ): + elif c.nodeName in ( "name", "usage", "seq", "data_ele", 'repeat'): pass # already consumed else: warnings.warn( XMLWarning("Unexpected %r" % (c,) ) ) @@ -329,17 +331,17 @@ def buildElement( self, elementNode, context, nesting=0 ): theElement= Element( eltXid, Properties(desc=name, req_sit=usage, seq=seq, data_ele=data_ele, - data_type=data_type_tuple, codes=codes, ) + data_type=data_type_tuple, codes=codes, repeat=repeat, ) ) - if self.dataDictionary.has_key( data_ele ) and len(codes) != 0: + if data_ele in self.dataDictionary and len(codes) != 0: #self.log2.debug( "Segment Qual Parameter? %r %r", self.dataDictionary[data_ele], codes ) pass context.append( theElement ) def buildSegment( self, segmentNode, context, nesting=0 ): """Segment contains Elements and Composites. - + :param segmentNode: a :mod:`xml.dom` Element with a name of :samp:`segment` :param context: The Loop which contains this Segment. :param nesting: The current nesting level used to indent the log messages. @@ -355,7 +357,7 @@ def buildSegment( self, segmentNode, context, nesting=0 ): nesting*2, '', segXid, name, usage, pos, max_use, syntax ) theSegment= Segment( segXid, - Properties(desc=name,req_sit=usage,pos=pos,repeat=max_use,syntax=syntax), + Properties(desc=name,req_sit=usage,position=pos,repeat=max_use,syntax=syntax), ) for c in segmentNode.childNodes: @@ -374,7 +376,7 @@ def buildSegment( self, segmentNode, context, nesting=0 ): def buildLoop( self, loopNode, context, nesting=0 ): """Loop contains Segments and Loops. Empty Loops create a warning, and are dropped. - + :param loopNode: a :mod:`xml.dom` Element with a name of :samp:`loop` :param context: The Loop which contains this Loop or Segment. :param nesting: The current nesting level used to indent the log messages. @@ -386,11 +388,11 @@ def buildLoop( self, loopNode, context, nesting=0 ): usage= self.getChildTextValue( loopNode, "usage" ) pos= self.getChildTextValue( loopNode, "pos" ) repeat= self.getChildTextValue( loopNode, "repeat" ) - self.log.debug( "%*sLoop xid %r type %r: name %r usage %r pos %r repear %r", + self.log.debug( "%*sLoop xid %r type %r: name %r usage %r pos %r repeat %r", nesting*2, '', loopXid, loopType, name, usage, pos, repeat ) theLoop= Loop( loopXid, - Properties(desc=name,req_sit=usage,pos=pos,repeat=repeat,looptype=loopType), + Properties(desc=name,req_sit=usage,position=pos,repeat=repeat,looptype=loopType), ) for c in loopNode.childNodes: @@ -409,10 +411,10 @@ def buildLoop( self, loopNode, context, nesting=0 ): warnings.warn( EmptyLoopWarning("Empty Loop %r" % (theLoop,) ) ) # optimize this out of existence else: - context.append( theLoop ) + context.append(theLoop) def build( self, xmlDoc, name=None ): """Build the overall :class:`X12.parse.Message` parser. - + :param xmlDoc: a :class:`XMLParser` which has parsed the data, codes and message structure documents. :param name: Optional name of the Message to build; this will use @@ -443,7 +445,7 @@ def getChildTextValue( self, aNode, name ): """Examines all children with the given name and extracts the text nodes for those children. It accumulates the nodeValues for those text nodes. - + :param aNode: an :mod:`xml.dom` Element. :param name: a node name underneath the given node. """ @@ -466,25 +468,25 @@ def __init__( self ): self.doc= None def data( self, name_or_file ): """Parses the data element definition XML file. - + :param fileName: name of the data element file, usually :file:`dataele.xml` """ self.dataeleDoc= DOM.parse( name_or_file ) def codes( self, name_or_file ): """Parses the external codes definition XML file. - + :param fileName: name of the external codes file, usually :file:`codes.xml` """ self.codesDoc= DOM.parse( name_or_file ) def read( self, name_or_file ): """Parses the message structure XML file. - + :param fileName: the name of a message structure file. """ self.doc= DOM.parse( name_or_file ) def dump( self, aDoc ): """Prints a dump of an XML document to stdout. - + :param aDoc: an :mod:`xml.dom` Node (usually the top-level Document). """ nodeNames= set() @@ -527,7 +529,7 @@ def convertFile(xml_file, data_ele_file, codes_file): def convertAll( baseDir ): """Convert all :file:`nnn*.4010.X*.xml` files in the given directory. - + :param baseDir: Directory with message definition, dataele and codes files. """ for path,dirs,names in os.walk(baseDir): @@ -537,7 +539,7 @@ def convertAll( baseDir ): def writeFile(aFile, name, x12, structure="flat"): """Write the x12 python module to a file. - + :param aFile: Filename of destination file. :type aFile: String :param name: The name of the generated class. @@ -552,7 +554,7 @@ def writeFile(aFile, name, x12, structure="flat"): x12.visit( pyMap ) pySrc= pyMap.getSource() with open(aFile, 'w') as f: - f.write("#\n# Generated by TigerShark.tools.convertPyX12 on %s\n#\n" % + f.write("#\n# Generated by TigerShark.tools.convertPyX12 on %s\n#\n" % datetime.now()) f.write( pySrc ) f.write( '\n\n' ) @@ -590,4 +592,4 @@ def writeFile(aFile, name, x12, structure="flat"): else: name = args.py_file.rsplit('/', 1)[1] name = name.split('.', 1)[0] - writeFile(args.base_dir, args.py_file, name, x12, args.structure) + writeFile(args.py_file, name, x12, args.structure) diff --git a/tigershark/tools/utils.py b/tigershark/tools/utils.py index 14055bd..5825cdc 100644 --- a/tigershark/tools/utils.py +++ b/tigershark/tools/utils.py @@ -1,3 +1,4 @@ +from __future__ import print_function from tigershark.X12 import message diff --git a/tigershark/util.py b/tigershark/util.py new file mode 100644 index 0000000..27f3985 --- /dev/null +++ b/tigershark/util.py @@ -0,0 +1,57 @@ +from tigershark.facade import get_facade +from tigershark.facade.control import ControlHeaders +from tigershark.parsers import SimpleParser +from tigershark.parsers import parse_control_headers + + +def identify_simple_x12(x12_contents): + """ + Return (transaction set id, version tuple) for simple X12. + + Simple X12 has only one kind of transaction set and one version. + + :param x12_contents: A string with X12 content. + :returns: (transaction set id, version_tuple) + :raises ValueError: If we cannot find any transaction set. + :raises ValueError: If we find more than one kind of transaction set + or version. + :raises ParseError: If the X12 cannot be parsed. + """ + identifers = set() # (transaction set id, version tuple) + + headers = ControlHeaders(parse_control_headers(x12_contents)) + + for control in headers.interchange_controls: + for group in control.functional_groups: + for transaction_set in group.transaction_sets: + identifers.add(( + transaction_set.transaction_set_identifier_code, + group.version_tuple)) + + if not identifers: + raise ValueError('No transaction sets') + elif len(identifers) > 1: + raise ValueError('Multiple kinds of transaction sets.', identifers) + else: + return identifers.pop() + + +def apply_facade_to_simple_x12(x12_contents): + """ + Identify, parse, and apply a facade to simple X12. + + If the X12 can be identified and parsed, the appropriate + Facade is applied and returned. + + :param x12_contents: A string with X12 content. + :returns: A Facade instance. + :raises ValueError: If we cannot find any transaction set. + :raises ValueError: If we find more than one kind of transaction set + or version. + :raises ValueError: If we cannot find an appropriate Facade. + :raises ParseError: If the X12 cannot be parsed. + """ + transaction_set_id, version_tuple = identify_simple_x12(x12_contents) + parser = SimpleParser(transaction_set_id, version_tuple) + x12 = parser.unmarshall(x12_contents) + return get_facade(transaction_set_id, version_tuple)(x12) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..ef1ac0a --- /dev/null +++ b/tox.ini @@ -0,0 +1,9 @@ +[tox] +envlist = py27,py35 + +[testenv] +usedevelop = True +commands = + py.test tests +deps = + pytest \ No newline at end of file diff --git a/web/claims/models.py b/web/claims/models.py index ce46f20..7e95a50 100755 --- a/web/claims/models.py +++ b/web/claims/models.py @@ -1,765 +1,765 @@ -#!/usr/bin/env python -"""Definitions of persistent parts of an X12 message. - -An X12 message instance is a recursive construction of Loops, sub-Loops and Segments. -The leaf elements are always Segments. Segments contain, in turn, Composites -and Elements. - -There are a number of operations on a Message. - - - Unmarshalling ("parsing"). This is done by an instance of classes - defined in the :mod:`X12.parse` package. The results of parsing is a - Message Instance, built from classes in this module. - - - Marshalling. Each message can marshall itself into a block - of text. - - - Persisting. Since the message instance is build from subclasses - of :mod:`django.db.models.Model`, a call to :meth:`save()` persists - the message. - - - Retrieving. The :mod:`X12Message.objects` manager can retreive any - Message. Ordinary navigation will fetch Loops and Segments for that - Message. - -This must be changed in two ways to stop using DB-generated PK's. - - - XXX - introduce an application-defined PK, - at the Message level as the 1st part of all keys in a message structure. - - - XXX - introduce a 2nd part to the key generated by the :class:`Factory` or - the :class:`X12Message` rather than the key created by the database. - -Navigation -========== - -Look at :mod:`X12.message` for the XPath-like navigation model. -This leads to a number of navgiation-oriented methods being folded into the -class definitions. - -Module Contents -=============== - -Here are the class definitions within this module. - - - :class:`X12Message`. The overall message -- a collection of Loops. - - - :class:`X12Loop`. A Loop is a collection of Segments and sub-Loops. - In a SQL implementation, a Loop has an FK to the owning Message, as well - as an FK to its immediate parent Loop. Top-level Loops, which belong - directly to the Message have a NULL parent. - - - Some Loops are "wrappers": a degenerate case that contain one Segment - and no subLoops. This allows a Loop to contain a proper collection of - Loops. - - - Some Loops are "explicit": a properly named Loop which contains - explicit subloops or wrapper loops around. - - - :class:`X12Segment`. A Segment is a collection of Elements and Composites. - Segments names are essentially a type name; there can be multiple instances - within a single Loop, each with different semantics. In a SQL implementation, - a Segment has an FK to the owning Message, as well as an FK to the - immediate parent Loop. - - - X12Composite. A Composite is a collection of Elements. This is - not actually implemented. It is merely attributes of a Segment. - - - X12Element. An atomic piece of data. These are identified - positionally within a segment's source text. -""" -from X12.parse import SegmentToken -import X12.message -from django.db import models -from django.conf import settings -import logging - -try: - debug= settings.MODEL_DEBUG -except AttributeError: - debug= False - -logger= logging.getLogger( __name__ ) - -class Factory( X12.message.Factory ): - """Create Django versions of the X12Message structures. - - This object is used by an :mod:`X12.parse` to unmarshall message - text and create Django objects. - """ - @staticmethod - def makeMessage( name, *structure ): - """Create a new X12Message object. - - :param name: name of this Message - :param structure: the various Loops of this Message - :returns: X12Message instance - """ - msg= X12Message( name=name ) - msg.save() - for part in structure: - msg.addChild( part ) - part.save() - return msg - @staticmethod - def makeLoop( name, *structure ): - """Create a new X12Loop object. - - :param name: name of this Loop - :param structure: the various sub-Loops and Segments of this Loop - :returns: X12Loop instance - """ - loop= X12Loop( name=name ) - loop.save() - for part in structure: - loop.addChild( part ) - part.save() - return loop - @staticmethod - def makeSegment( segmentToken, compositeSep=":", segmentType=None ): - """Create a Segment from a SegmentToken and an Segment definition. - - Another application can extend this data model to include - Segment-type specific classes. That application will - provide it's own Factory, which is a subclass of this Factory, - and will override this method to handle Segment-specific bindings. - - :param segmentToken: An :class:`X12.parse.SegmentToken` instance: - a list-like collection of Element values. It turns out that a simple - list of values may also work, if it does NOT have trailing empty - items omitted. Real Segment Tokens can have trailing empty items - omitted. - :param compositeSep: Composite internal separator from the ISA segment. - :param segmentType: An :class:`X12.parse.Segment` instance, which - defines the Elements and Composites of this X12Segment. - :returns: X12Segment instance - """ - seg= X12Segment( name=segmentToken[0], text=repr(segmentToken) ) - if segmentType is not None: - seg.bind( segmentType ) - seg.save() - return seg - -class Location( models.Model ): - """A named 'location' for a claim, usually geographic, but also possibly - a line of business. Often this is a constraint on - members or providers associated with a claim. - - :ivar name: short name of the location - :ivar description: long description of the location - """ - name = models.CharField( max_length=16, unique=True ) - description = models.CharField( max_length=96, blank=True, null=True ) - def __str__( self ): - return self.name - class Admin: - pass - -class ClaimType( models.Model ): - """The subtype of the :samp:`837` claim - Professional, Institutional, Dental. - - :ivar name: short name of the claim type (usually 1 character) - :ivar description: long name of the claim type - """ - name = models.CharField( max_length=8, unique=True ) - description = models.CharField( max_length=32, blank=True, null=True ) - def __str__( self ): - return self.name - class Admin: - pass - -class SecondaryCoverage( models.Model ): - """Any secondary coverage in the claim. - - :ivar name: short name of the secondary coverage. - :ivar description: long name of the secondary coverage. - """ - name = models.CharField( max_length=16, unique=True ) - description = models.CharField( max_length=96, blank=True, null=True ) - def __str__( self ): - return self.name - class Admin: - pass - -class Benefit( models.Model ): - """The primary benefit for this claim. - - :ivar benefit: short name of the benefit - :ivar description: long description of the benefit. - """ - benefit = models.CharField( max_length=16, unique=True ) - description= models.TextField( max_length=96, blank=True, null=True ) - def __str__( self ): - return self.benefit - class Admin: - list_display = ( 'benefit', 'description' ) - -class TypeOfService( models.Model ): - """The type of service associated with this benefit. - A benefit may have more than one type of service. - The :py:data:`fullName` is the "benefit / type of service" string. - - XXX - needs validator: TOS is just unique for a given benefit, not - globally unique. - - :ivar benefit: the associated benefit - :ivar typeOfService: short name of the type of service - :ivar description: long description of the type of service. - """ - benefit = models.ForeignKey( Benefit ) - typeOfService = models.CharField( max_length=16, unique=True ) - description = models.TextField( max_length=96, blank=True, null=True ) - def __str__( self ): - return self.fullName() - def shortName( self ): - return "%s-%s" % ( self.benefit.benefit, self.typeOfService ) - shortName.short_description = "Short Name" - def fullName( self ): - ben = self.benefit.description if self.benefit.description is not None else self.benefit.benefit - tos = self.description if self.description is not None else self.typeOfService - return "%s / %s" % ( ben, tos ) - fullName.short_description = "Full Description" - class Meta: - verbose_name_plural = 'Types of service' - class Admin: - list_display = ( 'benefit', 'typeOfService', 'fullName', ) - list_display_links = ( 'typeOfService', ) - -class GroupStatus( models.Model ): - """The status of a claim group. - This defines what processing is allowed for claim group. - Claims in a :samp:`Base` group, for instance, cannot be changed. - Other status may have additional or different features. - - :ivar name: short status string - :ivar description: definition of the status - :ivar can_change: can claims in this group be changed? - """ - name= models.CharField( max_length=16, unique=True ) - description= models.CharField( max_length=96, blank=True, null=True ) - can_change = models.BooleanField( default=True ) - def __str__( self ): - return self.description - class Meta: - verbose_name_plural= 'GroupStatus' - class Admin: - list_display = ( 'name', 'description', 'can_change' ) - -class ClaimGroup( models.Model ): - """A Group of claims. A group of claims has a status - which collects groups together for different kinds of testing. - A group also may have a dynamic processing state which reflects - whether or not it has been sent to the claim processing system. - - :ivar name: name of the claim group. :samp:`Base` claims have - a system-supplied default name. All other claim status - have user-supplied names. - :ivar description: long description of this claim group. - :ivar status: the Group Status for this Claim Group. - :ivar owner: the User who created this Claim group. - :ivar created: the datetime of creation of this group definition. - :ivar modified: the datetime of modification of the group definition. - """ - name= models.CharField( max_length=64, unique=True ) - description= models.TextField( blank=True, null=True ) - status= models.ForeignKey( GroupStatus ) - owner= models.CharField( max_length=16 ) # XXX - FK to auth.Users? - created= models.DateTimeField( auto_now_add=True ) - modified= models.DateTimeField( auto_now=True ) - def count( self ): - return self.x12message_set.count() - count.short_description= 'Count' - def __str__( self ): - return self.name - class Admin: - list_display= ( 'name', 'description', 'status', 'owner', 'count', ) - list_display_links= ( 'name', ) - list_filter= ( 'name', 'status', 'owner', ) - -class ClaimProperties( models.Model ): - """Selected properties of a claim. - XXX - add source system. - - :ivar claimType: one of the defined L{ClaimType}s for this claim - :ivar secondaryCoverage: one of the defined L{SecondaryCoverage}s for this claim - :ivar location: one of the defined L{Location}s for this claim - :ivar typeOfService: one of the define L{TypeOfService}s for this claim - :ivar created: creation datetime for this property - :ivar modified: modification datetime for this property - """ - claimType= models.ForeignKey( ClaimType ) - secondaryCoverage= models.ForeignKey( SecondaryCoverage ) - location= models.ForeignKey( Location ) - typeOfService= models.ForeignKey( TypeOfService ) - created= models.DateTimeField( auto_now_add=True ) - modified= models.DateTimeField( auto_now=True ) - def shortName( self ): - return "%s/%s/%s/%s" % ( - self.claimType.name, self.secondaryCoverage.name, - self.location.name, self.typeOfService.shortName() ) - def fullName( self ): - return "%s | %s | %s | %s" % ( - self.claimType.description, self.secondaryCoverage.description, - self.location.description, self.typeOfService.fullName() ) - def __str__( self ): - return self.fullName() - class Meta: - verbose_name_plural = 'Claim properties' - class Admin: - list_display= ( 'claimType', 'secondaryCoverage', 'location', 'benefit', 'typeOfService', 'count' ) - list_display_links= ( 'count', ) - list_filter= ( 'claimType', 'secondaryCoverage', 'location', 'typeOfService', ) - def benefit( self ): - return self.typeOfService.benefit - benefit.short_description= 'Benefit' - def count( self ): - return self.x12message_set.count() - count.short_description= 'Count' - -class X12Message( models.Model ): - """An overall X12 Message: essentially a collection of Loops. - To depict a unique message we can display unique internal identifiers - tucked away inside the X12 structure, or the Database-assigned ID field, - or an external identifier assigned at load time. - - Two of these are relatively unpleasant. - - It's challenging to provide the internal identifiers for a message - since a message is assembled in pieces. We don't have the ISA - segment or BHT segment until long after the message was initially - created and assigned a internal ID. - - The internal DB ID is assigned by the save() operation, making it difficult - to build a message from the top down. We have to save the empty X12Message - row in order to correctly associate X12Loops with it. Then we have to - save the X12Loops to correctly associate X12Segment instances. - - Therefore, we require a unique message ID to be supplied at load time. - This is the physical PK -- a DB defined PK is not used. Each Loop - gets a PK generated by our application, not a DB-defined PK, so that - we can build an entire message structure before deciding to persist it. - - :ivar name: Name of this message. XXX - replace with ID as PK. - :ivar properties: Claim Properties for this message. - """ - name= models.CharField( max_length=32, editable=False ) - group= models.ForeignKey( ClaimGroup, blank=True, null=True ) - properties= models.ForeignKey( ClaimProperties, blank=True, null=True, ) - created= models.DateTimeField( auto_now_add=True ) - modified= models.DateTimeField( auto_now=True ) - class Admin: - list_display= ( 'getISAid', 'getBHTid', ) - def __init__( self, *arg, **kw ): - super( X12Message, self ).__init__( *arg, **kw ) - self.thePosition= 0 - def __str__( self ): - return "%s %s" % ( self.name, ", ".join( map(str,self.x12loop_set.all()) ) ) - def getISAid( self ): - """Try to get ID information from the ISA segment. - ISA09 + ISA10 + ISA13 provide date, time and an ID.""" - try: - isa= self.descendant( 'segment', "ISA" )[0] - return ( isa.getByPos(9), isa.getByPos(10), isa.getByPos(13) ) - except Exception, e: - logger.exception( "getISAid" ) - return None - getISAid.short_description = 'ISA Date, Time and ID' - def getBHTid( self ): - """Try to get ID information from the BHT segment. - BHT03 might be a unique ID.""" - try: - bht= self.descendant( 'segment', "BHT" )[0] - return bht.getByPos(3) - except Exception, e: - logger.exception( "getBHTid" ) - return None - getBHTid.short_description = 'BHT Segment ID' - def segs( self ): - """Create the flat list of Segments under this Message. - - :returns: list of X12Segment instances. - """ - segList= [] - for p in self.x12loop_set.all(): - segList.extend( p.segs() ) - return segList - def marshall( self, segSep="~", eltSep="*" ): - """Marshall this message into an X12 string. - - :param segSep: (optional) Segment Terminator, usually :samp:`~` - :param eltSep: (optional) Element Separator, usually :samp:`*` - :returns: String with this X12 message marshalled - """ - segments= self.segs() - return segSep.join( [ s.marshall(eltSep) for s in segments ] ) + segSep - def addChild( self, aLoop ): - """Add a loop to this Message. - - :param aLoop: an X12Loop instance. - """ - self.save() - aLoop.message= self - aLoop.thePosition= self.x12loop_set.count() + 1 - aLoop.theParent= None - self.x12loop_set.add( aLoop ) - aLoop.save() - def matches( self, test, name=None, pos= None ): - """The Xpath self axis""" - testType= _test2type[test.lower()] - if isinstance(self, testType ): - c1, c2 = True, True - if name is not None: - c1= self.name == name - if pos is not None: - c2= self.thePosition == pos - return c1 and c2 - return False - def child( self, test, name=None, pos=None ): - result= [] - for part in self.x12loop_set.filter( theParent__isnull = True ): - aMatch= part.matches( test, name, pos ) - if aMatch: - result.append( part ) - return result - def descendant( self, test, name=None, pos=None ): - result= [] - for part in self.x12loop_set.filter( theParent__isnull = True ): - if part.matches( test, name, pos ): - result.append( part ) - result.extend( part.descendant(test,name,pos) ) - return result - def parent( self, test, name=None, pos=None ): - return [] - def ancestor( self, test, name=None, pos=None ): - return [] - -class TestConstraints( models.Model ): - """The constraints that define how to modify this claim - for unit test purposes. - - :ivar gender: allowed member genders. - :ivar age_low: minimum member age. - :ivar age_high: maximum member age. - """ - gender= models.CharField( max_length=8 ) # XXX - Choices- M, F, U - age_low= models.PositiveIntegerField( default=16 ) - age_high= models.PositiveIntegerField( default=125 ) - message = models.OneToOneField( X12Message, related_name='constraints' ) - def __str__( self ): - return "%s | %s-%s" % ( self.gender, self.age_low, self.age_high ) - class Meta: - verbose_name_plural = 'Test constraints' - class Admin: - list_display= ( 'gender', 'age_low', 'age_high', ) - list_filter= ( 'gender', 'age_low', 'age_high', ) - -class X12Loop( models.Model ): - """A Loop in an X12 message; it contains either subLoops or a Segment. - A Loop which contains a Segment is a "Wrapper" and has no other information. - A Loop which contains subloops is "Explicit" and has a name and could have - other attributes. - - :ivar name: Name of this Loop - :ivar kind: Kind of loop: either 'W' for wrappers or 'E' for explicit - :ivar message: The Message to which this Loop belongs. - This is set by addChild. - :ivar sequenceMessage: the sequence of this Loop within the overall Message. - *XXX - not fully supported.* - :ivar parent: the parent Loop (or None) if this is a top loop in a message. - This is set by addChild. - :ivar thePosition: the sequence of this Loop within the parent. - This is set by addChild. - :ivar occurrence: the occurrence of this Loop type within a parent loop. - This is set by the parser when handling multiple occurrences of loops or - segments. - - .. todo:: Admin interface for message children should be admin.StackedInline. - """ - LOOP_KINDS = ( ('W','Wrapper'), ('E','Explicit') ) - name = models.CharField( max_length=16, blank=True, null=True ) - kind = models.CharField( max_length=8, choices=LOOP_KINDS, default='E' ) - message = models.ForeignKey( X12Message, blank=True, null=True ) - messagePosition = models.PositiveIntegerField( default=0 ) - theParent = models.ForeignKey( 'self', blank=True, null=True, related_name='subloop_set' ) - thePosition = models.PositiveIntegerField( default=0 ) - occurrence= models.PositiveIntegerField( default=0 ) - class Admin: - pass - class Meta: - ordering = [ 'thePosition', ] - def children( self ): - """Returns the list of meaningful children -- supressing unnamed Wrapper Loops. - :returns: list of X12Loops mingled with X12Segments in the correct order. - """ - structure= [] - for p in self.subloop_set.all(): - if p.kind == "W": - structure.extend( p.x12segment_set.all() ) - else: - structure.append( p ) - return structure - def __str__( self ): - return "%s : ( %s )" % ( - self.name, - ", ".join(map(str,self.children())) ) - def segs( self ): - """Create a flat list of Segments under this Loop. - This is the list of segments used for marshalling this message. - - :returns: list of X12Segments. - """ - segList= [] - for p in self.subloop_set.all(): - if p.kind == "W": - # Skip over Wrappers and pull up their lonely Segment - segList.extend( p.x12segment_set.all() ) - else: - # Expand SubLoops - segList.extend( p.segs() ) - return segList - def addChild( self, part ): - """Add either a Segment or a Loop to this Loop, setting overal - message, parent and position of this child. - - X12Segments can only be added under "Wrapper" Loops, where - Loops can be added directly to Loops. Consequently, we need - to delegate the work to the part. X12Segments will - check for a wrapper; X12Loops will simply add themselves. - - NOTE. Can't add children unless the parent has a DB ID, which - is assigned at SAVE time; hence, an initial save. - - :param part: the X12Segment or X12Loop to add to this Loop. - """ - self.save() - part.addToParent( self ) - part.save() - def addToParent( self, parent ): - """Adds ourself to a parent Explicit Loop. - An X12Segment will do this in a different way; a Segment must - assure that it's being added to a Wrapper loop. We're an X12Loop, - however, and can add ourself to Explicit loops, only. - - :param parent: the parent loop to which we're adding ourself. - """ - if debug: - logger.debug( "X12Loop: adding Loop %r to Loop %s %s" % ( self, parent.name, parent.kind ) ) - if parent.kind == "W": - raise Error( "Problem: Attempt to a subLoop to a wrapper" ) - self.message= parent.message - self.thePosition=parent.subloop_set.count() + 1 - parent.subloop_set.add( self ) - def segmentWrapper( self ): - """Returns a Wrapper X12Loop for a Segment to add itself to. - If we are a Wrapper loop, we return ourself. - If we are an Explicit loop, we need to add a Wrapper and then - return that Wrapper. - - :returns: X12Loop of kind=="W" - """ - if self.kind == "W": - # We are a wrapper loop, all we can contain is this X12Segment - assert self.subloop_set.count() == 0 - return self - elif self.kind == "E": - # We are an explicit loop, all we can contain are subloops - # We must add a "wrapper" Loop for this X12Segment - wrapper= X12Loop( - name=None, kind="W", message=self.message, - thePosition= self.subloop_set.count() + 1 - ) - wrapper.save() - self.subloop_set.add( wrapper ) - assert self.x12segment_set.count() == 0 - return wrapper - else: - raise Error( "Invalid Loop.kind") - def matches( self, test, name=None, pos= None ): - """The Xpath self axis""" - testType= _test2type[test.lower()] - if isinstance(self, testType ): - c1, c2 = True, True - if name is not None: - c1= self.name == name - if pos is not None: - c2= self.thePosition == pos - return c1 and c2 - return False - def child( self, test, name=None, pos=None ): - result= [] - for part in self.subloop_set.all( ): - if part.kind == "W": # Wrappers need to be treated as Segments - part= part.x12segment_set.all()[0] - aMatch= part.matches( test, name, pos ) - if aMatch: - result.append( part ) - return result - def descendant( self, test, name=None, pos=None ): - result= [] - for part in self.subloop_set.all( ): - if part.kind == "W": # Wrappers need to be treated as Segments - part= part.x12segment_set.all()[0] - if part.matches( test, name, pos ): - result.append( part ) - result.extend( part.descendant(test,name,pos) ) - return result - def parent( self, test, name=None, pos=None ): - result= [] - if self.theParent.matches( test, name, pos ): - result.append( self.theParent ) - return result - def ancestor( self, test, name=None, pos=None ): - result= [] - if self.theParent: - if self.theParent.matches( test, name, pos ): - result.append( self.theParent ) - result.extend( self.theParent.ancestor(test,name,pos) ) - return result - -class X12Segment( models.Model ): - """A generic segment in an X12 message, created by a parser from a segmentToken. - Type-specific Segments will have a 1:1 relationship with this - Segment, but will have detailed Element definitions instead of this - generic definition. - - To make this generic version work, we store the entire :class:`X12.parse.SegmentToken` - as a big-ole block of text in the database. Methods within this object - unpack the text block to access individual Elements. Further, if a change - is made, the text block is repacked from the element list. - - We could use a Django Custom Field definition for this. It would make - the conversion back and forth between list and database-friendly String - transparent. - - :ivar elements: internal list of elements derived from self.text. - :ivar segType: internal reference to :class:`X12.parse.Segment` definition. - :ivar name: Name of this Segment - :ivar text: SegmentToken text for this segment. - :ivar message: top-most Message which contains this Segment - :ivar sequence: Message sequence of this Segment within the overall Message. - :ivar loop: parent Loop for this Segment. Must be a Wrapper kind of Loop. - :ivar occurrence: Occurrence of this segment type within the parent Loop. - """ - name = models.CharField( max_length=16 ) - text = models.TextField( max_length=512 ) - message= models.ForeignKey( X12Message, blank=True, null=True ) - messagePosition = models.PositiveIntegerField( default=0 ) - loop= models.ForeignKey( X12Loop, blank=True, null=True ) - occurrence= models.PositiveIntegerField( default= 0 ) - def __init__( self, *arg, **kw ): - """Initialize the internal variables: element and segType.""" - super( X12Segment, self ).__init__(*arg,**kw) - self.elements= None - self.segType= None - def __str__( self ): - return str( self.text ) - def bind( self, segment ): - """Bind an :class:`X12.parse.Segment` to this data. - - :param segment: An :class:`X12.parse.Segment` instance - """ - self.segType= segment - def segs( self ): - """Returns this Segment in a list, consistent with X12Loop and X12Message.""" - return [ self ] - def getByPos( self, position ): - """Get the value of an Element by the position number. - - :param position: position of the Element - :returns: string value of the Element. - """ - if self.elements is None: - self.elements= eval(self.text) - return self.elements[int(position)] - def setByPos( self, position, value ): - """Set the value of an Element by the position number. - This updates the text attribute of the persistent object. - - :param position: position of the Element - :param value: String value to replace - """ - if self.elements is None: - self.elements= eval(self.text) - while len(self.elements) <= int(position): - self.elements.append("") - self.elements[int(position)]= value - self.text= repr(self.elements) - def positionOf( self, name ): - """Returns the position of a named Element. - This only works if this X12Segment is bound to an :class:`X12.parse.Segment`. - - :param name: Element name - :returns: numberic position of this Element. - """ - if self.segType is None: - raise NotImplementedError( "No Segment bound to this data." ) - for en in range(len(self.segType.structure)): - if name == self.segType.structure[en].name: - return en+1 - raise ValueError( "Name %s Is Unknown in Segment %s" % ( name, self.name )) - def getByName( self, name ): - """Get the value of an Element by the element name. - This only works if this X12Segment is bound to an :class:`X12.parse.Segment`. - - :param name: name of the Element - :returns: string value of the Element. - """ - return self.getByPos( self.positionOf(name) ) - def marshall( self, eltSep="*" ): - """Marshalls this Segment's elements as a text string. - - :returns: String value of this Segment. - """ - if self.elements is None: - self.elements= eval(self.text) - while len(self.elements[-1]) == 0: - del self.elements[-1] - txt= eltSep.join( self.elements ) - self.elements= None - return txt - def addToParent( self, parentLoop ): - """X12Segment adding itself to a parent Wrapper Loop. - Or -- if the parent is Explicit -- adding the needed Wrapper. - We ask the parent for the "segmentWrapper": if the parent is a - Wrapper, that's what is returned; if the parent is Explicit, - the parent inserts the necessary wrapper and returns the wrapper. - - :param parentLoop: parent X12Loop to which we must add ourself. - """ - if debug: - logger.debug( "X12Loop: adding Segment %r to Loop %s %s" % ( self, parentLoop.name, parentLoop.kind ) ) - self.message= parentLoop.message - addTo= parentLoop.segmentWrapper() - self.thePosition= addTo.thePosition - addTo.x12segment_set.add( self ) - def matches( self, test, name=None, pos= None ): - """The Xpath self axis""" - testType= _test2type[test.lower()] - if isinstance(self, testType ): - c1, c2 = True, True - if name is not None: - c1= self.name == name - if pos is not None: - c2= self.loop.thePosition == pos - return c1 and c2 - return False - def parent( self, test, name=None, pos=None ): - # Immediate parent is a Wrapper, grand-parent is an Explicit loop - result= [] - if self.loop.theParent.matches( test, name, pos ): - result.append( self.loop.theParent ) - return result - def ancestor( self, test, name=None, pos=None ): - # Immediate parent is a Wrapper, grand-parent is an Explicit loop - result= [] - if self.loop.theParent: - if self.loop.theParent.matches( test, name, pos ): - result.append( self.loop.theParent ) - result.extend( self.loop.theParent.ancestor(test,name,pos) ) - return result - def child( self, test, name=None, pos=None ): - return [] - def descendant( self, test, name=None, pos=None ): - return [] - -_test2type = { "loop" : X12Loop, "segment" : X12Segment, "message" : X12Message } +#!/usr/bin/env python +"""Definitions of persistent parts of an X12 message. + +An X12 message instance is a recursive construction of Loops, sub-Loops and Segments. +The leaf elements are always Segments. Segments contain, in turn, Composites +and Elements. + +There are a number of operations on a Message. + + - Unmarshalling ("parsing"). This is done by an instance of classes + defined in the :mod:`X12.parse` package. The results of parsing is a + Message Instance, built from classes in this module. + + - Marshalling. Each message can marshall itself into a block + of text. + + - Persisting. Since the message instance is build from subclasses + of :mod:`django.db.models.Model`, a call to :meth:`save()` persists + the message. + + - Retrieving. The :mod:`X12Message.objects` manager can retreive any + Message. Ordinary navigation will fetch Loops and Segments for that + Message. + +This must be changed in two ways to stop using DB-generated PK's. + + - XXX - introduce an application-defined PK, + at the Message level as the 1st part of all keys in a message structure. + + - XXX - introduce a 2nd part to the key generated by the :class:`Factory` or + the :class:`X12Message` rather than the key created by the database. + +Navigation +========== + +Look at :mod:`X12.message` for the XPath-like navigation model. +This leads to a number of navgiation-oriented methods being folded into the +class definitions. + +Module Contents +=============== + +Here are the class definitions within this module. + + - :class:`X12Message`. The overall message -- a collection of Loops. + + - :class:`X12Loop`. A Loop is a collection of Segments and sub-Loops. + In a SQL implementation, a Loop has an FK to the owning Message, as well + as an FK to its immediate parent Loop. Top-level Loops, which belong + directly to the Message have a NULL parent. + + - Some Loops are "wrappers": a degenerate case that contain one Segment + and no subLoops. This allows a Loop to contain a proper collection of + Loops. + + - Some Loops are "explicit": a properly named Loop which contains + explicit subloops or wrapper loops around. + + - :class:`X12Segment`. A Segment is a collection of Elements and Composites. + Segments names are essentially a type name; there can be multiple instances + within a single Loop, each with different semantics. In a SQL implementation, + a Segment has an FK to the owning Message, as well as an FK to the + immediate parent Loop. + + - X12Composite. A Composite is a collection of Elements. This is + not actually implemented. It is merely attributes of a Segment. + + - X12Element. An atomic piece of data. These are identified + positionally within a segment's source text. +""" +from X12.parse import SegmentToken +import X12.message +from django.db import models +from django.conf import settings +import logging + +try: + debug= settings.MODEL_DEBUG +except AttributeError: + debug= False + +logger= logging.getLogger( __name__ ) + +class Factory( X12.message.Factory ): + """Create Django versions of the X12Message structures. + + This object is used by an :mod:`X12.parse` to unmarshall message + text and create Django objects. + """ + @staticmethod + def makeMessage( name, *structure ): + """Create a new X12Message object. + + :param name: name of this Message + :param structure: the various Loops of this Message + :returns: X12Message instance + """ + msg= X12Message( name=name ) + msg.save() + for part in structure: + msg.addChild( part ) + part.save() + return msg + @staticmethod + def makeLoop( name, *structure ): + """Create a new X12Loop object. + + :param name: name of this Loop + :param structure: the various sub-Loops and Segments of this Loop + :returns: X12Loop instance + """ + loop= X12Loop( name=name ) + loop.save() + for part in structure: + loop.addChild( part ) + part.save() + return loop + @staticmethod + def makeSegment( segmentToken, compositeSep=":", segmentType=None ): + """Create a Segment from a SegmentToken and an Segment definition. + + Another application can extend this data model to include + Segment-type specific classes. That application will + provide it's own Factory, which is a subclass of this Factory, + and will override this method to handle Segment-specific bindings. + + :param segmentToken: An :class:`X12.parse.SegmentToken` instance: + a list-like collection of Element values. It turns out that a simple + list of values may also work, if it does NOT have trailing empty + items omitted. Real Segment Tokens can have trailing empty items + omitted. + :param compositeSep: Composite internal separator from the ISA segment. + :param segmentType: An :class:`X12.parse.Segment` instance, which + defines the Elements and Composites of this X12Segment. + :returns: X12Segment instance + """ + seg= X12Segment( name=segmentToken[0], text=repr(segmentToken) ) + if segmentType is not None: + seg.bind( segmentType ) + seg.save() + return seg + +class Location( models.Model ): + """A named 'location' for a claim, usually geographic, but also possibly + a line of business. Often this is a constraint on + members or providers associated with a claim. + + :ivar name: short name of the location + :ivar description: long description of the location + """ + name = models.CharField( max_length=16, unique=True ) + description = models.CharField( max_length=96, blank=True, null=True ) + def __str__( self ): + return self.name + class Admin: + pass + +class ClaimType( models.Model ): + """The subtype of the :samp:`837` claim - Professional, Institutional, Dental. + + :ivar name: short name of the claim type (usually 1 character) + :ivar description: long name of the claim type + """ + name = models.CharField( max_length=8, unique=True ) + description = models.CharField( max_length=32, blank=True, null=True ) + def __str__( self ): + return self.name + class Admin: + pass + +class SecondaryCoverage( models.Model ): + """Any secondary coverage in the claim. + + :ivar name: short name of the secondary coverage. + :ivar description: long name of the secondary coverage. + """ + name = models.CharField( max_length=16, unique=True ) + description = models.CharField( max_length=96, blank=True, null=True ) + def __str__( self ): + return self.name + class Admin: + pass + +class Benefit( models.Model ): + """The primary benefit for this claim. + + :ivar benefit: short name of the benefit + :ivar description: long description of the benefit. + """ + benefit = models.CharField( max_length=16, unique=True ) + description= models.TextField( max_length=96, blank=True, null=True ) + def __str__( self ): + return self.benefit + class Admin: + list_display = ( 'benefit', 'description' ) + +class TypeOfService( models.Model ): + """The type of service associated with this benefit. + A benefit may have more than one type of service. + The :py:data:`fullName` is the "benefit / type of service" string. + + XXX - needs validator: TOS is just unique for a given benefit, not + globally unique. + + :ivar benefit: the associated benefit + :ivar typeOfService: short name of the type of service + :ivar description: long description of the type of service. + """ + benefit = models.ForeignKey( Benefit ) + typeOfService = models.CharField( max_length=16, unique=True ) + description = models.TextField( max_length=96, blank=True, null=True ) + def __str__( self ): + return self.fullName() + def shortName( self ): + return "%s-%s" % ( self.benefit.benefit, self.typeOfService ) + shortName.short_description = "Short Name" + def fullName( self ): + ben = self.benefit.description if self.benefit.description is not None else self.benefit.benefit + tos = self.description if self.description is not None else self.typeOfService + return "%s / %s" % ( ben, tos ) + fullName.short_description = "Full Description" + class Meta: + verbose_name_plural = 'Types of service' + class Admin: + list_display = ( 'benefit', 'typeOfService', 'fullName', ) + list_display_links = ( 'typeOfService', ) + +class GroupStatus( models.Model ): + """The status of a claim group. + This defines what processing is allowed for claim group. + Claims in a :samp:`Base` group, for instance, cannot be changed. + Other status may have additional or different features. + + :ivar name: short status string + :ivar description: definition of the status + :ivar can_change: can claims in this group be changed? + """ + name= models.CharField( max_length=16, unique=True ) + description= models.CharField( max_length=96, blank=True, null=True ) + can_change = models.BooleanField( default=True ) + def __str__( self ): + return self.description + class Meta: + verbose_name_plural= 'GroupStatus' + class Admin: + list_display = ( 'name', 'description', 'can_change' ) + +class ClaimGroup( models.Model ): + """A Group of claims. A group of claims has a status + which collects groups together for different kinds of testing. + A group also may have a dynamic processing state which reflects + whether or not it has been sent to the claim processing system. + + :ivar name: name of the claim group. :samp:`Base` claims have + a system-supplied default name. All other claim status + have user-supplied names. + :ivar description: long description of this claim group. + :ivar status: the Group Status for this Claim Group. + :ivar owner: the User who created this Claim group. + :ivar created: the datetime of creation of this group definition. + :ivar modified: the datetime of modification of the group definition. + """ + name= models.CharField( max_length=64, unique=True ) + description= models.TextField( blank=True, null=True ) + status= models.ForeignKey( GroupStatus ) + owner= models.CharField( max_length=16 ) # XXX - FK to auth.Users? + created= models.DateTimeField( auto_now_add=True ) + modified= models.DateTimeField( auto_now=True ) + def count( self ): + return self.x12message_set.count() + count.short_description= 'Count' + def __str__( self ): + return self.name + class Admin: + list_display= ( 'name', 'description', 'status', 'owner', 'count', ) + list_display_links= ( 'name', ) + list_filter= ( 'name', 'status', 'owner', ) + +class ClaimProperties( models.Model ): + """Selected properties of a claim. + XXX - add source system. + + :ivar claimType: one of the defined L{ClaimType}s for this claim + :ivar secondaryCoverage: one of the defined L{SecondaryCoverage}s for this claim + :ivar location: one of the defined L{Location}s for this claim + :ivar typeOfService: one of the define L{TypeOfService}s for this claim + :ivar created: creation datetime for this property + :ivar modified: modification datetime for this property + """ + claimType= models.ForeignKey( ClaimType ) + secondaryCoverage= models.ForeignKey( SecondaryCoverage ) + location= models.ForeignKey( Location ) + typeOfService= models.ForeignKey( TypeOfService ) + created= models.DateTimeField( auto_now_add=True ) + modified= models.DateTimeField( auto_now=True ) + def shortName( self ): + return "%s/%s/%s/%s" % ( + self.claimType.name, self.secondaryCoverage.name, + self.location.name, self.typeOfService.shortName() ) + def fullName( self ): + return "%s | %s | %s | %s" % ( + self.claimType.description, self.secondaryCoverage.description, + self.location.description, self.typeOfService.fullName() ) + def __str__( self ): + return self.fullName() + class Meta: + verbose_name_plural = 'Claim properties' + class Admin: + list_display= ( 'claimType', 'secondaryCoverage', 'location', 'benefit', 'typeOfService', 'count' ) + list_display_links= ( 'count', ) + list_filter= ( 'claimType', 'secondaryCoverage', 'location', 'typeOfService', ) + def benefit( self ): + return self.typeOfService.benefit + benefit.short_description= 'Benefit' + def count( self ): + return self.x12message_set.count() + count.short_description= 'Count' + +class X12Message( models.Model ): + """An overall X12 Message: essentially a collection of Loops. + To depict a unique message we can display unique internal identifiers + tucked away inside the X12 structure, or the Database-assigned ID field, + or an external identifier assigned at load time. + + Two of these are relatively unpleasant. + + It's challenging to provide the internal identifiers for a message + since a message is assembled in pieces. We don't have the ISA + segment or BHT segment until long after the message was initially + created and assigned a internal ID. + + The internal DB ID is assigned by the save() operation, making it difficult + to build a message from the top down. We have to save the empty X12Message + row in order to correctly associate X12Loops with it. Then we have to + save the X12Loops to correctly associate X12Segment instances. + + Therefore, we require a unique message ID to be supplied at load time. + This is the physical PK -- a DB defined PK is not used. Each Loop + gets a PK generated by our application, not a DB-defined PK, so that + we can build an entire message structure before deciding to persist it. + + :ivar name: Name of this message. XXX - replace with ID as PK. + :ivar properties: Claim Properties for this message. + """ + name= models.CharField( max_length=32, editable=False ) + group= models.ForeignKey( ClaimGroup, blank=True, null=True ) + properties= models.ForeignKey( ClaimProperties, blank=True, null=True, ) + created= models.DateTimeField( auto_now_add=True ) + modified= models.DateTimeField( auto_now=True ) + class Admin: + list_display= ( 'getISAid', 'getBHTid', ) + def __init__( self, *arg, **kw ): + super( X12Message, self ).__init__( *arg, **kw ) + self.thePosition= 0 + def __str__( self ): + return "%s %s" % ( self.name, ", ".join( map(str,self.x12loop_set.all()) ) ) + def getISAid( self ): + """Try to get ID information from the ISA segment. + ISA09 + ISA10 + ISA13 provide date, time and an ID.""" + try: + isa= self.descendant( 'segment', "ISA" )[0] + return ( isa.getByPos(9), isa.getByPos(10), isa.getByPos(13) ) + except Exception as e: + logger.exception( "getISAid" ) + return None + getISAid.short_description = 'ISA Date, Time and ID' + def getBHTid( self ): + """Try to get ID information from the BHT segment. + BHT03 might be a unique ID.""" + try: + bht= self.descendant( 'segment', "BHT" )[0] + return bht.getByPos(3) + except Exception as e: + logger.exception( "getBHTid" ) + return None + getBHTid.short_description = 'BHT Segment ID' + def segs( self ): + """Create the flat list of Segments under this Message. + + :returns: list of X12Segment instances. + """ + segList= [] + for p in self.x12loop_set.all(): + segList.extend( p.segs() ) + return segList + def marshall( self, segSep="~", eltSep="*" ): + """Marshall this message into an X12 string. + + :param segSep: (optional) Segment Terminator, usually :samp:`~` + :param eltSep: (optional) Element Separator, usually :samp:`*` + :returns: String with this X12 message marshalled + """ + segments= self.segs() + return segSep.join( [ s.marshall(eltSep) for s in segments ] ) + segSep + def addChild( self, aLoop ): + """Add a loop to this Message. + + :param aLoop: an X12Loop instance. + """ + self.save() + aLoop.message= self + aLoop.thePosition= self.x12loop_set.count() + 1 + aLoop.theParent= None + self.x12loop_set.add( aLoop ) + aLoop.save() + def matches( self, test, name=None, pos= None ): + """The Xpath self axis""" + testType= _test2type[test.lower()] + if isinstance(self, testType ): + c1, c2 = True, True + if name is not None: + c1= self.name == name + if pos is not None: + c2= self.thePosition == pos + return c1 and c2 + return False + def child( self, test, name=None, pos=None ): + result= [] + for part in self.x12loop_set.filter( theParent__isnull = True ): + aMatch= part.matches( test, name, pos ) + if aMatch: + result.append( part ) + return result + def descendant( self, test, name=None, pos=None ): + result= [] + for part in self.x12loop_set.filter( theParent__isnull = True ): + if part.matches( test, name, pos ): + result.append( part ) + result.extend( part.descendant(test,name,pos) ) + return result + def parent( self, test, name=None, pos=None ): + return [] + def ancestor( self, test, name=None, pos=None ): + return [] + +class TestConstraints( models.Model ): + """The constraints that define how to modify this claim + for unit test purposes. + + :ivar gender: allowed member genders. + :ivar age_low: minimum member age. + :ivar age_high: maximum member age. + """ + gender= models.CharField( max_length=8 ) # XXX - Choices- M, F, U + age_low= models.PositiveIntegerField( default=16 ) + age_high= models.PositiveIntegerField( default=125 ) + message = models.OneToOneField( X12Message, related_name='constraints' ) + def __str__( self ): + return "%s | %s-%s" % ( self.gender, self.age_low, self.age_high ) + class Meta: + verbose_name_plural = 'Test constraints' + class Admin: + list_display= ( 'gender', 'age_low', 'age_high', ) + list_filter= ( 'gender', 'age_low', 'age_high', ) + +class X12Loop( models.Model ): + """A Loop in an X12 message; it contains either subLoops or a Segment. + A Loop which contains a Segment is a "Wrapper" and has no other information. + A Loop which contains subloops is "Explicit" and has a name and could have + other attributes. + + :ivar name: Name of this Loop + :ivar kind: Kind of loop: either 'W' for wrappers or 'E' for explicit + :ivar message: The Message to which this Loop belongs. + This is set by addChild. + :ivar sequenceMessage: the sequence of this Loop within the overall Message. + *XXX - not fully supported.* + :ivar parent: the parent Loop (or None) if this is a top loop in a message. + This is set by addChild. + :ivar thePosition: the sequence of this Loop within the parent. + This is set by addChild. + :ivar occurrence: the occurrence of this Loop type within a parent loop. + This is set by the parser when handling multiple occurrences of loops or + segments. + + .. todo:: Admin interface for message children should be admin.StackedInline. + """ + LOOP_KINDS = ( ('W','Wrapper'), ('E','Explicit') ) + name = models.CharField( max_length=16, blank=True, null=True ) + kind = models.CharField( max_length=8, choices=LOOP_KINDS, default='E' ) + message = models.ForeignKey( X12Message, blank=True, null=True ) + messagePosition = models.PositiveIntegerField( default=0 ) + theParent = models.ForeignKey( 'self', blank=True, null=True, related_name='subloop_set' ) + thePosition = models.PositiveIntegerField( default=0 ) + occurrence= models.PositiveIntegerField( default=0 ) + class Admin: + pass + class Meta: + ordering = [ 'thePosition', ] + def children( self ): + """Returns the list of meaningful children -- supressing unnamed Wrapper Loops. + :returns: list of X12Loops mingled with X12Segments in the correct order. + """ + structure= [] + for p in self.subloop_set.all(): + if p.kind == "W": + structure.extend( p.x12segment_set.all() ) + else: + structure.append( p ) + return structure + def __str__( self ): + return "%s : ( %s )" % ( + self.name, + ", ".join(map(str,self.children())) ) + def segs( self ): + """Create a flat list of Segments under this Loop. + This is the list of segments used for marshalling this message. + + :returns: list of X12Segments. + """ + segList= [] + for p in self.subloop_set.all(): + if p.kind == "W": + # Skip over Wrappers and pull up their lonely Segment + segList.extend( p.x12segment_set.all() ) + else: + # Expand SubLoops + segList.extend( p.segs() ) + return segList + def addChild( self, part ): + """Add either a Segment or a Loop to this Loop, setting overal + message, parent and position of this child. + + X12Segments can only be added under "Wrapper" Loops, where + Loops can be added directly to Loops. Consequently, we need + to delegate the work to the part. X12Segments will + check for a wrapper; X12Loops will simply add themselves. + + NOTE. Can't add children unless the parent has a DB ID, which + is assigned at SAVE time; hence, an initial save. + + :param part: the X12Segment or X12Loop to add to this Loop. + """ + self.save() + part.addToParent( self ) + part.save() + def addToParent( self, parent ): + """Adds ourself to a parent Explicit Loop. + An X12Segment will do this in a different way; a Segment must + assure that it's being added to a Wrapper loop. We're an X12Loop, + however, and can add ourself to Explicit loops, only. + + :param parent: the parent loop to which we're adding ourself. + """ + if debug: + logger.debug( "X12Loop: adding Loop %r to Loop %s %s" % ( self, parent.name, parent.kind ) ) + if parent.kind == "W": + raise Error( "Problem: Attempt to a subLoop to a wrapper" ) + self.message= parent.message + self.thePosition=parent.subloop_set.count() + 1 + parent.subloop_set.add( self ) + def segmentWrapper( self ): + """Returns a Wrapper X12Loop for a Segment to add itself to. + If we are a Wrapper loop, we return ourself. + If we are an Explicit loop, we need to add a Wrapper and then + return that Wrapper. + + :returns: X12Loop of kind=="W" + """ + if self.kind == "W": + # We are a wrapper loop, all we can contain is this X12Segment + assert self.subloop_set.count() == 0 + return self + elif self.kind == "E": + # We are an explicit loop, all we can contain are subloops + # We must add a "wrapper" Loop for this X12Segment + wrapper= X12Loop( + name=None, kind="W", message=self.message, + thePosition= self.subloop_set.count() + 1 + ) + wrapper.save() + self.subloop_set.add( wrapper ) + assert self.x12segment_set.count() == 0 + return wrapper + else: + raise Error( "Invalid Loop.kind") + def matches( self, test, name=None, pos= None ): + """The Xpath self axis""" + testType= _test2type[test.lower()] + if isinstance(self, testType ): + c1, c2 = True, True + if name is not None: + c1= self.name == name + if pos is not None: + c2= self.thePosition == pos + return c1 and c2 + return False + def child( self, test, name=None, pos=None ): + result= [] + for part in self.subloop_set.all( ): + if part.kind == "W": # Wrappers need to be treated as Segments + part= part.x12segment_set.all()[0] + aMatch= part.matches( test, name, pos ) + if aMatch: + result.append( part ) + return result + def descendant( self, test, name=None, pos=None ): + result= [] + for part in self.subloop_set.all( ): + if part.kind == "W": # Wrappers need to be treated as Segments + part= part.x12segment_set.all()[0] + if part.matches( test, name, pos ): + result.append( part ) + result.extend( part.descendant(test,name,pos) ) + return result + def parent( self, test, name=None, pos=None ): + result= [] + if self.theParent.matches( test, name, pos ): + result.append( self.theParent ) + return result + def ancestor( self, test, name=None, pos=None ): + result= [] + if self.theParent: + if self.theParent.matches( test, name, pos ): + result.append( self.theParent ) + result.extend( self.theParent.ancestor(test,name,pos) ) + return result + +class X12Segment( models.Model ): + """A generic segment in an X12 message, created by a parser from a segmentToken. + Type-specific Segments will have a 1:1 relationship with this + Segment, but will have detailed Element definitions instead of this + generic definition. + + To make this generic version work, we store the entire :class:`X12.parse.SegmentToken` + as a big-ole block of text in the database. Methods within this object + unpack the text block to access individual Elements. Further, if a change + is made, the text block is repacked from the element list. + + We could use a Django Custom Field definition for this. It would make + the conversion back and forth between list and database-friendly String + transparent. + + :ivar elements: internal list of elements derived from self.text. + :ivar segType: internal reference to :class:`X12.parse.Segment` definition. + :ivar name: Name of this Segment + :ivar text: SegmentToken text for this segment. + :ivar message: top-most Message which contains this Segment + :ivar sequence: Message sequence of this Segment within the overall Message. + :ivar loop: parent Loop for this Segment. Must be a Wrapper kind of Loop. + :ivar occurrence: Occurrence of this segment type within the parent Loop. + """ + name = models.CharField( max_length=16 ) + text = models.TextField( max_length=512 ) + message= models.ForeignKey( X12Message, blank=True, null=True ) + messagePosition = models.PositiveIntegerField( default=0 ) + loop= models.ForeignKey( X12Loop, blank=True, null=True ) + occurrence= models.PositiveIntegerField( default= 0 ) + def __init__( self, *arg, **kw ): + """Initialize the internal variables: element and segType.""" + super( X12Segment, self ).__init__(*arg,**kw) + self.elements= None + self.segType= None + def __str__( self ): + return str( self.text ) + def bind( self, segment ): + """Bind an :class:`X12.parse.Segment` to this data. + + :param segment: An :class:`X12.parse.Segment` instance + """ + self.segType= segment + def segs( self ): + """Returns this Segment in a list, consistent with X12Loop and X12Message.""" + return [ self ] + def getByPos( self, position ): + """Get the value of an Element by the position number. + + :param position: position of the Element + :returns: string value of the Element. + """ + if self.elements is None: + self.elements= eval(self.text) + return self.elements[int(position)] + def setByPos( self, position, value ): + """Set the value of an Element by the position number. + This updates the text attribute of the persistent object. + + :param position: position of the Element + :param value: String value to replace + """ + if self.elements is None: + self.elements= eval(self.text) + while len(self.elements) <= int(position): + self.elements.append("") + self.elements[int(position)]= value + self.text= repr(self.elements) + def positionOf( self, name ): + """Returns the position of a named Element. + This only works if this X12Segment is bound to an :class:`X12.parse.Segment`. + + :param name: Element name + :returns: numberic position of this Element. + """ + if self.segType is None: + raise NotImplementedError( "No Segment bound to this data." ) + for en in range(len(self.segType.structure)): + if name == self.segType.structure[en].name: + return en+1 + raise ValueError( "Name %s Is Unknown in Segment %s" % ( name, self.name )) + def getByName( self, name ): + """Get the value of an Element by the element name. + This only works if this X12Segment is bound to an :class:`X12.parse.Segment`. + + :param name: name of the Element + :returns: string value of the Element. + """ + return self.getByPos( self.positionOf(name) ) + def marshall( self, eltSep="*" ): + """Marshalls this Segment's elements as a text string. + + :returns: String value of this Segment. + """ + if self.elements is None: + self.elements= eval(self.text) + while len(self.elements[-1]) == 0: + del self.elements[-1] + txt= eltSep.join( self.elements ) + self.elements= None + return txt + def addToParent( self, parentLoop ): + """X12Segment adding itself to a parent Wrapper Loop. + Or -- if the parent is Explicit -- adding the needed Wrapper. + We ask the parent for the "segmentWrapper": if the parent is a + Wrapper, that's what is returned; if the parent is Explicit, + the parent inserts the necessary wrapper and returns the wrapper. + + :param parentLoop: parent X12Loop to which we must add ourself. + """ + if debug: + logger.debug( "X12Loop: adding Segment %r to Loop %s %s" % ( self, parentLoop.name, parentLoop.kind ) ) + self.message= parentLoop.message + addTo= parentLoop.segmentWrapper() + self.thePosition= addTo.thePosition + addTo.x12segment_set.add( self ) + def matches( self, test, name=None, pos= None ): + """The Xpath self axis""" + testType= _test2type[test.lower()] + if isinstance(self, testType ): + c1, c2 = True, True + if name is not None: + c1= self.name == name + if pos is not None: + c2= self.loop.thePosition == pos + return c1 and c2 + return False + def parent( self, test, name=None, pos=None ): + # Immediate parent is a Wrapper, grand-parent is an Explicit loop + result= [] + if self.loop.theParent.matches( test, name, pos ): + result.append( self.loop.theParent ) + return result + def ancestor( self, test, name=None, pos=None ): + # Immediate parent is a Wrapper, grand-parent is an Explicit loop + result= [] + if self.loop.theParent: + if self.loop.theParent.matches( test, name, pos ): + result.append( self.loop.theParent ) + result.extend( self.loop.theParent.ancestor(test,name,pos) ) + return result + def child( self, test, name=None, pos=None ): + return [] + def descendant( self, test, name=None, pos=None ): + return [] + +_test2type = { "loop" : X12Loop, "segment" : X12Segment, "message" : X12Message } diff --git a/web/claims/resetTOS.py b/web/claims/resetTOS.py index 051867b..ca5d7ba 100755 --- a/web/claims/resetTOS.py +++ b/web/claims/resetTOS.py @@ -1,43 +1,43 @@ -#!/usr/bin/env python -"""Reset the Type of Service. -""" -from __future__ import print_function -from web.claims.models import Benefit, TypeOfService -import csv - -def resetTOS( source= "sql/typeofservice.csv" ): - print( "resetTOS.py", source ) - - # Remove old Type Of Service definitions - print( "Removing", TypeOfService.objects.count() ) - TypeOfService.objects.all().delete() - - # Open CSV file and load TOS's - with open( source, "rb" ) as tosFile: - tosRdr= csv.DictReader( tosFile ) - count= 0 - error= 0 - for row in tosRdr: - try: - benefit= Benefit.objects.get( benefit=row['benefit'] ) - tos= benefit.typeofservice_set.create( - typeOfService=row['typeofservice'], - description=row['description']) - tos.save() - count += 1 - except Benefit.DoesNotExist, e: - print( "?", row['benefit'] ) - error += 1 - except Benefit.MultipleObjectsReturned, e: - print( "*", row['benefit'] ) - error += 1 - - # Final Counts - print( "Loaded", count ) - if error > 0: - print( "Errors on ", error ) - - print( "There are now", TypeOfService.objects.count() ) - -if __name__ == "__main__": - resetTOS() +#!/usr/bin/env python +"""Reset the Type of Service. +""" +from __future__ import print_function +from web.claims.models import Benefit, TypeOfService +import csv + +def resetTOS( source= "sql/typeofservice.csv" ): + print( "resetTOS.py", source ) + + # Remove old Type Of Service definitions + print( "Removing", TypeOfService.objects.count() ) + TypeOfService.objects.all().delete() + + # Open CSV file and load TOS's + with open( source, "rb" ) as tosFile: + tosRdr= csv.DictReader( tosFile ) + count= 0 + error= 0 + for row in tosRdr: + try: + benefit= Benefit.objects.get( benefit=row['benefit'] ) + tos= benefit.typeofservice_set.create( + typeOfService=row['typeofservice'], + description=row['description']) + tos.save() + count += 1 + except Benefit.DoesNotExist as e: + print( "?", row['benefit'] ) + error += 1 + except Benefit.MultipleObjectsReturned as e: + print( "*", row['benefit'] ) + error += 1 + + # Final Counts + print( "Loaded", count ) + if error > 0: + print( "Errors on ", error ) + + print( "There are now", TypeOfService.objects.count() ) + +if __name__ == "__main__": + resetTOS() diff --git a/web/claims/views.py b/web/claims/views.py index 3ad1490..98865e3 100755 --- a/web/claims/views.py +++ b/web/claims/views.py @@ -1,212 +1,212 @@ -#!/usr/bin/env python -"""Claims view functions. -""" -from django.http import HttpResponse -from django.views.decorators.csrf import csrf_exempt -from web.claims.models import ( - X12Message, Factory, Location, ClaimType, SecondaryCoverage, - Benefit, TypeOfService, ClaimProperties, TestConstraints, ClaimGroup, - GroupStatus, - ) -import json -import logging, sys -import X12.parse -from web.claims.parse import parser - -logging.basicConfig( stream= sys.stderr ) -logger = logging.getLogger( __name__ ) - -def home( request ): - return HttpResponse("Claims Home Page.") - -@csrf_exempt -def load( request ): - """POST request with claim, claim_id, properties, constraints. - - The POST request has four parameters: - - :claim: is the X12-encoded message. - :claim_id: is the user-assigned unique ID for this claim. - :properties: is a JSON-encoded Properties object for this claim. - :constraints: is a JSON-encoded TestConstraint object for this claim. - """ - if request.method == 'POST': - claim= request.POST['claim'] - claim_id= request.POST['claim_id'] - prop_json= request.POST.get('properties',{}) - properties= json.loads( prop_json ) - cons_json= request.POST.get('constraints',{}) - constraints= json.loads( cons_json ) - try: - loader= Loader(parser) # Could be a different configuration - msg= loader.load( claim, claim_id, properties, constraints ) - response= {'claim': msg.marshall(), 'claim_id':msg.name, - 'group_name':msg.group.name, 'message':None} - return HttpResponse( content=json.dumps(response), status=201, content_type='application/json' ) - except Exception as e: - logger.exception( "claims.views.load") - return HttpResponse( content=json.dumps(repr(e)), status=404, content_type='application/json' ) - raise Http404 - -def fetch( request, claim_id ): - """GET request with claim_id. - - Fetch a given claim from the database. Marshall it as an X12 message. - - :param claimID: the claim identifier provided when the claim was loaded. - :return: status tuple ( status, message ) - """ - try: - claim= X12Message.objects.get( name=claim_id ) - if claim: - object= { 'claim_id': claim_id, 'claim': claim.marshall(), 'message': None } - status= 200 - else: - object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } - status= 404 - except X12Message.DoesNotExist, e: - object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } - status= 404 - except Exception, e: - logger.exception( e ) - object= { 'claim_id': claim_id, 'claim': None, 'message': "Internal Error %r" % ( claim_id ) } - status= 500 - - return HttpResponse( content=json.dumps(object), status=status, content_type='application/json' ) - - -class Loader( object ): - """Load generic claims. - Loading a claim, creates the associated properties, - test constraints, and a default group that claims are loaded to. - """ - def __init__( self, parser ): - """Initialize an instance of Loader.""" - self.log= logging.getLogger( "web.claims.views.Loader" ) - self.parser= parser - def _conformProperties( self, properties ): - """Conform the given set of properties attributes to a :class:`ClaimProperties` - object. This will either get an existing properties object or create a new - properties object. - The argument value must be a dictionary with the following attributes: - - - ``TYPE`` - this must resolve to a name in the :class:`ClaimType` table. - - - ``SECONDARY`` - this must resolve to a name in the :class:`SecondaryCoverage` table. - - - ``LOCATION`` - This must resolve to a name in the :class:`Location` table. - - - ``BENEFIT`` - this must resolve to a name in the :class:`Benefit` table. - - - ``TYPE-OF-SERVICE`` - this is paired with Benefit to locate a row in the - :class:`TypeOfService` table. - - :param properties: a dictionary with attributes for the properties. - :return: A ClaimProperties object. - """ - self.log.debug( "ClaimProperties: %r", properties ) - if properties is not None: - loc, status= Location.objects.get_or_create( name = properties["LOCATION"] ) - ct, status= ClaimType.objects.get_or_create( name = properties["TYPE"] ) - sc, status= SecondaryCoverage.objects.get_or_create( name = properties["SECONDARY"] ) - ben, status= Benefit.objects.get_or_create( benefit=properties["BENEFIT"]) - tos, status= TypeOfService.objects.get_or_create( benefit=ben, typeOfService=properties["TYPE-OF-SERVICE"] ) - props, status = ClaimProperties.objects.get_or_create( - claimType= ct, - secondaryCoverage= sc, - location= loc, - typeOfService= tos, ) - return props - def _defaultGroup( self, properties, user="Owner" ): - """Loading always allocates a default group, based on the ClaimProperties, - user and a fixed :class:`GroupStatus` of ``Base``. - """ - claimProperties= self._conformProperties( properties ) - group, status = ClaimGroup.objects.get_or_create( - name=claimProperties.shortName(), - description=claimProperties.fullName(), - status= GroupStatus.objects.get(name='Base'), - owner=user, - ) - return group - def _conformConstraints( self, x12message, constraints ): - """Conform the given set of properties attributes to an :class:`TestConstraints` - object. This will either get an existing constraints object or create a new - constraints object. - - The argument value must be a dictionary with the following attributes: - - - ``GENDER`` - This must resolve to a name in the :class:`Location` table. - - - ``AGE-FROM`` - this must resolve to a name in the :class:`ClaimType` table. - - - ``AGE-TO`` - this must resolve to a name in the :class:`SecondaryCoverage` table. - - :param constraints: a dictionary with attributes for the constraints. - :return: An TestConstraints object. - """ - self.log.debug( "TestConstraints: %r", constraints ) - if constraints is not None: - tcons, status = TestConstraints.objects.get_or_create( - gender= constraints["GENDER"], - age_low= constraints["AGE-FROM"], - age_high= constraints["AGE-TO"], - message= x12message) - return tcons - def load( self, claim, claimID, properties, constraints ): - """Load a Claim, conforming it with ClaimProperties and TestConstraints. - A generic parser defined - in :mod:`X12.parse` is tried to - parse the message. If the message can be parsed, the resulting object - is persisted in the database, associated with the given properties - and constraints. - - Note that the properties and constraints are conformed into several - different dimensions. If there are unique values in the attributes, - new rows will be created in the dimension tables. If this is not - intended, there are two choices: - - - Validate the constraints against the dimensions outside - this service. - - - Report the new values in the dimension to the users and - have them reassign the dimension values. This seems - like needless work, but it turns out to be simpler because - it gets fewer rejections and helps users discover and respond - to changes in the baseline claim-processing system. - - XXX - get actual user as an argument -- it's originally in the request. - - :param claim: source text for a generic X12 claim. - :param claimID: a unique identifier for this claim. - :param properties: dictionary of properties attributes, - used by :meth:`_conformProperties` - :param constraints: dictionary of automod constrain attributes, - used by :meth:`_conformConstraints` - :return: the Claim loaded or an exception - """ - self.log.debug( "X12Message: %r", claim ) - try: - msg= self.parser.unmarshall( claim, Factory ) - msg.name= claimID - msg.properties= self._conformProperties( properties ) - msg.group= self._defaultGroup( properties, "Owner" ) - msg.save() - self._conformConstraints( msg, constraints ) - self.log.debug( "Parser %s loaded %s", self.parser.desc, claimID ) - return msg - except X12.parse.ParseError, e: - # If we break trying to recognize the GS, then we're using the wrong parser - messageDesc, parser, segments = e.args - if segments is not None and segments[0][0] == 'GS': - self.log.debug( "Message didn't match %s", messageDesc ) - else: - # This is a more serious problem with message or parser. - self.log.error( "Error in parser %s", parser ) - e.log( log ) - self.log.warning( "Could not parse %r", claim ) - raise - except Exception, e: - # This is a non-parser error: it's some kind of bug. - self.log.error( "*** %r", e ) - raise +#!/usr/bin/env python +"""Claims view functions. +""" +from django.http import HttpResponse +from django.views.decorators.csrf import csrf_exempt +from web.claims.models import ( + X12Message, Factory, Location, ClaimType, SecondaryCoverage, + Benefit, TypeOfService, ClaimProperties, TestConstraints, ClaimGroup, + GroupStatus, + ) +import json +import logging, sys +import X12.parse +from web.claims.parse import parser + +logging.basicConfig( stream= sys.stderr ) +logger = logging.getLogger( __name__ ) + +def home( request ): + return HttpResponse("Claims Home Page.") + +@csrf_exempt +def load( request ): + """POST request with claim, claim_id, properties, constraints. + + The POST request has four parameters: + + :claim: is the X12-encoded message. + :claim_id: is the user-assigned unique ID for this claim. + :properties: is a JSON-encoded Properties object for this claim. + :constraints: is a JSON-encoded TestConstraint object for this claim. + """ + if request.method == 'POST': + claim= request.POST['claim'] + claim_id= request.POST['claim_id'] + prop_json= request.POST.get('properties',{}) + properties= json.loads( prop_json ) + cons_json= request.POST.get('constraints',{}) + constraints= json.loads( cons_json ) + try: + loader= Loader(parser) # Could be a different configuration + msg= loader.load( claim, claim_id, properties, constraints ) + response= {'claim': msg.marshall(), 'claim_id':msg.name, + 'group_name':msg.group.name, 'message':None} + return HttpResponse( content=json.dumps(response), status=201, content_type='application/json' ) + except Exception as e: + logger.exception( "claims.views.load") + return HttpResponse( content=json.dumps(repr(e)), status=404, content_type='application/json' ) + raise Http404 + +def fetch( request, claim_id ): + """GET request with claim_id. + + Fetch a given claim from the database. Marshall it as an X12 message. + + :param claimID: the claim identifier provided when the claim was loaded. + :return: status tuple ( status, message ) + """ + try: + claim= X12Message.objects.get( name=claim_id ) + if claim: + object= { 'claim_id': claim_id, 'claim': claim.marshall(), 'message': None } + status= 200 + else: + object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } + status= 404 + except X12Message.DoesNotExist as e: + object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } + status= 404 + except Exception as e: + logger.exception( e ) + object= { 'claim_id': claim_id, 'claim': None, 'message': "Internal Error %r" % ( claim_id ) } + status= 500 + + return HttpResponse( content=json.dumps(object), status=status, content_type='application/json' ) + + +class Loader( object ): + """Load generic claims. + Loading a claim, creates the associated properties, + test constraints, and a default group that claims are loaded to. + """ + def __init__( self, parser ): + """Initialize an instance of Loader.""" + self.log= logging.getLogger( "web.claims.views.Loader" ) + self.parser= parser + def _conformProperties( self, properties ): + """Conform the given set of properties attributes to a :class:`ClaimProperties` + object. This will either get an existing properties object or create a new + properties object. + The argument value must be a dictionary with the following attributes: + + - ``TYPE`` - this must resolve to a name in the :class:`ClaimType` table. + + - ``SECONDARY`` - this must resolve to a name in the :class:`SecondaryCoverage` table. + + - ``LOCATION`` - This must resolve to a name in the :class:`Location` table. + + - ``BENEFIT`` - this must resolve to a name in the :class:`Benefit` table. + + - ``TYPE-OF-SERVICE`` - this is paired with Benefit to locate a row in the + :class:`TypeOfService` table. + + :param properties: a dictionary with attributes for the properties. + :return: A ClaimProperties object. + """ + self.log.debug( "ClaimProperties: %r", properties ) + if properties is not None: + loc, status= Location.objects.get_or_create( name = properties["LOCATION"] ) + ct, status= ClaimType.objects.get_or_create( name = properties["TYPE"] ) + sc, status= SecondaryCoverage.objects.get_or_create( name = properties["SECONDARY"] ) + ben, status= Benefit.objects.get_or_create( benefit=properties["BENEFIT"]) + tos, status= TypeOfService.objects.get_or_create( benefit=ben, typeOfService=properties["TYPE-OF-SERVICE"] ) + props, status = ClaimProperties.objects.get_or_create( + claimType= ct, + secondaryCoverage= sc, + location= loc, + typeOfService= tos, ) + return props + def _defaultGroup( self, properties, user="Owner" ): + """Loading always allocates a default group, based on the ClaimProperties, + user and a fixed :class:`GroupStatus` of ``Base``. + """ + claimProperties= self._conformProperties( properties ) + group, status = ClaimGroup.objects.get_or_create( + name=claimProperties.shortName(), + description=claimProperties.fullName(), + status= GroupStatus.objects.get(name='Base'), + owner=user, + ) + return group + def _conformConstraints( self, x12message, constraints ): + """Conform the given set of properties attributes to an :class:`TestConstraints` + object. This will either get an existing constraints object or create a new + constraints object. + + The argument value must be a dictionary with the following attributes: + + - ``GENDER`` - This must resolve to a name in the :class:`Location` table. + + - ``AGE-FROM`` - this must resolve to a name in the :class:`ClaimType` table. + + - ``AGE-TO`` - this must resolve to a name in the :class:`SecondaryCoverage` table. + + :param constraints: a dictionary with attributes for the constraints. + :return: An TestConstraints object. + """ + self.log.debug( "TestConstraints: %r", constraints ) + if constraints is not None: + tcons, status = TestConstraints.objects.get_or_create( + gender= constraints["GENDER"], + age_low= constraints["AGE-FROM"], + age_high= constraints["AGE-TO"], + message= x12message) + return tcons + def load( self, claim, claimID, properties, constraints ): + """Load a Claim, conforming it with ClaimProperties and TestConstraints. + A generic parser defined + in :mod:`X12.parse` is tried to + parse the message. If the message can be parsed, the resulting object + is persisted in the database, associated with the given properties + and constraints. + + Note that the properties and constraints are conformed into several + different dimensions. If there are unique values in the attributes, + new rows will be created in the dimension tables. If this is not + intended, there are two choices: + + - Validate the constraints against the dimensions outside + this service. + + - Report the new values in the dimension to the users and + have them reassign the dimension values. This seems + like needless work, but it turns out to be simpler because + it gets fewer rejections and helps users discover and respond + to changes in the baseline claim-processing system. + + XXX - get actual user as an argument -- it's originally in the request. + + :param claim: source text for a generic X12 claim. + :param claimID: a unique identifier for this claim. + :param properties: dictionary of properties attributes, + used by :meth:`_conformProperties` + :param constraints: dictionary of automod constrain attributes, + used by :meth:`_conformConstraints` + :return: the Claim loaded or an exception + """ + self.log.debug( "X12Message: %r", claim ) + try: + msg= self.parser.unmarshall( claim, Factory ) + msg.name= claimID + msg.properties= self._conformProperties( properties ) + msg.group= self._defaultGroup( properties, "Owner" ) + msg.save() + self._conformConstraints( msg, constraints ) + self.log.debug( "Parser %s loaded %s", self.parser.desc, claimID ) + return msg + except X12.parse.ParseError as e: + # If we break trying to recognize the GS, then we're using the wrong parser + messageDesc, parser, segments = e.args + if segments is not None and segments[0][0] == 'GS': + self.log.debug( "Message didn't match %s", messageDesc ) + else: + # This is a more serious problem with message or parser. + self.log.error( "Error in parser %s", parser ) + e.log( log ) + self.log.warning( "Could not parse %r", claim ) + raise + except Exception as e: + # This is a non-parser error: it's some kind of bug. + self.log.error( "*** %r", e ) + raise diff --git a/web/claims_837/claim_spike.py b/web/claims_837/claim_spike.py index 67454a9..703d1bb 100755 --- a/web/claims_837/claim_spike.py +++ b/web/claims_837/claim_spike.py @@ -1,29 +1,30 @@ -""" -A function which applies the :mod:`claims` module -to the :mod:`web.claims_837` structure. -This allows a developer to implement the user's view of a :mod:`Claim` -as navigation through the X12 message parsed by :func:`web.claims_837.parse_837i`. -""" -from __future__ import print_function -from claims import Claim -from parse import parse_837i - - -if __name__ == "__main__": - with open( "../test/837I-Patient-NotSubscriber.txt", "rU" ) as claim: - src= claim.read() - msg= parse_837i.unmarshall( src ) - c= Claim(msg) - print( c.patient[0].loop ) - print( c.patient[0] ) - print( c.patient[0].addr1, c.patient[0].addr2, c.patient[0].city, c.patient[0].state, c.patient[0].zip ) - print( 'DOB:', c.patient[0].dob, 'SEX:', c.patient[0].sex, 'SSN:', c.patient[0].ssn, 'REL:', c.patient[0].rel ) - print( c.provider[0], c.provider[0].phone ) - print( c.submitter[0].loop ) - print( c.submitter[0].last, c.submitter[0].first, c.submitter[0].phone ) - print( "Notes:", c.claimDetails[0].billNote, c.claimDetails[0].claimNotes ) - print( "prin diag code:", c.claimDetails[0].prinDiagCode ) - print( "admit code:", c.claimDetails[0].admitDiagCd ) - print( "Cond Codes:", c.claimDetails[0].condCode ) - print( "Occr Codes:", c.claimDetails[0].occrCode ) - print( "Paperwork: ", c.claimDetails[0].paperwork ) +""" +A function which applies the :mod:`claims` module +to the :mod:`web.claims_837` structure. +This allows a developer to implement the user's view of a :mod:`Claim` +as navigation through the X12 message parsed by :func:`web.claims_837.parse_837i`. +""" +from __future__ import print_function +from __future__ import absolute_import +from claims import Claim +from .parse import parse_837i + + +if __name__ == "__main__": + with open( "../test/837I-Patient-NotSubscriber.txt", "rU" ) as claim: + src= claim.read() + msg= parse_837i.unmarshall( src ) + c= Claim(msg) + print( c.patient[0].loop ) + print( c.patient[0] ) + print( c.patient[0].addr1, c.patient[0].addr2, c.patient[0].city, c.patient[0].state, c.patient[0].zip ) + print( 'DOB:', c.patient[0].dob, 'SEX:', c.patient[0].sex, 'SSN:', c.patient[0].ssn, 'REL:', c.patient[0].rel ) + print( c.provider[0], c.provider[0].phone ) + print( c.submitter[0].loop ) + print( c.submitter[0].last, c.submitter[0].first, c.submitter[0].phone ) + print( "Notes:", c.claimDetails[0].billNote, c.claimDetails[0].claimNotes ) + print( "prin diag code:", c.claimDetails[0].prinDiagCode ) + print( "admit code:", c.claimDetails[0].admitDiagCd ) + print( "Cond Codes:", c.claimDetails[0].condCode ) + print( "Occr Codes:", c.claimDetails[0].occrCode ) + print( "Paperwork: ", c.claimDetails[0].paperwork ) diff --git a/web/claims_837/fetch.py b/web/claims_837/fetch.py index 1eade7c..74e4425 100755 --- a/web/claims_837/fetch.py +++ b/web/claims_837/fetch.py @@ -1,86 +1,86 @@ -#!/usr/bin/env python -"""Batch Fetch Claims Messages. - -Synopsis -======== - -:samp:`fetch.py {description.csv}...` - -Description -=========== - -Reads the CSV-format descriptions, either from stdin or files supplied as command-line -arguments. Each file contains rows which provide the claim identifiers. Other -attributes are silently ignored. - -This program calls the claim fetch service, and writes a log of success -and failures. - -Options -======= - - :file:`*description.csv`* a CSV-format files which identifies claims to fetch. - If omitted, :file:`stdin` is read. - -Environment Variables -===================== - - :envvar:`DJANGO_SETTINGS_MODULE` is the Django Settings Module that defines the - database and other runtime environment parameters. - -CSV FILE FORMAT -=============== - -The claim description file has the following format. Either the columns MUST be in -the following order, or the first row MUST have these column titles. - - - :samp:`CLAIM-ID`. This is the unique claim ID which will be assigned. - - Other columns are permitted in this file. They are ignored. For example, the following - additional column is often used. - - - :samp:`GWID` This is the HIPAA Gateway Transaction ID for the claim, used to retrieve it - from FACETS. -""" -from __future__ import print_function -import X12.file -import logging, sys -import xmlrpclib -import csv - -wsClaims= xmlrpclib.ServerProxy( "http://slott:slott@localhost:18000/RPC2/claim", allow_none=True ) -wsAutomod= xmlrpclib.ServerProxy( "http://slott:slott@localhost:18000/RPC2/automod", allow_none=True ) - -def fetchClaims( csvFile ): - log= logging.getLogger( "web.claims_837.fetchClaims" ) - csvReader= csv.DictReader( csvFile ) - for row in csvReader: - claimId= row["CLAIM-ID"] - try: - status, claim = wsClaims.fetch( claimId ) - if status == "OK": - print( claim ) - else: - print( "***", claim ) - except xmlrpclib.ProtocolError, e: - print( e ) - print( "*** Could not fetch", claimId ) - -def getCounts( csvFile ): - log= logging.getLogger( "web.claims_837.getCounts" ) - csvReader= csv.DictReader( csvFile ) - for row in csvReader: - status, counts = wsAutomod.getCounts( - row["LOCATION"], row["TYPE"], - row["BENEFIT"], row["TYPE-OF-SERVICE"], "Base" ) - if status != "OK": - print( "***", counts ) - continue - for prop, count in counts: - status, claims = wsAutomod.mod( prop, "" ) - print( status, map( str, claims ) ) - -if __name__ == "__main__": - with open(r"..\..\test\test_description.csv","rb") as claims: - #fetchClaims( claims ) - getCounts( claims ) +#!/usr/bin/env python +"""Batch Fetch Claims Messages. + +Synopsis +======== + +:samp:`fetch.py {description.csv}...` + +Description +=========== + +Reads the CSV-format descriptions, either from stdin or files supplied as command-line +arguments. Each file contains rows which provide the claim identifiers. Other +attributes are silently ignored. + +This program calls the claim fetch service, and writes a log of success +and failures. + +Options +======= + + :file:`*description.csv`* a CSV-format files which identifies claims to fetch. + If omitted, :file:`stdin` is read. + +Environment Variables +===================== + + :envvar:`DJANGO_SETTINGS_MODULE` is the Django Settings Module that defines the + database and other runtime environment parameters. + +CSV FILE FORMAT +=============== + +The claim description file has the following format. Either the columns MUST be in +the following order, or the first row MUST have these column titles. + + - :samp:`CLAIM-ID`. This is the unique claim ID which will be assigned. + + Other columns are permitted in this file. They are ignored. For example, the following + additional column is often used. + + - :samp:`GWID` This is the HIPAA Gateway Transaction ID for the claim, used to retrieve it + from FACETS. +""" +from __future__ import print_function +import X12.file +import logging, sys +import xmlrpclib +import csv + +wsClaims= xmlrpclib.ServerProxy( "http://slott:slott@localhost:18000/RPC2/claim", allow_none=True ) +wsAutomod= xmlrpclib.ServerProxy( "http://slott:slott@localhost:18000/RPC2/automod", allow_none=True ) + +def fetchClaims( csvFile ): + log= logging.getLogger( "web.claims_837.fetchClaims" ) + csvReader= csv.DictReader( csvFile ) + for row in csvReader: + claimId= row["CLAIM-ID"] + try: + status, claim = wsClaims.fetch( claimId ) + if status == "OK": + print( claim ) + else: + print( "***", claim ) + except xmlrpclib.ProtocolError as e: + print( e ) + print( "*** Could not fetch", claimId ) + +def getCounts( csvFile ): + log= logging.getLogger( "web.claims_837.getCounts" ) + csvReader= csv.DictReader( csvFile ) + for row in csvReader: + status, counts = wsAutomod.getCounts( + row["LOCATION"], row["TYPE"], + row["BENEFIT"], row["TYPE-OF-SERVICE"], "Base" ) + if status != "OK": + print( "***", counts ) + continue + for prop, count in counts: + status, claims = wsAutomod.mod( prop, "" ) + print( status, map( str, claims ) ) + +if __name__ == "__main__": + with open(r"..\..\test\test_description.csv","rb") as claims: + #fetchClaims( claims ) + getCounts( claims ) diff --git a/web/claims_837/load.py b/web/claims_837/load.py index 88b90f6..9487d41 100755 --- a/web/claims_837/load.py +++ b/web/claims_837/load.py @@ -1,166 +1,166 @@ -#!/usr/bin/env python -"""Batch Load Claims Messages associated with Classification plus Automod Parameters. - -Synopsis -======== - -:samp:`load.py {description.csv}...` - -Description -=========== - -Reads the CSV-format descriptions, either from stdin or files supplied as command-line -arguments. Each file contains rows which provide three separate things: - - - name of a file with claim(s) to parse (or the claim itself), - - - classification parameters for the claims, - - - automod constraints for the claims *[XXX this may be derivable from the claim]*. - -This program calls the claim load service, and writes a log of success -and failures. - -Before this program can be run, an extract must be used to get the X12N claims -out of the source application's HIPAA gateway. The extract process uses a -request ``.csv`` file, and writes the X12N files, plus the description ``.csv`` file. - -The typical use case for this loader is as follows:: - - claimExtract request.csv | load.py - -Options -======= - - :file:`*description.csv`* a CSV-format files which identifies claims to load. - If omitted, :file:`stdin` is read. - -Environment Variables -===================== - - :envvar:`DJANGO_SETTINGS_MODULE` is the Django Settings Module that defines the - database and other runtime environment parameters. - -CSV FILE FORMAT -=============== - -The claim description file has the following format. Either the columns MUST be in -the following order, or the first row MUST have these column titles. - - - :samp:`CLAIM-ID`. This is the unique claim ID which will be assigned. - - - :samp:`BENEFIT` The Benefit ID to assign to this claim. This is checked against the - TOS/Benefit list. - - - :samp:`TYPE-OF-SERVICE` The Type of Service ID to assign to this claim. This is checked against the - TOS/Benefit list. - - - :samp:`LOCATION` The codes are ALB, BUF, CE and CW. - Descriptions are Albany, Buffalo, Central NY West, and Central NY East. - - - :samp:`TYPE` The codes are I, P, O or D. - Descriptions are In-Patient, Professional, Out-Patient and Dental. - - - :samp:`SECONDARY` The codes are M and R. - Descriptions are Medicare and Regular. - - - :samp:`GENDER` This is used to define an automod constraint. - Codes are M, F and U. - - - :samp:`AGE-FROM` This is used to define an automod constraint. - - - :samp:`AGE-TO` This is used to define an automod constraint. - - - :samp:`CLAIM-FILE` If present, this is the file that contains the X12 message for this claim. - If omitted, the `CLAIM-TEXT` column must be used to provide - the actual X12N message. - - - :samp:`CLAIM-TEXT` If present, this is the text of the X12 message for this claim. - If omitted, the `CLAIM-FILE` column must be used to provide the - name of a file with the actual X12N message. - -Other columns are permitted in this file. They are ignored. For example, the following -additional column is often used. - - - :samp:`GWID` This is the HIPAA Gateway Transaction ID for the claim, used to retrieve it - from FACETS. -""" -import X12.file -import logging, sys -import xmlrpclib -import csv - -wsClaims= xmlrpclib.ServerProxy( "http://slott:slott@localhost:18000/RPC2/claim", allow_none=True ) - -def loadClaims( claimIter, claimId, properties=None, constraints=None ): - """Load a collection of claims, all of which have a common set of properties - and automod constraints. - - :param claimIter: An iterator over some claims, a list or a file will work. - Often an :mod:`X12.file` is used because it streamlines the file reading. - :param claimId: The base claim id. If multiple claims are loaded, then - claims after the first will have "-*n*" appended to the claim id string. - :param properties: A dict with Claim Properties. - :param constraints: A dict with Automod constraints. - """ - log= logging.getLogger( "web.claims_837.loadClaims" ) - count= 0 - good= 0 - error= 0 - id= claimId - for claim in claimIter: - count += 1 - log.info( "Parsing claim %d", count ) - try: - status= wsClaims.load( claim, id, properties, constraints ) - if status[0] == "OK": - good += 1 - else: - log.error( status ) - error += 1 - except xmlrpclib.ProtocolError, e: - log.error( str(e) ) - error += 1 - id= "%s-%d" % ( claimId, count ) - log.info( "Count %d", count ) - log.info( "Good %d", good ) - log.info( "Error %d", error ) - -def loadClaimAndDescription( csvFile ): - """Load a set of claims provided in a CSV-format file. - Each row of the CSV file describes one (rarely multiple) claim. - It provides a complete set of Properties and AutomodConstraints for - the claim. - - :param csvFile: an open file (or file-like object) that can be used - by csv.DictReader to get claims, properties and constraints. - """ - log= logging.getLogger( "web.claims_837.loadClaimAndDescription" ) - csvReader= csv.DictReader( csvFile ) - for row in csvReader: - # If Claim Text: put this in a simple list - if row.has_key("CLAIM-TEXT") and row["CLAIM-TEXT"] is not None: - claims= [ row["CLAIM-TEXT"] ] - # elif Claim File: use X12.file to read the file - elif row.has_key("CLAIM-FILE") and row["CLAIM-FILE"] is not None: - claims= X12.file.genClaims( row["CLAIM-FILE"] ) - # else: log a warning -- no claim present - else: - log.warning( "Row %r has no claim" % ( row, ) ) - continue - # Build Properties dict - propCols= ( "BENEFIT", "TYPE-OF-SERVICE", "LOCATION", "TYPE", "SECONDARY" ) - properties= dict( [ (k,row[k]) for k in propCols ] ) - # Build Constraints dict - consCols= ( "GENDER", "AGE-FROM", "AGE-TO" ) - constraints= dict( [ (k,row[k]) for k in consCols ] ) - # load claims - claimId= row["CLAIM-ID"] - loadClaims( claims, claimId, properties, constraints ) - -if __name__ == "__main__": - logging.basicConfig( stream=sys.stderr, level=logging.INFO ) - #loadClaims( X12.file.genClaims(r"..\..\test\837-example.txt") ) - #loadClaims( X12.file.genClaims(r"..\..\test\837I-Examples.txt") ) - with open(r"..\..\test\test_description.csv","rb") as claims: - loadClaimAndDescription( claims ) +#!/usr/bin/env python +"""Batch Load Claims Messages associated with Classification plus Automod Parameters. + +Synopsis +======== + +:samp:`load.py {description.csv}...` + +Description +=========== + +Reads the CSV-format descriptions, either from stdin or files supplied as command-line +arguments. Each file contains rows which provide three separate things: + + - name of a file with claim(s) to parse (or the claim itself), + + - classification parameters for the claims, + + - automod constraints for the claims *[XXX this may be derivable from the claim]*. + +This program calls the claim load service, and writes a log of success +and failures. + +Before this program can be run, an extract must be used to get the X12N claims +out of the source application's HIPAA gateway. The extract process uses a +request ``.csv`` file, and writes the X12N files, plus the description ``.csv`` file. + +The typical use case for this loader is as follows:: + + claimExtract request.csv | load.py + +Options +======= + + :file:`*description.csv`* a CSV-format files which identifies claims to load. + If omitted, :file:`stdin` is read. + +Environment Variables +===================== + + :envvar:`DJANGO_SETTINGS_MODULE` is the Django Settings Module that defines the + database and other runtime environment parameters. + +CSV FILE FORMAT +=============== + +The claim description file has the following format. Either the columns MUST be in +the following order, or the first row MUST have these column titles. + + - :samp:`CLAIM-ID`. This is the unique claim ID which will be assigned. + + - :samp:`BENEFIT` The Benefit ID to assign to this claim. This is checked against the + TOS/Benefit list. + + - :samp:`TYPE-OF-SERVICE` The Type of Service ID to assign to this claim. This is checked against the + TOS/Benefit list. + + - :samp:`LOCATION` The codes are ALB, BUF, CE and CW. + Descriptions are Albany, Buffalo, Central NY West, and Central NY East. + + - :samp:`TYPE` The codes are I, P, O or D. + Descriptions are In-Patient, Professional, Out-Patient and Dental. + + - :samp:`SECONDARY` The codes are M and R. + Descriptions are Medicare and Regular. + + - :samp:`GENDER` This is used to define an automod constraint. + Codes are M, F and U. + + - :samp:`AGE-FROM` This is used to define an automod constraint. + + - :samp:`AGE-TO` This is used to define an automod constraint. + + - :samp:`CLAIM-FILE` If present, this is the file that contains the X12 message for this claim. + If omitted, the `CLAIM-TEXT` column must be used to provide + the actual X12N message. + + - :samp:`CLAIM-TEXT` If present, this is the text of the X12 message for this claim. + If omitted, the `CLAIM-FILE` column must be used to provide the + name of a file with the actual X12N message. + +Other columns are permitted in this file. They are ignored. For example, the following +additional column is often used. + + - :samp:`GWID` This is the HIPAA Gateway Transaction ID for the claim, used to retrieve it + from FACETS. +""" +import X12.file +import logging, sys +import xmlrpclib +import csv + +wsClaims= xmlrpclib.ServerProxy( "http://slott:slott@localhost:18000/RPC2/claim", allow_none=True ) + +def loadClaims( claimIter, claimId, properties=None, constraints=None ): + """Load a collection of claims, all of which have a common set of properties + and automod constraints. + + :param claimIter: An iterator over some claims, a list or a file will work. + Often an :mod:`X12.file` is used because it streamlines the file reading. + :param claimId: The base claim id. If multiple claims are loaded, then + claims after the first will have "-*n*" appended to the claim id string. + :param properties: A dict with Claim Properties. + :param constraints: A dict with Automod constraints. + """ + log= logging.getLogger( "web.claims_837.loadClaims" ) + count= 0 + good= 0 + error= 0 + id= claimId + for claim in claimIter: + count += 1 + log.info( "Parsing claim %d", count ) + try: + status= wsClaims.load( claim, id, properties, constraints ) + if status[0] == "OK": + good += 1 + else: + log.error( status ) + error += 1 + except xmlrpclib.ProtocolError as e: + log.error( str(e) ) + error += 1 + id= "%s-%d" % ( claimId, count ) + log.info( "Count %d", count ) + log.info( "Good %d", good ) + log.info( "Error %d", error ) + +def loadClaimAndDescription( csvFile ): + """Load a set of claims provided in a CSV-format file. + Each row of the CSV file describes one (rarely multiple) claim. + It provides a complete set of Properties and AutomodConstraints for + the claim. + + :param csvFile: an open file (or file-like object) that can be used + by csv.DictReader to get claims, properties and constraints. + """ + log= logging.getLogger( "web.claims_837.loadClaimAndDescription" ) + csvReader= csv.DictReader( csvFile ) + for row in csvReader: + # If Claim Text: put this in a simple list + if "CLAIM-TEXT" in row and row["CLAIM-TEXT"] is not None: + claims= [ row["CLAIM-TEXT"] ] + # elif Claim File: use X12.file to read the file + elif "CLAIM-FILE" in row and row["CLAIM-FILE"] is not None: + claims= X12.file.genClaims( row["CLAIM-FILE"] ) + # else: log a warning -- no claim present + else: + log.warning( "Row %r has no claim" % ( row, ) ) + continue + # Build Properties dict + propCols= ( "BENEFIT", "TYPE-OF-SERVICE", "LOCATION", "TYPE", "SECONDARY" ) + properties= dict( [ (k,row[k]) for k in propCols ] ) + # Build Constraints dict + consCols= ( "GENDER", "AGE-FROM", "AGE-TO" ) + constraints= dict( [ (k,row[k]) for k in consCols ] ) + # load claims + claimId= row["CLAIM-ID"] + loadClaims( claims, claimId, properties, constraints ) + +if __name__ == "__main__": + logging.basicConfig( stream=sys.stderr, level=logging.INFO ) + #loadClaims( X12.file.genClaims(r"..\..\test\837-example.txt") ) + #loadClaims( X12.file.genClaims(r"..\..\test\837I-Examples.txt") ) + with open(r"..\..\test\test_description.csv","rb") as claims: + loadClaimAndDescription( claims ) diff --git a/web/claims_837/tests.py b/web/claims_837/tests.py index 139b250..1b39720 100755 --- a/web/claims_837/tests.py +++ b/web/claims_837/tests.py @@ -1,118 +1,119 @@ -#!/usr/bin/env python -"""Unit tests for the web.claims_837 application. -""" -from __future__ import print_function -from django.test import TestCase -import logging, sys -import os.path -import json - -from X12.parse import SegmentToken, ParseError -from web.claims.models import X12Segment, X12Loop, X12Message -from web.claims_837.models import Factory -from parse import parse_837p, parse_837d, parse_837i - -logging.basicConfig( stream=sys.stderr, level=logging.INFO ) - -class ParseTest( TestCase ): - def setUp( self ): - with open( os.path.join("test","837-example.txt"),"r") as example: - some837Lines= [ l.strip() for l in example.readlines() ] - self.some837= "".join( some837Lines ) - def tearDown( self ): - X12Segment.objects.all().delete() - X12Loop.objects.all().delete() - X12Message.objects.all().delete() - def test837p( self ): - try: - msg= parse_837p.unmarshall( self.some837 ) - except ParseError, e: - print( '***', e ) - self.fail( "Claim is supposed to be 837-Professional") - st= msg.descendant( 'SEGMENT', 'ST' ) - #print( 'Message Type', map( str, st ) ) - self.assertEquals( "837", st[0].getByPos(1) ) - st_loop= msg.descendant( 'LOOP', 'ST_LOOP' )[0] - header= st_loop.child( 'LOOP', 'HEADER' )[0] - bht= header.child( 'SEGMENT', 'BHT' ) - #print( 'Beginning of Hierarchical Transaction', map( str, bht ) ) - ref= header.child( 'SEGMENT', 'REF' ) - #print( 'Transmission Type Identification', map( str, ref ) ) - self.assertEquals( "004010X098A1", ref[0].getByPos(2) ) - def test837i( self ): - try: - msg= parse_837i.unmarshall( self.some837 ) - self.fail("Claim wrongly matched 837-Institutional") - except ParseError, e: - print( 'Expected:', e ) - def test837d( self ): - try: - msg= parse_837d.unmarshall( self.some837 ) - self.fail( "Claim wrongly matched 837-Dental") - except ParseError, e: - print( 'Expected:', e ) - -class PersistTest( TestCase ): - def setUp( self ): - with open( os.path.join("test","837-example.txt"),"r") as example: - some837Lines= [ l.strip() for l in example.readlines() ] - self.some837= "".join( some837Lines ) - def tearDown( self ): - X12Segment.objects.all().delete() - X12Loop.objects.all().delete() - X12Message.objects.all().delete() - def testPersist837p( self ): - try: - msg= parse_837p.unmarshall( self.some837, Factory ) - except ParseError, e: - print( '***', e ) - self.fail( "Claim is supposed to be 837-Professional") - for msg in X12Message.objects.all(): - loop2400List= msg.descendant( 'loop', '2400' ) - self.assertEquals( 2, len(loop2400List) ) - lx1Loop= loop2400List[0] - lx2Loop= loop2400List[1] - #print( lx1Loop ) - self.assertEquals( "LX", lx1Loop.child('SEGMENT','LX')[0].name ) - #print( lx2Loop ) - self.assertEquals( "LX", lx2Loop.child('SEGMENT','LX')[0].name ) - self.assertEquals( self.some837, msg.marshall() ) - - -class TestWS( TestCase ): - def setUp( self ): - sample= os.path.join("test","837-example.txt") - with open( sample, "rU" ) as claims: - self.claimText= "".join(x.strip() for x in claims) - msg= parse_837p.unmarshall( self.claimText, Factory ) - msg.name= '837_example' - msg.save() - def test_load( self ): - properties = { - 'TYPE': '', # a :class:`ClaimType` - 'SECONDARY': '', # a :class:`SecondaryCoverage` - 'LOCATION': '', # a :class:`Location` - 'BENEFIT': '', # a :class:`Benefit` - 'TYPE-OF-SERVICE': '', # a :class:`TypeOfService` - } - prop_json= json.dumps( properties ) - constraints = { - 'GENDER': '', # - 'AGE-FROM': 0, # - 'AGE-TO': 199, # - } - cons_json= json.dumps( constraints ) - params= {'claim':self.claimText, 'claim_id':'test_load', - 'properties':prop_json, 'constraints':cons_json} - response= self.client.post( "/claim_837/load/", params ) - self.assertEquals( 201, response.status_code ) - object= json.loads( response.content ) - self.assertEqual( "test_load", object['claim_id'] ) - self.assertEqual( self.claimText, object['claim'] ) - def test_fetch( self ): - response= self.client.get( "/claim_837/837_example/" ) - self.assertEquals( 200, response.status_code ) - object= json.loads( response.content ) - self.assertEqual( "837_example", object['claim_id'] ) - self.assertIsNone( object['message'] ) +#!/usr/bin/env python +"""Unit tests for the web.claims_837 application. +""" +from __future__ import print_function +from __future__ import absolute_import +from django.test import TestCase +import logging, sys +import os.path +import json + +from X12.parse import SegmentToken, ParseError +from web.claims.models import X12Segment, X12Loop, X12Message +from web.claims_837.models import Factory +from .parse import parse_837p, parse_837d, parse_837i + +logging.basicConfig( stream=sys.stderr, level=logging.INFO ) + +class ParseTest( TestCase ): + def setUp( self ): + with open( os.path.join("test","837-example.txt"),"r") as example: + some837Lines= [ l.strip() for l in example.readlines() ] + self.some837= "".join( some837Lines ) + def tearDown( self ): + X12Segment.objects.all().delete() + X12Loop.objects.all().delete() + X12Message.objects.all().delete() + def test837p( self ): + try: + msg= parse_837p.unmarshall( self.some837 ) + except ParseError as e: + print( '***', e ) + self.fail( "Claim is supposed to be 837-Professional") + st= msg.descendant( 'SEGMENT', 'ST' ) + #print( 'Message Type', map( str, st ) ) + self.assertEquals( "837", st[0].getByPos(1) ) + st_loop= msg.descendant( 'LOOP', 'ST_LOOP' )[0] + header= st_loop.child( 'LOOP', 'HEADER' )[0] + bht= header.child( 'SEGMENT', 'BHT' ) + #print( 'Beginning of Hierarchical Transaction', map( str, bht ) ) + ref= header.child( 'SEGMENT', 'REF' ) + #print( 'Transmission Type Identification', map( str, ref ) ) + self.assertEquals( "004010X098A1", ref[0].getByPos(2) ) + def test837i( self ): + try: + msg= parse_837i.unmarshall( self.some837 ) + self.fail("Claim wrongly matched 837-Institutional") + except ParseError as e: + print( 'Expected:', e ) + def test837d( self ): + try: + msg= parse_837d.unmarshall( self.some837 ) + self.fail( "Claim wrongly matched 837-Dental") + except ParseError as e: + print( 'Expected:', e ) + +class PersistTest( TestCase ): + def setUp( self ): + with open( os.path.join("test","837-example.txt"),"r") as example: + some837Lines= [ l.strip() for l in example.readlines() ] + self.some837= "".join( some837Lines ) + def tearDown( self ): + X12Segment.objects.all().delete() + X12Loop.objects.all().delete() + X12Message.objects.all().delete() + def testPersist837p( self ): + try: + msg= parse_837p.unmarshall( self.some837, Factory ) + except ParseError as e: + print( '***', e ) + self.fail( "Claim is supposed to be 837-Professional") + for msg in X12Message.objects.all(): + loop2400List= msg.descendant( 'loop', '2400' ) + self.assertEquals( 2, len(loop2400List) ) + lx1Loop= loop2400List[0] + lx2Loop= loop2400List[1] + #print( lx1Loop ) + self.assertEquals( "LX", lx1Loop.child('SEGMENT','LX')[0].name ) + #print( lx2Loop ) + self.assertEquals( "LX", lx2Loop.child('SEGMENT','LX')[0].name ) + self.assertEquals( self.some837, msg.marshall() ) + + +class TestWS( TestCase ): + def setUp( self ): + sample= os.path.join("test","837-example.txt") + with open( sample, "rU" ) as claims: + self.claimText= "".join(x.strip() for x in claims) + msg= parse_837p.unmarshall( self.claimText, Factory ) + msg.name= '837_example' + msg.save() + def test_load( self ): + properties = { + 'TYPE': '', # a :class:`ClaimType` + 'SECONDARY': '', # a :class:`SecondaryCoverage` + 'LOCATION': '', # a :class:`Location` + 'BENEFIT': '', # a :class:`Benefit` + 'TYPE-OF-SERVICE': '', # a :class:`TypeOfService` + } + prop_json= json.dumps( properties ) + constraints = { + 'GENDER': '', # + 'AGE-FROM': 0, # + 'AGE-TO': 199, # + } + cons_json= json.dumps( constraints ) + params= {'claim':self.claimText, 'claim_id':'test_load', + 'properties':prop_json, 'constraints':cons_json} + response= self.client.post( "/claim_837/load/", params ) + self.assertEquals( 201, response.status_code ) + object= json.loads( response.content ) + self.assertEqual( "test_load", object['claim_id'] ) + self.assertEqual( self.claimText, object['claim'] ) + def test_fetch( self ): + response= self.client.get( "/claim_837/837_example/" ) + self.assertEquals( 200, response.status_code ) + object= json.loads( response.content ) + self.assertEqual( "837_example", object['claim_id'] ) + self.assertIsNone( object['message'] ) self.assertEqual( self.claimText, object['claim'] ) \ No newline at end of file diff --git a/web/claims_837/views.py b/web/claims_837/views.py index 4043f22..822f208 100755 --- a/web/claims_837/views.py +++ b/web/claims_837/views.py @@ -1,166 +1,166 @@ -#!/usr/bin/env python -"""Claims_837 views.""" -from django.http import HttpResponse -from web.claims_837.models import Factory -from web.claims_837.parse import parse_837p, parse_837i, parse_837d -from web.claims.models import ( - X12Message, Location, ClaimType, SecondaryCoverage, Benefit, TypeOfService, - ClaimProperties, ClaimGroup, GroupStatus ) -from django.views.decorators.csrf import csrf_exempt -import json -import logging -import X12.parse -from django.core import serializers - -def home( request ): - return HttpResponse("Claims_837: {0} rows.".format(X12Message.objects.count()) ) - -@csrf_exempt -def load( request ): - """POST request with claim, claim_id, properties. - Use the "claims_837" model. - """ - if request.method == 'POST': - claim= request.POST['claim'] - claim_id= request.POST['claim_id'] - prop_json= request.POST.get('properties',{}) - properties= json.loads( prop_json ) - cons_json= request.POST.get('constraints',{}) - constraints= json.loads( cons_json ) - try: - loader= Loader() # Could be a different configuration - msg= loader.load( claim, claim_id, properties, constraints ) - response= {'claim': msg.marshall(), 'claim_id':msg.name, - 'group_name':msg.group.name, 'message':None} - return HttpResponse( content=json.dumps(response), status=201, content_type='application/json' ) - except Exception as e: - return HttpResponse( content=json.dumps(repr(e)), status=404, content_type='application/json' ) - raise Http404 - -def fetch( request, claim_id ): - """GET request with claim_id. - Fetch a given claim from the database. Marshall it as an X12 message. - - :param claimID: the claim identifier provided when the claim was loaded. - :return: status tuple ( status, message ) - """ - try: - claim= X12Message.objects.get( name=claim_id ) - if claim: - object= { 'claim_id': claim_id, 'claim': claim.marshall(), 'message': None } - status= 200 - else: - object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } - status= 404 - except X12Message.DoesNotExist, e: - object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } - status= 404 - except Exception, e: - logger.exception( e ) - object= { 'claim_id': claim_id, 'claim': None, 'message': "Internal Error %r" % ( claim_id ) } - status= 500 - - return HttpResponse( content=json.dumps(object), status=status, content_type='application/json' ) - - -class Loader( object ): - """Load claims_837-specific claim segments. - Loading a claim, creates the associated properties, - automod constraints, and a default group that claims are loaded to. - """ - def __init__( self ): - """Initialize an instance of Loader.""" - self.log= logging.getLogger( "web.claims_837.views.Loader" ) - def _conformProperties( self, properties ): - """Conform the given set of properties attributes to a :class:`ClaimProperties` - object. This will either get an existing properties object or create a new - properties object. - The argument value must be a dictionary with the following attributes: - - - ``TYPE`` - this must resolve to a name in the :class:`ClaimType` table. - - - ``SECONDARY`` - this must resolve to a name in the :class:`SecondaryCoverage` table. - - - ``LOCATION`` - This must resolve to a name in the :class:`Location` table. - - - ``BENEFIT`` - this must resolve to a name in the :class:`Benefit` table. - - - ``TYPE-OF-SERVICE`` - this is paired with Benefit to locate a row in the - :class:`TypeOfService` table. - - :param properties: a dictionary with attributes for the properties. - :return: A ClaimProperties object. - """ - self.log.debug( "ClaimProperties: %r", properties ) - if properties is not None: - loc, status= Location.objects.get_or_create( name = properties["LOCATION"] ) - ct, status= ClaimType.objects.get_or_create( name = properties["TYPE"] ) - sc, status= SecondaryCoverage.objects.get_or_create( name = properties["SECONDARY"] ) - ben, status= Benefit.objects.get_or_create( benefit=properties["BENEFIT"]) - tos, status= TypeOfService.objects.get_or_create( benefit=ben, typeOfService=properties["TYPE-OF-SERVICE"] ) - props, status = ClaimProperties.objects.get_or_create( - claimType= ct, - secondaryCoverage= sc, - location= loc, - typeOfService= tos, ) - return props - def _defaultGroup( self, properties, user="Owner" ): - """Loading always allocates a default group, based on the ClaimProperties, - user and a fixed :class:`GroupStatus` of ``Base``. - """ - claimProperties= self._conformProperties( properties ) - group, status = ClaimGroup.objects.get_or_create( - name=claimProperties.shortName(), - description=claimProperties.fullName(), - status= GroupStatus.objects.get(name='Base'), - owner=user, - ) - return group - - def load( self, claim, claimID, properties, constraints ): - """Load a Claim, conforming it with ClaimProperties. - The various parsers (:class:`parse_837p`, :class:`parse_837i`, :class:`parse_837d`) defined - in L{web.claims_837.parse} are tried to see which can successfully - parse the message. If the message can be parsed, the resulting object - is persisted in the database, associated with the given properties. - - Note that the properties are conformed into several - different dimensions. If there are unique values in the attributes, - new rows will be created in the dimension tables. - - :param claim: source text for an ``837`` claim. - :param claimID: a unique identifier for this claim. - :param properties: dictionary of properties attributes, - used by :class:`_conformProperties` - :return: the Claim loaded or an exception - """ - self.log.debug( "X12Message: %r", claim ) - msg= None - for parser in ( parse_837p, parse_837i, parse_837d ): - try: - parser.unmarshall( claim ) - msg= parser.unmarshall( claim, Factory ) - msg.name= claimID - msg.properties= self._conformProperties( properties ) - msg.group= self._defaultGroup( properties, "Owner" ) - msg.save() - self.log.debug( "Parser %s loaded %s", parser.desc, claimID ) - break - except X12.parse.ParseError, e: - # If we break trying to recognize the GS, then we're using the wrong parser - messageDesc, parser, segments = e.args - if segments is not None and segments[0][0] == 'GS': - self.log.debug( "Message didn't match %s", messageDesc ) - else: - # This is a more serious problem with message or parser. - self.log.error( "Error in parser %s", parser ) - e.log( log ) - msg= None - except Exception, e: - # This is a non-parser error: it's some kind of bug. - self.log.error( "*** %r", e ) - raise - if msg is None: - self.log.warning( "Could not parse %r", claim ) - raise X12.parse.ParseError( "Could not parse" ) +#!/usr/bin/env python +"""Claims_837 views.""" +from django.http import HttpResponse +from web.claims_837.models import Factory +from web.claims_837.parse import parse_837p, parse_837i, parse_837d +from web.claims.models import ( + X12Message, Location, ClaimType, SecondaryCoverage, Benefit, TypeOfService, + ClaimProperties, ClaimGroup, GroupStatus ) +from django.views.decorators.csrf import csrf_exempt +import json +import logging +import X12.parse +from django.core import serializers + +def home( request ): + return HttpResponse("Claims_837: {0} rows.".format(X12Message.objects.count()) ) + +@csrf_exempt +def load( request ): + """POST request with claim, claim_id, properties. + Use the "claims_837" model. + """ + if request.method == 'POST': + claim= request.POST['claim'] + claim_id= request.POST['claim_id'] + prop_json= request.POST.get('properties',{}) + properties= json.loads( prop_json ) + cons_json= request.POST.get('constraints',{}) + constraints= json.loads( cons_json ) + try: + loader= Loader() # Could be a different configuration + msg= loader.load( claim, claim_id, properties, constraints ) + response= {'claim': msg.marshall(), 'claim_id':msg.name, + 'group_name':msg.group.name, 'message':None} + return HttpResponse( content=json.dumps(response), status=201, content_type='application/json' ) + except Exception as e: + return HttpResponse( content=json.dumps(repr(e)), status=404, content_type='application/json' ) + raise Http404 + +def fetch( request, claim_id ): + """GET request with claim_id. + Fetch a given claim from the database. Marshall it as an X12 message. + + :param claimID: the claim identifier provided when the claim was loaded. + :return: status tuple ( status, message ) + """ + try: + claim= X12Message.objects.get( name=claim_id ) + if claim: + object= { 'claim_id': claim_id, 'claim': claim.marshall(), 'message': None } + status= 200 + else: + object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } + status= 404 + except X12Message.DoesNotExist as e: + object= { 'claim_id': claim_id, 'claim': None, 'message': "No claim matches %r" % ( claim_id ) } + status= 404 + except Exception as e: + logger.exception( e ) + object= { 'claim_id': claim_id, 'claim': None, 'message': "Internal Error %r" % ( claim_id ) } + status= 500 + + return HttpResponse( content=json.dumps(object), status=status, content_type='application/json' ) + + +class Loader( object ): + """Load claims_837-specific claim segments. + Loading a claim, creates the associated properties, + automod constraints, and a default group that claims are loaded to. + """ + def __init__( self ): + """Initialize an instance of Loader.""" + self.log= logging.getLogger( "web.claims_837.views.Loader" ) + def _conformProperties( self, properties ): + """Conform the given set of properties attributes to a :class:`ClaimProperties` + object. This will either get an existing properties object or create a new + properties object. + The argument value must be a dictionary with the following attributes: + + - ``TYPE`` - this must resolve to a name in the :class:`ClaimType` table. + + - ``SECONDARY`` - this must resolve to a name in the :class:`SecondaryCoverage` table. + + - ``LOCATION`` - This must resolve to a name in the :class:`Location` table. + + - ``BENEFIT`` - this must resolve to a name in the :class:`Benefit` table. + + - ``TYPE-OF-SERVICE`` - this is paired with Benefit to locate a row in the + :class:`TypeOfService` table. + + :param properties: a dictionary with attributes for the properties. + :return: A ClaimProperties object. + """ + self.log.debug( "ClaimProperties: %r", properties ) + if properties is not None: + loc, status= Location.objects.get_or_create( name = properties["LOCATION"] ) + ct, status= ClaimType.objects.get_or_create( name = properties["TYPE"] ) + sc, status= SecondaryCoverage.objects.get_or_create( name = properties["SECONDARY"] ) + ben, status= Benefit.objects.get_or_create( benefit=properties["BENEFIT"]) + tos, status= TypeOfService.objects.get_or_create( benefit=ben, typeOfService=properties["TYPE-OF-SERVICE"] ) + props, status = ClaimProperties.objects.get_or_create( + claimType= ct, + secondaryCoverage= sc, + location= loc, + typeOfService= tos, ) + return props + def _defaultGroup( self, properties, user="Owner" ): + """Loading always allocates a default group, based on the ClaimProperties, + user and a fixed :class:`GroupStatus` of ``Base``. + """ + claimProperties= self._conformProperties( properties ) + group, status = ClaimGroup.objects.get_or_create( + name=claimProperties.shortName(), + description=claimProperties.fullName(), + status= GroupStatus.objects.get(name='Base'), + owner=user, + ) + return group + + def load( self, claim, claimID, properties, constraints ): + """Load a Claim, conforming it with ClaimProperties. + The various parsers (:class:`parse_837p`, :class:`parse_837i`, :class:`parse_837d`) defined + in L{web.claims_837.parse} are tried to see which can successfully + parse the message. If the message can be parsed, the resulting object + is persisted in the database, associated with the given properties. + + Note that the properties are conformed into several + different dimensions. If there are unique values in the attributes, + new rows will be created in the dimension tables. + + :param claim: source text for an ``837`` claim. + :param claimID: a unique identifier for this claim. + :param properties: dictionary of properties attributes, + used by :class:`_conformProperties` + :return: the Claim loaded or an exception + """ + self.log.debug( "X12Message: %r", claim ) + msg= None + for parser in ( parse_837p, parse_837i, parse_837d ): + try: + parser.unmarshall( claim ) + msg= parser.unmarshall( claim, Factory ) + msg.name= claimID + msg.properties= self._conformProperties( properties ) + msg.group= self._defaultGroup( properties, "Owner" ) + msg.save() + self.log.debug( "Parser %s loaded %s", parser.desc, claimID ) + break + except X12.parse.ParseError as e: + # If we break trying to recognize the GS, then we're using the wrong parser + messageDesc, parser, segments = e.args + if segments is not None and segments[0][0] == 'GS': + self.log.debug( "Message didn't match %s", messageDesc ) + else: + # This is a more serious problem with message or parser. + self.log.error( "Error in parser %s", parser ) + e.log( log ) + msg= None + except Exception as e: + # This is a non-parser error: it's some kind of bug. + self.log.error( "*** %r", e ) + raise + if msg is None: + self.log.warning( "Could not parse %r", claim ) + raise X12.parse.ParseError( "Could not parse" ) return msg \ No newline at end of file diff --git a/web/make837.py b/web/make837.py index 7b6e94e..82859ee 100755 --- a/web/make837.py +++ b/web/make837.py @@ -1,213 +1,213 @@ -#!/usr/bin/env python -"""Build 837 parsers and 837 Segment definitions from XML Configuration. - -Synopsis -======== - -:samp:`make837.py -p {python} -d {django} -b {baseDir} {name=source}...` - -Description -=========== - -Reads the PyX12 source files (in .XML) and writes a Python parser module -for unmarshalling messages as well as a Django model for persisting the -message instances. - -Prior to this step you must initialize the application directory -structure with :samp:`manage.py startapp {newApp}`. - -After this step, you must update :file:`settings.py` to include the new application. - -Then you must sync the database with the following command before you can start -using the parser, factory and Django persistent class definitions you've created. - -:samp:`manage.py syncdb --pythonpath=".."` - -Options -======= - - :samp:`-p {python}` writes the Python module for unmarshalling the given messages. - - :samp:`-d {django}` writes two Django modules for persisting the given message instances. - This will be :samp:`{django}/models.py` and :samp:`{django}/admin.py`. - - :samp:`-b {baseDir}` is the base directory for the various source files. - - :samp:`name={source}` a list of parser names and message definitions. - The name is the Python variable name; the source is the PyX12 XML source file. - -Notes -===== - -An X12 parser is defined to use a Factory object to emit message instance objects. -This Factory object is a run-time binding between a parser and some message instance module. -Generic message instance modules include :mod:`X12.message` and :mod:`web.claims.models`. - -This application builds a specific message instance module, with specific message types. -In order for an :mod:`X12.parse` module to make use of the Django message instance module, -a Factory is required to instantiate the Django objects as well as the generic -X12Segment object defined in :mod:`web.claims.models`. -""" -from __future__ import print_function -import optparse -import tools.convertPyX12 -import os -import logging -import sys -import datetime -import X12.map.source -import X12.map.dj - -class ApplicationBuilder( object ): - """Build the core parser and message persistence modules for - an application. - - Generally, given a base directly, we'll load a number of XML files - which will define X12N message parsers. We have to emit a Python - source module for each individual message type, since they have unique - compliance rules. - - After seeing all of those XML files, we'll also know the various - segments defined and can emit a peristence model for the unique - kinds of segments. - - Note that the Django Visitor *accumulates* the various definitions. - Only the last output from the Django Visitor is particularly useful. - """ - def __init__( self, baseDir=None ): - """Initialize the ApplicationBuilder with a base directory.""" - self.baseDir= baseDir if baseDir is not None else "." - self.log= logging.getLogger( "make837.LoadXMLDefs") - self.bldParser= tools.convertPyX12.ParserBuilder() - # Accumulate Django definitions until after all messages have been examined - self.djMap= X12.map.dj.DjangoModelVisitor( ) - self.djAdm= X12.map.dj.DjangoAdminVisitor( ) - self.x12p= None - def load( self, xmlDef ): - """Load another message definition. This will also accumulate - Django Segment definitions. - """ - try: - xml= tools.convertPyX12.XMLParser() - xml.data( os.path.join( self.baseDir, "dataele.xml") ) - xml.codes( os.path.join( self.baseDir, "codes.xml") ) - xml.read( os.path.join( self.baseDir, xmlDef) ) - - self.x12p= self.bldParser.build( xml ) - except Warning, w: - log.warning( '*** WARNING IN %s', xmlDef ) - self.x12p= None - raise - self.pyCode= None - self.x12p.visit( self.djMap ) - self.x12p.visit( self.djAdm ) - return self.x12p - @property - def getParser( self ): - """Return the current message's parser object.""" - return self.x12p - def getPython( self, name ): - """Return Python source for the current message.""" - pyMap= X12.map.source.FlatPythonVisitor( name ) - self.x12p.visit( pyMap ) - self.pyCode= pyMap.getSource() - return self.pyCode - def getDjangoModel( self ): - """Emit the Django model code built so far.""" - self.djangoModel= self.djMap.getSource() - return self.djangoModel - def getDjangoAdmin( self, appname='claims_837'): - """Emit the Django Admin code built so far.""" - self.djangoAdmin= self.djAdm.getSource(appname) - return self.djangoAdmin - -factory=''' -import web.claims.models -class Factory( web.claims.models.Factory ): - """Factory for a generated application.""" - @staticmethod - def makeSegment( segmentToken, compositeSep, segmentType=None ): - """Create a Segment from a SegmentToken and an Segment definition. - - :param segmentToken: An :class:`X12.parse.SegmentToken` instance: - a list-like collection of Element values. It turns out that a simple - list of values may also work, if it does NOT have trailing empty - items omitted. Real Segment Tokens can have trailing empty items - omitted. - :param compositeSep: Composite internal separator from the ISA segment. - :param segmentType: An :class:`X12.parse.Segment` instance, which - defines the Elements and Composites of this X12Segment. - :returns: X12Segment instance - """ - seg= web.claims.models.Factory.makeSegment( segmentToken, compositeSep, segmentType ) - appSegClass= eval( "Segment_%s" % ( segmentToken[0], ) ) - appSeg= appSegClass( segment= seg ) - appSeg.unmarshall( segmentToken, compositeSep ) - appSeg.save() - return seg -''' - -def process( baseDir=r"C:\Python25\share\pyx12\map" ): - convertList= [ - ("parse_837i", "837.4010.x096.A1.xml"), - ("parse_837d", "837.4010.x097.A1.xml"), - ("parse_839p", "837.4010.x098.A1.xml"), - ] - # Load messages, generating Python as we go - builder= ApplicationBuilder( baseDir ) - for parserName, fileName in convertList: - builder.load( fileName ) - pySrc= builder.getPython( parserName ) - print( pySrc ) - # Write Django all in one final 'models' file - print( factory ) - builder.getDjangoModel() - print( builder.djangoModel ) - builder.getDjangoAdmin( 'claims_837' ) - print( builder.djangoAdmin ) - -def main(): - # Parse command-line options - cmdParse= optparse.OptionParser(version="0.1") - cmdParse.add_option( "-p", "--python", dest="python", default=None ) - cmdParse.add_option( "-d", "--django", dest="django", default=None ) - cmdParse.add_option( "-b", "--basedir", dest="baseDir", default="." ) - options, args = cmdParse.parse_args() - now= datetime.datetime.now() - builder= ApplicationBuilder( options.baseDir ) - if options.python is not None: - with open(options.python, "w" ) as pFile: - pFile.write( '#!/usr/bin/env python\n' ) - pFile.write( '"""Generated by make837.py on %s"""\n' % (now,) ) - for argText in args: - parserName, punct, fileName = argText.partition( "=" ) - builder.load( fileName ) - if options.python is not None: - pySrc= builder.getPython( parserName ) - pFile.write( "# %s/%s\n" % ( options.baseDir, fileName ) ) - pFile.write( pySrc ) - pFile.write( '\n\n' ) - if options.django is not None: - with open( os.path.join(options.django,"models.py"), "w" ) as dFile: - dFile.write( '#!/usr/bin/env python\n' ) - dFile.write( '"""Generated by make837.py on %s"""\n' % ( now,) ) - dFile.write( factory ) - dFile.write( '\n\n' ) - djSrc= builder.getDjangoModel( options.django ) - dFile.write( djSrc ) - dFile.write( '\n\n' ) - with open( os.path.join(options.django,"admin.py"), "w" ) as dFile: - dFile.write( '#!/usr/bin/env python\n' ) - dFile.write( '"""Generated by make837.py on %s"""\n' % ( now,) ) - djSrc= builder.getDjangoAdmin( options.django ) - dFile.write( djSrc ) - dFile.write( '\n\n' ) - -if __name__ == "__main__": - logging.basicConfig( - stream=sys.stderr, - level=logging.DEBUG, - ) - logging.getLogger("tools.convertPyX12.BuildParser").setLevel(logging.INFO) - #process() - main() +#!/usr/bin/env python +"""Build 837 parsers and 837 Segment definitions from XML Configuration. + +Synopsis +======== + +:samp:`make837.py -p {python} -d {django} -b {baseDir} {name=source}...` + +Description +=========== + +Reads the PyX12 source files (in .XML) and writes a Python parser module +for unmarshalling messages as well as a Django model for persisting the +message instances. + +Prior to this step you must initialize the application directory +structure with :samp:`manage.py startapp {newApp}`. + +After this step, you must update :file:`settings.py` to include the new application. + +Then you must sync the database with the following command before you can start +using the parser, factory and Django persistent class definitions you've created. + +:samp:`manage.py syncdb --pythonpath=".."` + +Options +======= + + :samp:`-p {python}` writes the Python module for unmarshalling the given messages. + + :samp:`-d {django}` writes two Django modules for persisting the given message instances. + This will be :samp:`{django}/models.py` and :samp:`{django}/admin.py`. + + :samp:`-b {baseDir}` is the base directory for the various source files. + + :samp:`name={source}` a list of parser names and message definitions. + The name is the Python variable name; the source is the PyX12 XML source file. + +Notes +===== + +An X12 parser is defined to use a Factory object to emit message instance objects. +This Factory object is a run-time binding between a parser and some message instance module. +Generic message instance modules include :mod:`X12.message` and :mod:`web.claims.models`. + +This application builds a specific message instance module, with specific message types. +In order for an :mod:`X12.parse` module to make use of the Django message instance module, +a Factory is required to instantiate the Django objects as well as the generic +X12Segment object defined in :mod:`web.claims.models`. +""" +from __future__ import print_function +import optparse +import tools.convertPyX12 +import os +import logging +import sys +import datetime +import X12.map.source +import X12.map.dj + +class ApplicationBuilder( object ): + """Build the core parser and message persistence modules for + an application. + + Generally, given a base directly, we'll load a number of XML files + which will define X12N message parsers. We have to emit a Python + source module for each individual message type, since they have unique + compliance rules. + + After seeing all of those XML files, we'll also know the various + segments defined and can emit a peristence model for the unique + kinds of segments. + + Note that the Django Visitor *accumulates* the various definitions. + Only the last output from the Django Visitor is particularly useful. + """ + def __init__( self, baseDir=None ): + """Initialize the ApplicationBuilder with a base directory.""" + self.baseDir= baseDir if baseDir is not None else "." + self.log= logging.getLogger( "make837.LoadXMLDefs") + self.bldParser= tools.convertPyX12.ParserBuilder() + # Accumulate Django definitions until after all messages have been examined + self.djMap= X12.map.dj.DjangoModelVisitor( ) + self.djAdm= X12.map.dj.DjangoAdminVisitor( ) + self.x12p= None + def load( self, xmlDef ): + """Load another message definition. This will also accumulate + Django Segment definitions. + """ + try: + xml= tools.convertPyX12.XMLParser() + xml.data( os.path.join( self.baseDir, "dataele.xml") ) + xml.codes( os.path.join( self.baseDir, "codes.xml") ) + xml.read( os.path.join( self.baseDir, xmlDef) ) + + self.x12p= self.bldParser.build( xml ) + except Warning as w: + log.warning( '*** WARNING IN %s', xmlDef ) + self.x12p= None + raise + self.pyCode= None + self.x12p.visit( self.djMap ) + self.x12p.visit( self.djAdm ) + return self.x12p + @property + def getParser( self ): + """Return the current message's parser object.""" + return self.x12p + def getPython( self, name ): + """Return Python source for the current message.""" + pyMap= X12.map.source.FlatPythonVisitor( name ) + self.x12p.visit( pyMap ) + self.pyCode= pyMap.getSource() + return self.pyCode + def getDjangoModel( self ): + """Emit the Django model code built so far.""" + self.djangoModel= self.djMap.getSource() + return self.djangoModel + def getDjangoAdmin( self, appname='claims_837'): + """Emit the Django Admin code built so far.""" + self.djangoAdmin= self.djAdm.getSource(appname) + return self.djangoAdmin + +factory=''' +import web.claims.models +class Factory( web.claims.models.Factory ): + """Factory for a generated application.""" + @staticmethod + def makeSegment( segmentToken, compositeSep, segmentType=None ): + """Create a Segment from a SegmentToken and an Segment definition. + + :param segmentToken: An :class:`X12.parse.SegmentToken` instance: + a list-like collection of Element values. It turns out that a simple + list of values may also work, if it does NOT have trailing empty + items omitted. Real Segment Tokens can have trailing empty items + omitted. + :param compositeSep: Composite internal separator from the ISA segment. + :param segmentType: An :class:`X12.parse.Segment` instance, which + defines the Elements and Composites of this X12Segment. + :returns: X12Segment instance + """ + seg= web.claims.models.Factory.makeSegment( segmentToken, compositeSep, segmentType ) + appSegClass= eval( "Segment_%s" % ( segmentToken[0], ) ) + appSeg= appSegClass( segment= seg ) + appSeg.unmarshall( segmentToken, compositeSep ) + appSeg.save() + return seg +''' + +def process( baseDir=r"C:\Python25\share\pyx12\map" ): + convertList= [ + ("parse_837i", "837.4010.x096.A1.xml"), + ("parse_837d", "837.4010.x097.A1.xml"), + ("parse_839p", "837.4010.x098.A1.xml"), + ] + # Load messages, generating Python as we go + builder= ApplicationBuilder( baseDir ) + for parserName, fileName in convertList: + builder.load( fileName ) + pySrc= builder.getPython( parserName ) + print( pySrc ) + # Write Django all in one final 'models' file + print( factory ) + builder.getDjangoModel() + print( builder.djangoModel ) + builder.getDjangoAdmin( 'claims_837' ) + print( builder.djangoAdmin ) + +def main(): + # Parse command-line options + cmdParse= optparse.OptionParser(version="0.1") + cmdParse.add_option( "-p", "--python", dest="python", default=None ) + cmdParse.add_option( "-d", "--django", dest="django", default=None ) + cmdParse.add_option( "-b", "--basedir", dest="baseDir", default="." ) + options, args = cmdParse.parse_args() + now= datetime.datetime.now() + builder= ApplicationBuilder( options.baseDir ) + if options.python is not None: + with open(options.python, "w" ) as pFile: + pFile.write( '#!/usr/bin/env python\n' ) + pFile.write( '"""Generated by make837.py on %s"""\n' % (now,) ) + for argText in args: + parserName, punct, fileName = argText.partition( "=" ) + builder.load( fileName ) + if options.python is not None: + pySrc= builder.getPython( parserName ) + pFile.write( "# %s/%s\n" % ( options.baseDir, fileName ) ) + pFile.write( pySrc ) + pFile.write( '\n\n' ) + if options.django is not None: + with open( os.path.join(options.django,"models.py"), "w" ) as dFile: + dFile.write( '#!/usr/bin/env python\n' ) + dFile.write( '"""Generated by make837.py on %s"""\n' % ( now,) ) + dFile.write( factory ) + dFile.write( '\n\n' ) + djSrc= builder.getDjangoModel( options.django ) + dFile.write( djSrc ) + dFile.write( '\n\n' ) + with open( os.path.join(options.django,"admin.py"), "w" ) as dFile: + dFile.write( '#!/usr/bin/env python\n' ) + dFile.write( '"""Generated by make837.py on %s"""\n' % ( now,) ) + djSrc= builder.getDjangoAdmin( options.django ) + dFile.write( djSrc ) + dFile.write( '\n\n' ) + +if __name__ == "__main__": + logging.basicConfig( + stream=sys.stderr, + level=logging.DEBUG, + ) + logging.getLogger("tools.convertPyX12.BuildParser").setLevel(logging.INFO) + #process() + main() diff --git a/web/manage.py b/web/manage.py index b8c4be8..727a271 100755 --- a/web/manage.py +++ b/web/manage.py @@ -1,11 +1,12 @@ -#!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) - sys.exit(1) - -if __name__ == "__main__": - execute_manager(settings) +#!/usr/bin/env python +from __future__ import absolute_import +from django.core.management import execute_manager +try: + from . import settings # Assumed to be in the same directory. +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings)