Skip to content

x12sdk 2.4.0

Choose a tag to compare

@owgreen-dev owgreen-dev released this 23 Nov 01:40
· 32 commits to main since this release
775178e

Added

  • x12sdk.tables and x12sdk-table: an 835 or 837 as one row per service
    line
    , for spreadsheets, SQL and pandas. read_lines, to_dataframe
    (pandas extra) and write_csv; x12sdk-table remit.835 -o remit.csv needs
    nothing extra. Remittance rows carry the payment, claim, patient, procedure,
    amounts and adjustments totalled by group plus every GROUP-REASON code;
    claim rows (837P, 837I, 837D) carry the claim, patient, payer, provider,
    diagnoses, revenue codes and teeth. The columns are fixed
    (REMITTANCE_COLUMNS, CLAIM_COLUMNS); claim and remittance rows join on
    patient_control_number. Composites are split on whatever component
    separator the file uses, so HC>99213 reads like HC:99213. A claim paid
    without line detail still gets a row. Every 5010 835 and 837 in the test
    corpus reads; 4010 files are refused with a reason.

  • x12sdk-validate: checking files, with the answer in words. Valid
    files are summarised (transactions, implementation, claims); for an invalid
    one each problem is located in the loop hierarchy (loop 2000A #1 › loop 2000B #1 › loop 2300 #1: ...) without echoing the file's content. Unreadable
    input is explained (a malformed ISA envelope, not X12, file not found). Exits
    1 if any file is invalid; --json for machines. x12sdk.validation.check()
    from Python; the MCP server's validate_x12 shares the same formatting.

  • x12sdk.matching: remittances joined to claims on the patient control
    number. match_claims keeps every payment for a number (payments,
    reversals, corrections) and drops nothing: unanswered claims are
    no remittance, payments for claims not given are no claim.
    match_rows gives flat rows.

  • scripts/benchmark.py and published numbers: an 835 reads at about
    8,200 claims/s and an 837P at about 2,100 on an Apple-silicon Mac. Memory
    grows with the largest transaction: about 540 MB peak for one 837P
    transaction of 10,000 claims.

  • MCP Registry entry (server.json, launched with
    uvx --from "x12sdk[mcp]==<version>" x12sdk-mcp), and the ownership line
    the registry looks for in the README. A test keeps both in step with the
    package version.

Changed

  • The README opens with common tasks: tables, sample files, checking a file,
    AI assistants.
  • The roadmap promises at least one release a month rather than one fixed
    release around the 20th; releases go out when a useful set is ready.

Fixed

  • The dataset's service-line table could not be shown on Hugging Face,
    and codes lost their leading zeros there. The viewer guessed column types
    from the CSVs, took procedure codes for numbers, and failed on the first
    dental code; revenue code 0510 read as 510. scripts/build_dataset.py now
    also writes the tables as JSON Lines, where codes are text and amounts
    numbers, and the dataset card declares every column's type and points the
    viewer at those files. The CSVs and X12 files are unchanged.