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.
005010X221A1HP (GS01)TS835 in EdiFabric.Templates.HipaaThe 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 |
|---|---|---|---|
ST | Transaction Set Header | Required | 1 |
BPR | Financial Information | Required | 1 |
TRN | Reassociation Trace Number | Required | 1 |
CUR | Foreign Currency Information | Situational | 1 |
| Any order | The loops below can appear in any order | Situational | 1 |
REF | Receiver Identification | Situational | 1 |
REF | Version Identification | Situational | 1 |
DTM | Production Date | Situational | 1 |
| Any order | The loops below can appear in any order | Required | 1 |
| Loop 1000A | Payer Identification | Required | 1 |
N1 | Payer Identification | Required | 1 |
N3 | Payer Address | Required | 1 |
N4 | Payer City State ZIP Code | Required | 1 |
REF | Additional Payer Identification | Situational | 4 |
| Any order | The loops below can appear in any order | Required | 1 |
PER | Payer Business Contact Information | Situational | 1 |
PER | Payer Technical Contact Information | Required | >1 |
PER | Payer WEB Site | Situational | 1 |
| Loop 1000B | Payee Identification | Required | 1 |
N1 | Payee Identification | Required | 1 |
N3 | Payee Address | Situational | 1 |
N4 | Payee City State ZIP Code | Situational | 1 |
REF | Payee Additional Identification | Situational | >1 |
RDM | Remittance Delivery Method | Situational | 1 |
| Loop 2000 | Header Number | Situational | >1 |
LX | Header Number | Required | 1 |
TS3 | Provider Summary Information | Situational | 1 |
TS2 | Provider Supplemental Summary Information | Situational | 1 |
| Loop 2100 | Claim Payment Information | Required | >1 |
CLP | Claim Payment Information | Required | 1 |
CAS | Claims Adjustment | Situational | 99 |
| Any order | The loops below can appear in any order | Required | 1 |
NM1 | Patient Name | Required | 1 |
NM1 | Insured Name | Situational | 1 |
NM1 | Corrected Patient Insured Name | Situational | 1 |
NM1 | Service Provider Name | Situational | 1 |
NM1 | Crossover Carrier Name | Situational | 1 |
NM1 | Corrected Priority Payer Name | Situational | 1 |
NM1 | Other Subscriber Name | Situational | 1 |
MIA | Inpatient Adjudication Information | Situational | 1 |
MOA | Outpatient Adjudication Information | Situational | 1 |
| Any order | The loops below can appear in any order | Situational | 1 |
REF | Other Claim Related Identification | Situational | 5 |
REF | Rendering Provider Identification | Situational | 10 |
| Any order | The loops below can appear in any order | Situational | 1 |
DTM | Statement Fromor to Date | Situational | 2 |
DTM | Coverage Expiration Date | Situational | 1 |
DTM | Claim Received Date | Situational | 1 |
PER | Claim Contact Information | Situational | 2 |
AMT | Claim Supplemental Information | Situational | 13 |
QTY | Claim Supplemental Information Quantity | Situational | 14 |
| Loop 2110 | Service Payment Information | Situational | 999 |
SVC | Service Payment Information | Required | 1 |
DTM | Service Date | Situational | 2 |
CAS | Service Adjustment | Situational | 99 |
| Any order | The loops below can appear in any order | Situational | 1 |
REF | Service Identification | Situational | 8 |
REF | Line Item Control Number | Situational | 1 |
REF | Rendering Provider Information | Situational | 10 |
REF | Health Care Policy Identification | Situational | 5 |
AMT | Service Supplemental Amount | Situational | 9 |
QTY | Service Supplemental Quantity | Situational | 6 |
LQ | Health Care Remark Codes | Situational | 99 |
PLB | Provider Adjustment | Situational | >1 |
SE | Transaction Set Trailer | Required | 1 |
Usage follows the 005010X221A1 implementation guide: Required segments must be sent, Situational ones only when the guide's condition applies. Trading partners often add their own rules in companion guides - ediFabric templates can be adjusted to match. Open the element-level definition in the EdiNation spec library.
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~
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"
}
}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'
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'
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.
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).
No. BPR04 NON means no payment, for example when every claim was denied or the payment was sent separately. BPR01 H is notification only.
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.