Parsing 835 (Claim Payment/Advice) Transactions

Parsing 835 transactions is very similar to parsing claims.

Claims and payments share the same object model, including ServiceLine, Subscriber, and other objects. Claim and Payment objects inherit common properties from the same superclass.

Many types, expressed as Java enums, are also shared.

Here is an example:

var parser = new EdiParser(ediFile835);

EdiParsingResults results = parser.parse();
List<Payment> payments = results.payments();
Payment payment = payments.get(0);
// Get key payment fields
String payerControlNumber=payment.payerControlNumber();
String patientControlNumber=payment.patientControlNumber();
BigDecimal chargeAmount = payment.chargeAmount();
BigDecimal paidAmount = payment.paymentAmount();
ClaimStatus status=payment.claimStatus();
OrgOrPerson payee=payment.payee();
String payeeNpi = payee.identifier();

assertNotNull(payerControlNumber, status, patientControlNumber, chargeAmount,  paidAmount, patientControlNumber, payeeNpi);

// iterate over lines and get key fields
for (var line : payment.lines()) {
    String procedureCode = line.procedure().code();
    LocalDate serviceDate = line.serviceDateFrom();
    BigDecimal lineChargeAmount = line.chargeAmount();
    BigDecimal linePaidAmount = line.paidAmount();
    assertNotNull(procedureCode, serviceDate, lineChargeAmount, linePaidAmount);

Please visit our GitHub repo for more examples.

Register below to get access to the parser: