X12 835 Health Care Claim Payment/Advice Last updated: 2026-09-29

The 835 is the HIPAA electronic remittance advice (ERA). A payer sends it to a provider to explain how each claim was paid, adjusted or denied, and it usually accompanies an EFT payment.

BPR carries the payment amount and method, TRN the trace number that links the 835 to the EFT, and each CLP loop reports one claim with its CAS adjustments and SVC service line payments. Provider-level adjustments sit in PLB at the end.

At a glance

Standard
X12 HIPAA
Implementation guide
005010X221A1
Functional group
HP (GS01)
Sent by
Payer to provider or billing service
Responses
999
ediFabric .NET template
TS835 in EdiFabric.Templates.Hipaa
OpenEDI definition
View 835 in the spec library

835 structure

The full X12 835 layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 5 loops and 53 segment positions, in file order. Loops are shaded and their segments indented; Max use is how many times a segment or loop may repeat.

Segment / loop Name Usage Max use
STTransaction Set HeaderRequired1
BPRFinancial InformationRequired1
TRNReassociation Trace NumberRequired1
CURForeign Currency InformationSituational1
Any orderThe loops below can appear in any orderSituational1
REFReceiver IdentificationSituational1
REFVersion IdentificationSituational1
DTMProduction DateSituational1
Any orderThe loops below can appear in any orderRequired1
Loop 1000APayer IdentificationRequired1
N1Payer IdentificationRequired1
N3Payer AddressRequired1
N4Payer City State ZIP CodeRequired1
REFAdditional Payer IdentificationSituational4
Any orderThe loops below can appear in any orderRequired1
PERPayer Business Contact InformationSituational1
PERPayer Technical Contact InformationRequired>1
PERPayer WEB SiteSituational1
Loop 1000BPayee IdentificationRequired1
N1Payee IdentificationRequired1
N3Payee AddressSituational1
N4Payee City State ZIP CodeSituational1
REFPayee Additional IdentificationSituational>1
RDMRemittance Delivery MethodSituational1
Loop 2000Header NumberSituational>1
LXHeader NumberRequired1
TS3Provider Summary InformationSituational1
TS2Provider Supplemental Summary InformationSituational1
Loop 2100Claim Payment InformationRequired>1
CLPClaim Payment InformationRequired1
CASClaims AdjustmentSituational99
Any orderThe loops below can appear in any orderRequired1
NM1Patient NameRequired1
NM1Insured NameSituational1
NM1Corrected Patient Insured NameSituational1
NM1Service Provider NameSituational1
NM1Crossover Carrier NameSituational1
NM1Corrected Priority Payer NameSituational1
NM1Other Subscriber NameSituational1
MIAInpatient Adjudication InformationSituational1
MOAOutpatient Adjudication InformationSituational1
Any orderThe loops below can appear in any orderSituational1
REFOther Claim Related IdentificationSituational5
REFRendering Provider IdentificationSituational10
Any orderThe loops below can appear in any orderSituational1
DTMStatement Fromor to DateSituational2
DTMCoverage Expiration DateSituational1
DTMClaim Received DateSituational1
PERClaim Contact InformationSituational2
AMTClaim Supplemental InformationSituational13
QTYClaim Supplemental Information QuantitySituational14
Loop 2110Service Payment InformationSituational999
SVCService Payment InformationRequired1
DTMService DateSituational2
CASService AdjustmentSituational99
Any orderThe loops below can appear in any orderSituational1
REFService IdentificationSituational8
REFLine Item Control NumberSituational1
REFRendering Provider InformationSituational10
REFHealth Care Policy IdentificationSituational5
AMTService Supplemental AmountSituational9
QTYService Supplemental QuantitySituational6
LQHealth Care Remark CodesSituational99
PLBProvider AdjustmentSituational>1
SETransaction Set TrailerRequired1

Sample 835 file

A remittance for one payment with claim-level and service-level adjustments. Paste it into EdiNation to see every element named and validated.

ISA*00*          *00*          *ZZ*1234567        *ZZ*11111          *170508*1141*^*00501*000000101*1*P*:~
GS*HC*XXXXXXX*XXXXX*20170617*1741*101*X*005010X221A1~
ST*835*0001~
BPR*I*34.00*C*CHK************20050318~
TRN*1*0063158ABC*1566339911~
REF*EV*030240928~
DTM*405*20050318~
N1*PR*YOUR TAX DOLLARS AT WORK~
N3*481A00 DEER RUN ROAD~
N4*WEST PALM BCH*FL*11114~
PER*BL*JOHN WAYNE*TE*8005551212*EX*123~
N1*PE*ATONEWITHHEALTH*FI*3UR334563~
N3*3501 JOHNSON STREET~
N4*SUNSHINE*FL*12345~
REF*PQ*11861~
LX*1~
CLP*0001000055*2*541*34**12*50650619501~
NM1*QC*1*BURCK*RAYMOND*W***MI*987654321~
NM1*82*2*PROFESSIONAL TEST 1*****BS*34426~
DTM*232*20050202~
DTM*233*20050202~
SVC*HC:55669*541*34*1~
DTM*472*20050202~
CAS*OA*23*516~
CAS*OA*94*-9~
REF*1B*44280~
AMT*B6*550~
SE*26*0001~
GE*1*101~
IEA*1*000000101~

The same 835 as JSON

ediFabric turns every loop, segment and element into a named field. This is the transaction from the sample, in the JSON that ediFabric Native and Cloud return and accept.

{
  "ST": {
    "TransactionSetIdentifierCode_01": "835",
    "TransactionSetControlNumber_02": "0001"
  },
  "BPR_FinancialInformation": {
    "TransactionHandlingCode_01": "I",
    "TotalPremiumPaymentAmount_02": "34.00",
    "CreditorDebitFlagCode_03": "C",
    "PaymentMethodCode_04": "CHK",
    "CheckIssueorEFTEffectiveDate_16": "20050318"
  },
  "TRN_ReassociationTraceNumber": {
    "TraceTypeCode_01": "1",
    "CurrentTransactionTraceNumber_02": "0063158ABC",
    "OriginatingCompanyIdentifier_03": "1566339911"
  },
  "AllREF": {
    "REF_ReceiverIdentification": {
      "ReferenceIdentificationQualifier_01": "EV",
      "MemberGrouporPolicyNumber_02": "030240928"
    }
  },
  "DTM_ProductionDate": {
    "DateTimeQualifier_01": "405",
    "Date_02": "20050318"
  },
  "AllN1": {
    "Loop1000A": {
      "N1_PayerIdentification": {
        "EntityIdentifierCode_01": "PR",
        "PremiumPayerName_02": "YOUR TAX DOLLARS AT WORK"
      },
      "N3_PayerAddress": {
        "ResponseContactAddressLine_01": "481A00 DEER RUN ROAD"
      },
      "N4_PayerCity_State_ZIPCode": {
        "AdditionalPatientInformationContactCityName_01": "WEST PALM BCH",
        "AdditionalPatientInformationContactStateCode_02": "FL",
        "AdditionalPatientInformationContactPostalZoneorZIPCode_03": "11114"
      },
      "AllPER": {
        "PER_PayerTechnicalContactInformation": [
          {
            "ContactFunctionCode_01": "BL",
            "ResponseContactName_02": "JOHN WAYNE",
            "CommunicationNumberQualifier_03": "TE",
            "ResponseContactCommunicationNumber_04": "8005551212",
            "CommunicationNumberQualifier_05": "EX",
            "ResponseContactCommunicationNumber_06": "123"
          }
        ]
      }
    },
    "Loop1000B": {
      "N1_PayeeIdentification": {
        "EntityIdentifierCode_01": "PE",
        "PremiumPayerName_02": "ATONEWITHHEALTH",
        "IdentificationCodeQualifier_03": "FI",
        "IntermediaryBankIdentifier_04": "3UR334563"
      },
      "N3_PayeeAddress": {
        "ResponseContactAddressLine_01": "3501 JOHNSON STREET"
      },
      "N4_PayeeCity_State_ZIPCode": {
        "AdditionalPatientInformationContactCityName_01": "SUNSHINE",
        "AdditionalPatientInformationContactStateCode_02": "FL",
        "AdditionalPatientInformationContactPostalZoneorZIPCode_03": "12345"
      },
      "REF_PayeeAdditionalIdentification": [
        {
          "ReferenceIdentificationQualifier_01": "PQ",
          "MemberGrouporPolicyNumber_02": "11861"
        }
      ]
    }
  },
  "Loop2000": [
    {
      "LX_HeaderNumber": {
        "AssignedNumber_01": "1"
      },
      "Loop2100": [
        {
          "CLP_ClaimPaymentInformation": {
            "PatientControlNumber_01": "0001000055",
            "ClaimStatusCode_02": "2",
            "TotalClaimChargeAmount_03": "541",
            "ClaimPaymentAmount_04": "34",
            "ClaimFilingIndicatorCode_06": "12",
            "PayerClaimControlNumber_07": "50650619501"
          },
          "AllNM1": {
            "NM1_PatientName": {
              "EntityIdentifierCode_01": "QC",
              "EntityTypeQualifier_02": "1",
              "ResponseContactLastorOrganizationName_03": "BURCK",
              "ResponseContactFirstName_04": "RAYMOND",
              "ResponseContactMiddleName_05": "W",
              "IdentificationCodeQualifier_08": "MI",
              "ResponseContactIdentifier_09": "987654321"
            },
            "NM1_ServiceProviderName": {
              "EntityIdentifierCode_01": "82",
              "EntityTypeQualifier_02": "2",
              "ResponseContactLastorOrganizationName_03": "PROFESSIONAL TEST 1",
              "IdentificationCodeQualifier_08": "BS",
              "ResponseContactIdentifier_09": "34426"
            }
          },
          "AllDTM": {
            "DTM_StatementFromorToDate": [
              {
                "DateTimeQualifier_01": "232",
                "Date_02": "20050202"
              },
              {
                "DateTimeQualifier_01": "233",
                "Date_02": "20050202"
              }
            ]
          },
          "Loop2110": [
            {
              "SVC_ServicePaymentInformation": {
                "CompositeMedicalProcedureIdentifier_01": {
                  "ProductorServiceIDQualifier_01": "HC",
                  "ProcedureCode_02": "55669"
                },
                "LineItemChargeAmount_02": "541",
                "MonetaryAmount_03": "34",
                "RevenueCode_04": "1"
              },
              "DTM_ServiceDate": [
                {
                  "DateTimeQualifier_01": "472",
                  "Date_02": "20050202"
                }
              ],
              "CAS_ServiceAdjustment": [
                {
                  "ClaimAdjustmentGroupCode_01": "OA",
                  "AdjustmentReasonCode_02": "23",
                  "AdjustmentAmount_03": "516"
                },
                {
                  "ClaimAdjustmentGroupCode_01": "OA",
                  "AdjustmentReasonCode_02": "94",
                  "AdjustmentAmount_03": "-9"
                }
              ],
              "AllREF": {
                "REF_RenderingProviderInformation": [
                  {
                    "ReferenceIdentificationQualifier_01": "1B",
                    "MemberGrouporPolicyNumber_02": "44280"
                  }
                ]
              },
              "AMT_ServiceSupplementalAmount": [
                {
                  "AmountQualifierCode_01": "B6",
                  "TotalClaimChargeAmount_02": "550"
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "SE": {
    "NumberofIncludedSegments_01": "26",
    "TransactionSetControlNumber_02": "0001"
  }
}

Parse and validate an 835 file

Read the file into typed objects with ediFabric .NET, convert it to JSON in process with the ediFabric Native bindings for Python, Java and C, or post it to the ediFabric Cloud REST API from any language.

using EdiFabric.Templates.Hipaa5010;

License.SetSerial("YOUR_SERIAL_KEY");

using (var stream = File.OpenRead(@"C:\edi\Payment.txt"))
using (var reader = new X12Reader(stream, "EdiFabric.Templates.Hipaa"))
{
    var items = await reader.ReadToEndAsync();
    foreach (var transaction in items.OfType<TS835>())
    {
        if (transaction.IsValid(out MessageErrorContext errors))
            Console.WriteLine($"{transaction.ST.TransactionSetControlNumber_02} is valid");
        else
            Console.WriteLine(string.Join(Environment.NewLine, errors.Flatten()));
    }
}
import json
import edifabric_x12 as ef

serial = "YOUR_SERIAL_KEY"
ef.load_library()
ef.set_serial(serial)
ef.set_map(json.dumps({"default": serial, "maps": {}}))

edi = open("Payment.txt", "rb").read()
output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE)
transactions = output[:offset]
report = json.loads(output[offset:])
print(report["errors_count"])
import com.edifabric.nativex12.EdiFabricX12;
import com.edifabric.nativex12.ParseMode;
import com.edifabric.nativex12.ParseResult;

String serial = "YOUR_SERIAL_KEY";
EdiFabricX12.loadLibrary();
EdiFabricX12.setSerial(serial);
EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}");

String edi = Files.readString(Path.of("Payment.txt"));
ParseResult result = EdiFabricX12.parse(edi, ParseMode.JSON_VALIDATE);
System.out.println(result.getTransactions());
System.out.println(result.getReport());
#include "edifabric_x12.h"

const char *serial = "YOUR_SERIAL_KEY";
ef_parse_result result;

if (ef_load_library(NULL) != 0)
    return 1;
ef_set_serial(serial);
ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}");

char *edi = read_file("Payment.txt", NULL);   /* helper in example_all_functions.c */
if (ef_parse(edi, EF_PARSE_JSON_VALIDATE, NULL, &result) == 0) {
    /* transactions = output[0 .. offset), report = output[offset .. length) */
    fwrite(result.output.data, 1, (size_t)result.output.length, stdout);
    ef_free(result.output.data);
}
curl -X POST 'https://api.edination.com/v2/x12/read' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/octet-stream' \
--data-binary '@Payment.txt'

Generate an 835 file

Populate a TS835 object in .NET, or pass JSON in the shape shown above to ediFabric Native or ediFabric Cloud, and get a valid 835 file back.

using EdiFabric.Templates.Hipaa5010;

License.SetSerial("YOUR_SERIAL_KEY");

var transaction = new TS835();

transaction.ST = new ST();
transaction.ST.TransactionSetIdentifierCode_01 = "835";
transaction.ST.TransactionSetControlNumber_02 = "0001";

transaction.BPR_FinancialInformation = new BPR_FinancialInformation_2();
transaction.BPR_FinancialInformation.TransactionHandlingCode_01 = "I";
transaction.BPR_FinancialInformation.TotalPremiumPaymentAmount_02 = "34.00";
transaction.BPR_FinancialInformation.CreditorDebitFlagCode_03 = "C";
transaction.BPR_FinancialInformation.PaymentMethodCode_04 = "CHK";
transaction.BPR_FinancialInformation.CheckIssueorEFTEffectiveDate_16 = "20050318";

transaction.TRN_ReassociationTraceNumber = new TRN_DependentTraceNumber();
transaction.TRN_ReassociationTraceNumber.TraceTypeCode_01 = "1";
transaction.TRN_ReassociationTraceNumber.CurrentTransactionTraceNumber_02 = "0063158ABC";
transaction.TRN_ReassociationTraceNumber.OriginatingCompanyIdentifier_03 = "1566339911";

//  Occurrence of REF Segments in any order
transaction.AllREF = new All_REF_835_3();

// ... set the remaining loops and segments the same way

// SegmentBuilders is in the Common project of the example repository
using (var stream = new MemoryStream())
{
    using (var writer = new X12Writer(stream))
    {
        writer.Write(SegmentBuilders.BuildIsa("1"));
        writer.Write(SegmentBuilders.BuildGs("1", "SENDER1", "RECEIVER1", "005010X221A1"));
        writer.Write(transaction);
    }
    Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray()));
}
import json
import edifabric_x12 as ef

serial = "YOUR_SERIAL_KEY"
ef.load_library()
ef.set_serial(serial)
ef.set_map(json.dumps({"default": serial, "maps": {}}))

# the transactions JSON returned by ef.parse, edited or produced by your application
transactions = open("Payment.json", "rb").read()
edi = ef.build(transactions, postfix="\r\n")
print(edi)
import com.edifabric.nativex12.EdiFabricX12;

String serial = "YOUR_SERIAL_KEY";
EdiFabricX12.loadLibrary();
EdiFabricX12.setSerial(serial);
EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}");

// the transactions JSON returned by parse, edited or produced by your application
String transactions = Files.readString(Path.of("Payment.json"));
String edi = EdiFabricX12.build(transactions, "\r\n");
System.out.println(edi);
#include "edifabric_x12.h"

ef_buffer edi;

if (ef_load_library(NULL) != 0)
    return 1;
ef_set_serial("YOUR_SERIAL_KEY");
ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}");

/* the transactions JSON returned by ef_parse, edited or produced by your application */
char *transactions = read_file("Payment.json", NULL);
if (ef_build(transactions, "\r\n", &edi) == 0) {
    fwrite(edi.data, 1, (size_t)edi.length, stdout);
    ef_free(edi.data);
}
# the JSON returned by /read, edited or produced by your application
curl -X POST 'https://api.edination.com/v2/x12/write' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/json' \
--data-binary '@Payment.json' \
-o 'Payment.txt'

Complete ediFabric .NET example

A complete C# program for the X12 835, built on TS835 in EdiFabric.Templates.Hipaa. The same code is in the ediFabric .NET examples on GitHub.

using EdiFabric.Framework.Readers;
using EdiFabric.Framework.Writers;
using EdiFabric.Templates.Hipaa5010;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using EdiFabric.Core.Model.Edi;
using EdiFabric.Core.Model.Edi.X12;
using EdiFabric.Examples.X12.Common;

namespace EdiFabric.Examples.X12.T835
{
    class Program
    {
        static void Main(string[] args)
        {
            SerialKey.Set(Common.SerialKey.Get());
            Read();
            Write();
        }

        ///
        /// Read Payment
        ///
        static void Read()
        {
            var ediStream = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\Hipaa\Payment.txt");

            List ediItems;
            using (var ediReader = new X12Reader(ediStream, "EdiFabric.Templates.Hipaa"))
                ediItems = ediReader.ReadToEnd().ToList();

            var transactions = ediItems.OfType();

            foreach (var transaction in transactions)
            {
                if (transaction.HasErrors)
                {
                    //  partially parsed
                    var errors = transaction.ErrorContext.Flatten();
                }
            }
        }

        ///
        /// Write Payment
        ///
        static void Write()
        {
            var transaction = BuildPayment("1");

            using (var stream = new MemoryStream())
            {
                using (var writer = new X12Writer(stream))
                {
                    writer.Write(SegmentBuilders.BuildIsa("1"));
                    writer.Write(SegmentBuilders.BuildGs("1", "SENDER1", "RECEIVER1", "005010X221A1"));
                    writer.Write(transaction);
                }

                var ediString = stream.LoadToString();
            }
        }

        ///
        /// Build payment.
        /// Original from http://www.x12.org/examples/005010X221/payments/secondary-payment-with-higher-fee-schedule/
        ///
        static TS835 BuildPayment(string controlNumber)
        {
            //  In this claim, the primary payer received a claim for $541.00. They allowed $400 and paid $375.00 of the submitted charges.
            //  The primary payer applied $141.00 as a contractual adjustment that was part of the provider's fee schedule. The patient, Raymond Burck owed a co-pay of $25.00.

            //  YTDAW as the secondary payer allowed $550.00 for the service submitted. This amount is $9.00 more than charged.
            //  The secondary payer paid $34.00.The impact of the primary payer's payment on the secondary payer is $516.00 ($141.00 contractual adjustment and $375.00 payment).

            var result = new TS835();

            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "835";
            result.ST.TransactionSetControlNumber_02 = controlNumber.PadLeft(9, '0');

            result.BPR_FinancialInformation = new BPR_FinancialInformation_2();
            result.BPR_FinancialInformation.TransactionHandlingCode_01 = "I";
            result.BPR_FinancialInformation.TotalPremiumPaymentAmount_02 = "34.00";
            result.BPR_FinancialInformation.CreditorDebitFlagCode_03 = "C";
            result.BPR_FinancialInformation.PaymentMethodCode_04 = "CHK";
            result.BPR_FinancialInformation.CheckIssueorEFTEffectiveDate_16 = "20050318";

            result.TRN_ReassociationTraceNumber = new TRN_DependentTraceNumber();
            result.TRN_ReassociationTraceNumber.TraceTypeCode_01 = "1";
            result.TRN_ReassociationTraceNumber.CurrentTransactionTraceNumber_02 = "0063158ABC";
            result.TRN_ReassociationTraceNumber.OriginatingCompanyIdentifier_03 = "1566339911";

            //  Occurrence of REF Segments in any order
            result.AllREF = new All_REF_835_3();

            result.AllREF.REF_ReceiverIdentification = new REF_ReceiverIdentification();
            result.AllREF.REF_ReceiverIdentification.ReferenceIdentificationQualifier_01 = "EV";
            result.AllREF.REF_ReceiverIdentification.MemberGrouporPolicyNumber_02 = "030240928";

            result.DTM_ProductionDate = new DTM_ProductionDate();
            result.DTM_ProductionDate.DateTimeQualifier_01 = "405";
            result.DTM_ProductionDate.Date_02 = "20050318";

            //  Occurrence of N1 Loops in any order
            result.AllN1 = new All_N1_835();

            //  Begin 1000A Loop
            result.AllN1.Loop1000A = new Loop_1000A_835();

            result.AllN1.Loop1000A.N1_PayerIdentification = new N1_PayerIdentification();
            result.AllN1.Loop1000A.N1_PayerIdentification.EntityIdentifierCode_01 = "PR";
            result.AllN1.Loop1000A.N1_PayerIdentification.PremiumPayerName_02 = "YOUR TAX DOLLARS AT WORK";

            result.AllN1.Loop1000A.N3_PayerAddress = new N3_AdditionalPatientInformationContactAddress();
            result.AllN1.Loop1000A.N3_PayerAddress.ResponseContactAddressLine_01 = "481A00 DEER RUN ROAD";

            result.AllN1.Loop1000A.N4_PayerCity_State_ZIPCode = new N4_AdditionalPatientInformationContactCity();
            result.AllN1.Loop1000A.N4_PayerCity_State_ZIPCode.AdditionalPatientInformationContactCityName_01 = "WEST PALM BCH";
            result.AllN1.Loop1000A.N4_PayerCity_State_ZIPCode.AdditionalPatientInformationContactStateCode_02 = "FL";
            result.AllN1.Loop1000A.N4_PayerCity_State_ZIPCode.AdditionalPatientInformationContactPostalZoneorZIPCode_03 = "11114";

            //  Occurrence of PER Segments in any order
            result.AllN1.Loop1000A.AllPER = new All_PER_835();

            //  Repeating PER Contact Information
            result.AllN1.Loop1000A.AllPER.PER_PayerTechnicalContactInformation = new List();

            var per1 = new PER_PayerTechnicalContactInformation();
            per1.ContactFunctionCode_01 = "BL";
            per1.ResponseContactName_02 = "JOHN WAYNE";
            per1.CommunicationNumberQualifier_03 = "TE";
            per1.ResponseContactCommunicationNumber_04 = "8005551212";
            per1.CommunicationNumberQualifier_05 = "EX";
            per1.ResponseContactCommunicationNumber_06 = "123";
            result.AllN1.Loop1000A.AllPER.PER_PayerTechnicalContactInformation.Add(per1);

            //  End 1000A Loop

            //  Begin 1000B Loop
            result.AllN1.Loop1000B = new Loop_1000B_835();

            result.AllN1.Loop1000B.N1_PayeeIdentification = new N1_PayeeIdentification();
            result.AllN1.Loop1000B.N1_PayeeIdentification.EntityIdentifierCode_01 = "PE";
            result.AllN1.Loop1000B.N1_PayeeIdentification.PremiumPayerName_02 = "ATONEWITHHEALTH";
            result.AllN1.Loop1000B.N1_PayeeIdentification.IdentificationCodeQualifier_03 = "FI";
            result.AllN1.Loop1000B.N1_PayeeIdentification.IntermediaryBankIdentifier_04 = "3UR334563";

            result.AllN1.Loop1000B.N3_PayeeAddress = new N3_AdditionalPatientInformationContactAddress();
            result.AllN1.Loop1000B.N3_PayeeAddress.ResponseContactAddressLine_01 = "3501 JOHNSON STREET";

            result.AllN1.Loop1000B.N4_PayeeCity_State_ZIPCode = new N4_AdditionalPatientInformationContactCity();
            result.AllN1.Loop1000B.N4_PayeeCity_State_ZIPCode.AdditionalPatientInformationContactCityName_01 = "SUNSHINE";
            result.AllN1.Loop1000B.N4_PayeeCity_State_ZIPCode.AdditionalPatientInformationContactStateCode_02 = "FL";
            result.AllN1.Loop1000B.N4_PayeeCity_State_ZIPCode.AdditionalPatientInformationContactPostalZoneorZIPCode_03 = "12345";

            //  Repeating REF Identification
            result.AllN1.Loop1000B.REF_PayeeAdditionalIdentification = new List();

            var ref1 = new REF_PayeeAdditionalIdentification();
            ref1.ReferenceIdentificationQualifier_01 = "PQ";
            ref1.MemberGrouporPolicyNumber_02 = "11861";
            result.AllN1.Loop1000B.REF_PayeeAdditionalIdentification.Add(ref1);

            //  End 1000B Loop

            //  Repeating Loop 2000 Groups
            result.Loop2000 = new List();

            //  Begin Loop 2000
            var loop2000 = new Loop_2000_835();

            loop2000.LX_HeaderNumber = new LX_HeaderNumber();
            loop2000.LX_HeaderNumber.AssignedNumber_01 = "1";

            //  Repeating Loop 2100 Groups
            loop2000.Loop2100 = new List();

            //  Begin Loop 2100
            var loop2100 = new Loop_2100_835();

            loop2100.CLP_ClaimPaymentInformation = new CLP_ClaimPaymentInformation();
            loop2100.CLP_ClaimPaymentInformation.PatientControlNumber_01 = "0001000055";
            loop2100.CLP_ClaimPaymentInformation.ClaimStatusCode_02 = "2";
            loop2100.CLP_ClaimPaymentInformation.TotalClaimChargeAmount_03 = "541";
            loop2100.CLP_ClaimPaymentInformation.ClaimPaymentAmount_04 = "34";
            loop2100.CLP_ClaimPaymentInformation.ClaimFilingIndicatorCode_06 = "12";
            loop2100.CLP_ClaimPaymentInformation.PayerClaimControlNumber_07 = "50650619501";

            //  Occurrence of NM1 Segments in any order
            loop2100.AllNM1 = new All_NM1_835();

            loop2100.AllNM1.NM1_PatientName = new NM1_PatientName_2();
            loop2100.AllNM1.NM1_PatientName.EntityIdentifierCode_01 = "QC";
            loop2100.AllNM1.NM1_PatientName.EntityTypeQualifier_02 = "1";
            loop2100.AllNM1.NM1_PatientName.ResponseContactLastorOrganizationName_03 = "BURCK";
            loop2100.AllNM1.NM1_PatientName.ResponseContactFirstName_04 = "RAYMOND";
            loop2100.AllNM1.NM1_PatientName.ResponseContactMiddleName_05 = "W";
            loop2100.AllNM1.NM1_PatientName.IdentificationCodeQualifier_08 = "MI";
            loop2100.AllNM1.NM1_PatientName.ResponseContactIdentifier_09 = "987654321";

            loop2100.AllNM1.NM1_ServiceProviderName = new NM1_ServiceProviderName_3();
            loop2100.AllNM1.NM1_ServiceProviderName.EntityIdentifierCode_01 = "82";
            loop2100.AllNM1.NM1_ServiceProviderName.EntityTypeQualifier_02 = "2";
            loop2100.AllNM1.NM1_ServiceProviderName.ResponseContactLastorOrganizationName_03 = "PROFESSIONAL TEST 1";
            loop2100.AllNM1.NM1_ServiceProviderName.IdentificationCodeQualifier_08 = "BS";
            loop2100.AllNM1.NM1_ServiceProviderName.ResponseContactIdentifier_09 = "34426";

            //  Occurrence of DTM Segments in any order
            loop2100.AllDTM = new All_DTM_835();

            //  Repeating DTM statement
            loop2100.AllDTM.DTM_StatementFromorToDate = new List();

            var dtm1 = new DTM_StatementFromorToDate();
            dtm1.DateTimeQualifier_01 = "232";
            dtm1.Date_02 = "20050202";
            loop2100.AllDTM.DTM_StatementFromorToDate.Add(dtm1);

            var dtm2 = new DTM_StatementFromorToDate();
            dtm2.DateTimeQualifier_01 = "233";
            dtm2.Date_02 = "20050202";
            loop2100.AllDTM.DTM_StatementFromorToDate.Add(dtm2);

            //  Repeating 2110 Loops
            loop2100.Loop2110 = new List();

            //  Begin 2110 Loop
            var loop2110 = new Loop_2110_835();

            loop2110.SVC_ServicePaymentInformation = new SVC_ServicePaymentInformation();
            loop2110.SVC_ServicePaymentInformation.CompositeMedicalProcedureIdentifier_01 = new C003_CompositeMedicalProcedureIdentifier_16();
            loop2110.SVC_ServicePaymentInformation.CompositeMedicalProcedureIdentifier_01.ProductorServiceIDQualifier_01 = "HC";
            loop2110.SVC_ServicePaymentInformation.CompositeMedicalProcedureIdentifier_01.ProcedureCode_02 = "55669";
            loop2110.SVC_ServicePaymentInformation.LineItemChargeAmount_02 = "541";
            loop2110.SVC_ServicePaymentInformation.MonetaryAmount_03 = "34";
            loop2110.SVC_ServicePaymentInformation.RevenueCode_04 = "1";

            //  Repeating DT service date
            loop2110.DTM_ServiceDate = new List();

            var dtm3 = new DTM_ServiceDate();
            dtm3.DateTimeQualifier_01 = "472";
            dtm3.Date_02 = "20050202";
            loop2110.DTM_ServiceDate.Add(dtm3);

            //  Repeating CAS
            loop2110.CAS_ServiceAdjustment = new List();

            var cas1 = new CAS_ClaimsAdjustment();
            cas1.ClaimAdjustmentGroupCode_01 = "OA";
            cas1.AdjustmentReasonCode_02 = "23";
            cas1.AdjustmentAmount_03 = "516";
            loop2110.CAS_ServiceAdjustment.Add(cas1);

            var cas2 = new CAS_ClaimsAdjustment();
            cas2.ClaimAdjustmentGroupCode_01 = "OA";
            cas2.AdjustmentReasonCode_02 = "94";
            cas2.AdjustmentAmount_03 = "-9";
            loop2110.CAS_ServiceAdjustment.Add(cas2);

            //  Occurrence of DTM Segments in any order
            loop2110.AllREF = new All_REF_835_2();

            //  Repeating REF provider information
            loop2110.AllREF.REF_RenderingProviderInformation = new List();

            var ref2 = new REF_RenderingProviderInformation();
            ref2.ReferenceIdentificationQualifier_01 = "1B";
            ref2.MemberGrouporPolicyNumber_02 = "44280";
            loop2110.AllREF.REF_RenderingProviderInformation.Add(ref2);

            //  Repeating AMT service amount
            loop2110.AMT_ServiceSupplementalAmount = new List();

            var amt = new AMT_ServiceSupplementalAmount();
            amt.AmountQualifierCode_01 = "B6";
            amt.TotalClaimChargeAmount_02 = "550";
            loop2110.AMT_ServiceSupplementalAmount.Add(amt);

            //  End 2110 Loop
            loop2100.Loop2110.Add(loop2110);

            //  End Loop 2100
            loop2000.Loop2100.Add(loop2100);

            //  End Loop 2000
            result.Loop2000.Add(loop2000);

            return result;
        }
    }
}

More operations in ediFabric .NET

835 questions

How do I match an 835 to the bank deposit?

TRN02 is the check or EFT trace number and BPR02 the payment amount. The same trace number is sent with the ACH CCD+ payment, so the two can be reassociated automatically.

What do the CAS group codes mean?

CAS01 groups each adjustment: CO contractual obligation, PR patient responsibility, OA other adjustments, PI payer initiated reductions. CAS02 is the claim adjustment reason code (CARC).

Does an 835 always carry a payment?

No. BPR04 NON means no payment, for example when every claim was denied or the payment was sent separately. BPR01 H is notification only.

How do I parse and generate X12 835 files in .NET, Python, Java and C?

In .NET, install EdiFabric and EdiFabric.Templates.Hipaa, read the file with X12Reader into TS835 objects and write them back with X12Writer. From Python, Java or C, use ediFabric Native, which converts 835 files to JSON and JSON back to X12 inside your process. From any other language, post the file to the ediFabric Cloud REST API.

Resources

Parse your first X12 835 in five minutes

The Community plan is free forever and needs no credit card. It includes ediFabric .NET, Native and Cloud with one serial key.

Sign up free Validate EDI files free