X12-0.80/0000755000175400010010000000000011313335033010061 5ustar pbNoneX12-0.80/cf/0000755000175400010010000000000010100503335010444 5ustar pbNoneX12-0.80/cf/270_004010X092.cf0000644000175400010010000000554410100503335012465 0ustar pbNone[LOOPS] ISA GS ST 2000A 2000B 2000C 2000D SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 #LOOP ID - 2000A INFORMATION SOURCE LEVEL >1 [2000A] segment=HL:3:20:Information Source Level:R:1 loop=2100A #LOOP ID - 2100A INFORMATION SOURCE NAME 1 [2100A] segment=NM1:1:2B,36,GP,P5,PR:Information Source Name:R:1 #LOOP ID - 2000B INFORMATION RECEIVER LEVEL >1 [2000B] segment=HL:3:21:Information Receiver Level:R:1 loop=2100B #LOOP ID - 2100B INFORMATION RECEIVER NAME 1 [2100B] segment=NM1:1:1P,2B,36,80,FA,GP,P5,PR:Information Receiver Name:R:1 segment=REF:::Information Receiver Additional Identification:S:9 segment=N3:::Information Receiver Address:S:1 segment=N4:::Information Receiver City/State/ZIP Code:S:1 segment=PER:::Information Receiver Contact Information:S:3 segment=PRV:::Information Receiver Provider Information:S:1 #LOOP ID - 2000C SUBSCRIBER LEVEL >1 [2000C] segment=HL:3:22:Subscriber Level:R:1 segment=TRN:::Subscriber Trace Number:S:2 loop=2100C #LOOP ID - 2100C SUBSCRIBER NAME 1 [2100C] segment=NM1:1:IL:Subscriber Name:R:1 segment=REF:::Subscriber Additional Identification:S:9 segment=N3:::Subscriber Address:S:1 segment=N4:::Subscriber City/State/ZIP Code:S:1 segment=PRV:::Provider Information:S:1 segment=DMG:::Subscriber Demographic Information:S:1 segment=INS:::Subscriber Relationship:S:1 segment=DTP:::Subscriber Date:S:2 loop=2110C #LOOP ID - 2110C SUBSCRIBER ELIGIBILITY OR BENEFIT INQUIRY INFORMATION 99 [2110C] segment=EQ:::Subscriber Eligibility or Benefit Inquiry Information:S:1 segment=AMT:::Subscriber Spend Down Amount:S:1 segment=III:::Subscriber Eligibility or Benefit Additional Inquiry Information:S:10 segment=REF:::Subscriber Additional Information:S:1 segment=DTP:::Subscriber Eligibility/Benefit Date:S:1 #LOOP ID - 2000D DEPENDENT LEVEL >1 [2000D] segment=HL:3:23:Dependent Level:S:1 segment=TRN:::Dependent Trace Number:S:2 loop=2100D #LOOP ID - 2100D DEPENDENT NAME 1 [2100D] segment=NM1:1:03:Dependent Name:R:1 segment=REF:::Dependent Additional Identification:S:9 segment=N3:::Dependent Address:S:1 segment=N4:::Dependent City/State/ZIP Code:S:1 segment=PRV:::Provider Information:S:1 segment=DMG:::Dependent Demographic Information:S:1 segment=INS:::Dependent Relationship:S:1 segment=DTP:::Dependent Date:S:2 loop=2110D #LOOP ID - 2110D DEPENDENT ELIGIBILITY OR BENEFIT INQUIRY INFORMATION 99 [2110D] segment=EQ:::Dependent Eligibility or Benefit Inquiry Information:R:1 segment=III:::Dependent Eligibility or Benefit Additional Inquiry Information:S:10 segment=REF:::Dependent Additional Information:S:1 segment=DTP:::Dependent Eligibility/Benefit Date:S:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/271_004010X092.cf0000644000175400010010000001056610100503335012466 0ustar pbNone[LOOPS] ISA GS ST 2000A 2000B 2000C 2000D SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 #LOOP ID - 2000A INFORMATION SOURCE LEVEL >1 [2000A] segment=HL:3:20:Information Source Level:R:1 segment=AAA:::Request Validation:S:9 loop=2100A #LOOP ID - 2100A INFORMATION SOURCE NAME 1 [2100A] segment=NM1:1:2B,36,GP,P5,PR:Information Source Name:R:1 segment=REF:::Information Source Additional Identification:S:9 segment=PER:::Information Source Contact Information:S:3 segment=AAA:::Request Validation:S:9 #LOOP ID - 2000B INFORMATION RECEIVER LEVEL >1 [2000B] segment=HL:3:21:Information Receiver Level:S:1 loop=2100B #LOOP ID - 2100B INFORMATION RECEIVER NAME 1 [2100B] segment=NM1:1:1P,2B,36,80,FA,GP,P5,PR:Information Receiver Name:R:1 segment=REF:::Information Receiver Additional Identification:S:9 segment=AAA:::Information Receiver Request Validation:S:9 #LOOP ID - 2000C SUBSCRIBER LEVEL >1 [2000C] segment=HL:3:22:Subscriber Level:S:1 segment=TRN:::Subscriber Trace Number:S:3 loop=2100C #LOOP ID - 2100C SUBSCRIBER NAME 1 [2100C] segment=NM1:1:IL:Subscriber Name:R:1 segment=REF:::Subscriber Additional Identification:S:9 segment=N3:::Subscriber Address:S:1 segment=N4:::Subscriber City/State/ZIP Code:S:1 segment=PER:::Subscriber Contact Information:S:3 segment=AAA:::Subscriber Request Validation:S:9 segment=DMG:::Subscriber Demographic Information:S:1 segment=INS:::Subscriber Relationship:S:1 segment=DTP:::Subscriber Date:S:9 loop=2110C #LOOP ID - 2110C SUBSCRIBER ELIGIBILITY OR BENEFIT INFORMATION >1 [2110C] segment=EB:::Subscriber Eligibility or Benefit Information:S:1 segment=HSD:::Health Care Services Delivery:S:9 segment=REF:::Subscriber Additional Identification:S:9 segment=DTP:::Subscriber Eligibility/Benefit Date:S:20 segment=AAA:::Subscriber Request Validation:S:9 segment=MSG:::Message Text:S:10 loop=2115C loop=2120C #LOOP ID - 2115C SUBSCRIBER ELIGIBILITY OR BENEFIT ADDITIONAL INFORMATION 10 [2115C] segment=III:::Subscriber Eligibility or Benefit Additional Information:S:1 segment=LS:::Loop Header:S:1 #LOOP ID - 2120C SUBSCRIBER BENEFIT RELATED ENTITY NAME 1 [2120C] segment=NM1:1:1P,2B,36,73,FA,GP,IL,LR,P3,P4,P5,PR,PRP,SEP,TTP,VN,X3:Subscriber Benefit Related Entity Name:S:1 segment=N3:::Subscriber Benefit Related Entity Address:S:1 segment=N4:::Subscriber Benefit Related City/State/ZIP Code:S:1 segment=PER:::Subscriber Benefit Related Entity Contact Information:S:3 segment=PRV:::Subscriber Benefit Related Provider Information:S:1 segment=LE:::Loop Trailer:S:1 #LOOP ID - 2000D DEPENDENT LEVEL >1 [2000D] segment=HL:3:23:Dependent Level:S:1 segment=TRN:::Dependent Trace Number:S:3 loop=2100D #LOOP ID - 2100D DEPENDENT NAME 1 [2100D] segment=NM1:1:03:Dependent Name:R:1 segment=REF:::Dependent Additional Identification:S:9 segment=N3:::Dependent Address:S:1 segment=N4:::Dependent City/State/ZIP Code:S:1 segment=PER:::Dependent Contact Information:S:3 segment=AAA:::Dependent Request Validation:S:9 segment=DMG:::Dependent Demographic Information:S:1 segment=INS:::Dependent Relationship:S:1 segment=DTP:::Dependent Date:S:9 loop=2110D #LOOP ID - 2110D DEPENDENT ELIGIBILITY OR BENEFIT INFORMATION >1 [2110D] segment=EB:::Dependent Eligibility or Benefit Information:S:1 segment=HSD:::Health Care Services Delivery:S:9 segment=REF:::Dependent Additional Identification:S:9 segment=DTP:::Dependent Eligibility/Benefit Date:S:20 segment=AAA:::Dependent Request Validation:S:9 segment=MSG:::Message Text:S:10 loop=2115D loop=2120D #LOOP ID - 2115D DEPENDENT ELIGIBILITY OR BENEFIT ADDITIONAL INFORMATION 10 [2115D] segment=III:::Dependent Eligibility or Benefit Additional Information:S:1 segment=LS:::Dependent Eligibility or Benefit Information:S:1 #LOOP ID - 2120D DEPENDENT BENEFIT RELATED ENTITY NAME 1 [2120D] segment=NM1:1:1P,2B,36,73,FA,GP,IL,LR,P3,P4,P5,PR,PRP,SEP,TTP,VN,X3:Dependent Benefit Related Entity Name:S:1 segment=N3:::Dependent Benefit Related Entity Address:S:1 segment=N4:::Dependent Benefit Related Entity City/State/ZIP Code:S:1 segment=PER:::Dependent Benefit Related Entity Contact Information:S:3 segment=PRV:::Dependent Benefit Related Provider Information:S:1 segment=LE:::Loop Trailer:S:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/276_004010X093.cf0000644000175400010010000000500610100503335012465 0ustar pbNone[LOOPS] ISA GS ST 2000A 2000B 2000C 2000D 2000E SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 #LOOP ID - 2000A INFORMATION SOURCE LEVEL >1 [2000A] segment=HL:3:20:Information Source Level:R:1 loop=2100A #LOOP ID - 2100A PAYER NAME >1 [2100A] segment=NM1:1:PR:Payer Name:R:1 segment=PER:::Payer Contact Information:S:1 #LOOP ID - 2000B INFORMATION RECEIVER LEVEL >1 [2000B] segment=HL:3:21:Information Receiver Level:R:1 loop=2100B #LOOP ID - 2100B INFORMATION RECEIVER NAME >1 [2100B] segment=NM1:1:41:Information Receiver Name:R:1 #LOOP ID - 2000C SERVICE PROVIDER LEVEL >1 [2000C] segment=HL:3:19:Service Provider Level:R:1 loop=2100C #LOOP ID - 2100C PROVIDER NAME >1 [2100C] segment=NM1:1:1P:Provider Name:R:1 #LOOP ID - 2000D SUBSCRIBER LEVEL >1 [2000D] segment=HL:3:22:Subscriber Level:R:1 segment=DMG:::Subscriber Demographic Information:S:1 loop=2100D loop=2200D #LOOP ID - 2100D SUBSCRIBER NAME >1 [2100D] segment=NM1:1:IL,QC:Subscriber Name:R:1 #LOOP ID - 2200D CLAIM SUBMITTER TRACE NUMBER >1 [2200D] segment=TRN:::Claim Submitter Trace Number:R:1 segment=REF:::Payer Claim Identification Number:S:1 segment=REF:::Institutional Bill Type Identification:S:1 segment=REF:::Medical Record Identification:S:1 segment=AMT:::Claim Submitted Charges:S:1 segment=DTP:::Claim Service Date:S:1 loop=2210D #LOOP ID - 2210D SERVICE LINE INFORMATION >1 [2210D] segment=SVC:::Service Line Information:S:1 segment=REF:::Service Line Item Identification:S:1 segment=DTP:::Service Line Date:R:1 #LOOP ID - 2000E DEPENDENT LEVEL >1 [2000E] segment=HL:3:23:Dependent Level:S:1 segment=DMG:::Dependent Demographic Information:R:1 loop=2100E loop=2200E #LOOP ID - 2100E DEPENDENT NAME >1 [2100E] segment=NM1:1:QC:Dependent Name:R:1 #LOOP ID - 2200E CLAIM SUBMITTER TRACE NUMBER >1 [2200E] segment=TRN:::Claim Submitter Trace Number:R:1 segment=REF:::Payer Claim Identification Number:S:1 segment=REF:::Institutional Bill Type Identification:S:1 segment=REF:::Medical Record Identification:S:1 segment=AMT:::Claim Submitted Charges:S:1 segment=DTP:::Claim Service Date:S:1 loop=2210E #LOOP ID - 2210E SERVICE LINE INFORMATION >1 [2210E] segment=SVC:::Service Line Information:S:1 segment=REF:::Service Line Item Identification:S:1 segment=DTP:::Service Line Date:S:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/277_004010X092.cf0000644000175400010010000000517010100503335012467 0ustar pbNone[LOOPS] ISA GS ST 2000A 2000B 2000C 2000D 2000E SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 #LOOP ID - 2000A INFORMATION SOURCE LEVEL >1 [2000A] segment=HL:3:20:Information Source Level:R:1 loop=2100A #LOOP ID - 2100A PAYER NAME >1 [2100A] segment=NM1:1:PR:Payer Name:R:1 segment=PER:::Payer Contact Information:S:1 #LOOP ID - 2000B INFORMATION RECEIVER LEVEL >1 [2000B] segment=HL:3:21:Information Receiver Level:R:1 loop=2100B #LOOP ID - 2100B INFORMATION RECEIVER NAME >1 [2100B] segment=NM1:1:41:Information Receiver Name:R:1 #LOOP ID - 2000C SERVICE PROVIDER LEVEL >1 [2000C] segment=HL:3:19:Service Provider Level:R:1 loop=2100C #LOOP ID - 2100C PROVIDER NAME >1 [2100C] segment=NM1:1:1P:Provider Name:R:1 #LOOP ID - 2000D SUBSCRIBER LEVEL >1 [2000D] segment=HL:3:22:Subscriber Level:R:1 segment=DMG:::Subscriber Demographic Information:R:1 loop=2100D loop=2200D #LOOP ID - 2100D SUBSCRIBER NAME >1 [2100D] segment=NM1:1:IL,QC:Subscriber Name:R:1 #LOOP ID - 2200D CLAIM SUBMITTER TRACE NUMBER >1 [2200D] segment=TRN:::Claim Submitter Trace Number:R:1 segment=STC:::Claim Level Status Information:R:1 segment=REF:::Payer Claim Identification Number:S:1 segment=REF:::Institutional Bill Type Identification:S:1 segment=REF:::Medical Record Identification:S:1 segment=DTP:::Claim Service Date:S:1 loop=2220D #LOOP ID - 2220D SERVICE LINE INFORMATION >1 [2220D] segment=SVC:::Service Line Information:S:1 segment=STC:::Service Line Status Information:S:1 segment=REF:::Service Line Item Identification:S:1 segment=DTP:::Service Line Date:S:1 #LOOP ID - 2000E DEPENDENT LEVEL >1 [2000E] segment=HL:3:23:Dependent Level:S:1 segment=DMG:::Dependent Demographic Information:R:1 loop=2100E loop=2200E #LOOP ID - 2100E DEPENDENT NAME >1 [2100E] segment=NM1:1:QC:Dependent Name:R:1 #LOOP ID - 2200E CLAIM SUBMITTER TRACE NUMBER >1 [2200E] segment=TRN:::Claim Submitter Trace Number:R:1 segment=STC:::Claim Level Status Information:R:1 segment=REF:::Payer Claim Identification Number:R:1 segment=REF:::Institutional Bill Type Identification:S:1 segment=REF:::Medical Record Identification:S:1 segment=DTP:::Claim Service Date:S:1 loop=2220E #LOOP ID - 2220E SERVICE LINE INFORMATION >1 [2220E] segment=SVC:::Service Line Information:S:1 segment=STC:::Service Line Status Information:S:1 segment=REF:::Service Line Item Identification:S:1 segment=DTP:::Service Line Date:S:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/278_004010X094_Req.cf0000644000175400010010000000650310100503335013302 0ustar pbNone[LOOPS] ISA GS ST 2000A 2000B 2000C 2000D 2000E 2000F SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 #LOOP ID - 2000A UTILIZATION MANAGEMENT ORGANIZATION (UMO) LEVEL 1 [2000A] segment=HL:3:20:Utilization Management Organization (UMO) Level:R:1 loop=2010A #LOOP ID - 2010A UTILIZATION MANAGEMENT ORGANIZATION (UMO) NAME 1 [2010A] segment=NM1:1:X3:Utilization Management Organization (UMO) Name:R:1 #LOOP ID - 2000B REQUESTER LEVEL 1 [2000B] segment=HL:3:21:Requester Level:R:1 loop=2010B #LOOP ID - 2010B REQUESTER NAME 1 [2010B] segment=NM1:1:1P,FA:Requester Name:R:1 segment=REF:::Requester Supplemental Identification:S:8 segment=N3:::Requester Address:S:1 segment=N4:::Requester City/State/ZIP Code:S:1 segment=PER:::Requester Contact Information:S:1 segment=PRV:::Requester Provider Information:S:1 #LOOP ID - 2000C SUBSCRIBER LEVEL 1 [2000C] segment=HL:3:22:Subscriber Level:R:1 segment=DTP:::Accident Date:S:1 segment=DTP:::Last Menstrual Period Date:S:1 segment=DTP:::Estimated Date of Birth:S:1 segment=DTP:::Onset of Current Symptoms or Illness Date:S:1 segment=HI:::Subscriber Diagnosis:S:1 loop=2010C #LOOP ID - 2010C SUBSCRIBER NAME 1 [2010C] segment=NM1:1:IL:Subscriber Name:R:1 segment=REF:::Subscriber Supplemental Identification:S:9 segment=DMG:::Subscriber Demographic Information:S:1 #LOOP ID - 2000D DEPENDENT LEVEL 1 [2000D] segment=HL:3:23:Dependent Level:S:1 segment=DTP:::Accident Date:S:1 segment=DTP:::Last Menstrual Period Date:S:1 segment=DTP:::Estimated Date of Birth:S:1 segment=DTP:::Onset of Current Symptoms or Illness Date:S:1 segment=HI:::Dependent Diagnosis:S:1 loop=2010D #LOOP ID - 2010D DEPENDENT NAME 1 [2010D] segment=NM1:1:QD:Dependent Name:R:1 segment=REF:::Dependent Supplemental Identification:S:3 segment=DMG:::Dependent Demographic Information:S:1 segment=INS:::Dependent Relationship:S:1 #LOOP ID - 2000E SERVICE PROVIDER LEVEL >1 [2000E] segment=HL:3:19:Service Provider Level:R:1 segment=MSG:::Message Text:S:1 loop=2010E #LOOP ID - 2010E SERVICE PROVIDER NAME 3 [2010E] segment=NM1:1:1T,FA,SJ:Service Provider Name:R:1 segment=REF:::Service Provider Supplemental Identification:S:7 segment=N3:::Service Provider Address:S:1 segment=N4:::Service Provider City/State/ZIP Code:S:1 segment=PER:::Service Provider Contact Information:S:1 segment=PRV:::Service Provider Information:S:1 #LOOP ID - 2000F SERVICE LEVEL >1 [2000F] segment=HL:3:SS:Service Level:R:1 segment=TRN:::Service Trace Number:S:2 segment=UM:::Health Care Services Review Information:R:1 segment=REF:::Previous Certification Identification:S:1 segment=DTP:::Service Date:S:1 segment=DTP:::Admission Date:S:1 segment=DTP:::Discharge Date:S:1 segment=DTP:::Surgery Date:S:1 segment=HI:::Procedures:S:1 segment=HSD:::Health Care Services Delivery:S:1 segment=CRC:::Patient Condition Information:S:6 segment=CL1:::Institutional Claim Code:S:1 segment=CR1:::Ambulance Transport Information:S:1 segment=CR2:::Spinal Manipulation Service Information:S:1 segment=CR5:::Home Oxygen Therapy Information:S:1 segment=CR6:::Home Health Care Information:S:1 segment=MSG:::Message Text:S:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/278_004010X094_Res.cf0000644000175400010010000000752210100503335013306 0ustar pbNone[LOOPS] ISA GS ST 2000A 2000B 2000C 2000D 2000E 2000F SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 #LOOP ID - 2000A UTILIZATION MANAGEMENT ORGANIZATION (UMO) LEVEL 1 [2000A] segment=HL:3:20:Utilization Management Organization (UMO) Level:R:1 segment=AAA:::Request Validation:S:9 loop=2010A #LOOP ID - 2010A UTILIZATION MANAGEMENT ORGANIZATION (UMO) NAME 1 [2010A] segment=NM1:1:X3:Utilization Management Organization (UMO) Name:R:1 segment=PER:::Utilization Management Organization (UMO) Contact Information:S:1 segment=AAA:::Utilization Management Organization (UMO) Request Validation:S:9 #LOOP ID - 2000B REQUESTER LEVEL 1 [2000B] segment=HL:3:21:Requester Level:R:1 loop=2010B #LOOP ID - 2010B REQUESTER NAME 1 [2010B] segment=NM1:1:1P,FA:Requester Name:R:1 segment=REF:::Requester Supplemental Identification:S:8 segment=AAA:::Requester Request Validation:S:9 segment=PRV:::Requester Provider Information:S:1 #LOOP ID - 2000C SUBSCRIBER LEVEL 1 [2000C] segment=HL:3:22:Subscriber Level:R:1 segment=AAA:::Subscriber Request Validation:S:9 segment=DTP:::Accident Date:S:1 segment=DTP:::Last Menstrual Period Date:S:1 segment=DTP:::Estimated Date of Birth:S:1 segment=DTP:::Onset of Current Symptoms or Illness Date:S:1 segment=HI:::Subscriber Diagnosis:S:1 loop=2010C #LOOP ID - 2010C SUBSCRIBER NAME 1 [2010C] segment=NM1:1:IL:Subscriber Name:R:1 segment=REF:::Subscriber Supplemental Identification:S:9 segment=AAA:::Subscriber Request Validation:S:9 segment=DMG:::Subscriber Demographic Information:S:1 #LOOP ID - 2000D DEPENDENT LEVEL 1 [2000D] segment=HL:3:23:Dependent Level:S:1 segment=AAA:::Dependent Request Validation:S:9 segment=DTP:::Accident Date:S:1 segment=DTP:::Last Menstrual Period Date:S:1 segment=DTP:::Estimated Date of Birth:S:1 segment=DTP:::Onset of Current Symptoms or Illness Date:S:1 segment=HI:::Dependent Diagnosis:S:1 loop=2010D #LOOP ID - 2010D DEPENDENT NAME 1 [2010D] segment=NM1:1:QC:Dependent Name:R:1 segment=REF:::Dependent Supplemental Identification:S:3 segment=AAA:::Dependent Request Validation:S:9 segment=DMG:::Dependent Demographic Information:S:1 segment=INS:::Dependent Relationship:S:1 #LOOP ID - 2000E SERVICE PROVIDER LEVEL >1 [2000E] segment=HL:3:19:Service Provider Level:R:1 segment=MSG:::Message Text:S:1 #LOOP ID - 2010E SERVICE PROVIDER NAME 3 [2010E] segment=NM1:1:1T,FA,SJ:Service Provider Name:R:1 segment=REF:::Service Provider Supplemental Identification:S:7 segment=N3:::Service Provider Address:S:1 segment=N4:::Service Provider City/State/ZIP Code:S:1 segment=PER:::Service Provider Contact Information:S:1 segment=AAA:::Service Provider Request Validation:S:9 segment=PRV:::Service Provider Information:S:1 #LOOP ID - 2000F SERVICE LEVEL >1 [2000F] segment=HL:3:SS:Service Level:R:1 segment=TRN:::Service Trace Number:S:3 segment=AAA:::Service Request Validation:S:9 segment=UM:::Health Care Services Review Information:R:1 segment=HCR:::Health Care Services Review:S:1 segment=REF:::Previous Certification Identification:S:1 segment=DTP:::Service Date:S:1 segment=DTP:::Admission Date:S:1 segment=DTP:::Discharge Date:S:1 segment=DTP:::Surgery Date:S:1 segment=DTP:::Certification Issue Date:S:1 segment=DTP:::Certification Expiration Date:S:1 segment=DTP:::Certification Effective Date:S:1 segment=HI:::Procedures:S:1 segment=HSD:::Health Care Services Delivery:S:1 segment=CL1:::Institutional Claim Code:S:1 segment=CR1:::Ambulance Transport Information:S:1 segment=CR2:::Spinal Manipulation Service Information:S:1 segment=CR5:::Home Oxygen Therapy Information:S:1 segment=CR6:::Home Health Care Information:S:1 segment=MSG:::Message Text:S:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/820_004010X061.cf0000644000175400010010000000416210100503335012455 0ustar pbNone[LOOPS] ISA GS ST 1000A 1000B 2000A 2000B SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::820 Header:R:1 segment=BPR:::Financial Information:R:1 segment=TRN:::Reassociation Key:R:1 segment=CUR:::Non-US Dollars Currency:S:1 segment=REF:::Premium Receivers Identification Key:S:>1 segment=DTM:::Process Date:S:1 segment=DTM:::Delivery Date:S:1 segment=DTM:::Coverage Period:S:1 #LOOP ID - 1000A PREMIUM RECEIVER’S NAME 1 [1000A] segment=N1:1:PE:Premium Receiver’s Name:R:1 segment=N2:::Premium Receiver Additional Name:S:1 segment=N3:::Premium Receiver’s Address:S:1 segment=N4:::Premium Receiver’s City, State, Zip:S:1 #LOOP ID - 1000B PREMIUM PAYER’S NAME 1 [1000B] segment=N1:1:PR:Premium Payer’s Name:R:1 segment=N2:::Premium Payer Additional Name:S:1 segment=N3:::Premium Payer’s Address:S:1 segment=N4:::Premium Payer’s City, State, Zip:S:1 segment=PER:::Premium Payer’s Administrative Contact:S:>1 #LOOP ID - 2000A ORGANIZATION SUMMARY REMITTANCE 1 [2000A] segment=ENT:::Organization Summary Remittance:S:1 loop=2300A #LOOP ID - 2300A ORGANIZATION SUMMARY REMITTANCE DETAIL >1 [2300A] segment=RMR:::Organization Summary Remittance Detail:R:1 loop=2310A loop=2320A #LOOP ID - 2310A SUMMARY LINE ITEM 1 [2310A] segment=IT1:::Summary Line Item:S:1 loop=2315A #LOOP ID - 2315A MEMBER COUNT >1 [2315A] segment=SLN:::Member Count:S:1 #LOOP ID - 2320A ORGANIZATION SUMMARY REMITTANCE LEVEL ADJUSTMENT >1 [2320A] segment=ADX:::Organization Summary Remittance Level Adjustment:S:1 #LOOP ID - 2000B INDIVIDUAL REMITTANCE >1 [2000B] segment=ENT:::Individual Remittance:S:1 loop=2100B loop=2300B #LOOP ID - 2100B INDIVIDUAL NAME >1 [2100B] segment=NM1:1:EY:Individual Name:S:1 #LOOP ID - 2300B INDIVIDUAL PREMIUM REMITTANCE DETAIL >1 [2300B] segment=RMR:::Individual Premium Remittance Detail:S:1 segment=DTM:::Individual Coverage Period:S:1 loop=2320B #LOOP ID - 2320B INDIVIDUAL PREMIUM ADJUSTMENT >1 [2320B] segment=ADX:::Individual Premium Adjustment:S:1 #LOOP ID - TRAILER [SE] segment=SE:::820 Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/834_004010X095.cf0000644000175400010010000000730410100503335012472 0ustar pbNone[LOOPS] ISA GS ST 1000A 1000B 1000C 2000 SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BGN:::Beginning Segment:R:1 segment=REF:::Transaction Set Policy Number:S:1 segment=DTP:::File Effective Date:S:>1 #LOOP ID - 1000A SPONSOR NAME 1 [1000A] segment=N1:1:P5:Sponsor Name:R:1 #LOOP ID - 1000B PAYER 1 [1000B] segment=N1:1:1N:Payer:R:1 #LOOP ID - 1000C TPA/BROKER NAME 2 [1000C] segment=N1:1:TV:TPA/Broker Name:S:1 loop=1100C #LOOP ID - 1100C TPA/BROKER ACCOUNT INFORMATION 1 [1100C] segment=ACT:::TPA/Broker Account Information:S:1 #LOOP ID - 2000 MEMBER LEVEL DETAIL >1 [2000] segment=INS:::Member Level Detail:R:1 segment=REF:::Subscriber Number:R:1 segment=REF:::Member Policy Number:S:1 segment=REF:::Member Identification Number:S:5 segment=REF:::Prior Coverage Months:S:1 segment=DTP:::Member Level Dates:S:20 loop=2100A loop=2100B loop=2100C loop=2100D loop=2100E loop=2100F loop=2100G loop=2200 loop=2300 #LOOP ID - 2100A MEMBER NAME 1 [2100A] segment=NM1:1:IL:Member Name:R:1 segment=PER:::Member Communications Numbers:S:1 segment=N3:::Member Residence Street Address:S:1 segment=N4:::Member Residence City, State, ZIP Code:S:1 segment=DMG:::Member Demographics:S:1 segment=ICM:::Member Income:S:1 segment=AMT:::Member Policy Amounts:S:4 segment=HLH:::Member Health Information:S:1 segment=LUI:::Member Language:S:5 #LOOP ID - 2100B INCORRECT MEMBER NAME 1 [2100B] segment=NM1:1:70:Incorrect Member Name:S:1 segment=DMG:::Incorrect Member Demographics:S:1 #LOOP ID - 2100C MEMBER MAILING ADDRESS 1 [2100C] segment=NM1:1:31:Member Mailing Address:S:1 segment=N3:::Member Mail Street Address:S:1 segment=N4:::Member Mail City, State, Zip:S:1 #LOOP ID - 2100D MEMBER EMPLOYER 3 [2100D] segment=NM1:1:ES:Member Employer:S:1 segment=PER:::Member Employer Communications Numbers:S:1 segment=N3:::Member Employer Street Address:S:1 segment=N4:::Member Employer City, State, Zip:S:1 #LOOP ID - 2100E MEMBER SCHOOL 3 [2100E] segment=NM1:1:M8:Member School:S:1 segment=PER:::Member School Commmunications Numbers:S:1 segment=N3:::Member School Street Address:S:1 segment=N4:::Member School City, State, Zip:S:1 #LOOP ID - 2100F CUSTODIAL PARENT 1 [2100F] segment=NM1:1:S3:Custodial Parent:S:1 segment=PER:::Custodial Parent Communications Numbers:S:1 segment=N3:::Custodial Parent Street Address:S:1 segment=N4:::Custodial Parent City, State, Zip:S:1 #LOOP ID - 2100G RESPONSIBLE PERSON 1 [2100G] segment=NM1:1:QD:Responsible Person:S:1 segment=PER:::Responsible Person Communications Numbers:S:1 segment=N3:::Responsible Person Street Address:S:1 segment=N4:::Responsible Person City, State, Zip:S:1 #LOOP ID - 2200 DISABILITY INFORMATION 1 [2200] segment=DSB:::Disability Information:S:1 segment=DTP:::Disability Eligibility Dates:S:2 #LOOP ID - 2300 HEALTH COVERAGE 99 [2300] segment=HD:::Health Coverage:S:1 segment=DTP:::Health Coverage Dates:R:4 segment=AMT:::Health Coverage Policy:S:4 segment=REF:::Health Coverage Policy Number:S:2 segment=IDC:::Identification Card:S:10 loop=2310 loop=2320 #LOOP ID - 2310 PROVIDER INFORMATION 30 [2310] segment=LX:::Provider Information:S:1 segment=NM1:::Provider Name:R:1 segment=N4:::Provider City, State, ZIP Code:S:1 segment=PER:::Provider Communications Numbers:S:2 segment=PLA:::PCP Change Reason:S:1 #LOOP ID - 2320 COORDINATION OF BENEFITS 5 [2320] segment=COB:::Coordination of Benefits:S:1 segment=REF:::Additional Coordination of Benefits Identifiers:S:5 segment=N1:::Other Insurance Company Name:S:1 segment=DTP:::Coordination of Benefits Eligibility Dates:S:2 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/835_004010X091.cf0000644000175400010010000000432210100503335012464 0ustar pbNone[LOOPS] ISA GS ST 1000A 1000B 2000 SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GE:R:1 [ST] segment=ST:1:835:Transaction Set Header:R:1 segment=BPR:::Financial Information:R:1 segment=TRN:::Reassociation Trace Number:R:1 segment=CUR:::Foreign Currency Information:S:1 segment=REF:1:EV:Receiver Identification:S:1 segment=REF:1:F2:Version Identification:S:1 segment=DTM:1:405:Production Date:S:1 [1000A] segment=N1:1:PR:Payer Identification:R:1 segment=N3:::Payer Address:R:1 segment=N4:::Payer City, State, ZIP Code:R:1 segment=REF:1:2U,EO,HI,NF:Additional Payer Identification:S:4 segment=PER:1:CX:Payer Contact Information:S:1 [1000B] segment=N1:1:PE:Payee Identification:R:1 segment=N3:::Payee Address:S:1 segment=N4:::Payee City, State, ZIP Code:S:1 segment=REF:::Payee Additional Identification:S:>1 [2000] segment=LX:::Header Number:S:1 segment=TS3:::Provider Summary Information:S:1 segment=TS2:::Provider Supplemental Summary Information:S:1 loop=2100 [2100] segment=CLP:::Claim Payment Information:R:1 segment=CAS:1:PR:Claim Adjustment:S:99 segment=NM1:1:QC:Patient Name:R:1 segment=NM1:1:IL:Insured Name:S:1 segment=NM1:1:74:Corrected Patient/Insured Name:S:1 segment=NM1:1:82:Service Provider Name:S:1 segment=NM1:1:TT:Crossover Carrier Name:S:1 segment=NM1:1:PR:Corrected Priority Payer Name:S:2 segment=MIA:::Inpatient Adjudication Information:S:1 segment=MOA:::Outpatient Adjudication Information:S:1 segment=REF:::Other Claim Related Identification:S:5 segment=REF:::Rendering Provider Identification:S:10 segment=DTM:::Claim Date:S:4 segment=PER:::Claim Contact Information:S:3 segment=AMT:::Claim Supplemental Information:S:14 segment=QTY:::Claim Supplemental Information Quantity:S:15 loop=2110 [2110] segment=SVC:::Service Payment Information:S:1 segment=DTM:::Service Date:S:3 segment=CAS:::Service Adjustment:S:99 segment=REF:::Service Identification:S:7 segment=REF:::Rendering Provider Information:S:10 segment=AMT:::Service Supplemental Amount:S:12 segment=QTY:::Service Supplemental Quantity:S:6 segment=LQ:::Health Care Remark Codes:S:99 segment=PLB:::Provider Adjustment:S:>1 [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/837_004010X096.cf0000644000175400010010000002522310100503335012476 0ustar pbNone[LOOPS] ISA GS ST 1000A 1000B 2000A 2000B 2000C SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 segment=REF:::Transmission Type Identification:R:1 #LOOP ID - 1000A SUBMITTER NAME 1 [1000A] segment=NM1:1:41:Submitter Name:R:1 segment=PER:::Submitter EDI Contact Information:R:2 #LOOP ID - 1000B RECEIVER NAME 1 [1000B] segment=NM1:1:40:Receiver Name:R:1 #LOOP ID - 2000A BILLING/PAY-TO PROVIDER HIERARCHICAL LEVEL >1 [2000A] segment=HL:3:20:Billing/Pay-To Provider Hierarchical Level:R:1 segment=PRV:::Billing/Pay-To Provider Specialty Information:S:1 segment=CUR:::Foreign Currency Information:S:1 loop=2010AA loop=2010AB #LOOP ID - 2010AA BILLING PROVIDER NAME 1 [2010AA] segment=NM1:1:85:Billing Provider Name:R:1 segment=N3:::Billing Provider Address:R:1 segment=N4:::Billing Provider City/State/ZIP Code:R:1 segment=REF:::Billing Provider Secondary Identification:S:8 segment=REF:::Credit/Debit Card Billing Information:S:8 segment=PER:::Billing Provider Contact Information:S:2 #LOOP ID - 2010AB PAY-TO PROVIDER NAME 1 [2010AB] segment=NM1:1:87:Pay-To Provider Name:S:1 segment=N3:::Pay-To Provider Address:R:1 segment=N4:::Pay-To Provider City/State/ZIP Code:R:1 segment=REF:::Pay-To Provider Secondary Identification:S:5 #LOOP ID - 2000B SUBSCRIBER HIERARCHICAL LEVEL >1 [2000B] segment=HL:3:22:Subscriber Hierarchical Level:R:1 segment=SBR:::Subscriber Information:R:1 segment=PAT:::Patient Information:S:1 loop=2010BA loop=2010BB loop=2010BC loop=2010BD loop=2300 #LOOP ID - 2010BA SUBSCRIBER NAME 1 [2010BA] segment=NM1:1:IL:Subscriber Name:R:1 segment=N3:::Subscriber Address:S:1 segment=N4:::Subscriber City/State/ZIP Code:S:1 segment=DMG:::Subscriber Demographic Information:S:1 segment=REF:::Subscriber Secondary Identification:S:4 segment=REF:::Property and Casualty Claim Number:S:1 #LOOP ID - 2010BB CREDIT/DEBIT CARD ACCOUNT HOLDER NAME 1 [2010BB] segment=NM1:1:AO:Credit/Debit Card Account Holder Name:S:1 segment=REF:::Credit/Debit Card Information:S:2 #LOOP ID - 2010BC PAYER NAME 1 [2010BC] segment=NM1:1:PR:Payer Name:R:1 segment=N3:::Payer Address:S:1 segment=N4:::Payer City/State/ZIP Code:S:1 segment=REF:::Payer Secondary Identification:S:3 #LOOP ID - 2010BD RESPONSIBLE PARTY NAME 1 [2010BD] segment=NM1:1:QD:Responsible Party Name:S:1 segment=N3:::Responsible Party Address:R:1 segment=N4:::Responsible Party City/State/ZIP Code:R:1 #LOOP ID - 2000C PATIENT HIERARCHICAL LEVEL >1 [2000C] segment=HL:3:23:Patient Hierarchical Level:S:1 segment=PAT:::Patient Information:R:1 loop=2010CA loop=2300 #LOOP ID - 2010CA PATIENT NAME 1 [2010CA] segment=NM1:1:QC:Patient Name:R:1 segment=N3:::Patient Address:R:1 segment=N4:::Patient City/State/ZIP Code:R:1 segment=DMG:::Patient Demographic Information:R:1 segment=REF:::Patient Secondary Identification Number:S:5 segment=REF:::Property and Casualty Claim Number:S:1 #LOOP ID - 2300 CLAIM INFORMATION 100 [2300] segment=CLM:::Claim information:R:1 segment=DTP:::Discharge Hour:S:1 segment=DTP:::Statement Dates:R:1 segment=DTP:::Admission Date/Hour:S:1 segment=CL1:::Institutional Claim Code:S:1 segment=PWK:::Claim Supplemental Information:S:10 segment=CN1:::Contract Information:S:1 segment=AMT:::Payer Estimated Amount Due:S:1 segment=AMT:::Patient Estimated Amount Due:S:1 segment=AMT:::Patient Paid Amount:S:1 segment=AMT:::Credit/Debit Card Maximum Amount:S:1 segment=REF:::Adjusted Repriced Claim Number:S:1 segment=REF:::Repriced Claim Number:S:1 segment=REF:::Claim Identification Number For Clearinghouses and Other Transmission Intermediaries:S:1 segment=REF:::Document Identification Code:S:1 segment=REF:::Original Reference Number (ICN/DCN):S:1 segment=REF:::Investigational Device Exemption Number:S:1 segment=REF:::Service Authorization Exception Code:S:1 segment=REF:::Peer Review Organization (PRO) Approval Number:S:1 segment=REF:::Prior Authorization or Referral Number:S:2 segment=REF:::Medical Record Number:S:1 segment=REF:::Demonstration Project Identifier:S:1 segment=K3:::File Information:S:10 segment=NTE:::Claim Note:S:10 segment=NTE:::Billing Note:S:1 segment=CR6:::Home Health Care Information:S:1 segment=CRC:::Home Health Functional Limitations:S:3 segment=CRC:::Home Health Activities Permitted:S:3 segment=CRC:::Home Health Mental Status:S:2 segment=HI:::Principal, Admitting, E-Code and Patient Reason For Visit Diagnosis Information:R:1 segment=HI:::Diagnosis Related Group (DRG) Information:S:1 segment=HI:::Other Diagnosis Information:S:2 segment=HI:::Principal Procedure Information:S:1 segment=HI:::Other Procedure Information:S:2 segment=HI:::Occurrence Span Information:S:2 segment=HI:::Occurrence Information:S:2 segment=HI:::Value Information:S:2 segment=HI:::Condition Information:S:2 segment=HI:::Treatment Code Information:S:2 segment=QTY:::Claim Quantity:S:4 segment=HCP:::Claim Pricing/Repricing Information:S:1 loop=2305 loop=2310A loop=2310B loop=2310C loop=2310D loop=2310E loop=2320 loop=2400 #LOOP ID - 2305 HOME HEALTH CARE PLAN INFORMATION 6 [2305] segment=CR7:::Home Health Care Plan Information:S:1 segment=HSD:::Health Care Services Delivery:S:12 #LOOP ID - 2310A ATTENDING PHYSICIAN NAME 1 [2310A] segment=NM1:1:71:Attending Physician Name:S:1 segment=PRV:::Attending Physician Specialty Information:R:1 segment=REF:::Attending Physician Secondary Identification:S:5 #LOOP ID - 2310B OPERATING PHYSICIAN NAME 1 [2310B] segment=NM1:1:72:Operating Physician Name:S:1 segment=PRV:::Operating Physician Specialty Information:S:1 segment=REF:::Operating Physician Secondary Identification:S:5 #LOOP ID - 2310C OTHER PROVIDER NAME 1 [2310C] segment=NM1:1:73:Other Provider Name:S:1 segment=PRV:::Other Provider Specialty Information:R:1 segment=REF:::Other Provider Secondary Identification:S:5 #LOOP ID - 2310D REFERRING PROVIDER NAME 2 [2310D] segment=NM1:1:DN,P3:Referring Provider Name:S:1 segment=PRV:::Referring Provider Specialty Information:S:1 segment=REF:::Referring Provider Secondary Identification:S:5 #LOOP ID - 2310E SERVICE FACILITY NAME 1 [2310E] segment=NM1:1:FA:Service Facility Name:S:1 segment=PRV:::Service Facility Specialty Information:S:1 segment=N3:::Service Facility Address:R:1 segment=N4:::Service Facility City/State/Zip Code:R:1 segment=REF:::Service Facility Secondary Identification:S:5 #LOOP ID - 2320 OTHER SUBSCRIBER INFORMATION 10 [2320] segment=SBR:::Other Subscriber Information:S:1 segment=CAS:::Claim Level Adjustment:S:5 segment=AMT:::Payer Prior Payment:S:1 segment=AMT:::Coordination of Benefits (COB) Total Allowed Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Total Submitted Charges:S:1 segment=AMT:::Diagnostic Related Group (DRG) Outlier Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Total Medicare Paid Amount:S:1 segment=AMT:::Medicare Paid Amount - 100%:S:1 segment=AMT:::Medicare Paid Amount - 80%:S:1 segment=AMT:::Coordination of Benefits (COB) Medicare A Trust Fund Paid Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Medicare B Trust Fund Paid Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Total Non-covered Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Total Denied Amount:S:1 segment=DMG:::Other Subscriber Demographic Information:S:1 segment=OI:::Other Insurance Coverage Information:R:1 segment=MIA:::Medicare Inpatient Adjudication Information:S:1 segment=MOA:::Medicare Outpatient Adjudication Information:S:1 loop=2330A loop=2330B loop=2330C loop=2330D loop=2330E loop=2330F loop=2330G loop=2330H #LOOP ID - 2330A OTHER SUBSCRIBER NAME 1 [2330A] segment=NM1:1:IL:Other Subscriber Name:R:1 segment=N3:::Other Subscriber Address:S:1 segment=N4:::Other Subscriber City/State/ZIP Code:S:1 segment=REF:::Other Subscriber Secondary Information:S:3 #LOOP ID - 2330B OTHER PAYER NAME 1 [2330B] segment=NM1:1:PR:Other Payer Name:R:1 segment=N3:::Other Payer Address:S:1 segment=N4:::Other Payer City/State/ZIP Code:S:1 segment=DTP:::Claim Adjudication Date:S:1 segment=REF:::Other Payer Secondary Identification and Reference Number:S:2 segment=REF:::Other Payer Prior Authorization or Referral Number:S:1 #LOOP ID - 2330C OTHER PAYER PATIENT INFORMATION 1 [2330C] segment=NM1:1:QC:Other Payer Patient Information:S:1 segment=REF:::Other Payer Patient Identification Number:S:3 #LOOP ID - 2330D OTHER PAYER ATTENDING PROVIDER 1 [2330D] segment=NM1:1:71:Other Payer Attending Provider:S:1 segment=REF:::Other Payer Attending Provider Identification:R:3 #LOOP ID - 2330E OTHER PAYER OPERATING PROVIDER 1 [2330E] segment=NM1:1:72:Other Payer Operating Provider:S:1 segment=REF:::Other Payer Operating Provider Identification:R:3 #LOOP ID - 2330F OTHER PAYER OTHER PROVIDER 1 [2330F] segment=NM1:1:73:Other Payer Other Provider:S:1 segment=REF:::Other Payer Other Provider Identification:R:3 #LOOP ID - 2330G OTHER PAYER REFERRING PROVIDER 2 [2330G] segment=NM1:1:DN,P3:Other Payer Referring Provider:S:1 segment=REF:::Other Payer Referring Provider Identification:R:3 #LOOP ID - 2330H OTHER PAYER SERVICE FACILITY PROVIDER 1 [2330H] segment=NM1:1:FA:Other Payer Service Facility Provider:S:1 segment=REF:::Other Payer Service Facility Provider Identification:R:3 #LOOP ID - 2400 SERVICE LINE NUMBER 999 [2400] segment=LX:::Service Line Number:R:1 segment=SV2:::Institutional Service Line:R:1 segment=SV4:::Prescription Number:S:1 segment=PWK:::Line Supplemental Information:S:5 segment=DTP:::Service Line Date:S:1 segment=DTP:::Assessment Date:S:1 segment=AMT:::Service Tax Amount:S:1 segment=AMT:::Facility Tax Amount:S:1 loop=2420A loop=2420B loop=2420C loop=2420D loop=2430 #LOOP ID - 2420A ATTENDING PHYSICIAN NAME 1 [2420A] segment=NM1:1:71:Attending Physician Name:S:1 segment=PRV:::Attending Physician Specialty Information:R:1 segment=REF:::Attending Physician Secondary Identification:S:1 #LOOP ID - 2420B OPERATING PHYSICIAN NAME 1 [2420B] segment=NM1:1:72:Operating Physician Name:S:1 segment=PRV:::Operating Physician Specialty Information:S:1 segment=REF:::Operating Physician Secondary Identification:S:1 #LOOP ID - 2420C OTHER PROVIDER NAME 1 [2420C] segment=NM1:1:73:Other Provider Name:S:1 segment=PRV:::Other Provider Specialty Information:S:1 segment=REF:::Other Provider Secondary Identification:S:1 #LOOP ID - 2420D REFERRING PROVIDER NAME 1 [2420D] segment=NM1:1:DN:Referring Provider Name:S:1 segment=PRV:::Referring Provider Specialty Information:S:1 segment=REF:::Referring Provider Secondary Identification:S:1 #LOOP ID - 2430 SERVICE LINE ADJUDICATION INFORMATION 25 [2430] segment=SVD:::Service Line Adjudication Information:S:1 segment=CAS:::Service Line Adjustment:S:99 segment=DTP:::Service Adjudication Date:S:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/837_004010X097.cf0000644000175400010010000001777510100503335012514 0ustar pbNone[LOOPS] ISA GS ST 1000A 1000B 2000A 2000B 2000C SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 segment=REF:::Transmission Type Identification:R:1 #LOOP ID - 1000A SUBMITTER NAME 1 [1000A] segment=NM1:1:41:Submitter Name:R:1 segment=N2:::Additional Submitter Name Information:S:1 segment=PER:::Submitter Contact Information:R:2 #LOOP ID - 1000B RECEIVER NAME 1 [1000B] segment=NM1:1:40:Receiver Name:R:1 segment=N2:::Receiver Additional Name Information:S:1 #LOOP ID - 2000A BILLING/PAY-TO PROVIDER HIERARCHICAL LEVEL >1 [2000A] segment=HL:3:20:Billing/Pay-to Provider Hierarchical Level:R:1 segment=PRV:::Billing/Pay-to Provider Specialty Information:S:1 segment=CUR:::Foreign Currency Information:S:1 loop=2010AA loop=2010AB #LOOP ID - 2010AA BILLING PROVIDER NAME 1 [2010AA] segment=NM1:1:85:Billing Provider Name:R:1 segment=N2:::Additional Billing Provider Name Information:S:1 segment=N3:::Billing Provider Address:R:1 segment=N4:::Billing Provider City/State/ZIP Code:R:1 segment=REF:::Billing Provider Secondary Identification Number:S:5 segment=REF:::Claim Submitter Credit/Debit Card Information:S:8 #LOOP ID - 2010AB PAY-TO PROVIDER’S NAME 1 [2010AB] segment=NM1:1:87:Pay-to Provider’s Name:S:1 segment=N2:::Additional Pay-to Provider Name Information:S:1 segment=N3:::Pay-to Provider’s Address:R:1 segment=N4:::Pay-to Provider City/State/Zip:R:1 segment=REF:::Pay-to Provider Secondary Identification Number:S:5 #LOOP ID - 2000B SUBSCRIBER HIERARCHICAL LEVEL >1 [2000B] segment=HL:3:22:Subscriber Hierarchical Level:R:1 segment=SBR:::Subscriber Information:R:1 loop=2010BA loop=2010BB loop=2010BC loop=2300 #LOOP ID - 2010BA SUBSCRIBER NAME 1 [2010BA] segment=NM1:1:IL:Subscriber Name:R:1 segment=N2:::Additional Subscriber Name Information:S:1 segment=N3:::Subscriber Address:S:1 segment=N4:::Subscriber City/State/ZIP Code:S:1 segment=DMG:::Subscriber Demographic Information:S:1 segment=REF:::Subscriber Secondary Identification:S:4 segment=REF:::Property and Casualty Claim Number:S:1 #LOOP ID - 2010BB PAYER NAME 1 [2010BB] segment=NM1:1:PR:Payer Name:R:1 segment=N2:::Additional Payer Name Information:S:1 segment=N3:::Payer Address:S:1 segment=N4:::Payer City/State/ZIP Code:S:1 segment=REF:::Payer Secondary Identification Number:S:3 #LOOP ID - 2010BC CREDIT/DEBIT CARD HOLDER NAME 1 [2010BC] segment=NM1:1:AO:Credit/Debit Card Holder Name:S:1 segment=N2:::Additional Credit/Debit Card Holder Name Information:S:1 segment=REF:::Credit/Debit Card Information:S:3 #LOOP ID - 2000C PATIENT HIERARCHICAL LEVEL >1 [2000C] segment=HL:3:23:Patient Hierarchical Level:S:1 segment=PAT:::Patient Information:R:1 loop=2010CA loop=2300 #LOOP ID - 2010CA PATIENT NAME 1 [2010CA] segment=NM1:1:QC:Patient Name:R:1 segment=N2:::Additional Name Information:S:1 segment=N3:::Patient Address:R:1 segment=N4:::Patient City/State/ZIP Code:R:1 segment=DMG:::Patient Demographic Information:R:1 segment=REF:::Patient Secondary Identification:S:5 segment=REF:::Property and Casualty Claim Number:S:1 #LOOP ID - 2300 CLAIM INFORMATION 100 [2300] segment=CLM:::Claim Information:R:1 segment=DTP:::Date - Admission:S:1 segment=DTP:::Date - Discharge:S:1 segment=DTP:::Date - Referral:S:1 segment=DTP:::Date - Accident:S:1 segment=DTP:::Date - Appliance Placement:S:5 segment=DTP:::Date - Service:S:1 segment=DN1:::Orthodontic Total Months of Treatment:S:1 segment=DN2:::Tooth Status:S:35 segment=PWK:::Claim Supplemental Information:S:10 segment=AMT:::Patient Amount Paid:S:1 segment=AMT:::Credit/Debit Card - Maximum Amount:S:1 segment=REF:::Predetermination Identification:S:5 segment=REF:::Service Authorization Exception Code:S:1 segment=REF:::Original Reference Number (ICN/DCN):S:1 segment=REF:::Referral Identification:S:1 segment=REF:::Claim Identification Number for Clearinghouses and Other Transmission Intermediaries:S:1 segment=NTE:::Claim Note:S:20 loop=2310A loop=2310B loop=2310C loop=2320 loop=2400 #LOOP ID - 2310A REFERRING PROVIDER NAME 2 [2310A] segment=NM1:1:DN,P3:Referring Provider Name:S:1 segment=PRV:::Referring Provider Specialty Information:S:1 segment=N2:::Additional Referring Provider Name Information:S:1 segment=REF:::Referring Provider Secondary Identification:S:5 #LOOP ID - 2310B RENDERING PROVIDER NAME 1 [2310B] segment=NM1:1:82:Rendering Provider Name:S:1 segment=PRV:::Rendering Provider Specialty Information:R:1 segment=N2:::Additional Rendering Provider Name Information:S:1 segment=REF:::Rendering Provider Secondary Identification:S:5 #LOOP ID - 2310C SERVICE FACILITY LOCATION 1 [2310C] segment=NM1:1:FA:Service Facility Location:S:1 segment=N2:::Additional Service Facility Location Name Information:S:1 segment=REF:::Service Facility Location Secondary Identification:S:5 #LOOP ID - 2320 OTHER SUBSCRIBER INFORMATION 10 [2320] segment=SBR:::Other Subscriber Information:S:1 segment=CAS:::Claim Adjustment:S:5 segment=AMT:::Coordination of Benefits (COB) Payer Paid Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Approved Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Allowed Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Patient Responsibility Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Covered Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Discount Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Patient Paid Amount:S:1 segment=DMG:::Other Insured Demographic Information:S:1 segment=OI:::Other Insurance Coverage Information:R:1 loop=2330A loop=2330B loop=2330C loop=2330D loop=2330E #LOOP ID - 2330A OTHER SUBSCRIBER NAME 1 [2330A] segment=NM1:1:IL:Other Subscriber Name:R:1 segment=N2:::Additional Other Subscriber Name Information:S:1 segment=N3:::Other Subscriber Address:S:1 segment=N4:::Other Subscriber City/State/Zip Code:S:1 segment=REF:::Other Subscriber Secondary Identification:S:3 #LOOP ID - 2330B OTHER PAYER NAME 1 [2330B] segment=NM1:1:PR:Other Payer Name:R:1 segment=N2:::Additional Other Payer Name Information:S:1 segment=PER:::Other Payer Contact Information:S:2 segment=DTP:::Claim Paid Date:S:1 segment=REF:::Other Payer Secondary Identifier:S:3 segment=REF:::Other Payer Referral Number:S:1 segment=REF:::Other Payer Claim Adjustment Indicator:S:1 #LOOP ID - 2330C OTHER PAYER PATIENT INFORMATION 1 [2330C] segment=NM1:1:QC:Other Payer Patient Information:S:1 segment=REF:::Other Payer Patient Identification:S:3 #LOOP ID - 2330D OTHER PAYER REFERRING PROVIDER 1 [2330D] segment=NM1:1:DN,P3:Other Payer Referring Provider:S:1 segment=REF:::Other Payer Referring Provider Identification:S:3 #LOOP ID - 2330E OTHER PAYER RENDERING PROVIDER 1 [2330E] segment=NM1:1:82:Other Payer Rendering Provider:S:1 segment=REF:::Other Payer Rendering Provider Identification:S:3 #LOOP ID - 2400 LINE COUNTER 50 [2400] segment=LX:::Line Counter:R:1 segment=SV3:::Dental Service:R:1 segment=TOO:::Tooth Information:S:32 segment=DTP:::Date - Service:S:1 segment=DTP:::Date - Prior Placement:S:1 segment=DTP:::Date - Appliance Placement:S:1 segment=DTP:::Date - Replacement:S:1 segment=QTY:::Anesthesia Quantity:S:5 segment=REF:::Service Predetermination Identification:S:1 segment=REF:::Referral Number:S:1 segment=REF:::Line Item Control Number:S:1 segment=AMT:::Approved Amount:S:1 segment=NTE:::Line Note:S:10 loop=2420A loop=2420B loop=2430 #LOOP ID - 2420A RENDERING PROVIDER NAME 1 [2420A] segment=NM1:1:82:Rendering Provider Name:S:1 segment=PRV:::Rendering Provider Specialty Information:R:1 segment=N2:::Additional Rendering Provider Name Information:S:1 segment=REF:::Rendering Provider Secondary Identification:S:5 #LOOP ID - 2420B OTHER PAYER REFERRAL NUMBER 1 [2420B] segment=NM1:1:PR:Other Payer Referral Number:S:1 segment=REF:::Other Payer Referral Number:S:1 #LOOP ID - 2430 LINE ADJUDICATION INFORMATION 25 [2430] segment=SVD:::Line Adjudication Information:S:1 segment=CAS:::Service Adjustment:S:99 segment=DTP:::Line Adjudication Date:R:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/837_004010X098.cf0000644000175400010010000003532310100503335012502 0ustar pbNone[LOOPS] ISA GS ST 1000A 1000B 2000A 2000B 2000C SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 segment=BHT:::Beginning of Hierarchical Transaction:R:1 segment=REF:::Transmission Type Identification:R:1 #LOOP ID - 1000A SUBMITTER NAME 1 [1000A] segment=NM1:1:41:Submitter Name:R:1 segment=N2:::Additional Submitter Name Information:S:1 segment=PER:::Submitter EDI Contact Information:R:2 #LOOP ID - 1000B RECEIVER NAME 1 [1000B] segment=NM1:1:40:Receiver Name:R:1 segment=N2:::Receiver Additional Name Information:S:1 #LOOP ID - 2000A BILLING/PAY-TO PROVIDER >1 [2000A] segment=HL:3:20:Billing/Pay-to Provider Hierarchical Level:R:1 segment=PRV:::Billing/Pay-to Provider Specialty Information:S:1 segment=CUR:::Foreign Currency Information:S:1 loop=2010AA loop=2010AB #LOOP ID - 2010AA BILLING PROVIDER NAME 1 [2010AA] segment=NM1:1:85:Billing Provider Name:R:1 segment=N2:::Additional Billing Provider Name Information:S:1 segment=N3:::Billing Provider Address:R:1 segment=N4:::Billing Provider City/State/ZIP Code:R:1 segment=REF:::Billing Provider Secondary Identification:S:8 segment=REF:::Credit/Debit Card Billing Information:S:8 segment=PER:::Billing Provider Contact Information:S:2 #LOOP ID - 2010AB PAY-TO PROVIDER NAME 1 [2010AB] segment=NM1:1:87:Pay-to Provider Name:S:1 segment=N2:::Additional Pay-to Provider Name Information:S:1 segment=N3:::Pay-to Provider Address:R:1 segment=N4:::Pay-to Provider City/State/ZIP Code:R:1 segment=REF:::Pay-to-Provider Secondary Identification:S:5 #LOOP ID - 2000B SUBSCRIBER HIERARCHICAL LEVEL >1 [2000B] segment=HL:3:22:Subscriber Hierarchical Level:R:1 segment=SBR:::Subscriber Information:R:1 segment=PAT:::Patient Information:S:1 loop=2010BA loop=2010BB loop=2010BC loop=2010BD loop=2300 #LOOP ID - 2010BA SUBSCRIBER NAME 1 [2010BA] segment=NM1:1:IL:Subscriber Name:R:1 segment=N2:::Additional Subscriber Name Information:S:1 segment=N3:::Subscriber Address:S:1 segment=N4:::Subscriber City/State/ZIP Code:S:1 segment=DMG:::Subscriber Demographic Information:S:1 segment=REF:::Subscriber Secondary Identification:S:4 segment=REF:::Property and Casualty Claim Number:S:1 #LOOP ID - 2010BB PAYER NAME 1 [2010BB] segment=NM1:1:PR:Payer Name:R:1 segment=N2:::Additional Payer Name Information:S:1 segment=N3:::Payer Address:S:1 segment=N4:::Payer City/State/ZIP Code:S:1 segment=REF:::Payer Secondary Identification:S:3 #LOOP ID - 2010BC RESPONSIBLE PARTY NAME 1 [2010BC] segment=NM1:1:QD:Responsible Party Name:S:1 segment=N2:::Additional Responsible Party Name Information:S:1 segment=N3:::Responsible Party Address:R:1 segment=N4:::Responsible Party City/State/ZIP Code:R:1 #LOOP ID - 2010BD CREDIT/DEBIT CARD HOLDER NAME 1 [2010BD] segment=NM1:1:AO:Credit/Debit Card Holder Name:S:1 segment=N2:::Additional Credit/Debit Card Holder Name Information:S:1 segment=REF:::Credit/Debit Card Information:S:2 #LOOP ID - 2000C PATIENT HIERARCHICAL LEVEL >1 [2000C] segment=HL:3:23:Patient Hierarchical Level:S:1 segment=PAT:::Patient Information:R:1 loop=2010CA loop=2300 #LOOP ID - 2010CA PATIENT NAME 1 [2010CA] segment=NM1:1:QC:Patient Name:R:1 segment=N2:::Additional Patient Name Information:S:1 segment=N3:::Patient Address:R:1 segment=N4:::Patient City/State/ZIP Code:R:1 segment=DMG:::Patient Demographic Information:R:1 segment=REF:::Patient Secondary Identification:S:5 segment=REF:::Property and Casualty Claim Number:S:1 #LOOP ID - 2300 CLAIM INFORMATION 100 [2300] segment=CLM:::Claim Information:R:1 segment=DTP:::Date - Order Date:S:1 segment=DTP:::Date - Initial Treatment:S:1 segment=DTP:::Date - Referral Date:S:1 segment=DTP:::Date - Date Last Seen:S:1 segment=DTP:::Date - Onset of Current Illness/Symptom:S:1 segment=DTP:::Date - Acute Manifestation:S:5 segment=DTP:::Date - Similar Illness/Symptom Onset:S:10 segment=DTP:::Date - Accident:S:10 segment=DTP:::Date - Last Menstrual Period:S:1 segment=DTP:::Date - Last X-ray:S:1 segment=DTP:::Date - Estimated Date of Birth:S:1 segment=DTP:::Date - Hearing and Vision Prescription Date:S:1 segment=DTP:::Date - Disability Begin:S:5 segment=DTP:::Date - Disability End:S:5 segment=DTP:::Date - Last Worked:S:1 segment=DTP:::Date - Authorized Return to Work:S:1 segment=DTP:::Date - Admission:S:1 segment=DTP:::Date - Discharge:S:1 segment=DTP:::Date - Assumed and Relinquished Care Dates:S:2 segment=PWK:::Claim Supplemental Information:S:10 segment=CN1:::Contract Information:S:1 segment=AMT:::Credit/Debit Card Maximum Amount:S:1 segment=AMT:::Patient Amount Paid:S:1 segment=AMT:::Total Purchased Service Amount:S:1 segment=REF:::Service Authorization Exception Code:S:1 segment=REF:::Mandatory Medicare (Section 4081) Crossover Indicator:S:1 segment=REF:::Mammography Certification Number:S:1 segment=REF:::Prior Authorization or Referral Number:S:2 segment=REF:::Original Reference Number (ICN/DCN):S:1 segment=REF:::Clinical Laboratory Improvement Amendment (CLIA)Number:S:3 segment=REF:::Repriced Claim Number:S:1 segment=REF:::Adjusted Repriced Claim Number:S:1 segment=REF:::Investigational Device Exemption Number:S:1 segment=REF:::Claim Identification Number for Clearing Houses and Other Transmission Intermediaries:S:1 segment=REF:::Ambulatory Patient Group (APG):S:4 segment=REF:::Medical Record Number:S:1 segment=REF:::Demonstration Project Identifier:S:1 segment=K3:::File Information:S:10 segment=NTE:::Claim Note:S:1 segment=CR1:::Ambulance Transport Information:S:1 segment=CR2:::Spinal Manipulation Service Information:S:1 segment=CRC:::Ambulance Certification:S:3 segment=CRC:::Patient Condition Information Vision:S:3 segment=CRC:::Homebound Indicator:S:1 segment=HI:::Health Care Diagnosis Code:S:1 segment=HCP:::Claim Pricing/Repricing Information:S:1 loop=2305 loop=2310A loop=2310B loop=2310C loop=2310D loop=2310E loop=2320 loop=2400 #LOOP ID - 2305 HOME HEALTH CARE PLAN INFORMATION 6 [2305] segment=CR7:::Home Health Care Plan Information:S:1 segment=HSD:::Health Care Services Delivery:S:3 #LOOP ID - 2310A REFERRING PROVIDER NAME 2 [2310A] segment=NM1:1:DN,P3:Referring Provider Name:S:1 segment=PRV:::Referring Provider Specialty Information:S:1 segment=N2:::Additional Referring Provider Name Information:S:1 segment=REF:::Referring Provider Secondary Identification:S:5 #LOOP ID - 2310B RENDERING PROVIDER NAME 1 [2310B] segment=NM1:1:82:Rendering Provider Name:S:1 segment=PRV:::Rendering Provider Specialty Information:R:1 segment=N2:::Additional Rendering Provider Name Information:S:1 segment=REF:::Rendering Provider Secondary Identification:S:5 #LOOP ID - 2310C PURCHASED SERVICE PROVIDER NAME 1 [2310C] segment=NM1:1:QB:Purchased Service Provider Name:S:1 segment=REF:::Purchased Service Provider Secondary Identification:S:5 #LOOP ID - 2310D SERVICE FACILITY LOCATION 1 [2310D] segment=NM1:1:77,FA,LI,TL:Service Facility Location:S:1 segment=N2:::Additional Service Facility Location Name Information:S:1 segment=N3:::Service Facility Location Address:R:1 segment=N4:::Service Facility Location City/State/ZIP:R:1 segment=REF:::Service Facility Location Secondary Identification:S:5 #LOOP ID - 2310E SUPERVISING PROVIDER NAME 1 [2310E] segment=NM1:1:DQ:Supervising Provider Name:S:1 segment=N2:::Additional Supervising Provider Name Information:S:1 segment=REF:::Supervising Provider Secondary Identification:S:5 #LOOP ID - 2320 OTHER SUBSCRIBER INFORMATION 10 [2320] segment=SBR:::Other Subscriber Information:S:1 segment=CAS:::Claim Level Adjustments:S:5 segment=AMT:::Coordination of Benefits (COB) Payer Paid Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Approved Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Allowed Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Patient Responsibility Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Covered Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Discount Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Per Day Limit Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Patient Paid Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Tax Amount:S:1 segment=AMT:::Coordination of Benefits (COB) Total Claim Before Taxes Amount:S:1 segment=DMG:::Subscriber Demographic Information:S:1 segment=OI:::Other Insurance Coverage Information:R:1 segment=MOA:::Medicare Outpatient Adjudication Information:S:1 loop=2330A loop=2330B loop=2330C loop=2330D loop=2330E loop=2330F loop=2330G loop=2330H #LOOP ID - 2330A OTHER SUBSCRIBER NAME 1 [2330A] segment=NM1:1:IL:Other Subscriber Name:R:1 segment=N2:::Additional Other Subscriber Name Information:S:1 segment=N3:::Other Subscriber Address:S:1 segment=N4:::Other Subscriber City/State/ZIP Code:S:1 segment=REF:::Other Subscriber Secondary Identification:S:3 #LOOP ID - 2330B OTHER PAYER NAME 1 [2330B] segment=NM1:1:PR:Other Payer Name:R:1 segment=N2:::Additional Other Payer Name Information:S:1 segment=PER:::Other Payer Contact Information:S:2 segment=DTP:::Claim Adjudication Date:S:1 segment=REF:::Other Payer Secondary Identifier:S:2 segment=REF:::Other Payer Prior Authorization or Referral Number:S:2 segment=REF:::Other Payer Claim Adjustment Indicator:S:2 #LOOP ID - 2330C OTHER PAYER PATIENT INFORMATION 1 [2330C] segment=NM1:1:QC:Other Payer Patient Information:S:1 segment=REF:::Other Payer Patient Identification:S:3 #LOOP ID - 2330D OTHER PAYER REFERRING PROVIDER 2 [2330D] segment=NM1:1:DN,P3:Other Payer Referring Provider:S:1 segment=REF:::Other Payer Referring Provider Identification:R:3 #LOOP ID - 2330E OTHER PAYER RENDERING PROVIDER 1 [2330E] segment=NM1:1:82:Other Payer Rendering Provider:S:1 segment=REF:::Other Payer Rendering Provider Secondary Identification:R:3 #LOOP ID - 2330F OTHER PAYER PURCHASED SERVICE PROVIDER 1 [2330F] segment=NM1:1:QB:Other Payer Purchased Service Provider:S:1 segment=REF:::Other Payer Purchased Service Provider Identification:R:3 #LOOP ID - 2330G OTHER PAYER SERVICE FACILITY LOCATION 1 [2330G] segment=NM1:1:77,FA,LI,TL:Other Payer Service Facility Location:S:1 segment=REF:::Other Payer Service Facility Location Identification:R:3 #LOOP ID - 2330H OTHER PAYER SUPERVISING PROVIDER 1 [2330H] segment=NM1:1:DQ:Other Payer Supervising Provider:S:1 segment=REF:::Other Payer Supervising Provider Identification:R:3 #LOOP ID - 2400 SERVICE LINE 50 [2400] segment=LX:::Service Line:R:1 segment=SV1:::Professional Service:R:1 segment=SV4:::Prescription Number:S:1 segment=PWK:::DMERC CMN Indicator:S:1 segment=CR1:::Ambulance Transport Information:S:1 segment=CR2:::Spinal Manipulation Service Information:S:5 segment=CR3:::Durable Medical Equipment Certification:S:1 segment=CR5:::Home Oxygen Therapy Information:S:1 segment=CRC:::Ambulance Certification:S:3 segment=CRC:::Hospice Employee Indicator:S:1 segment=CRC:::DMERC Condition Indicator:S:2 segment=DTP:::Date - Service Date:R:1 segment=DTP:::Date - Certification Revision Date:S:1 segment=DTP:::Date - Referral Date:S:1 segment=DTP:::Date - Begin Therapy Date:S:1 segment=DTP:::Date - Last Certification Date:S:1 segment=DTP:::Date - Order Date:S:1 segment=DTP:::Date - Date Last Seen:S:1 segment=DTP:::Date - Test:S:2 segment=DTP:::Date - Oxygen Saturation/Arterial Blood Gas Test:S:3 segment=DTP:::Date - Shipped:S:1 segment=DTP:::Date - Onset of Current Symptom/Illness:S:1 segment=DTP:::Date - Last X-ray:S:1 segment=DTP:::Date - Acute Manifestation:S:1 segment=DTP:::Date - Initial Treatment:S:1 segment=DTP:::Date - Similar Illness/Symptom Onset:S:1 segment=QTY:::Anesthesia Modifying Units:S:5 segment=MEA:::Test Result:S:20 segment=CN1:::Contract Information:S:1 segment=REF:::Repriced Line Item Reference Number:S:1 segment=REF:::Adjusted Repriced Line Item Reference Number:S:1 segment=REF:::Prior Authorization or Referral Number:S:2 segment=REF:::Line Item Control Number:S:1 segment=REF:::Mammography Certification Number:S:1 segment=REF:::Clinical Laboratory Improvement Amendment (CLIA) Identification:S:1 segment=REF:::Referring Clinical Laboratory Improvement Amendment (CLIA) Facility Identification:S:1 segment=REF:::Immunization Batch Number:S:1 segment=REF:::Ambulatory Patient Group (APG):S:4 segment=REF:::Oxygen Flow Rate:S:1 segment=REF:::Universal Product Number (UPN):S:1 segment=AMT:::Sales Tax Amount:S:1 segment=AMT:::Approved Amount:S:1 segment=AMT:::Postage Claimed Amount:S:1 segment=K3:::File Information:S:10 segment=NTE:::Line Note:S:1 segment=PS1:::Purchased Service Information:S:1 segment=HSD:::Health Care Services Delivery:S:1 segment=HCP:::Line Pricing/Repricing Information:S:1 loop=2420A loop=2420B loop=2420C loop=2420D loop=2420E loop=2420F loop=2420G loop=2430 loop=2440 #LOOP ID - 2420A RENDERING PROVIDER NAME 1 [2420A] segment=NM1:1:82:Rendering Provider Name:S:1 segment=PRV:::Rendering Provider Specialty Information:R:1 segment=N2:::Additional Rendering Provider Name Information:S:1 segment=REF:::Rendering Provider Secondary Identification:S:5 #LOOP ID - 2420B PURCHASED SERVICE PROVIDER NAME 1 [2420B] segment=NM1:1:QB:Purchased Service Provider Name:S:1 segment=REF:::Purchased Service Provider Secondary Identification:S:5 #LOOP ID - 2420C SERVICE FACILITY LOCATION 1 [2420C] segment=NM1:1:77,FA,LI,TL:Service Facility Location:S:1 segment=N2:::Additional Service Facility Location Name Information:S:1 segment=N3:::Service Facility Location Address:R:1 segment=N4:::Service Facility Location City/State/ZIP:R:1 segment=REF:::Service Facility Location Secondary Identification:S:5 #LOOP ID - 2420D SUPERVISING PROVIDER NAME 1 [2420D] segment=NM1:1:DQ:Supervising Provider Name:S:1 segment=N2:::Additional Supervising Provider Name Information:S:1 segment=REF:::Supervising Provider Secondary Identification:S:5 #LOOP ID - 2420E ORDERING PROVIDER NAME 1 [2420E] segment=NM1:1:DK:Ordering Provider Name:S:1 segment=N2:::Additional Ordering Provider Name Information:S:1 segment=N3:::Ordering Provider Address:S:1 segment=N4:::Ordering Provider City/State/ZIP Code:S:1 segment=REF:::Ordering Provider Secondary Identification:S:5 segment=PER:::Ordering Provider Contact Information:S:1 #LOOP ID - 2420F REFERRING PROVIDER NAME 2 [2420F] segment=NM1:1:DN,P3:Referring Provider Name:S:1 segment=PRV:::Referring Provider Specialty Information:S:1 segment=N2:::Additional Referring Provider Name Information:S:1 segment=REF:::Referring Provider Secondary Identification:S:5 #LOOP ID - 2420G OTHER PAYER PRIOR AUTHORIZATION OR REFERRAL NUMBER 4 [2420G] segment=NM1:1:PR:Other Payer Prior Authorization or Referral Number:S:1 segment=REF:::Other Payer Prior Authorization or Referral Number:R:2 #LOOP ID - 2430 LINE ADJUDICATION INFORMATION 25 [2430] segment=SVD:::Line Adjudication Information:S:1 segment=CAS:::Line Adjustment:S:99 segment=DTP:::Line Adjudication Date:R:1 #LOOP ID - 2440 FORM IDENTIFICATION CODE 5 [2440] segment=LQ:::Form Identification Code:S:1 segment=FRM:::Supporting Documentation:R:99 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/cf/997.cf0000644000175400010010000000135510100503335011312 0ustar pbNone[LOOPS] ISA GS ST AK1 AK2 AK2/AK3 AK5 AK9 SE GE IEA #--- start of loop details ---# [ISA] segment=ISA:::ISA:R:1 [GS] segment=GS:::GS:R:1 #LOOP ID - HEADER [ST] segment=ST:::Transaction Set Header:R:1 #LOOP ID - AK1 [AK1] segment=AK1:::Functional Group Response Header:S:1 #LOOP ID - AK2 999999 [AK2] segment=AK2:::Transaction Set Response Header:S:1 loop=AK2/AK3 #LOOP ID - AK2/AK3 999999 [AK2/AK3] segment=AK3:::Data Segment Note:S:99 segment=AK4:::Data Element Note:S:99 #LOOP ID - AK5 [AK5] segment=AK5:::Transaction Set Response Trailer:R:1 #LOOP ID - AK9 [AK9] segment=AK9:::Functional Group Response Trailer:R:1 #LOOP ID - TRAILER [SE] segment=SE:::Transaction Set Trailer:R:1 [GE] segment=GE:::GE:R:1 [IEA] segment=IEA:::IEA:R:1 X12-0.80/CHANGES0000644000175400010010000001172011313334630011057 0ustar pbNone X12::Parser 0.80 ------------------------------------------------------------------------------- 1. Some errors related to file handling have been fixed. Versions 0.50 and 0.60 were impacted. get_next_pos_loop, get_next_pos_level_loop, print_tree were impacted. The error was as a result of calling readline() on a closed file handle. 2. The pods have been better formatted. X12::Parser 0.60 ------------------------------------------------------------------------------- 1. Attention: users of previous version parse_file() has been renamed to parsefile(). parsefile ( file => $file, conf => $conf ); Users using the parse() methods to parse a X12 file should now use the parsefile() method. 2. Attention: users of previous version parse() method signature has changed. new signature is parse ( handle => $handle, conf => $conf ); takes an already open file handle as input. 3. closefile() method is added. If you do not parse the entire X12 file using get_next_loop() method, then it is recommended that you call closefile() to close the file being parsed. X12::Parser 0.50 ------------------------------------------------------------------------------- 1. Many improvements (almost a rewrite) have gone into this version. Most of the interfaces have been kept the same except some spell corrections. 2. New class X12::Parser::Tree has been added. Earlier the X12::Parser::Cf class was used to read the cf file as well as maintain the information in object form. Now they are separated out. X12::Parser::Tree simplifies the representation of cf file in object format and is a much cleanser approach. 3. X12::Parser::Cf has been rewritten. Old goto statements are gone. 4. X12::Parser module is rewritten. As a result of X12::Parser::Tree, the X12::Parser module is now much more readable and uses a cleaner approach. It can handle segment separators of the for ~, ~LF, ~CRLF. 5. New method get_subelement_separator() is added. 6. Spelling correction from seperator to separator is done. 7. Additional test files for the new modules. 8. Added new method parse_file, replacement to parse. The parse() method in the future will be used for file handles. X12::Parser 0.09 ------------------------------------------------------------------------------- 1. Package Level variables in both the Parser.pm and Cf.pm module have been removed. This would allow a user to call the parse method on multiple files using same/different config files. 2. Removed warnings that appeared when a end of the X12 file was reached. X12::Parser 0.08 ------------------------------------------------------------------------------- A whole lot of changes have gone into this version. The X12::Parser can now handle files of any size. The earlier versions of the parser relied on reading the whole X12 file into an array before parsing. X12::Parser can handle files with multiple ISA segments having different segment seperators (note it cannot handle different transaction types within the same file). 1. _parse() method is split into 2 functions _parse_loop_start() and _parse_loop(). Instead of loading the whole file into an array the file is read as it is being parsed. _parse_loop_start() and _parse_loop() could have been handled within the same function but have kept it seperate for simplicity. _parse_loop_start() detects start of loops. _parse_loop() return the loop segments. 2. _set_seperator() function is added. This function sets the segment seperator and element seperator. 3. get_segments() function is removed. Since we no longer maintain the whole file in an array, it is difficult to gets the segments in a loop just by giving the line number where the loop starts. 4. reset_pos() function is removed. Not really used and also now that we parse the file serially there is no need for this function. 5. get_loop_segment() no longer needs $loop as input. 6. Changes to man page section of the module to reflect the above changes. 7. get_next_pos_loop(), and get_next_pos_level_loop() return segment positions starting with 1. In previous versions 0 would correspond to the first segment. X12::Parser 0.04 ------------------------------------------------------------------------------- 1. Moved _get_level_one and _get_next_level functions from Parser.pm to Cf.pm (the new functions in Cf.pm are called get_level_one and get_next_level). This keeps configuration related functions within the Cf.pm module. 2. Moved $self members/elements to file globals. 3. Changed $c_L to $current_level and $s to $element_seperator 4. Added $segment_seperator. Added get_segment_seperator() and get_element_seperator() functions. Modified $line_seperator to $orig_line_seperator X12::Parser 0.03 ------------------------------------------------------------------------------- 1. Fixed problem with parser running out of memory. Still has issue with very large files. X12::Parser 0.01 - initial release ------------------------------------------------------------------------------- 1. First release X12-0.80/lib/0000755000175400010010000000000010100503335010622 5ustar pbNoneX12-0.80/lib/X12/0000755000175400010010000000000011313334702011203 5ustar pbNoneX12-0.80/lib/X12/Parser/0000755000175400010010000000000011313334741012442 5ustar pbNoneX12-0.80/lib/X12/Parser/Cf.pm0000644000175400010010000000731111313334741013332 0ustar pbNone# Copyright 2009 by Prasad Balan # All rights reserved. # # This library is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. package X12::Parser::Cf; use strict; require Exporter; our @ISA = qw(Exporter); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use X12::Parser::Cf ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.80'; # Preloaded methods go here. use X12::Parser::Tree; sub new { my $self = { _LINES => undef, }; return bless $self; } sub load { my $self = shift; my %params = @_; #open the config file and read it into array open( FILE, $params{file} ) || die "error: cannot open cf file $params{file}\n"; @{ $self->{_LINES} } = ; chomp( @{ $self->{_LINES} } ); close(FILE); #create the root tree object my $root = X12::Parser::Tree->new(); $root->set_name("X12"); my $pos = $self->_get_loop_pos("LOOPS"); #parse the LOOPS section of the config file for ( my $i = $pos ; $i < scalar @{ $self->{_LINES} } ; $i++ ) { if ( $self->{_LINES}->[$i] !~ /^[a-zA-Z0-9#]/ ) { last; } else { $self->_parse_loop( $root, $self->{_LINES}->[$i] ); } } return $root; } #get the position of a loop section e.g. [2300] sub _get_loop_pos { my ( $self, $loop ) = @_; for ( my $i = 0 ; $i < @{ $self->{_LINES} } ; $i++ ) { if ( $self->{_LINES}->[$i] =~ /^\[$loop\]/ ) { return $i + 1; } } return undef; } sub _parse_loop { my ( $self, $node, $loop ) = @_; my $pos = $self->_get_loop_pos($loop); my $end = undef; my $child = X12::Parser::Tree->new(); $child->set_name($loop); if ( $self->{_LINES}->[$pos] =~ /^segment=/ ) { $end = substr $self->{_LINES}->[$pos], 8; } $child->set_loop_start_parm( split( /:/, $end ) ); $child->set_parent($node); $node->add_child($child); for ( my $i = $pos ; $i < scalar( @{ $self->{_LINES} } ) ; $i++ ) { if ( $self->{_LINES}->[$i] =~ /^segment=/ ) { next; } if ( $self->{_LINES}->[$i] =~ /^loop=/ ) { $end = substr $self->{_LINES}->[$i], 5; $self->_parse_loop( $child, $end ); } if ( $self->{_LINES}->[$i] !~ /^[a-zA-Z0-9#]/ ) { last; } } } 1; __END__ # Below is stub documentation for your module. You better edit it! =head1 NAME X12::Parser::Cf - Perl module for reading X12 configuration files. =head1 SYNOPSIS use X12::Parser::Cf; # Create a X12::Parser::Cf object my $cf = new X12::Parser::Cf; # Read/load a cf file $cf->load ( file => '837_004010X098.cf' ); =head1 DESCRIPTION X12::Parser::Cf module is created to read the configuration files that are created for parsing X12 transaction files. This module is used in the L module and is not designed for independent usage. Note that this module does not do syntax checking of the configuration file. The user should ensure that he has got the cf file correct. Read the L man page for details. The sample cf files provided with this package are good to the best of the authors knowledge. However the user should ensure the validity of these files. The user may use them as is at his own risk. =head1 AUTHOR Prasad Balan, I =head1 SEE ALSO L, L, L =head1 COPYRIGHT AND LICENSE Copyright 2009 by Prasad Balan This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut X12-0.80/lib/X12/Parser/Tree.pm0000644000175400010010000001020311313334721013671 0ustar pbNone# Copyright 2009 by Prasad Balan # All rights reserved. # # This library is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. package X12::Parser::Tree; use strict; require Exporter; our @ISA = qw(Exporter); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use X12::Parser::Tree ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.80'; # Preloaded methods go here. #use X12::Parser::Tree; #This class holds the loop structure of the X12 transaction. #The class is populated by X12::Parser::Cf and loaded from the *.cf file. #constructor. sub new { my $self = { _PARENT => undef, _CHILDREN => undef, _NAME => undef, _SEG => undef, _SEG_QUAL => undef, _SEG_QUAL_POS => undef, _DEPTH => 0, }; return bless $self; } sub set_name { my ( $self, $name ) = @_; $self->{_NAME} = $name; } sub get_name { my $self = shift; return $self->{_NAME}; } sub is_root { my $self = shift; return ( defined $self->{_PARENT} ) ? 0 : 1; } sub set_parent { my ( $self, $parent ) = @_; $self->{_PARENT} = $parent; } sub get_parent { my $self = shift; return $self->{_PARENT}; } sub has_children { my $self = shift; return ( defined $self->{_CHILDREN} ) ? 1 : 0; } sub get_child { my ( $self, $index ) = @_; return $self->{_CHILDREN}->[$index]; } sub get_children { my $self = shift; return $self->{_CHILDREN}; } sub get_child_count { my $self = shift; if ( defined $self->{_CHILDREN} ) { return scalar @{ $self->{_CHILDREN} }; } return 0; } sub add_child { my ( $self, $child ) = @_; if ( $self->get_child_count() ) { $child->{_DEPTH} = $self->{_DEPTH} + 1; push( @{ $self->{_CHILDREN} }, $child ); } else { $child->{_DEPTH} = $self->{_DEPTH} + 1; my @children; $self->{_CHILDREN} = \@children; push( @{ $self->{_CHILDREN} }, $child ); } } sub set_loop_start_parm { my ( $self, @args ) = @_; $self->{_SEG} = $args[0]; if ( $args[1] eq '' ) { $self->{_SEG_QUAL_POS} = undef; } else { $self->{_SEG_QUAL_POS} = $args[1]; my @array = split( /,/, $args[2] ); $self->{_SEG_QUAL} = \@array; } } sub is_loop_start { my ( $self, $elements ) = @_; if ( $self->{_SEG} eq @{$elements}[0] ) { if ( defined( $self->{_SEG_QUAL_POS} ) ) { return scalar grep { /@{$elements}[$self->{_SEG_QUAL_POS}]/ } @{ $self->{_SEG_QUAL} }; } else { return 1; } } return 0; } sub get_depth { my $self = shift; return $self->{_DEPTH}; } sub print_tree { my $self = shift; my $node = shift; if ( !defined $node ) { $node = $self; } my $pad = ' ' x $node->get_depth(); print $pad . $node->get_name . "\n"; for ( my $i = 0 ; $i < $node->get_child_count() ; $i++ ) { $self->print_tree( $node->get_child($i) ); } } 1; __END__ =head1 NAME X12::Parser::Tree - Object structure representing the X12 cf file. =head1 SYNOPSIS use X12::Parser::Tree; #create a new Tree object my $node = X12::Parser::Tree->new(); #set the name of the node/loop $node->set_name('1000A'); #set the name of the parameters used to determine start of a loop $node->set_loop_start_parm('NM1', '41', 1); #create a new Tree object and set it as the child my $child_node = X12::Parser::Tree->new(); $node->add_child($child_node); =head1 DESCRIPTION This module represents the cf file as a object structure. This class is used by the L and L. Unless you plan to modify the parser or such you would not need to access this class directly. =head1 AUTHOR Prasad Poruporuthan, I =head1 SEE ALSO L, L, L =head1 COPYRIGHT AND LICENSE Copyright 2009 by Prasad Balan This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut X12-0.80/lib/X12/Parser.pm0000644000175400010010000003055711313334702013007 0ustar pbNone# Copyright 2009 by Prasad Balan # All rights reserved. # # This library is free software; you can redistribute it and/or modify # it under the same terms as Perl itself. package X12::Parser; use strict; require Exporter; our @ISA = qw(Exporter); # Items to export into callers namespace by default. Note: do not export # names by default without a very good reason. Use EXPORT_OK instead. # Do not simply export all your public functions/methods/constants. # This allows declaration use X12 ':all'; # If you do not need this, moving things directly into @EXPORT or @EXPORT_OK # will save memory. our %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); our @EXPORT = qw( ); our $VERSION = '0.80'; # Preloaded methods go here. use X12::Parser::Tree; use X12::Parser::Cf; #constructor. sub new { my $self = { file => undef, conf => undef, _TREE_ROOT => undef, _TREE_POS => undef, _FILE_HANDLE => undef, _FILE_CLOSED => undef, _SEGMENT_SEPARATOR => undef, _ELEMENT_SEPARATOR => undef, _SUBELEMENT_SEPARATOR => undef, _NEXT_LOOP => undef, _NEXT_SEGMENT => undef, }; return bless $self; } #public method, takes the X12 handle and Cf file name as input. #loads the config file and sets the separators. sub parse { my $self = shift; my %params = @_; $self->{handle} = $params{handle}; $self->{conf} = $params{conf}; $self->{_FILE_HANDLE} = $params{handle}; $self->{_FILE_CLOSED} = undef; #read the config file to create the TREE object my $cf = X12::Parser::Cf->new(); $self->{_TREE_ROOT} = $cf->load( file => "$self->{conf}" ) if defined $self->{conf}; $self->{_TREE_POS} = $self->{_TREE_ROOT}; #set the separators $self->_set_separator; } #public method, takes the X12 and Cf file name as input. #loads the config file and sets the separators. sub parsefile { my $self = shift; my %params = @_; $self->{file} = $params{file}; $self->{conf} = $params{conf}; #chose the handle just in case this method is being called the second time #without closing the file if ( defined $self->{_FILE_HANDLE} ) { close( $self->{_FILE_HANDLE} ); $self->{_FILE_CLOSED} = 1; } open( my $handle, "$self->{file}" ) || die "error: cannot open file $self->{file}\n"; $self->parse( handle => $handle, conf => $self->{conf} ); } #close the file sub closefile { my $self = shift; if ( defined $self->{_FILE_HANDLE} ) { close( $self->{_FILE_HANDLE} ); $self->{_FILE_CLOSED} = 1; } } #private method. sets the separators. sub _set_separator { my $self = shift; my $isa = undef; if ( read( $self->{_FILE_HANDLE}, $isa, 108 ) != 108 ) { close( $self->{_FILE_HANDLE} ); $self->{_FILE_CLOSED} = 1; die "error: invalid file format $self->{file}\n"; } #set the segment terminator my $terminator = substr( $isa, 106, 2 ); if ( $terminator =~ /\r\n/ ) { $self->{_SEGMENT_SEPARATOR} = substr( $isa, 105, 3 ); } elsif ( $terminator =~ /^\n/ ) { $self->{_SEGMENT_SEPARATOR} = substr( $isa, 105, 2 ); } else { $self->{_SEGMENT_SEPARATOR} = substr( $isa, 105, 1 ); } #set the element separator $self->{_ELEMENT_SEPARATOR} = substr( $isa, 3, 1 ); #set the sub element separator $self->{_SUBELEMENT_SEPARATOR} = substr( $isa, 104, 1 ); seek( $self->{_FILE_HANDLE}, -108, 1 ); } #public method. gets the next loop. sub get_next_loop { my $self = shift; if ( defined $self->{_NEXT_LOOP} ) { my $loop = $self->{_NEXT_LOOP}; $self->{_NEXT_LOOP} = undef; return $loop; } else { return $self->_get_next_loop(); } } sub get_next_pos_loop { my $self = shift; my $loop = undef; if ( defined $self->{_NEXT_LOOP} ) { $loop = $self->{_NEXT_LOOP}; $self->{_NEXT_LOOP} = undef; return ( $., $loop ); } else { $loop = $self->_get_next_loop(); if ( defined $loop ) { return ( $., $loop ); } else { return; } } } sub get_next_pos_level_loop { my $self = shift; my $loop = undef; if ( defined $self->{_NEXT_LOOP} ) { $loop = $self->{_NEXT_LOOP}; $self->{_NEXT_LOOP} = undef; return ( $., $self->{_TREE_POS}->get_depth(), $loop ); } else { $loop = $self->_get_next_loop(); if ( defined $loop ) { return ( $., $self->{_TREE_POS}->get_depth(), $loop ); } else { return; } } } #private method. does the hard lifting. sub _get_next_loop { my $self = shift; my ( $segment, $file_handle, $node, $loop, @element ); local $/; $/ = $self->{_SEGMENT_SEPARATOR}; $file_handle = $self->{_FILE_HANDLE}; $node = $self->{_TREE_POS}; $self->{_LOOP} = []; if ( defined $self->{_NEXT_SEGMENT} ) { push( @{ $self->{_LOOP} }, $self->{_NEXT_SEGMENT} ); $self->{_NEXT_SEGMENT} = undef; } if ( defined $self->{_FILE_CLOSED} ) { return undef; } while ( $segment = <$file_handle> ) { chomp($segment); @element = split( /\Q$self->{_ELEMENT_SEPARATOR}\E/, $segment ); $loop = $self->_check_child_match( $node, \@element ); if ( defined $loop ) { $self->{_NEXT_SEGMENT} = $segment; return $loop; } $loop = $self->_check_parent_match( $node, \@element ); if ( defined $loop ) { $self->{_NEXT_SEGMENT} = $segment; return $loop; } push( @{ $self->{_LOOP} }, $segment ); } close($file_handle); $self->{_FILE_CLOSED} = 1; return undef; } #private method. check if any of the child loops match sub _check_child_match { my ( $self, $node, $elements ) = @_; for ( my $i = 0 ; $i < $node->get_child_count() ; $i++ ) { my $child = $node->get_child($i); if ( $child->is_loop_start($elements) ) { $self->{_TREE_POS} = $child; return $child->get_name(); } } return undef; } #private method. check if any of the parent loops match sub _check_parent_match { my ( $self, $node, $elements ) = @_; my $parent = $node->get_parent(); if ( !defined $parent ) { return undef; } for ( my $i = 0 ; $i < $parent->get_child_count() ; $i++ ) { my $child = $parent->get_child($i); if ( $child->is_loop_start($elements) ) { $self->{_TREE_POS} = $child; return $child->get_name(); } } $self->_check_parent_match( $parent, $elements ); } #get the segments in the loop sub get_loop_segments { my $self = shift; my $loop = $self->_get_next_loop(); $self->{_NEXT_LOOP} = $loop; return @{ $self->{_LOOP} }; } sub get_segment_separator { my $self = shift; return $self->{_SEGMENT_SEPARATOR}; } sub get_element_separator { my $self = shift; return $self->{_ELEMENT_SEPARATOR}; } sub get_subelement_separator { my $self = shift; return $self->{_SUBELEMENT_SEPARATOR}; } sub print_tree { my $self = shift; my ( $pad, $index, $segment ); while ( my ( $pos, $level, $loop ) = $self->get_next_pos_level_loop ) { $pad = ' |' x $level; print " $pad--$loop\n"; $pad = ' |' x ( $level + 1 ); my @loop = $self->get_loop_segments; foreach $segment (@loop) { $index = sprintf( "%+7s", $pos++ ); print "$index$pad-- $segment\n"; } } } #private method only called for tests sub _print_tree { my $self = shift; my ( $pad, $index, $segment, $tree ); while ( my ( $pos, $level, $loop ) = $self->get_next_pos_level_loop ) { $pad = ' |' x $level; $tree .= " $pad--$loop\n"; $pad = ' |' x ( $level + 1 ); my @loop = $self->get_loop_segments; foreach $segment (@loop) { $index = sprintf( "%+7s", $pos++ ); $tree .= "$index$pad-- $segment\n"; } } return $tree; } 1; __END__ # Below is stub documentation for your module. You'd better edit it! =head1 NAME X12::Parser - Perl module for parsing X12 Transaction files =head1 SYNOPSIS use X12::Parser; # Create a parser object my $p = new X12::Parser; # Parse a file with the transaction specific configuration file $p->parsefile ( file => '837.txt', conf => 'X12-837P.cf' ); # Step through the file while ( my $loop = $p->get_next_loop ) { my @loop = $p->get_loop_segments; } # or use this method instead while ( my ($pos, $loop) = $p->get_next_pos_loop ) { my @loop = $p->get_loop_segments; } # or use while ( my ($pos, $level, $loop) = $p->get_next_pos_level_loop ) { my @loop = $p->get_loop_segments; } =head1 ABSTRACT X12::Parser package provides a efficient way to parse X12 transaction files. Although this package is built keeping HIPAA related X12 transactions in mind, it is flexible and can be adapted to parse any X12 or similar transactions. =head1 DESCRIPTION The X12::Parser is a token based parser for parsing X12 transaction files. The parsing of transaction files requires the presence of configuration files for the different transaction types. The following methods are available: =over 2 =item new $p = new X12::Parser; This is the object constructor method. It does not take any arguments. It only initializes the members variables required for parsing the transaction file. =item parsefile $p->parsefile(file => '837.txt', conf => 'X12-837P.cf'); This method takes two arguments. The first argument is the transaction file that needs to be parsed. The second argument specifies the configuration file to be used for parsing the transaction file. To create your own configuration file read the L man page. =item parse open($file, '837.txt'); $p->parse(handle => $file, conf => 'X12-837P.cf'); This method is similar to parsefile, except it takes an open file handle as input. =item closefile $p->closefile(); Close a X12 file. If you parse an X12 file till the very end the Parser will close the file. But if you only parse a few segments you can explicitly close the file by calling closefile(); =item get_next_loop $p->get_next_loop; This function returns the name of the next loop that is present in the file being parsed. The loop name is as specified in the cf file. =item get_loop_segments $p->get_loop_segments; This function returns the segments in the loop that was returned by get_next_loop(). This function is to be used in tandem with the get_next_loop. If not it may return/produce undesired results. =item get_next_pos_loop $p->get_next_pos_loop; This function returns the next loop name and the segment position. Note position 1 corresponds to the first segment. =item get_next_pos_level_loop $p->get_next_pos_level_loop; Same as get_next_pos_loop() except that in addition this function returns the level of the loop. The level corresponds to the level of the loop in the loop hierarchy. The top level loop has level 1. =item print_tree $p->print_tree; Prints the transaction file in a tree format. =item get_segment_separator $p->get_segment_separator; Get the segment separator. =item get_element_separator $p->get_element_separator; Get the element separator. =item get_subelement_separator $p->get_subelement_separator; Get the sub-element separator. =back The configuration files provided with this package and the corresponding transaction type are mentioned below. These are the X12 HIPAA transactions. type configuration file ---- ------------------ 1) 270 270_004010X092.cf 2) 271 271_004010X092.cf 3) 276 276_004010X093.cf 4) 277 277_004010X092.cf 5) 278 278_004010X094_Req.cf 6) 278 278_004010X094_Res.cf 7) 820 820_004010X061.cf 8) 834 834_004010X095.cf 9) 835 835_004010X091.cf 10) 837I 837_004010X096.cf 11) 837D 837_004010X097.cf 12) 837P 837_004010X098.cf These cf files are installed in under the X12/Parser/cf folder. The sample cf files provided with this package are good to the best of the authors knowledge. However the user should ensure the validity of these files. The user may use them as is at their own risk. =head2 EXPORT None by default. =head1 SEE ALSO For details on Transaction sets refer to: National Electronic Data Interchange Transaction Set Implementation Guide. Implementation guides are available for all the Transaction sets. L for more information on the Parser and configuration files. L L If you have a mailing list set up for your module, mention it here. If you have a web site set up for your module, mention it here. =head1 AUTHOR Prasad Balan, I =head1 COPYRIGHT AND LICENSE Copyright 2009 by Prasad Balan This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut X12-0.80/Makefile.PL0000644000175400010010000000330411313251741012036 0ustar pbNoneuse 5.000; use ExtUtils::MakeMaker; # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. WriteMakefile( 'NAME' => 'X12::Parser', 'VERSION_FROM' => 'lib/X12/Parser.pm', # finds $VERSION 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1 'PM' => { 'Readme.pod' => '$(INST_MAN3DIR)/Parser/Readme.pod', 'lib/X12/Parser.pm' => '$(INST_LIBDIR)/Parser.pm', 'lib/X12/Parser/Cf.pm' => '$(INST_LIBDIR)/Parser/Cf.pm', 'lib/X12/Parser/Tree.pm' => '$(INST_LIBDIR)/Parser/Tree.pm', 'cf/270_004010X092.cf' => '$(INST_LIBDIR)/Parser/cf/270_004010X092.cf', 'cf/271_004010X092.cf' => '$(INST_LIBDIR)/Parser/cf/271_004010X092.cf', 'cf/276_004010X093.cf' => '$(INST_LIBDIR)/Parser/cf/276_004010X093.cf', 'cf/277_004010X092.cf' => '$(INST_LIBDIR)/Parser/cf/277_004010X092.cf', 'cf/278_004010X094_Req.cf' => '$(INST_LIBDIR)/Parser/cf/278_004010X094_Req.cf', 'cf/278_004010X094_Res.cf' => '$(INST_LIBDIR)/Parser/cf/278_004010X094_Res.cf', 'cf/820_004010X061.cf' => '$(INST_LIBDIR)/Parser/cf/820_004010X061.cf', 'cf/834_004010X095.cf' => '$(INST_LIBDIR)/Parser/cf/834_004010X095.cf', 'cf/835_004010X091.cf' => '$(INST_LIBDIR)/Parser/cf/835_004010X091.cf', 'cf/837_004010X096.cf' => '$(INST_LIBDIR)/Parser/cf/837_004010X096.cf', 'cf/837_004010X097.cf' => '$(INST_LIBDIR)/Parser/cf/837_004010X097.cf', 'cf/837_004010X098.cf' => '$(INST_LIBDIR)/Parser/cf/837_004010X098.cf', 'cf/997.cf' => '$(INST_LIBDIR)/Parser/cf/997.cf', }, ( $] ge '5.005' ) ? ( 'AUTHOR' => 'Prasad Balan (prasad@cpan.org)', 'ABSTRACT' => 'Perl module for parsing X12 transaction files', ) : (), ); X12-0.80/MANIFEST0000644000175400010010000000204111313251715011213 0ustar pbNonelib/X12/Parser/Cf.pm X12::Parser::Cf module lib/X12/Parser/Tree.pm X12::Parser::Tree module CHANGES changes file Makefile.PL Makefile MANIFEST This file lib/X12/Parser.pm X12::Parser module README Readme file Readme.pod X12::Parser::Readme man page cf/270_004010X092.cf cf file cf/271_004010X092.cf cf file cf/276_004010X093.cf cf file cf/277_004010X092.cf cf file cf/278_004010X094_Req.cf cf file cf/278_004010X094_Res.cf cf file cf/820_004010X061.cf cf file cf/834_004010X095.cf cf file cf/835_004010X091.cf cf file cf/837_004010X096.cf cf file cf/837_004010X097.cf cf file cf/837_004010X098.cf cf file cf/997.cf cf file t/1.t test file t/2.t test file t/3.t test file t/4.t test file t/sample_835.txt data for test file X12-0.80/README0000644000175400010010000000111611313334654010750 0ustar pbNoneX12 version 0.80 ================ X12::Parser - Perl module for parsing X12 data/transaction files INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: X12::Parser::Cf included is included in this package. X12::Parser::Tree included is included in this package. COPYRIGHT AND LICENCE Copyright (C) 2009 Prasad Balan All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. X12-0.80/Readme.pod0000644000175400010010000002773411313333214011776 0ustar pbNone=head1 NAME X12::Parser::Readme - understanding configuration (cf) files for X12::Parser =head2 X12 transactions ASC X12 standards define commonly used EDI transactions. The standards define a structure/format for exchange of EDI data. Each transaction type is called a "transaction set". The smallest data item in a transaction is called an "element". Groups of related elements form a data segment. A data element separator separates the elements within a segment. A segment starts with a element which is called the segment ID, and ends with a segment terminator. Logical groups of segments are called loops. There are some segments, which are used only to identify the beginning of a loop, these are called as control segments. A logical set of loops together form a "transaction set". Similar transaction sets can be lumped together by enclosing them in data segments that are known as functional group headers and trailers. Functional groups are grouped together using interchange control headers and trailers. =head2 Parsing Unlike XML/HTML parsers which relies on "<" and ">" tags to determine start and end of data blocks, X12 transactions rely on pre-defined values (segment IDs) to indicate start and end of related data blocks (loops). Developing a parser that would work for all X12 transactions poses a challenge in this respect, as each transaction has its own hierarchy of loops and start/end indicators. This lead to the development of the X12 configuration file (I) specification. The cf specification is created to specify details regarding the blocks/loops and start/end information in a simple format. Cf files can be created for the different transaction sets. (see section I). Now you can parse your X12 data file by invoking the X12::Parser specifying the cf file to use. This allows you to parse any X12 transaction data files just by building the cf file for that transaction type. =head2 Cf file specification for X12::Parser The cf file specifies any transaction in a hierarchical form. It identifies the loops and segments in a transaction. This information is used to parse the transaction file. The L uses the L module to read the cf file information before parsing a transaction file. Since the X12::Parser parses files based on the cf file it allows the user to parse different X12 transaction types just by using the appropriate cf file. The user can use the cf files that are bundled with this package or create new cf files. The cf provided with this package is for the HIPAA X12 Ver 4010 X12 transactions. A cf file has two types of information: I
and I pairs. A section contains information in key=value pairs. =head3 section Sections are identified by the square brackets ("[" and "]"). Section represents loops (or logical blocks) in a X12 transaction. The name of the loop or the block is specified in square brackets. The section I<[LOOPS]> is mandatory in a configuration file. It consists only the names of the top level loops instead of key=value pairs. The X12::Parser::Cf cf file reader starts reading a cf file from the [LOOPS] section. =head3 key=value There are two predefined keys, which are recognized by the Cf file reader, namely: I and I. Segment key is used to define the segments that are part of the current section/loop. The loop key is used to define the sub-loops or the child loops for the current section/loop. Note: The term section and loop is used interchangeably as a section in the cf file represents a loop in a X12 transaction. Within a section, the first key=value pair represents the start of the loop. Each section/loop should have atleast one key=value pair for the X12::Parser to identify the loop in the X12 transaction file. Although the X12::Parser::Cf modules reads all the key=value pairs, the X12::Parser uses only the first key=value pair to identify the loops. The user may specify only the first key=value pairs for each loop. Value itself consists of 6 fields separated by I<':'>. All values are not currently used. key=value1:value2:value3:value4:value5:value6 When parsing a X12 transaction file, the values help the X12::Parser determine if a segment is the start of a loop. =over 2 =item value1 value1, is the segment id for a segment in a X12 transaction. The first key=value pair within a section tells the X12::Parser how to identify the loop. =item value2 and value3 In some cases, to identify a loop correctly it is not enough to look at the segment id, you need to look at the qualifier too. value2 and value3 are used to specify this. value2 is used to specify the position on the segment that the X12::Parser should look for value3. value3 consists of a COMMA separated list of qualifiers. =item value4 value4 is a description of the segment. B<(value4 is not currently used by Parser)>. =item value5 value5 indicates if the segment is required or situational. B<(value5 is not currently used by Parser)>. =item value6 value6 indicates the allowable repeat count for the segment. B<(value6 is not currently used by Parser)>. =back Currently values 1, 2 and 3 are used for parsing the transaction file. The others may be used in later versions of this package. =head2 Limitations The X12::Parser::Cf module does not do validation of the Cf files. Since the goal of the X12::Parser module is to parse X12 files, the X12::Parser::Cf module is very minimal. The user should ensure that the cf files are appropriate. Do not put extra spaces after [ ] sections. Do not have leading spaces for section name and key=value pairs. Lines with a leading #, are considered comments. To validate if X12::Parser::Cf is reading the cf file correctly try something like use X12::Parser::Cf; my $cf = new X12::Parser::Cf; $cf->load("sample.cf"); $cf->print_tree; This would print the loop hierarchy. You can validate this to ensure you have the correct structure. =head2 Building a cf file Lets take the case of building a cf file for Version 004010 of ANSI ASC X12.85, Health Care Claim Payment/Advice (835) transaction. =head3 835 transaction A 835 transaction structure would contain the following loops. ISA |-- GS |-- ST |-- 1000A |-- 1000B |-- 2000 |-- 2100 |-- 2110 |-- SE |-- GE IEA The above diagram shows the hierarchy of the loops. The data segments are not shown. =head3 Sample cf file /-------------------------------------------------\ | ### start of the configuration file ### | (1) | [LOOPS] | (2) | ISA | | IEA | | | | #--- start of loop details ---# | (3) | [ISA] | (4) | segment=ISA:::Interchange Control Header:R:1 | (5) | loop=GS | | | (6) | [GS] | | segment=GS:::Functional Group Header:R:1 | | loop=ST | | | (7) | [ST] | | segment=ST:1:835:Transaction Set Header:R:1 | (8) | loop=1000A | | loop=1000B | | loop=2000 | | | | [1000A] | (9) | segment=N1:1:PR:Payer Identification:R:1 | | | | [1000B] | | segment=N1:1:PE:Payee Identification:R:1 | | | | [2000] | | segment=LX:::Header Number:S:1 | | loop=2100 | | loop=2110 | | | | [2100] | | segment=CLP:::Claim Payment Information:R:1 | | | | [2110] | | segment=SVC:::Service Payment Information:S:1 | | | | [SE] | | segment=SE:::Transaction Set Trailer:R:1 | | | | [GE] | | segment=GE:::Functional Group Trailer:R:1 | | | (3) | [IEA] | | segment=IEA:::Interchange Group Trailer:R:1 | | ### end of the configuration file ### | \-------------------------------------------------/ =head3 Description B<(1)> LOOPS section is mandatory. Add the main loops under this section. Here we have added ISA and IEA loops B<(2)>. These are the top level loops. The ISA, IEA are interchange group header and trailer segments. But we treat them as a loop with one segment. And so are GS and GE functional group header and trailer record. B<(3)> Create a section for each of the loops mentioned under LOOPS. B<(4)> Use the segment key to specify how the X12::Parser should determine the start of the ISA loop. We will explain the fields better when we come to B<(9)>. B<(5)> Specify the sub-loops for ISA segment. In the above example GS is a sub loop for ISA. In there are more than one sub loops under ISA specify them too using the loop keyword. See B<(8)> how three sub loops are specified. B<(6)> create a section for all loops specified under section ISA. Here it is GS. Use the section key and if there are any sub loops use the loop key to define their values. Follow the same procedure to define all the loops and sub-loops. B<(9)> Here's a description of the fields of the values for segment. segment=N1:1:PR:Payer Identification:R:1 | | | | | | (a)(b)(c) (d) (e)(f) B<(a)> specify the segment id here. Loop 1000A starts with N1 so specify N1 here. B<(b)> and B<(c)>, there are cases when the segment id does not uniquely identify a loop. For eg. Loop 1000A and 1000B both start with N1 segment id. When parsing a transaction file, if the parser encounters a segment starting with N1, it needs additional information to decide if it is Loop 1000A or 1000B. This is done by specifying the qualifier information in the fields B<(b)> and B<(c)>. B<(b)> specify the position in the X12 segment where the parser should look for the qualifier specified in B<(c)>. If there are multiple qualifiers which identify a loop, specify all of them in position B<(c)> separated by a comma. B<(d)> This is the description of the segment. You may leave this blank. (*not used) B<(e)> Specify if the segment is required or situational. (*not used) B<(f)> Specify the number of times the segment can be repeated (*not used) The fields B<(d)> B<(e)> and B<(f)> are not used currently, but later releases may support these fields. =head1 SEE ALSO For details on Transaction sets refer to: National Electronic Data Interchange Transaction Set Implementation Guide. Implementation guides are available for all the Transaction sets. L, L, L If you have a mailing list set up for your module, mention it here. If you have a web site set up for your module, mention it here. =head1 AUTHOR Prasad Balan, I =head1 COPYRIGHT AND LICENSE Copyright 2009 by Prasad Balan This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut X12-0.80/t/0000755000175400010010000000000011313251337010330 5ustar pbNoneX12-0.80/t/1.t0000644000175400010010000000603211305270021010646 0ustar pbNone# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1.t' ######################### use strict; use Test; BEGIN { plan tests => 15 } ######################### use FindBin; use X12::Parser::Tree; #setup for the test my $root = X12::Parser::Tree->new(); $root->set_name('X12'); #add 1 child my $child = X12::Parser::Tree->new(); $child->set_name('ST'); $child->set_loop_start_parm( 'ST', '', '' ); $child->set_parent($root); $root->add_child($child); #add 2 child $child = X12::Parser::Tree->new(); $child->set_name('2000A'); $child->set_loop_start_parm( 'HL', '3', '20' ); $child->set_parent($root); $root->add_child($child); #add 2.1 child my $grandchild = X12::Parser::Tree->new(); $grandchild->set_name('2010AA'); $grandchild->set_loop_start_parm( 'NM1', '1', '85' ); $grandchild->set_parent($child); $child->add_child($grandchild); #add 2.2 child $grandchild = X12::Parser::Tree->new(); $grandchild->set_name('2010AB'); $grandchild->set_loop_start_parm( 'NM1', '1', '87' ); $grandchild->set_parent($child); $child->add_child($grandchild); #add 3 child $child = X12::Parser::Tree->new(); $child->set_name('2000B'); $child->set_loop_start_parm( '2000B', '3', '22' ); $child->set_parent($root); $root->add_child($child); #add 3.1 child $grandchild = X12::Parser::Tree->new(); $grandchild->set_name('2010BA'); $grandchild->set_loop_start_parm( 'NM1', '1', 'IL' ); $grandchild->set_parent($child); $child->add_child($grandchild); #add 3.2 child $grandchild = X12::Parser::Tree->new(); $grandchild->set_name('2010BB'); $grandchild->set_loop_start_parm( 'NM1', '1', 'PR,QD,AO' ); $grandchild->set_parent($child); $child->add_child($grandchild); my $svalue = ''; my $ivalue = 0; #test my $node = $root; $svalue = $node->get_name; ok( $svalue, 'X12' ); #test $ivalue = $node->is_root; ok( $ivalue, 1 ); #test $svalue = $node->get_parent; ok( $svalue, undef ); #test $ivalue = $node->has_children; ok( $ivalue, 1 ); #test 5 $ivalue = $node->get_child_count; #test ok( $ivalue, 3 ); #test $child = $node->get_child(0); $svalue = $child->get_name(); ok( $svalue, 'ST' ); #test $child = $node->get_child(2); $svalue = $child->get_name(); ok( $svalue, '2000B' ); #test $node = $child; $ivalue = $node->has_children(); ok( $ivalue, 1 ); #test $ivalue = $node->get_child_count; ok( $ivalue, 2 ); #test $child = $node->get_child(0); $svalue = $child->get_name(); ok( $svalue, '2010BA' ); #test $node = $child; my $arrayref = [ 'NM1', 'IL', '2', 'GREEN HOSPITAL' ]; $ivalue = $node->is_loop_start($arrayref); ok( $ivalue, 1 ); #test $arrayref = [ 'NM1', 'QC', '2', 'GREEN HOSPITAL' ]; $ivalue = $node->is_loop_start($arrayref); ok( $ivalue, 0 ); #test $node = $node->get_parent; $node = $node->get_child(1); $svalue = $node->get_name(); ok( $svalue, '2010BB' ); #test $arrayref = [ 'NM1', 'QD', '2', 'GREEN HOSPITAL' ]; $ivalue = $node->is_loop_start($arrayref); ok( $ivalue, 1 ); #test $arrayref = [ 'NM1', 'QC', '2', 'GREEN HOSPITAL' ]; $ivalue = $node->is_loop_start($arrayref); ok( $ivalue, 0 ); X12-0.80/t/2.t0000644000175400010010000000235011305270021010646 0ustar pbNone# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1.t' ######################### use strict; use Test; BEGIN { plan tests => 12 } ######################### use FindBin; use X12::Parser::Cf; #setup my $sample_cf = "$FindBin::RealBin/../cf/837_004010X098.cf"; my $cf = X12::Parser::Cf->new(); my $root = $cf->load( file => $sample_cf ); my ( $svalue, $ivalue, $node, $array ); #test $ivalue = $root->get_child_count; ok( $ivalue, 11 ); #test $svalue = $root->get_name; ok( $svalue, 'X12' ); #test $node = $root->get_child(7); $svalue = $node->get_name; ok( $svalue, '2000C' ); #test $ivalue = $node->get_child_count; ok( $ivalue, 2 ); #test $svalue = $node->{_SEG}; ok( $svalue, 'HL' ); #test $ivalue = $node->{_SEG_QUAL_POS}; ok( $ivalue, 3 ); #test $array = $node->{_SEG_QUAL}; ok( @{$array}[0], '23' ); #test $node = $node->get_child(1); $svalue = $node->get_name; ok( $svalue, '2300' ); #test $ivalue = $node->get_child_count; ok( $ivalue, 8 ); #test $node = $node->get_child(7); $svalue = $node->get_name; ok( $svalue, '2400' ); #test $ivalue = $node->get_child_count; ok( $ivalue, 9 ); #test $ivalue = $node->get_depth; ok( $ivalue, 3 ); X12-0.80/t/3.t0000644000175400010010000000362611310772234010667 0ustar pbNone# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1.t' ######################### use strict; use Test; BEGIN { plan tests => 16 } ######################### use FindBin; use X12::Parser; #setup my ( $loop, $pos, $level ); my $sample_file = "$FindBin::RealBin/sample_835.txt"; my $sample_cf = "$FindBin::RealBin/../cf/835_004010X091.cf"; #create a parser instance my $p = new X12::Parser; $p->parsefile( file => $sample_file, conf => $sample_cf ); #test 1 $loop = $p->get_next_loop; ok( $loop, 'ISA' ); #test 2 $loop = $p->get_next_loop; ok( $loop, 'GS' ); #test 3 ( $pos, $loop ) = $p->get_next_pos_loop; ok( $pos, 3 ); #test 4 ( $pos, $level, $loop ) = $p->get_next_pos_level_loop; ok( $level, 1 ); #test 5 #close the file $p->closefile(); # parse the file again $p->parsefile( file => $sample_file, conf => $sample_cf ); $loop = $p->get_next_loop; ok( $loop, 'ISA' ); #test 6 $loop = $p->get_next_loop; ok( $loop, 'GS' ); #test 7 ( $pos, $loop ) = $p->get_next_pos_loop; ok( $pos, 3 ); #test 8 ( $pos, $level, $loop ) = $p->get_next_pos_level_loop; ok( $level, 1 ); #test 9 #close the file $p->closefile(); # parse the file again open( my $handle, $sample_file ); $p->parse( handle => $handle, conf => $sample_cf ); $loop = $p->get_next_loop; ok( $loop, 'ISA' ); #test 10 $loop = $p->get_next_loop; ok( $loop, 'GS' ); #test 11 ( $pos, $loop ) = $p->get_next_pos_loop; ok( $pos, 3 ); #test 12 ( $pos, $level, $loop ) = $p->get_next_pos_level_loop; ok( $level, 1 ); close($handle); #test 13 open( $handle, $sample_file ); $p->parse( handle => $handle, conf => $sample_cf ); $loop = $p->get_next_loop; ok( $loop, 'ISA' ); #test 14 $loop = $p->get_next_loop; ok( $loop, 'GS' ); #test 15 ( $pos, $loop ) = $p->get_next_pos_loop; ok( $pos, 3 ); #test 16 ( $pos, $level, $loop ) = $p->get_next_pos_level_loop; ok( $level, 1 ); close($handle); X12-0.80/t/4.t0000755000175400010010000000415611313251337010671 0ustar pbNone# Before `make install' is performed this script should be runnable with # `make test'. After `make install' it should work as `perl 1.t' ######################### use strict; use Test; BEGIN { plan tests => 1 } ######################### use FindBin; use X12::Parser; #setup my ( $result, $expected_result ); my $sample_file = "$FindBin::RealBin/sample_835.txt"; my $sample_cf = "$FindBin::RealBin/../cf/835_004010X091.cf"; $expected_result = <parsefile( file => $sample_file, conf => $sample_cf ); #test 1 $result = $p->_print_tree; ok( $result, $expected_result ); X12-0.80/t/sample_835.txt0000644000175400010010000000137610100503335012747 0ustar pbNoneISA*00* *00* *ZZ*USERNAME *ZZ*PASSWORD *030620*0730*U*00401*000000001*0*T*: GS*TEST*TEST ST*835*1234 BPR*A*A*A*A*A*A*A*A*A*A TRN*1*12345*12345 DTM*111*20020916 N1*PR*ALWAYS INSURANCE COMPANY N7*1 MAIN STREET N4*ALWAYS*YOURS*00001 REF*B*B*00001 N1*PE*NEW HOSPITAL*B*127456789 LX*1 TS7*BTEST*BTEST*BTEST*BTEST*BTEST*BTEST TS2*CTEST*CTEST*CTEST*CTEST CLP*DTEST*DTEST*DTEST*DTEST*DTEST CAS*ETEST*ETEST*ETEST NM1*QC*1*LN*FN*M****1234567 MIA*0*0*0 DTM*272*20020816 DTM*273*20020824 QTY*A*5 LX*2 TS7*GTEST*GTEST*GTEST*GTEST*GTEST*GTEST*GTEST*GTEST CLP*HTEST*HTEST*HTEST*HTEST*HTEST*HTEST*HTEST*HTEST CAS*ITEST*ITEST*ITEST NM1*QC*1*LN*FN*M****123456789 MOA*0*0*0 DTM*272*20020512 PLB*JTEST*JTEST*JTEST*JTEST SE*1*1234 GE*1*TEST IEA*1*000000001