Skip to content

x12sdk 2.4.1

Choose a tag to compare

@owgreen-dev owgreen-dev released this 28 Nov 15:50
· 22 commits to main since this release
088ed3c

Added

  • A browser playground (playground/, published as a Hugging Face
    Space): check a file and see where it breaks, turn an 835 or 837 into a
    CSV, generate synthetic files and claim/remittance pairs, and match claims
    to payments. It runs the released x12sdk in Pyodide, so files are processed
    in the visitor's browser and never uploaded.
  • A documentation site at https://owgreen-dev.github.io/x12sdk/: task
    guides (tables, checking files, generating, matching, reading and writing,
    denial analytics, MCP, CLI) and an API reference, built with Sphinx and
    Furo from docs/. Every Python example on it runs in the test suite
    (test_docs.py), and the build fails on any warning. pip install "x12sdk[docs]" installs the tools.

Changed

  • Each tagged release is listed in the official MCP Registry automatically
    once it is on PyPI, by a workflow authenticated with GitHub OIDC (no stored
    secret). glama.json names the maintainer for the Glama directory.

Fixed

The four fixes below were contributed by jcc004
(#27, #28, #29, #30).

  • A subscriber loop with HL04 = 1 that carries its own detail segments no
    longer crashes or loses its place.
    The 270, 271 and every 837 parser set
    the current patient only when HL04 was 0, so such a subscriber raised a raw
    TypeError or KeyError, or its detail was attached to an earlier
    subscriber. The subscriber is now always the current patient until a
    dependent loop starts. The 837 parsers accept a claim directly under a
    subscriber who also has dependents, and a subscriber with HL04 = 1 and no
    dependent; the 270 and 271 still refuse a subscriber with HL04 = 1 and no
    dependent, with their existing error.
  • 271: an empty NM1 last name or organization name is accepted in loops
    2100A, 2100B and 2100D
    , as it already was in 2100C. It failed with a
    string_type error before; a value is still limited to 60 characters.
  • 277: segments are no longer dropped while parsing. Every service line
    after the first (with its STC and DTP) and the segments after a patient or
    claim loop without a TRN were lost, which showed only as an SE segment
    count mismatch. They are now kept and round-trip. trn_segment is
    optional on the 2200D and 2200E loops, so a claim without a TRN is
    accepted; trace_number returns None for it.
  • 271: well-formed AAA03, AAA04 and EB03 code values are accepted. These
    fields were limited to fixed lists, one copy per loop for AAA03 and AAA04,
    so a valid code outside a list (for example 72 or 73 in AAA03, A8 in
    EB03) failed the whole transaction. Each list is now defined once, in
    x12sdk.v5010.code_tables, and gains 72 and 73 (AAA03) and A8 (EB03).
    AAA03 and AAA04 also accept any other value of the right length. EB03 on
    the 271 and EQ01 on the 270 (the same service type code) accept, in each
    repetition, a known code, any other value of one or two characters, or an
    empty repetition (30^, 2^^30), and the file serializes back byte for
    byte; a value longer than two characters, or an element empty throughout,
    is still rejected. Parsed values are plain strings, unchanged from the
    released version. Inputs rejected before are accepted; nothing accepted
    before changes, and the nested enum names on the segment classes still
    resolve.