@cosyte/x12 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -8
- package/KNOWN-LIMITATIONS.md +6 -6
- package/README.md +3 -4
- package/TRADEMARKS.md +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +29 -38
package/CHANGELOG.md
CHANGED
|
@@ -1952,7 +1952,7 @@ required control number and this builder never invents one, so nothing is emitte
|
|
|
1952
1952
|
composite. Escaping against a guessed delimiter set is a value corruption rather than a safe
|
|
1953
1953
|
default: `unescapeRelease` preserves `?X` verbatim for any `X` outside the reader's declared set,
|
|
1954
1954
|
so a value released against the wrong delimiter comes back carrying a stray `?`. The defaults are
|
|
1955
|
-
unchanged and are the
|
|
1955
|
+
unchanged and are the Cosyte archetype, which this function cannot verify, so state the separators
|
|
1956
1956
|
if you embed a TA1 in an envelope that declares different ones.
|
|
1957
1957
|
|
|
1958
1958
|
**A non-string element now refuses** with `AckBuildError` and the existing `X12_ACK_INVALID_SPEC`
|
|
@@ -3043,7 +3043,7 @@ string, …` - which `esc` cannot, being unary.
|
|
|
3043
3043
|
|
|
3044
3044
|
- **Em-dash brand gate in CI (`scripts/check-no-emdash.sh`, `pnpm check:no-emdash`,
|
|
3045
3045
|
`.github/workflows/no-emdash.yml`; `EMDASH-CONFORMANCE`).** The founder directive of 2026-07-24
|
|
3046
|
-
(`knowledgebase/06-brand/voice-and-tone.md`) bans `U+2014` outright across every
|
|
3046
|
+
(`knowledgebase/06-brand/voice-and-tone.md`) bans `U+2014` outright across every Cosyte surface
|
|
3047
3047
|
and names commit messages explicitly, and the meta-repo's `documentation/conventions.md` has
|
|
3048
3048
|
described the rule as CI-gated; x12 was one of the repos where it was not. This ports
|
|
3049
3049
|
`knowledgebase`'s scanner (the text-only variant, correct here because x12 tracks no binaries:
|
|
@@ -3138,7 +3138,7 @@ string, …` - which `esc` cannot, being unary.
|
|
|
3138
3138
|
### Added
|
|
3139
3139
|
|
|
3140
3140
|
- **Trademark notice (`TRADEMARKS.md`).** This package names third-party systems to describe what it
|
|
3141
|
-
interoperates with; the notice records that
|
|
3141
|
+
interoperates with; the notice records that Cosyte is not affiliated with, endorsed by, or
|
|
3142
3142
|
sponsored by any of them, that every reference is descriptive, and that the built-in profiles are
|
|
3143
3143
|
authored from public sources only. Added to `files` so it ships inside the published tarball, not
|
|
3144
3144
|
just on GitHub. Documentation only, no runtime or API change.
|
|
@@ -3792,7 +3792,7 @@ EV/SS`), and HL-04 has-child flag from the nested input tree, so an
|
|
|
3792
3792
|
helper). The `X12ClaimNote` JSDoc explicitly flags NTE-02 as
|
|
3793
3793
|
PHI-bearing (provider-supplied free text). Every Phase 5 fixture
|
|
3794
3794
|
is synthetic (test names `TEST PATIENT` / `SUB LAST` / `PATIENT
|
|
3795
|
-
CHILD`; sequential member IDs `MEMBER001
|
|
3795
|
+
CHILD`; sequential member IDs `MEMBER001` to `MEMBER011` etc.; NPI-
|
|
3796
3796
|
shaped sequential numbers; obvious test addresses) and matches
|
|
3797
3797
|
the established 835 fixture conventions.
|
|
3798
3798
|
- **Known limitations after this phase** (deliberate v1 scope; none
|
|
@@ -3980,7 +3980,7 @@ refresh:code-lists` arrives in Phase 10); no per-payer profile
|
|
|
3980
3980
|
|
|
3981
3981
|
- **Phase 3: 999 + TA1 acknowledgments (TR3 005010X231A1).** Two
|
|
3982
3982
|
pure-function ack surfaces ship side-by-side; neither auto-sends, opens
|
|
3983
|
-
a socket, or touches the filesystem. The
|
|
3983
|
+
a socket, or touches the filesystem. The Cosyte ack archetype: the
|
|
3984
3984
|
library MECHANICALLY builds the disposition it is told and REFUSES to
|
|
3985
3985
|
fabricate an Accept against a non-empty error list. Mirrors hl7's
|
|
3986
3986
|
upcoming `buildAck` boundary and mllp's commit-contract pattern.
|
|
@@ -4001,7 +4001,7 @@ refresh:code-lists` arrives in Phase 10); no per-payer profile
|
|
|
4001
4001
|
a TA1 inside an open functional group is still flagged as unexpected
|
|
4002
4002
|
(non-spec). `parseTA1(interchange)` returns the typed `X12AckTA1`
|
|
4003
4003
|
for the first captured TA1 (or `undefined`). `buildTA1(spec)` emits
|
|
4004
|
-
a fixed-position 5-element `Ta1Segment` (`TA101
|
|
4004
|
+
a fixed-position 5-element `Ta1Segment` (`TA101` to `TA105`). Caller
|
|
4005
4005
|
wraps it in their preferred envelope. Both standalone TA1-only
|
|
4006
4006
|
interchanges (ISA → TA1 → IEA, no GS) and embedded TA1s round-trip.
|
|
4007
4007
|
- **Safety guards (refused via `AckBuildError`):** `build999` refuses
|
|
@@ -4020,7 +4020,7 @@ refresh:code-lists` arrives in Phase 10); no per-payer profile
|
|
|
4020
4020
|
`IK3_SYNTAX_ERROR_CODES` (code list 716, 13 codes),
|
|
4021
4021
|
`IK4_SYNTAX_ERROR_CODES` (code list 723, 18 codes),
|
|
4022
4022
|
`TA1_ACK_CODES` (code list I13: `A`/`E`/`R`),
|
|
4023
|
-
`TA1_NOTE_CODES` (code list I18: `000
|
|
4023
|
+
`TA1_NOTE_CODES` (code list I18: `000` to `028`). String-literal
|
|
4024
4024
|
unions are exported for exhaustive narrowing. The helper
|
|
4025
4025
|
`isAcceptDisposition(code)` returns true for `A`/`E`/`P` and false
|
|
4026
4026
|
for the four reject codes.
|
|
@@ -4165,7 +4165,7 @@ safety` test blocks assert no SSN / ISO-date / long-digit-run
|
|
|
4165
4165
|
|
|
4166
4166
|
### Changed
|
|
4167
4167
|
|
|
4168
|
-
- Migrated onto the shared
|
|
4168
|
+
- Migrated onto the shared Cosyte engineering standard (Phase E). The toolchain
|
|
4169
4169
|
is now inherited from the published `@cosyte/*` config packages instead of
|
|
4170
4170
|
per-repo copies: `tsup.config.ts` uses `cosyteTsup`, `vitest.config.ts` uses
|
|
4171
4171
|
`cosyteVitest`, and `eslint.config.js` is the three-line `cosyte` wrapper.
|
package/KNOWN-LIMITATIONS.md
CHANGED
|
@@ -672,7 +672,7 @@ model.
|
|
|
672
672
|
nothing else - `buildTA1` still emits no terminator. Escaping against a guessed set is a value
|
|
673
673
|
corruption rather than a safe default: `unescapeRelease` preserves `?X` verbatim for any `X`
|
|
674
674
|
outside the declared set, so a value released against the wrong delimiter comes back carrying a
|
|
675
|
-
stray `?`. **The defaults are the
|
|
675
|
+
stray `?`. **The defaults are the Cosyte archetype and this function cannot verify them** - if
|
|
676
676
|
you embed a TA1 in an envelope that declares different separators, state them.
|
|
677
677
|
- **A non-string element now REFUSES** with `AckBuildError` / `X12_ACK_INVALID_SPEC`, and that is a
|
|
678
678
|
prerequisite rather than a bonus. Releasing a value means routing it through the escape helper,
|
|
@@ -1555,7 +1555,7 @@ N-char spec limit` refusal, one per emitting module, where the branch fires **be
|
|
|
1555
1555
|
2. **Whether an `X12Decimal` carries the SCALE you meant.** `fromString("0.3")` and
|
|
1556
1556
|
`fromString("0.30")` are both accepted and both emit verbatim. That choice is yours.
|
|
1557
1557
|
3. **The delimiter set `buildTA1` releases against**, per the paragraph above. It defaults to the
|
|
1558
|
-
|
|
1558
|
+
Cosyte archetype and the function cannot verify it; state the separators on `BuildTA1Options`
|
|
1559
1559
|
if you embed a TA1 in an envelope that declares different ones.
|
|
1560
1560
|
4. **`build835`'s balance-equation amounts, which refuse UNTYPED.** `build835` runs its balance
|
|
1561
1561
|
guard before it builds the escape helper, and that guard calls `X12Decimal` methods on your
|
|
@@ -1874,10 +1874,10 @@ N-char spec limit` refusal, one per emitting module, where the branch fires **be
|
|
|
1874
1874
|
applied and this package applies none.
|
|
1875
1875
|
- **No transport.** AS2, SFTP, and MLLP-style delivery are out of scope. This is a parser/serializer,
|
|
1876
1876
|
not a communications stack.
|
|
1877
|
-
- **
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1877
|
+
- **Below 1.0.** The package is published on npm as `@cosyte/x12` from a public repo, at `0.1`. Its
|
|
1878
|
+
exported readers, builders, types and warning codes are the surface we keep stable, and below 1.0
|
|
1879
|
+
a breaking change bumps the minor version and is called out in the changelog with its migration.
|
|
1880
|
+
`npm view @cosyte/x12 version` is the only source of truth for the current version.
|
|
1881
1881
|
- **A 276 hierarchical level whose declared parent does not resolve is left off the returned tree.**
|
|
1882
1882
|
The 276 reader attaches a level by its own HL-02 and by nothing else, so a pointer naming a level
|
|
1883
1883
|
that is not present, a pointer naming a level of the wrong kind, and a parent chain that returns
|
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ a stable code instead of failing or guessing.
|
|
|
31
31
|
|
|
32
32
|
## Status
|
|
33
33
|
|
|
34
|
-
**Version 0.1.
|
|
34
|
+
**Version 0.1.2**, published on npm from a public repository.
|
|
35
35
|
|
|
36
36
|
From `0.1.0` the public API is settled and safe to depend on: the exported readers, builders,
|
|
37
37
|
types and warning codes are the surface we keep stable, and the warning registry only ever gains
|
|
@@ -179,8 +179,7 @@ Everything ships from one entry point; there are no subpath imports.
|
|
|
179
179
|
transaction set into a typed one (`get835`, `get837Claims`, `get270Inquiry`, `get271Eligibility`,
|
|
180
180
|
`get276StatusInquiry`, `parse999`, `parseTA1`, and the rest).
|
|
181
181
|
- **Emit.** `serializeX12` and `buildInterchange` are the general path, and every transaction set
|
|
182
|
-
with a reader also has a domain builder (`build835`, `build837P`, `build271`, and the rest)
|
|
183
|
-
layers that guide's own invariants on top.
|
|
182
|
+
with a reader also has a domain builder (`build835`, `build837P`, `build271`, and the rest).
|
|
184
183
|
- **Errors and warnings.** Parsing is lenient, and only **four** structural failures are ever fatal
|
|
185
184
|
(`X12_NO_ISA_HEADER`, `X12_ISA_TOO_SHORT`, `X12_INVALID_DELIMITERS`, `X12_EMPTY_INPUT`).
|
|
186
185
|
Everything else arrives on `ix.warnings` as a stable code with positional context, so a tolerated
|
|
@@ -295,7 +294,7 @@ must be synthetic: never open a pull request carrying a real patient's data.
|
|
|
295
294
|
|
|
296
295
|
## Trademarks
|
|
297
296
|
|
|
298
|
-
Availity and Blue Cross Blue Shield are trademarks of their respective owners.
|
|
297
|
+
Availity and Blue Cross Blue Shield are trademarks of their respective owners. Cosyte is not
|
|
299
298
|
affiliated with, endorsed by, or sponsored by any of them. The names identify the trading partners
|
|
300
299
|
whose companion-guide deviations the built-in profiles accommodate. See
|
|
301
300
|
[TRADEMARKS.md](./TRADEMARKS.md).
|
package/TRADEMARKS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Trademarks
|
|
2
2
|
|
|
3
|
-
`@cosyte/x12` is an independent open-source project.
|
|
3
|
+
`@cosyte/x12` is an independent open-source project. Cosyte is **not affiliated with, endorsed by,
|
|
4
4
|
or sponsored by** any company named in this repository or its documentation.
|
|
5
5
|
|
|
6
6
|
## Why these names appear
|
package/dist/index.cjs
CHANGED
|
@@ -15395,7 +15395,7 @@ var profiles = Object.freeze({
|
|
|
15395
15395
|
});
|
|
15396
15396
|
|
|
15397
15397
|
// src/index.ts
|
|
15398
|
-
var VERSION = "0.1.
|
|
15398
|
+
var VERSION = "0.1.2";
|
|
15399
15399
|
|
|
15400
15400
|
exports.AAA_CONDITION_LEVELS = AAA_CONDITION_LEVELS;
|
|
15401
15401
|
exports.AAA_FOLLOW_UP_ACTION_CODES = AAA_FOLLOW_UP_ACTION_CODES;
|