x12sdk¶
Read, check and generate HIPAA X12 health care transactions in Python: claims (837P, 837I, 837D), remittances (835), eligibility (270/271), claim status (276/277) and enrollment (834).
pip install x12sdk
x12sdk-table remit.835 -o remit.csv # an 835 as one row per service line
x12sdk-validate claims.837 # valid, or where it breaks
x12sdk-generate 837p --seed 7 --claims 25 # synthetic claims, no PHI
Everything runs locally; no file is uploaded anywhere.
Start where you are¶
You have… |
Go to |
|---|---|
A file and no Python |
The browser playground: check it, get a CSV, nothing to install |
An 835 you want in a spreadsheet |
|
A file a payer or clearinghouse rejected |
|
Code to test, and no X12 you can share |
|
Claims and the remittances that paid them |
|
Denials to understand across many remittances |
|
An AI assistant that should read X12 |
|
A service that reads other people’s files |
|
Code on x12sdk 2.x |
|
Code on |
A ready-made dataset of 30,000 synthetic claims with their remittances is on Hugging Face.
Supported transaction sets¶
Set |
Implementation |
What it is |
Generate |
Accessors |
|---|---|---|---|---|
837P |
005010X222A2 |
Professional claim |
|
|
837I |
005010X223A3 |
Institutional claim |
|
|
837D |
005010X224A2 |
Dental claim |
|
|
835 |
005010X221A1 |
Claim payment / remittance advice |
|
|
834 |
005010X220A1 |
Benefit enrollment and maintenance |
|
|
270 / 271 |
005010X279A1 |
Eligibility inquiry / response |
|
|
276 / 277 |
005010X212 |
Claim status inquiry / response |
|
|
Every transaction parses into a validated Pydantic v2 model and serializes back to X12; the test suite asserts the round trip reproduces each sample file byte for byte. x12sdk runs on Python 3.10–3.14.