HealthcareEDI & Interoperability

X12 EDI for Healthcare Developers: Structure, 837 and 270/271

March 22, 202618 min readUpdated Nov 4, 2026
Written by
Jitendra Choudhary
Jitendra Choudhary

CTO & Co-Founder

CTO & Co-Founder at Nirmitee.io. Architects healthcare integrations across FHIR, SMART on FHIR, ABDM and NHCX, writing from production experience taking hospital software from sandbox to go-live.

X12 EDI for Healthcare Developers: Structure, 837 and 270/271

Updated November 2026

X12 EDI is the HIPAA standard format US healthcare uses to exchange claims, remittances, eligibility checks, claim status and prior authorizations. For a developer, every X12 file is the same three nested envelopes (ISA, GS and ST) around delimited segments, and each transaction follows its own implementation guide.

This guide covers the envelope, the X12 837 claim transaction structure, the 835, 270/271 eligibility in depth, 276/277 and 278, with validated synthetic examples, Python parsing code and the pitfalls we see most. If you only need the difference between the claim and the remittance, read our 835 vs 837 guide. If you need these transactions built into your product, our clearinghouse integration services team does that work (tell us what you need), and our revenue cycle management guide shows how the pieces fit.

Watch: X12 EDI Explained From Basics to Advanced: How to Read Any Healthcare X12 File (9:03).

X12 EDI Fundamentals: The Envelope Structure

Every X12 file nests three envelopes: ISA/IEA for the interchange, GS/GE for a functional group of one transaction type, and ST/SE for each transaction set. Think of postal mail: the outer envelope names sender and receiver, the inner one groups related letters, and the letter inside is the business document.

ISA/IEA: Interchange Control Envelope

The ISA segment is always exactly 106 characters, including its separators and the segment terminator. It is the first thing a parser sees and it declares the delimiters for the whole file.

ISA*00*          *00*          *ZZ*SENDER_ID      *ZZ*RECEIVER_ID    *260615*1200*^*00501*000000001*0*P*:~

Field-by-field breakdown:

PositionElementValueDescription
ISA01Auth Info Qualifier00No authorization info
ISA02Auth Information(10 spaces)Blank when ISA01=00
ISA03Security Info Qualifier00No security info
ISA04Security Information(10 spaces)Blank when ISA03=00
ISA05Sender ID QualifierZZMutually defined
ISA06Sender IDSENDER_ID15 chars, right-padded
ISA07Receiver ID QualifierZZMutually defined
ISA08Receiver IDRECEIVER_ID15 chars, right-padded
ISA09Date260615YYMMDD format
ISA10Time1200HHMM format
ISA11Repetition Separator^Used in version 5010
ISA12Version005015010, the current HIPAA version
ISA13Control Number000000001Unique per interchange
ISA14Ack Requested00=no, 1=yes (TA1 requested)
ISA15Usage IndicatorPP=production, T=test
ISA16Component Separator:Sub-element delimiter; the character after it is the segment terminator

Critical developer note: the ISA uses fixed-width fields. ISA06 and ISA08 are always 15 characters, padded with spaces. If your parser trims whitespace, it breaks the ISA, and this is a common X12 parsing bug.

GS/GE: Functional Group

GS*HC*SENDER_CODE*RECEIVER_CODE*20260615*1200*1*X*005010X222A1~

The GS segment groups transaction sets of the same type, and GS01 says which type. GS08 names the exact implementation guide, which tells the parser how to read the transactions inside.

GS01Transaction
HC837 Health Care Claim
HP835 Health Care Claim Payment/Advice
HS270 Eligibility, Coverage or Benefit Inquiry
HB271 Eligibility, Coverage or Benefit Information
HR276 Health Care Claim Status Request
HN277 Health Care Information Status Notification
HI278 Health Care Services Review Information
FA999 Implementation Acknowledgment

X12 837 Health Care Claim Transaction: What the Standard Covers

The X12 837 health care claim transaction is the HIPAA standard format for sending professional, institutional and dental claims electronically. Under 45 CFR 162.1102, each claim type has its own X12 version 5010 implementation guide, so test each one you support separately.

Claim typeHIPAA standard (45 CFR 162.1102)GS08 payers expect (errata version)Paper form
Professional (837P)ASC X12N/005010X222005010X222A1CMS-1500
Institutional (837I)ASC X12N/005010X223 and X223A1005010X223A2UB-04
Dental (837D)ASC X12N/005010X224 and X224A1005010X224A2ADA dental claim form

The GS08 values come from the CMS Medicare companion guides (837P and 837I) and New York Medicaid's eMedNY notice (837D). Retail pharmacy drug claims use the separate NCPDP standard, so they do not follow this format.

X12 837 Transaction Structure: The Loops

An 837 is a hierarchy: submitter and receiver at the top, then billing provider, subscriber, optional patient, claim and service lines. HL segments build the hierarchy, and each loop reuses segments such as NM1 with a different qualifier.

LoopWhat it holdsKey segments
HeaderTransaction purpose and batch IDST, BHT
1000A / 1000BSubmitter and receiverNM1*41, PER, NM1*40
2000A / 2010AABilling providerHL (code 20), NM1*85 with NPI, N3, N4, REF*EI
2000B / 2010BA / 2010BBSubscriber and payerHL (code 22), SBR, NM1*IL, DMG, NM1*PR
2000C / 2010CAPatient, when not the subscriberHL (code 23), PAT, NM1*QC
2300ClaimCLM, DTP, REF, HI
2400Service lineLX, SV1 / SV2 / SV3, DTP*472, REF*6R

The 837: Healthcare Claim Transaction Example

The 837 submits claims from providers to payers, usually through a clearinghouse. Developers must handle 837P (professional, the CMS-1500 equivalent) and 837I (institutional, the UB-04 equivalent) differently, and 837D if they support dental.

837P Example: Professional Claim

Here is a minimal 837P for an office visit, built only from test values. It passes structural validation against the 005010X222A1 map in pyx12 (an open-source X12 validator); we checked the money by hand.

ISA*00*          *00*          *ZZ*SUBMITTERID    *ZZ*RECEIVERID     *260615*1200*^*00501*000000001*0*T*:~
GS*HC*SUBMITTERID*RECEIVERID*20260615*1200*1*X*005010X222A1~
ST*837*0001*005010X222A1~
BHT*0019*00*CLAIM001*20260615*1200*CH~
NM1*41*2*SUBMITTER ORG*****46*SUBMITTERID~
PER*IC*CONTACT NAME*TE*5555551234~
NM1*40*2*RECEIVER ORG*****46*RECEIVERID~
HL*1**20*1~
NM1*85*2*BILLING PROVIDER ORG*****XX*1234567893~
N3*123 MAIN STREET~
N4*ANYTOWN*NY*100010000~
REF*EI*990000003~
HL*2*1*22*0~
SBR*P*18*GROUP123******CI~
NM1*IL*1*DOE*JOHN****MI*MEMBERID123~
N3*456 OAK AVENUE~
N4*ANYTOWN*NY*10002~
DMG*D8*19800115*M~
NM1*PR*2*EXAMPLE HEALTH PLAN*****PI*PAYERID01~
CLM*PATIENTACCT001*150***11:B:1*Y*A*Y*Y~
HI*ABK:J069~
LX*1~
SV1*HC:99213*75*UN*1***1~
DTP*472*D8*20260610~
LX*2~
SV1*HC:99000*75*UN*1***1~
DTP*472*D8*20260610~
SE*26*0001~
GE*1*1~
IEA*1*000000001~

The NPI 1234567893 is a test value: it passes the NPI check-digit rule and returned no provider in the NPPES registry when we searched it on November 4, 2026.

Key 837P Segments Annotated

SegmentPurposeKey Fields
BHTBeginning of Hierarchical TransactionBHT02: 00 = original, 18 = reissue; BHT06: CH = chargeable
NM1*85Billing ProviderNM109: NPI (10 digits, XX qualifier)
NM1*ILSubscriberNM109: Member ID (MI qualifier)
NM1*PRPayerNM109: Payer ID (PI qualifier)
CLMClaim-level infoCLM01: patient control number; CLM02: total charge (must equal the line charges); CLM05: place of service 11, qualifier B, frequency 1 (original)
HIDiagnosis CodesABK = ICD-10-CM principal diagnosis; ABF = other diagnoses. Codes are sent without the decimal point
SV1Service Line (Professional)SV101: CPT/HCPCS code (HC qualifier); SV102: charge; SV104: units; SV107: diagnosis pointer
DTP*472Service DateDate of service in CCYYMMDD format
SETransaction Set TrailerSE01 counts every segment from ST to SE (26 here)

837I Differences

The 837I (Institutional) uses different service line segments and adds UB-04 data:

  • SV2 instead of SV1 for service lines (revenue code, optional HCPCS, charge, units)
  • CL1 for institutional claim codes (admission type, admission source, patient status)
  • CLM05-1 for the facility type code from the UB-04 type of bill, with CLM05-3 as the frequency code
  • HI*BG for condition codes, HI*BH for occurrence codes and HI*BE for value codes

The 835: Electronic Remittance Advice

The 835 is the return transaction: it tells you how a payer adjudicated your claims. Every payment, denial, adjustment and patient responsibility is encoded in it, so parsing 835s accurately is essential for payment posting, underpayment detection and denial management. For a plain-English walkthrough, see what an 835 file is, with an example.

835 Example: Remittance for the 837P Above

This 835 pays the claim above: 120.00 paid, a 5.00 coinsurance for the patient and 25.00 written off. It passes structural validation against the 005010X221A1 map in pyx12, and every amount balances.

ISA*00*          *00*          *ZZ*PAYERID01      *ZZ*SUBMITTERID    *260715*0800*^*00501*000000002*0*T*:~
GS*HP*PAYERID01*SUBMITTERID*20260715*0800*2*X*005010X221A1~
ST*835*0001~
BPR*I*120*C*CHK************20260716~
TRN*1*CHK0009876*1990000003~
DTM*405*20260715~
N1*PR*EXAMPLE HEALTH PLAN~
N3*1 PAYER WAY~
N4*ANYTOWN*NY*10003~
PER*BL*EDI SUPPORT*TE*5555550199~
N1*PE*BILLING PROVIDER ORG*XX*1234567893~
REF*TJ*990000003~
LX*1~
CLP*PATIENTACCT001*1*150*120*5*12*CLAIMREF001*11*1~
NM1*QC*1*DOE*JOHN****MI*MEMBERID123~
SVC*HC:99213*75*65**1~
DTM*472*20260610~
CAS*CO*45*10~
AMT*B6*65~
SVC*HC:99000*75*55**1~
DTM*472*20260610~
CAS*CO*45*15~
CAS*PR*2*5~
AMT*B6*60~
SE*23*0001~
GE*1*2~
IEA*1*000000002~

Critical 835 Fields for Developers

BPR (Financial Information): BPR02 is the total payment amount, BPR04 the payment method (ACH, CHK or NON), and BPR16 the payment date. This is the first thing your system reads to know how much money is coming.

CLP (Claim Payment Information):

  • CLP01: patient control number (matches CLM01 from the 837)
  • CLP02: claim status (1 = processed as primary, 2 = processed as secondary, 3 = processed as tertiary, 4 = denied, 22 = reversal of previous payment)
  • CLP03: total charge submitted
  • CLP04: total payment
  • CLP05: patient responsibility
  • CLP07: payer claim control number

CAS (Claim Adjustment): every dollar between billed and paid is explained by a CAS segment. The group code appears once in CAS01, followed by up to six reason, amount and quantity triplets. X12's current group code list:

Group CodeMeaningWho Is Responsible
COContractual ObligationProvider write-off (per contract)
PRPatient ResponsibilityPatient owes (deductible, coinsurance, copay)
OAOther AdjustmentNeither of the above; review it
PIPayor Initiated ReductionProvider, by the payer's decision

Common reason codes (CARCs) from X12's list:

  • 1: Deductible amount
  • 2: Coinsurance amount
  • 3: Co-payment amount
  • 4: The procedure code is inconsistent with the modifier used
  • 16: Claim/service lacks information or has submission/billing error(s)
  • 18: Exact duplicate claim/service
  • 45: Charge exceeds fee schedule/maximum allowable or contracted/legislated fee arrangement
  • 96: Non-covered charge(s)
  • 197: Precertification/authorization/notification/pre-treatment absent

The 270/271: Eligibility Inquiry and Response

The 270 asks "is this patient covered, and for what?", and the 271 answers with coverage and benefit details. It is the check that catches coverage problems before a claim is ever sent.

270 Example: Eligibility Inquiry

ISA*00*          *00*          *ZZ*PROVIDERID     *ZZ*PAYERID01      *260615*0900*^*00501*000000003*0*T*:~
GS*HS*PROVIDERID*PAYERID01*20260615*0900*3*X*005010X279A1~
ST*270*0001*005010X279A1~
BHT*0022*13*ELIGREQ001*20260615*0900~
HL*1**20*1~
NM1*PR*2*EXAMPLE HEALTH PLAN*****PI*PAYERID01~
HL*2*1*21*1~
NM1*1P*2*BILLING PROVIDER ORG*****XX*1234567893~
HL*3*2*22*0~
TRN*1*TRACE0001*9900000003~
NM1*IL*1*DOE*JOHN****MI*MEMBERID123~
DMG*D8*19800115~
DTP*291*D8*20260620~
EQ*30~
SE*13*0001~
GE*1*3~
IEA*1*000000003~

Key segments: GS01 = HS marks an eligibility inquiry, TRN carries your trace number (the 271 echoes it back), DTP*291 is the date you are asking about, and EQ*30 asks for plan coverage and general benefits (service type code 30). Other service type codes from X12's list include 33 (chiropractic), 47 (hospitalization), 86 (emergency services), 88 (retail or independent pharmacy) and MH (mental health). We checked this 270 by hand; pyx12 has no 5010 map for the 270.

271 Response: What You Get Back

The 271 returns EB (eligibility or benefit information) segments, and a real response can carry dozens of them. Each EB describes one benefit for one service type and time period.

EB*1*IND*30*HM*GOLD PLAN~
EB*C*IND*30***23*500~
EB*C*IND*30***29*350~
EB*B*IND*30***27*25~
EB*A*IND*30***27**0.2~
EB*G*IND*30***23*3000~
ElementMeaningIn the lines above
EB01Eligibility or benefit code1 = active coverage, C = deductible, B = co-payment, A = co-insurance, G = out of pocket (stop loss); 6 = inactive, F = limitations
EB02Coverage levelIND = individual (FAM = family)
EB03Service type code30 = plan coverage and general benefits
EB04Insurance typeHM = HMO
EB05Plan coverage descriptionGOLD PLAN
EB06Time period qualifier23 = calendar year, 29 = remaining, 27 = visit
EB07Monetary amount500 deductible, 350 remaining, 25 copay per visit, 3000 out-of-pocket maximum
EB08Percent0.2 = 20% coinsurance

The CMS HETS 270/271 companion guide for Medicare uses the same positions, for example EB07 for deductible amounts with EB06 = 29 for the remaining amount, and EB08 for coinsurance percentages. For the business side of eligibility, see our insurance eligibility verification guide.

The 276/277: Claim Status Inquiry and Response

After submitting a claim, you send a 276 to ask where it is, and the payer answers with a 277. The same 277 format, as the 277CA (005010X214), also acknowledges whether each claim in an 837 was accepted for processing.

Both the 277 status response and the 277CA start with ST*277. In our production work we route them on BHT06 (TH for the 277CA, DG for a claim status response), never on ST01 alone; our Waystar clearinghouse guide covers this trap.

277 Status Category Codes

STC01-1 carries a claim status category code from X12's published list. These are the ones you will see most:

CodeX12 meaningWhat your system should do
A1Acknowledgement/Receipt: received, not yet accepted for adjudicationMark as received
A2Acknowledgement/Acceptance into adjudication systemMark as accepted; wait for adjudication
A3Acknowledgement/Returned as unprocessable claimRoute to the correction queue and resubmit
A6 / A7Rejected for missing / invalid informationFix the data named in the status code, then resubmit
P1 / P2Pending: in process / payer reviewCheck again later
F1Finalized/Payment: the claim or line has been paidExpect the payment on an 835
F2Finalized/Denial: the claim or line has been deniedRoute to denial management
F4Finalized/Adjudication complete, no payment forthcomingClose or review
R0 to R16Requests for additional informationRetrieve the request and respond

The 278: Prior Authorization

The 278 Health Care Services Review carries prior authorization requests and responses (005010X217 under HIPAA). For the FHIR route that CMS-0057-F relies on, see Da Vinci PAS and the X12 278.

The 278 request carries subscriber and provider information, the service requested (procedure and diagnosis codes) and the clinical information that supports it. The 278 response returns the decision (for example certified, not certified, pended or modified), the authorization number and the certified dates.

Python Parsing: Working with X12 EDI

Read the delimiters from the ISA, split segments on the terminator, and track context as you go. The code below is a lightweight starting point; we ran it on the samples above before publishing.

Basic X12 Parser

from decimal import Decimal


class X12Parser:
    """Lightweight X12 EDI parser for healthcare transactions."""

    def __init__(self, raw_edi: str):
        self.raw = raw_edi.lstrip()
        # ISA declares the delimiters: element at index 3, component at 104, terminator at 105
        self.element_sep = self.raw[3]
        self.sub_sep = self.raw[104]
        self.segment_sep = self.raw[105]
        self.segments = self._parse_segments()

    def _parse_segments(self) -> list:
        parsed = []
        for seg in self.raw.split(self.segment_sep):
            seg = seg.strip()
            if seg:
                elements = seg.split(self.element_sep)
                parsed.append({"id": elements[0], "elements": elements})
        return parsed

    def get_segments(self, segment_id: str) -> list:
        return [s for s in self.segments if s["id"] == segment_id]

    def get_transaction_type(self) -> str:
        st = self.get_segments("ST")
        return st[0]["elements"][1] if st else "Unknown"


def parse_835_payments(edi_text: str) -> list:
    """Return claim-level payment details from an 835."""
    parser = X12Parser(edi_text)
    claims, current = [], None
    for seg in parser.segments:
        sid, els = seg["id"], seg["elements"]
        if sid == "CLP":
            current = {"patient_account": els[1], "status": els[2],
                       "billed": Decimal(els[3]), "paid": Decimal(els[4]),
                       "adjustments": [], "service_lines": []}
            claims.append(current)
        elif sid == "CAS" and current:
            group = els[1]                    # CO, PR, OA or PI, once per CAS
            for i in range(2, len(els), 3):   # reason, amount, quantity triplets
                if els[i]:
                    current["adjustments"].append(
                        {"group": group, "reason": els[i], "amount": Decimal(els[i + 1])})
        elif sid == "SVC" and current:
            code = els[1].split(parser.sub_sep)
            current["service_lines"].append(
                {"qualifier": code[0], "code": code[1] if len(code) > 1 else "",
                 "billed": Decimal(els[2]), "paid": Decimal(els[3] or "0")})
    return claims


for claim in parse_835_payments(open("remittance.835").read()):
    patient = sum(a["amount"] for a in claim["adjustments"] if a["group"] == "PR")
    others = sum(a["amount"] for a in claim["adjustments"] if a["group"] != "PR")
    assert claim["billed"] == claim["paid"] + patient + others, "835 does not balance"
    print(claim["patient_account"], claim["paid"], "patient owes", patient)

On the sample 835 above it prints PATIENTACCT001 120 patient owes 5, and the balance assertion holds. Use Decimal for money, never float.

Parsing 271 Eligibility Responses

def parse_271_eligibility(edi_text: str) -> dict:
    """Pull the headline benefits out of a 271 (EB07 = amount, EB08 = percent)."""
    parser = X12Parser(edi_text)
    out = {"active": False, "plan": "", "copay": None, "coinsurance": None,
           "deductible": None, "deductible_remaining": None, "oop_max": None}
    for seg in parser.get_segments("EB"):
        e = seg["elements"] + [""] * 10
        code, period, amount, pct = e[1], e[6], e[7], e[8]
        if code == "1":
            out["active"], out["plan"] = True, e[5]
        elif code == "6":
            out["active"] = False
        elif code == "B" and amount:
            out["copay"] = Decimal(amount)
        elif code == "A" and pct:
            out["coinsurance"] = Decimal(pct)
        elif code == "C" and amount:
            key = "deductible_remaining" if period == "29" else "deductible"
            out[key] = Decimal(amount)
        elif code == "G" and amount:
            out["oop_max"] = Decimal(amount)
    return out

On the 271 lines above it returns active coverage on GOLD PLAN, copay 25, coinsurance 0.2, deductible 500 with 350 remaining, and an out-of-pocket maximum of 3000. Real 271s repeat EB segments per service type, coverage level and network, so key your results on EB03 and EB02 as well in production.

X12 EDI to FHIR Mapping

FHIR R4 has a resource for each X12 transaction's business meaning, but the mapping is conceptual, not field for field. Claims and remittances stay on X12 under HIPAA; FHIR versions are used for uses such as patient access and, for prior authorization, Da Vinci PAS.

X12 TransactionFHIR R4 ResourceWhere it is used
837 (Claim)ClaimCore FHIR financial module
835 (Remittance)ExplanationOfBenefitPayer to patient data in the CARIN Blue Button guide
270 (Eligibility Inquiry)CoverageEligibilityRequestCore FHIR financial module
271 (Eligibility Response)CoverageEligibilityResponseCore FHIR financial module
278 (Prior Authorization)Claim (use = preauthorization) and ClaimResponseDa Vinci Prior Authorization Support (PAS)

For developers working with both standards, our guide on HL7 vs FHIR and when you need both gives the architectural context for running X12 EDI alongside FHIR APIs.

Common X12 Implementation Pitfalls

These are the bugs and design mistakes we see most often when teams build X12 handling. Each one is cheap to prevent and expensive to find in production.

1. ISA Fixed-Width Parsing

ISA06 and ISA08 are always exactly 15 characters. If you split by the element separator and trim whitespace, you break downstream routing. Always preserve padding in ISA segments.

2. Segment Terminator Detection

The segment terminator is not always ~. It is the character right after ISA16, at index 105 of the ISA. Files may also carry line breaks after each terminator. Always read the ISA before assuming delimiters.

3. Loop Identification

X12 uses hierarchical loops identified by HL segments. The same segment ID (like NM1) appears in multiple loops with different meanings: NM1*85 is the billing provider, NM1*IL the subscriber and NM1*QC the patient. Your parser must track loop context, not just segment IDs.

4. Claim Adjustment Math

For 835 processing, the math must balance: Billed Amount = Paid Amount + CO Adjustments + PR Adjustments + OA Adjustments + PI Adjustments. If the numbers do not balance, you have a parsing error. Build this check into your 835 parser as an assertion.

5. Version Compatibility

HIPAA has required version 5010 (ISA12 = 00501) since January 1, 2012 (45 CFR part 162). Treat a 4010 file as an error to report to the sender, and check GS08 against the errata version each payer's companion guide names.

6. Testing with Real-Shaped Data

Synthetic test data misses edge cases that production files contain, such as reversals, PLB adjustments and split claims. Ask your clearinghouse for test scenarios that cover them, and read the CMS Medicare companion guides for Medicare-specific rules. Our EDI testing guide lists what to prove before go-live.

Skip the spec PDFs: paste any X12 file into our free EDI Inspector for an element-by-element reference on hover, plain-English narration and a searchable 005010 dictionary.

Once the transaction set is clear, the next questions are quality and proof. See our guides to building a claim scrubber and rendering vs billing provider.

Hosted EDI APIs vs Running Your Own X12 Stack

Most healthcare product teams do not need to build X12 parsing, clearinghouse connectivity and payer enrollment from scratch. A hosted EDI API handles the envelope, transport and payer routing and returns JSON; a custom build gives you full control over data, cost at volume and edge cases, at the price of owning testing, acknowledgments and payer onboarding.

The right choice depends on three questions: which transactions you need, how many payers you must reach, and whether your team can own rejections, 999 and 277CA acknowledgments and enrollment. The table compares common hosted options with a custom build. Details come from each provider's own website as checked on November 4, 2026; confirm pricing, payer coverage and BAA terms with the provider before you commit.

OptionWhat it offersBest fitLimitation to check
StediJSON APIs for 270/271, 837P/837I/837D, 276/277, 277CA, 835 and 275 attachments; states over 3,500 payers; pay-as-you-go pricingHealthtech platforms and RCM software that want an API-first clearinghousePrior authorization (278) is not listed among its healthcare transactions; check coverage for your payers
AvailityDeveloper APIs for claim status, service reviews add-ons, eligibility and benefits add-ons and claim attachments; remittance data API in betaTeams whose provider customers already use Availity, or that need service-review workflowsPricing is not published on the developer site
Optum (formerly Change Healthcare)APIs for eligibility, professional and institutional claims, claim status, attachments, claim responses and reports (ERA) and prior authorization, with EDI to JSON translation guides; sandbox availableTeams that want a large, established network behind JSON APIsPricing is not published on the developer portal
SignalEDIEDI platform with 837, 835 and 270/271 on every paid plan, 276/277 and 278 sample documents, and API, SFTP and webhook connectionsSmaller teams that want a managed EDI setup with onboarding helpProduction PHI requires an executed BAA and its HIPAA/BAA add-on (included on Enterprise)
Custom build (with an engineering partner such as Nirmitee)Your own X12 parsing, validation, clearinghouse or direct payer connections, and mapping into your data model and FHIRHigh-volume products, unusual flows such as 278 alongside FHIR PAS, or strict data-control needsHigher upfront effort; you own testing, acknowledgments and monitoring

A common middle path is to use a hosted API for eligibility and claims transport and build your own layer for validation, mapping and exception handling. Payer connectivity stays off your plate while your product still controls the data and the edge cases. Our X12 EDI integration team designs that layer and can connect whichever API you choose to your platform.

Conclusion: What to Build First

Start with the envelope and a parser that reads delimiters from the ISA, then the 837 you send and the 999, 277CA and 835 you receive. Add 270/271 and 276/277 next, and 278 when prior authorization is in scope.

X12 is the HIPAA standard that moves claims and payments in US healthcare, and any developer building in the healthcare financial space needs to understand it at the segment level. Mapping it to FHIR is a growing need as payers add FHIR APIs, but the X12 transactions remain the ones that carry claims and remittances.

If your team is building healthcare financial integrations and needs help with X12 EDI parsing, clearinghouse connectivity or FHIR-based revenue cycle automation, connect with our engineering team.

Connecting claims and remittance workflows?

Review the engineering scope for trading-partner access, X12 mappings, acknowledgements and reconciliation. Bring the systems and workflow you need to connect.

Frequently Asked Questions

What is X12 EDI in healthcare?

X12 EDI is the HIPAA standard electronic format US healthcare uses for administrative transactions: 837 claims, 835 remittances, 270/271 eligibility, 276/277 claim status and 278 prior authorization. Each file nests ISA, GS and ST envelopes around delimited segments, and each transaction follows a version 5010 implementation guide.

What is the structure of an X12 837 claim transaction?

An 837 is a hierarchy built with HL segments: submitter and receiver (loops 1000A and 1000B), billing provider (2000A/2010AA), subscriber and payer (2000B/2010BA/2010BB), an optional patient loop (2000C), the claim (2300, starting with CLM) and service lines (2400, with SV1, SV2 or SV3).

Which implementation guide IDs go in GS08?

Medicare's companion guides expect 005010X222A1 for 837P, 005010X223A2 for 837I and 005010X221A1 for the 835, and New York Medicaid names 005010X224A2 for 837D. The 270/271 uses 005010X279A1. Always check each payer's companion guide.

Do I need to buy the X12 implementation guides?

For production work, yes. The Technical Report Type 3 (TR3) guides that HIPAA adopts are published by ASC X12, which 45 CFR 162.920 names as the source. For learning and testing, CMS and many payers publish free companion guides that explain how they use each transaction.

Can I use FHIR instead of X12 EDI?

Not for HIPAA claims and remittances, where X12 remains the adopted standard. FHIR is used for other exchanges, such as patient access and, for prior authorization, the Da Vinci PAS guide. Build for X12 now and map to FHIR where a use case calls for it.

What Python libraries exist for X12?

pyx12 is an open-source X12 validator and parser; in version 2.3.3 we used it to validate the 837P and 835 samples in this guide, though it has no 5010 map for the 270. Many teams also write a small custom parser, like the one above, for loop tracking and posting rules.

How do clearinghouses fit into the X12 flow?

Clearinghouses sit between providers and payers. They receive your 837 claims, check them against payer edits, route them to the right payer, and return 999 and 277CA acknowledgments, then deliver 835 remittances from many payers. Most providers do not send X12 directly to payers.

Should I use a hosted EDI API or build my own X12 integration?

Use a hosted EDI API when you need standard transactions with many payers quickly and your volume is moderate. Build your own layer when you need unusual flows such as the 278 alongside FHIR PAS, high volume where per-transaction fees add up, or full control over validation and data. Many teams combine both.
Share