X12 5010 Claims Processing
Transform X12 EDI transactions to FHIR R4 bundles with US Core profiles.
Overview
InteropSuite transforms X12 5010 EDI transactions into validated FHIR R4 bundles. The transformation engine supports 15 transaction types covering claims, eligibility, remittance, prior authorization, enrollment, and more.
X12 5010 transactions are transformed to FHIR R4 bundles using either US Core 6.1.0 (default) or CMS-0057-F profiles (Da Vinci PAS, CARIN Blue Button, PDex Provenance).
View real 835 Remittance and 837P Claim transformations with side-by-side input/output examples.
Supported Transactions
InteropSuite transforms 15 X12 5010 transaction types to FHIR R4:
Claims & Remittance
| Transaction | Description | FHIR Resources |
|---|---|---|
| 837P | Professional Claim | Claim, Patient, Practitioner, Organization |
| 837I | Institutional Claim | Claim, Patient, Organization, Location |
| 837D | Dental Claim | Claim, Patient, Practitioner |
| 835 | Remittance Advice | ExplanationOfBenefit, ClaimResponse |
Eligibility & Coverage
| Transaction | Description | FHIR Resources |
|---|---|---|
| 270 | Eligibility Inquiry | CoverageEligibilityRequest, Patient, Coverage |
| 271 | Eligibility Response | CoverageEligibilityResponse, Coverage |
| 834 | Enrollment | Coverage, Patient, RelatedPerson |
Authorization & Status
| Transaction | Description | FHIR Resources |
|---|---|---|
| 278 | Prior Authorization | Claim (preauthorization), ClaimResponse |
| 276 | Claim Status Request | Claim (query) |
| 277 | Claim Status Response | ClaimResponse |
| 277CA | Claims Acknowledgment | ClaimResponse |
Other Transactions
| Transaction | Description | FHIR Resources |
|---|---|---|
| 820 | Payment Order | PaymentReconciliation |
| 275 | Attachments | DocumentReference, Binary |
| 720 | Premium Payment Notification | PaymentNotice |
| 721 | Premium Payment Acknowledgment | PaymentNotice |
Usage
Basic Transformation
// Activate license (once at startup)
Interop.ActivateLicense(licenseKey);
// Transform X12 to FHIR
var result = await Interop.X12ToFhirAsync(x12Message);
if (result.Success)
{
string fhirJson = result.FhirBundle;
string txType = result.DetectedFormat; // e.g., "X12^837P"
}
else
{
// Handle errors
foreach (var error in result.Errors)
Console.WriteLine(error);
}
Batch Processing
Process multiple X12 files at once. For mixed workloads, use unified batch processing (recommended).
Unified Processing Recommended
using InteropSuite.Fhir.Engine.Batch;
// Process all formats with RoundRobin interleaving
var options = new BatchOptions
{
Sources = new[]
{
new BatchSource("./input/hl7", "HL7", OutputFormat.UsCore),
new BatchSource("./input/x12", "X12", OutputFormat.UsCore),
new BatchSource("./input/cda", "CDA", OutputFormat.UsCore),
new BatchSource("./input/cms", "CMS-0057-F", OutputFormat.Cms0057F),
}
};
var result = await Interop.ProcessBatchAsync(options);
Sequential Processing
// Process X12 files only
var options = new BatchOptions
{
Domain = "X12",
OutputFormat = OutputFormat.UsCore
};
var result = await Interop.ProcessBatchAsync("./input/x12", options);
Console.WriteLine($"Processed: {result.TotalFiles} files");
Console.WriteLine($"Succeeded: {result.Succeeded}");
See User Guide: Batch Processing for complete documentation.
FHIR Mapping
X12 loops and segments map to FHIR resources:
837 Claim Mapping
| X12 Loop/Segment | FHIR Element |
|---|---|
| 2010AA (Billing Provider) | Claim.provider, Organization |
| 2010BA (Subscriber) | Patient, Coverage.subscriber |
| 2010BB (Payer) | Organization (insurer) |
| 2300 (Claim) | Claim.identifier, dates, amounts |
| 2310 (Providers) | Practitioner, PractitionerRole |
| 2400 (Service Lines) | Claim.item[] |
| CLM01 | Claim.identifier |
| CLM02 | Claim.total |
| HI (Diagnosis) | Claim.diagnosis[] |
| SV1/SV2 (Service) | Claim.item.productOrService |
835 Remittance Mapping
| X12 Loop/Segment | FHIR Element |
|---|---|
| BPR (Payment) | ExplanationOfBenefit.payment |
| N1 (Payee) | ExplanationOfBenefit.payee |
| CLP (Claim Payment) | ExplanationOfBenefit.item |
| CAS (Adjustments) | ExplanationOfBenefit.adjudication |
| SVC (Service) | ExplanationOfBenefit.item.adjudication |
Multi-Record Support
X12 files often contain multiple transactions. InteropSuite automatically detects record boundaries:
| Transaction | Boundary Segment | Description |
|---|---|---|
| 837P/I/D | HL (22) | Each claim loop |
| 835 | BPR | Beginning of payment/remittance |
| 270/271 | HL (22/23) | Subscriber/Dependent loops |
| 278 | TRN | Trace number for each request |
| 276/277 | TRN | Trace number for each status |
| 834 | INS (Y/18) | New subscriber enrollment |
| 820 | BPR | Beginning of payment order |
| 275 | TRN | Trace number for each attachment |
| 720 | BPR | Beginning of premium payment |
| 721 | BPR | Beginning of premium acknowledgment |
Each record in a multi-record file produces a separate FHIR bundle. Use the engine's RunManyAsync for batch processing.
Examples
837P Professional Claim (Simplified)
ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *240115*1200*^*00501*000000001*0*P*:~
GS*HC*SENDER*RECEIVER*20240115*1200*1*X*005010X222A1~
ST*837*0001*005010X222A1~
BHT*0019*00*BATCH001*20240115*1200*CH~
NM1*41*2*BILLING PROVIDER*****46*1234567890~
NM1*40*2*RECEIVER NAME*****46*9876543210~
HL*1**20*1~
NM1*85*2*PROVIDER GROUP*****XX*1234567893~
HL*2*1*22*0~
NM1*IL*1*SMITH*JOHN****MI*12345A~
DMG*D8*19800515*M~
NM1*PR*2*INSURANCE COMPANY*****PI*INS001~
CLM*CLAIM001*150***11:B:1*Y*A*Y*Y~
HI*ABK:I10~
LX*1~
SV1*HC:99213*100*UN*1***1~
DTP*472*D8*20240110~
SE*18*0001~
GE*1*1~
IEA*1*000000001~
270 Eligibility Inquiry (Simplified)
ISA*00* *00* *ZZ*SENDER *ZZ*RECEIVER *240115*1200*^*00501*000000001*0*P*:~
GS*HS*SENDER*RECEIVER*20240115*1200*1*X*005010X279A1~
ST*270*0001*005010X279A1~
BHT*0022*13*10001234*20240115*1200~
HL*1**20*1~
NM1*PR*2*INSURANCE CO*****PI*12345~
HL*2*1*21*1~
NM1*1P*2*PROVIDER NAME*****XX*1234567893~
HL*3*2*22*0~
NM1*IL*1*SMITH*JOHN****MI*MEM12345~
DMG*D8*19800515~
EQ*30~
SE*12*0001~
GE*1*1~
IEA*1*000000001~