@cosyte/x12 0.0.16 → 0.0.18
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 +232 -0
- package/KNOWN-LIMITATIONS.md +100 -37
- package/dist/index.cjs +16 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +212 -144
- package/dist/index.d.ts +212 -144
- package/dist/index.mjs +16 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -7,10 +7,10 @@ import { Buffer } from 'node:buffer';
|
|
|
7
7
|
* warning it emits so messages, payload shape, and positional context stay
|
|
8
8
|
* consistent across stages.
|
|
9
9
|
*
|
|
10
|
-
* The
|
|
10
|
+
* The envelope set is intentionally small (8 codes) - every additional code
|
|
11
11
|
* is a public-surface addition that needs a snapshot bump
|
|
12
|
-
* (see `test/warning-codes.snapshot.test.ts`).
|
|
13
|
-
*
|
|
12
|
+
* (see `test/warning-codes.snapshot.test.ts`). Later stages extend, never
|
|
13
|
+
* rename.
|
|
14
14
|
*
|
|
15
15
|
* ## A warning message is built from this registry, never from the document
|
|
16
16
|
*
|
|
@@ -61,6 +61,7 @@ import { Buffer } from 'node:buffer';
|
|
|
61
61
|
declare const WARNING_CODES: {
|
|
62
62
|
readonly X12_CONTROL_NUMBER_MISMATCH: "X12_CONTROL_NUMBER_MISMATCH";
|
|
63
63
|
readonly X12_PRE_005010: "X12_PRE_005010";
|
|
64
|
+
readonly X12_ISA_EXTRA_ELEMENT_SEPARATOR: "X12_ISA_EXTRA_ELEMENT_SEPARATOR";
|
|
64
65
|
readonly X12_GROUP_COUNT_MISMATCH: "X12_GROUP_COUNT_MISMATCH";
|
|
65
66
|
readonly X12_TRANSACTION_COUNT_MISMATCH: "X12_TRANSACTION_COUNT_MISMATCH";
|
|
66
67
|
readonly X12_SEGMENT_COUNT_MISMATCH: "X12_SEGMENT_COUNT_MISMATCH";
|
|
@@ -298,13 +299,19 @@ interface X12ParseWarning {
|
|
|
298
299
|
*/
|
|
299
300
|
declare function controlNumberMismatch(position: X12Position, pair: X12ControlNumberPair): X12ParseWarning;
|
|
300
301
|
/**
|
|
301
|
-
* Build an `X12_PRE_005010` warning. Emitted when
|
|
302
|
-
*
|
|
302
|
+
* Build an `X12_PRE_005010` warning. Emitted when the twelfth element of the
|
|
303
|
+
* ISA split does not read `00501`, the HIPAA-mandated baseline interchange
|
|
304
|
+
* control version number. The code name reads as a
|
|
303
305
|
* "pre-005010" test and the guard is an inequality, so a LATER family
|
|
304
306
|
* (`00602`, `00700`) raises it too. The parser still
|
|
305
307
|
* accepts the input (Postel's Law: lenient on parse) but flags the
|
|
306
308
|
* mismatch so consumers know the input may diverge from 005010 semantics.
|
|
307
|
-
*
|
|
309
|
+
*
|
|
310
|
+
* The guard reads that element, so raising this code does NOT establish that
|
|
311
|
+
* the header split into `ISA` plus 16 elements and does not assert what ISA-12
|
|
312
|
+
* itself declares. Where `X12_ISA_EXTRA_ELEMENT_SEPARATOR` is also present the
|
|
313
|
+
* element read may be a displaced one; `isa.raw` carries all 106 bytes and with
|
|
314
|
+
* the ISA fixed widths is the route back.
|
|
308
315
|
*
|
|
309
316
|
* @example
|
|
310
317
|
* ```ts
|
|
@@ -313,6 +320,37 @@ declare function controlNumberMismatch(position: X12Position, pair: X12ControlNu
|
|
|
313
320
|
* ```
|
|
314
321
|
*/
|
|
315
322
|
declare function pre005010(position: X12Position): X12ParseWarning;
|
|
323
|
+
/**
|
|
324
|
+
* Build an `X12_ISA_EXTRA_ELEMENT_SEPARATOR` warning. Emitted when the ISA
|
|
325
|
+
* element area (bytes 0..104) splits on the detected element separator into
|
|
326
|
+
* anything other than `["ISA", e1, …, e16]`.
|
|
327
|
+
*
|
|
328
|
+
* `detectDelimiters` has already verified that the separator sits at all 16
|
|
329
|
+
* fixed 005010 positions, so the split can only come out LONGER than 17: an
|
|
330
|
+
* ISA element value is itself carrying the byte that was declared in-band as
|
|
331
|
+
* the element separator. The interchange is not 005010-conformant either way,
|
|
332
|
+
* and the parser does not choose between the two readings of that byte - it
|
|
333
|
+
* reports that the header did not frame and leaves `isa.elements` exactly as
|
|
334
|
+
* the split produced it, with `isa.raw` carrying all 106 bytes verbatim.
|
|
335
|
+
*
|
|
336
|
+
* `decodeEnvelope` raises this ahead of every warning it raises after it,
|
|
337
|
+
* because when it is present the ISA-derived diagnostics that follow
|
|
338
|
+
* (`X12_PRE_005010` off `elements[12]`, `X12_CONTROL_NUMBER_MISMATCH` off
|
|
339
|
+
* `elements[13]`) may be reading a displaced element rather than the one they
|
|
340
|
+
* name. **That is a statement about `parseX12`'s `warnings` (and `onWarning`)
|
|
341
|
+
* and about nothing else.** `serializeX12(ix, { specClean: true })` runs its own
|
|
342
|
+
* reconciliation off `interchange.isa.elements[13]` with no arity awareness and
|
|
343
|
+
* never raises this code, so on that channel a lone
|
|
344
|
+
* `X12_CONTROL_NUMBER_MISMATCH` can be a displaced read - and its absence is not
|
|
345
|
+
* evidence the header framed. Filed, not fixed here.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* ```ts
|
|
349
|
+
* import { isaExtraElementSeparator } from "@cosyte/x12";
|
|
350
|
+
* const w = isaExtraElementSeparator({ segmentIndex: 0, interchangeIndex: 0 });
|
|
351
|
+
* ```
|
|
352
|
+
*/
|
|
353
|
+
declare function isaExtraElementSeparator(position: X12Position): X12ParseWarning;
|
|
316
354
|
/**
|
|
317
355
|
* Build an `X12_GROUP_COUNT_MISMATCH` warning. Emitted when IEA-01 does not
|
|
318
356
|
* equal the actual number of GS..GE groups present in the interchange.
|
|
@@ -344,8 +382,7 @@ declare function transactionCountMismatch(position: X12Position): X12ParseWarnin
|
|
|
344
382
|
* segments in the transaction set it closes (ST through SE inclusive).
|
|
345
383
|
* Corrected counts are emitted only on `serializeX12(ix, { specClean: true,
|
|
346
384
|
* recomputeCounts: true })`. The parser does not emit this code (it leaves
|
|
347
|
-
* SE-01 reconciliation to the emit half); it is a
|
|
348
|
-
* diagnostic.
|
|
385
|
+
* SE-01 reconciliation to the emit half); it is a serializer diagnostic.
|
|
349
386
|
*
|
|
350
387
|
* @example
|
|
351
388
|
* ```ts
|
|
@@ -591,7 +628,7 @@ declare function missingRequiredLoop(position: X12Position, loop: X12RequiredLoo
|
|
|
591
628
|
* `submission.implementationConventionReference` is decoded of any `?` release
|
|
592
629
|
* escape, so on a document that escapes a delimiter inside `ST-03` the two
|
|
593
630
|
* differ and the model field can hold an identifier this code just said was
|
|
594
|
-
* not recognised
|
|
631
|
+
* not recognised. A pointer stood here and
|
|
595
632
|
* in the message text and is DELETED, not reworded.
|
|
596
633
|
*
|
|
597
634
|
* `get837Claims` anchors this at the **ST**, which is `tx.segments[0]` and
|
|
@@ -981,7 +1018,7 @@ declare function amountRowDropped(position: X12Position): X12ParseWarning;
|
|
|
981
1018
|
declare function statedAmountDiscarded(position: X12Position): X12ParseWarning;
|
|
982
1019
|
|
|
983
1020
|
/**
|
|
984
|
-
* Type definitions for the `@cosyte/x12` profile subsystem
|
|
1021
|
+
* Type definitions for the `@cosyte/x12` profile subsystem.
|
|
985
1022
|
*
|
|
986
1023
|
* A profile captures **trading-partner / companion-guide deviations** as
|
|
987
1024
|
* typed, documented, fixture-grounded data - never silent leniency. It
|
|
@@ -1153,7 +1190,7 @@ interface X12ProfileSpec {
|
|
|
1153
1190
|
* an 835 claim, a dropped decimal is the wrong dollar amount in someone's
|
|
1154
1191
|
* cash post. `X12Decimal` preserves the inbound lexical form verbatim for
|
|
1155
1192
|
* byte-exact round-trip and exposes exact `BigInt`-backed arithmetic for
|
|
1156
|
-
* balance invariants (
|
|
1193
|
+
* balance invariants (CLP-04 + CLP-05 + ΣCAS = CLP-03;
|
|
1157
1194
|
* ΣSVC paid + ΣCAS = CLP-04; Σclaim CLP-04 + PLB = BPR-02).
|
|
1158
1195
|
*
|
|
1159
1196
|
* Internal representation:
|
|
@@ -1375,7 +1412,7 @@ declare class X12Decimal {
|
|
|
1375
1412
|
}
|
|
1376
1413
|
|
|
1377
1414
|
/**
|
|
1378
|
-
* Segment-level decode for the `@cosyte/x12` parser pipeline.
|
|
1415
|
+
* Segment-level decode for the `@cosyte/x12` parser pipeline. The
|
|
1379
1416
|
* syntactic core: take a raw segment string (terminator already stripped by
|
|
1380
1417
|
* the envelope walker) and decode it into an immutable {@link X12Segment}
|
|
1381
1418
|
* carrying its segment id, raw text, and an element array. Element values
|
|
@@ -1396,8 +1433,8 @@ declare class X12Decimal {
|
|
|
1396
1433
|
* - `"03[2]-1"` → component 1 of repetition 2 of element 3.
|
|
1397
1434
|
*
|
|
1398
1435
|
* The parser deliberately does NOT support cross-segment paths at this
|
|
1399
|
-
*
|
|
1400
|
-
* traversal arrives with `defineLoopSpec`
|
|
1436
|
+
* level - `Segment.get` operates inside a single segment. Cross-loop
|
|
1437
|
+
* traversal arrives with `defineLoopSpec` (which authors the
|
|
1401
1438
|
* built-in transaction loops through the same public API as consumers -
|
|
1402
1439
|
* the dogfooding gate).
|
|
1403
1440
|
*/
|
|
@@ -1781,13 +1818,13 @@ interface X12ParseOptions {
|
|
|
1781
1818
|
}
|
|
1782
1819
|
/**
|
|
1783
1820
|
* The four X12 delimiter classes discovered from fixed byte positions inside
|
|
1784
|
-
* the ISA envelope.
|
|
1821
|
+
* the ISA envelope. The parser detects all four from the ISA itself - they are
|
|
1785
1822
|
* NEVER assumed (in particular, `component` is rarely `:` outside Medicare).
|
|
1786
1823
|
*
|
|
1787
1824
|
* - `element` - ISA byte 4 (1-indexed); separates the 16 ISA elements.
|
|
1788
1825
|
* - `repetition` - ISA-11 (byte 83, 1-indexed); separates repetitions inside
|
|
1789
1826
|
* an element. Carries the legacy Control Standards Identifier
|
|
1790
|
-
* (typically `U`) for pre-005010 inputs;
|
|
1827
|
+
* (typically `U`) for pre-005010 inputs; the parser surfaces it verbatim.
|
|
1791
1828
|
* - `component` - ISA-16 (byte 105, 1-indexed); separates sub-elements of a
|
|
1792
1829
|
* composite. Real-world senders use `:`, `\\`, `^`, `|`, and more.
|
|
1793
1830
|
* - `segment` - the byte immediately after ISA-16 (byte 106, 1-indexed);
|
|
@@ -1812,18 +1849,27 @@ interface Delimiters {
|
|
|
1812
1849
|
readonly segment: string;
|
|
1813
1850
|
}
|
|
1814
1851
|
/**
|
|
1815
|
-
* The decoded ISA interchange header.
|
|
1816
|
-
*
|
|
1817
|
-
*
|
|
1818
|
-
*
|
|
1819
|
-
*
|
|
1852
|
+
* The decoded ISA interchange header. ISA-12 is the interchange control
|
|
1853
|
+
* version number, `00501` being the HIPAA-mandated baseline, and ISA-13 the
|
|
1854
|
+
* interchange control number, which the envelope walker reconciles against
|
|
1855
|
+
* IEA-02.
|
|
1856
|
+
*
|
|
1857
|
+
* `raw` preserves the exact 106-byte ISA + terminator string from input so
|
|
1858
|
+
* round-trip serialization is byte-exact regardless of any lenient
|
|
1859
|
+
* normalization downstream. `elements` is what splitting that span on the
|
|
1860
|
+
* element separator produced, `elements[0]` being the literal `"ISA"` name
|
|
1861
|
+
* placeholder. **Element values are stored RAW**, so an entry is byte text
|
|
1862
|
+
* and not necessarily the value the sender stated. The 1-indexed mapping onto
|
|
1863
|
+
* ISA-01..ISA-16 holds where that split produced exactly 17 entries;
|
|
1864
|
+
* `X12_ISA_EXTRA_ELEMENT_SEPARATOR` reports where it did not, and `raw`
|
|
1865
|
+
* carries all 106 bytes either way.
|
|
1820
1866
|
*
|
|
1821
1867
|
* @example
|
|
1822
1868
|
* ```ts
|
|
1823
1869
|
* import type { IsaSegment } from "@cosyte/x12";
|
|
1824
1870
|
* declare const isa: IsaSegment;
|
|
1825
|
-
* isa.
|
|
1826
|
-
* isa.elements[13];
|
|
1871
|
+
* isa.raw; // verbatim 106-byte header
|
|
1872
|
+
* isa.elements[13]; // raw text at index 13 of the ISA split
|
|
1827
1873
|
* ```
|
|
1828
1874
|
*/
|
|
1829
1875
|
interface IsaSegment {
|
|
@@ -1831,16 +1877,22 @@ interface IsaSegment {
|
|
|
1831
1877
|
readonly elements: readonly string[];
|
|
1832
1878
|
}
|
|
1833
1879
|
/**
|
|
1834
|
-
* The decoded IEA interchange trailer.
|
|
1835
|
-
*
|
|
1836
|
-
*
|
|
1837
|
-
*
|
|
1880
|
+
* The decoded IEA interchange trailer. IEA-01 is the group count and IEA-02
|
|
1881
|
+
* the interchange control number, which the envelope walker reconciles
|
|
1882
|
+
* against ISA-13.
|
|
1883
|
+
*
|
|
1884
|
+
* `raw` is the exact segment string (without the segment terminator) and
|
|
1885
|
+
* `elements` is 1-indexed (`elements[0]` = `"IEA"`, `elements[1]` = IEA-01,
|
|
1886
|
+
* `elements[2]` = IEA-02). **Element values are stored RAW,
|
|
1887
|
+
* pre-`?`-unescape**, so an element is the framed byte text of its slot and
|
|
1888
|
+
* not necessarily the value the sender stated.
|
|
1838
1889
|
*
|
|
1839
1890
|
* @example
|
|
1840
1891
|
* ```ts
|
|
1841
1892
|
* import type { IeaSegment } from "@cosyte/x12";
|
|
1842
1893
|
* declare const iea: IeaSegment;
|
|
1843
|
-
* iea.
|
|
1894
|
+
* iea.raw; // verbatim segment text
|
|
1895
|
+
* iea.elements[2]; // raw text of IEA-02 (post-element-split, pre-?-unescape)
|
|
1844
1896
|
* ```
|
|
1845
1897
|
*/
|
|
1846
1898
|
interface IeaSegment {
|
|
@@ -1848,17 +1900,22 @@ interface IeaSegment {
|
|
|
1848
1900
|
readonly elements: readonly string[];
|
|
1849
1901
|
}
|
|
1850
1902
|
/**
|
|
1851
|
-
* The decoded GS functional group header.
|
|
1852
|
-
*
|
|
1853
|
-
*
|
|
1854
|
-
*
|
|
1903
|
+
* The decoded GS functional group header. GS-01 is the functional ID code
|
|
1904
|
+
* (`HC` for claims, `HP` for remittance, etc.), GS-06 the group control
|
|
1905
|
+
* number, which reconciles against GE-02, and GS-08 the version /
|
|
1906
|
+
* implementation convention reference (e.g. `005010X222A2`).
|
|
1907
|
+
*
|
|
1908
|
+
* `elements` is 1-indexed (`elements[0]` = `"GS"`, `elements[1]` = GS-01,
|
|
1909
|
+
* ..., `elements[8]` = GS-08). **Element values are stored RAW,
|
|
1910
|
+
* pre-`?`-unescape**, so an element is the framed byte text of its slot and
|
|
1911
|
+
* not necessarily the value the sender stated.
|
|
1855
1912
|
*
|
|
1856
1913
|
* @example
|
|
1857
1914
|
* ```ts
|
|
1858
1915
|
* import type { GsSegment } from "@cosyte/x12";
|
|
1859
1916
|
* declare const gs: GsSegment;
|
|
1860
|
-
* gs.
|
|
1861
|
-
* gs.elements[6];
|
|
1917
|
+
* gs.raw; // verbatim segment text
|
|
1918
|
+
* gs.elements[6]; // raw text of GS-06 (post-element-split, pre-?-unescape)
|
|
1862
1919
|
* ```
|
|
1863
1920
|
*/
|
|
1864
1921
|
interface GsSegment {
|
|
@@ -1866,16 +1923,21 @@ interface GsSegment {
|
|
|
1866
1923
|
readonly elements: readonly string[];
|
|
1867
1924
|
}
|
|
1868
1925
|
/**
|
|
1869
|
-
* The decoded GE functional group trailer.
|
|
1870
|
-
*
|
|
1871
|
-
*
|
|
1872
|
-
*
|
|
1926
|
+
* The decoded GE functional group trailer. GE-01 is the transaction count,
|
|
1927
|
+
* which reconciles against the number of ST/SE pairs in the group, and
|
|
1928
|
+
* GE-02 the group control number, which reconciles against GS-06.
|
|
1929
|
+
*
|
|
1930
|
+
* `elements` is 1-indexed (`elements[0]` = `"GE"`, `elements[1]` = GE-01,
|
|
1931
|
+
* `elements[2]` = GE-02). **Element values are stored RAW,
|
|
1932
|
+
* pre-`?`-unescape**, so an element is the framed byte text of its slot and
|
|
1933
|
+
* not necessarily the value the sender stated.
|
|
1873
1934
|
*
|
|
1874
1935
|
* @example
|
|
1875
1936
|
* ```ts
|
|
1876
1937
|
* import type { GeSegment } from "@cosyte/x12";
|
|
1877
1938
|
* declare const ge: GeSegment;
|
|
1878
|
-
* ge.
|
|
1939
|
+
* ge.raw; // verbatim segment text
|
|
1940
|
+
* ge.elements[2]; // raw text of GE-02 (post-element-split, pre-?-unescape)
|
|
1879
1941
|
* ```
|
|
1880
1942
|
*/
|
|
1881
1943
|
interface GeSegment {
|
|
@@ -1889,24 +1951,31 @@ interface GeSegment {
|
|
|
1889
1951
|
* GS at all (a TA1-only interchange). One interchange may carry multiple
|
|
1890
1952
|
* TA1 segments, each acknowledging a prior inbound interchange.
|
|
1891
1953
|
*
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1894
|
-
* date YYMMDD
|
|
1895
|
-
*
|
|
1896
|
-
*
|
|
1897
|
-
*
|
|
1898
|
-
*
|
|
1954
|
+
* TA1-01 is the interchange control number of the acknowledged interchange
|
|
1955
|
+
* and the reassociation key. TA1-02 and TA1-03 are
|
|
1956
|
+
* its interchange date (YYMMDD) and time (HHMM). TA1-04 is the Interchange
|
|
1957
|
+
* Acknowledgment Code, code list I13 (`A` accepted, `E` accepted with
|
|
1958
|
+
* errors, `R` rejected), and TA1-05 the Interchange Note Code, code list
|
|
1959
|
+
* I18.
|
|
1960
|
+
*
|
|
1961
|
+
* `elements` is 1-indexed (`elements[0]` = `"TA1"`, `elements[1]` = TA1-01,
|
|
1962
|
+
* ..., `elements[5]` = TA1-05). **Element values are stored RAW,
|
|
1963
|
+
* pre-`?`-unescape**, so an element is the framed byte text of its slot and
|
|
1964
|
+
* not necessarily the value the sender stated.
|
|
1899
1965
|
*
|
|
1900
|
-
* The
|
|
1901
|
-
* typed-ack model is built on top by `parseTA1
|
|
1902
|
-
*
|
|
1966
|
+
* The envelope walker captures TA1 segments here verbatim; the
|
|
1967
|
+
* typed-ack model is built on top by `parseTA1`, whose five decoded fields
|
|
1968
|
+
* are POST-`?`-unescape. `parseTA1` decodes the FIRST TA1 on an
|
|
1969
|
+
* interchange, so on a multi-TA1 inbound it does not necessarily describe
|
|
1970
|
+
* the segment you are holding. TA1 contains only structural control /
|
|
1971
|
+
* disposition codes - by spec it carries NO PHI.
|
|
1903
1972
|
*
|
|
1904
1973
|
* @example
|
|
1905
1974
|
* ```ts
|
|
1906
1975
|
* import type { Ta1Segment } from "@cosyte/x12";
|
|
1907
1976
|
* declare const ta1: Ta1Segment;
|
|
1908
|
-
* ta1.
|
|
1909
|
-
* ta1.elements[
|
|
1977
|
+
* ta1.raw; // verbatim segment text
|
|
1978
|
+
* ta1.elements[1]; // raw text of TA1-01 (post-element-split, pre-?-unescape)
|
|
1910
1979
|
* ```
|
|
1911
1980
|
*/
|
|
1912
1981
|
interface Ta1Segment {
|
|
@@ -1914,7 +1983,7 @@ interface Ta1Segment {
|
|
|
1914
1983
|
readonly elements: readonly string[];
|
|
1915
1984
|
}
|
|
1916
1985
|
/**
|
|
1917
|
-
* A single ST..SE transaction set inside a functional group.
|
|
1986
|
+
* A single ST..SE transaction set inside a functional group. The parser
|
|
1918
1987
|
* decodes every body segment via {@link "./segment.js".decodeSegment} so
|
|
1919
1988
|
* `segments` carries typed {@link X12Segment} entries (ST through SE,
|
|
1920
1989
|
* inclusive). `rawSegments` mirrors the same list as the verbatim raw
|
|
@@ -1925,7 +1994,7 @@ interface Ta1Segment {
|
|
|
1925
1994
|
* time so envelope invariants can be checked (ST-02 ↔ SE-02 control-number
|
|
1926
1995
|
* reconciliation, SE-01 segment count). **Read "decoded" as element-SPLIT and
|
|
1927
1996
|
* nothing more: the strings are PRE-`?`-unescape**, and a reader that publishes
|
|
1928
|
-
* one to a consumer unescapes it first
|
|
1997
|
+
* one to a consumer unescapes it first.
|
|
1929
1998
|
*
|
|
1930
1999
|
* @example
|
|
1931
2000
|
* ```ts
|
|
@@ -1951,13 +2020,12 @@ interface X12TransactionSet {
|
|
|
1951
2020
|
/**
|
|
1952
2021
|
* A single GS..GE functional group inside an interchange. `transactions`
|
|
1953
2022
|
* is the ordered list of ST..SE transaction sets inside it (opaque bodies
|
|
1954
|
-
* at
|
|
2023
|
+
* at envelope decode - see {@link X12TransactionSet}).
|
|
1955
2024
|
*
|
|
1956
2025
|
* @example
|
|
1957
2026
|
* ```ts
|
|
1958
2027
|
* import type { X12FunctionalGroup } from "@cosyte/x12";
|
|
1959
2028
|
* declare const group: X12FunctionalGroup;
|
|
1960
|
-
* group.gs.elements[1]; // GS-01 - functional ID code
|
|
1961
2029
|
* group.transactions.length;
|
|
1962
2030
|
* ```
|
|
1963
2031
|
*/
|
|
@@ -2167,7 +2235,7 @@ interface X12Interchange {
|
|
|
2167
2235
|
}
|
|
2168
2236
|
|
|
2169
2237
|
/**
|
|
2170
|
-
* Public entry point for the `@cosyte/x12` parser - composes the
|
|
2238
|
+
* Public entry point for the `@cosyte/x12` parser - composes the
|
|
2171
2239
|
* delimiter-detection + envelope-decode stages and routes every Tier-2
|
|
2172
2240
|
* warning through a single emission chokepoint. The four Tier-3 fatal codes
|
|
2173
2241
|
* (`X12_EMPTY_INPUT`, `X12_NO_ISA_HEADER`, `X12_ISA_TOO_SHORT`,
|
|
@@ -2191,11 +2259,11 @@ interface X12Interchange {
|
|
|
2191
2259
|
* carries an empty `snippet`: the warning it wraps is registry-built and
|
|
2192
2260
|
* fully located by `position`, so there is nothing to redact.
|
|
2193
2261
|
*
|
|
2194
|
-
*
|
|
2195
|
-
*
|
|
2196
|
-
*
|
|
2197
|
-
*
|
|
2198
|
-
*
|
|
2262
|
+
* The envelope decode reads ISA / GS / ST / SE / GE / IEA and detects the
|
|
2263
|
+
* four delimiters from fixed ISA byte positions. Transaction-set bodies
|
|
2264
|
+
* inside each ST..SE are kept **opaque** there - `tx.segments` carries the
|
|
2265
|
+
* raw segment strings (terminator stripped). Segment decode adds
|
|
2266
|
+
* element/composite/repetition decode on top.
|
|
2199
2267
|
*
|
|
2200
2268
|
* @example
|
|
2201
2269
|
* ```ts
|
|
@@ -2206,7 +2274,7 @@ interface X12Interchange {
|
|
|
2206
2274
|
* ix.delimiters.element; // "*"
|
|
2207
2275
|
* ix.delimiters.component; // ":"
|
|
2208
2276
|
* ix.delimiters.segment; // "~"
|
|
2209
|
-
* ix.groups[0]?.gs.elements[1]; //
|
|
2277
|
+
* ix.groups[0]?.gs.elements[1]; // raw text of GS-01 (pre-?-unescape)
|
|
2210
2278
|
* for (const w of ix.warnings) {
|
|
2211
2279
|
* if (w.code === WARNING_CODES.X12_PRE_005010) {
|
|
2212
2280
|
* // sender on pre-005010 version family
|
|
@@ -2287,7 +2355,7 @@ declare const DELIMITER_POSITIONS: {
|
|
|
2287
2355
|
* against an input that begins with `"ISA"` followed by structurally
|
|
2288
2356
|
* wrong bytes (e.g. a tab as element separator with `:` further in).
|
|
2289
2357
|
*
|
|
2290
|
-
*
|
|
2358
|
+
* The parser is liberal in what it accepts AFTER the ISA - downstream
|
|
2291
2359
|
* envelope walking emits Tier-2 warnings rather than throwing. But the
|
|
2292
2360
|
* ISA itself MUST be structurally readable; otherwise no later stage has
|
|
2293
2361
|
* a delimiter set to work with.
|
|
@@ -2306,7 +2374,7 @@ declare function detectDelimiters(raw: string): Delimiters;
|
|
|
2306
2374
|
|
|
2307
2375
|
/**
|
|
2308
2376
|
* Fatal error taxonomy for the `@cosyte/x12` parser pipeline. Four Tier-3
|
|
2309
|
-
* codes cover every unrecoverable structural failure
|
|
2377
|
+
* codes cover every unrecoverable structural failure; anything
|
|
2310
2378
|
* less severe is a Tier-2 warning (see `./warnings.ts`). `X12ParseError` is
|
|
2311
2379
|
* thrown directly; consumers narrow via the `code` discriminant. The set is
|
|
2312
2380
|
* locked at 4 and is additions-only thereafter - adding a code is a
|
|
@@ -2314,8 +2382,8 @@ declare function detectDelimiters(raw: string): Delimiters;
|
|
|
2314
2382
|
*/
|
|
2315
2383
|
|
|
2316
2384
|
/**
|
|
2317
|
-
* Stable string codes for every Tier-3 fatal `parseX12` may throw.
|
|
2318
|
-
*
|
|
2385
|
+
* Stable string codes for every Tier-3 fatal `parseX12` may throw. The
|
|
2386
|
+
* registry is locked at four codes: anything else MUST be a Tier-2 warning.
|
|
2319
2387
|
* Consumers narrow on `err.code` to react to specific structural failures.
|
|
2320
2388
|
*
|
|
2321
2389
|
* @example
|
|
@@ -2426,7 +2494,7 @@ declare class X12ParseError extends Error {
|
|
|
2426
2494
|
*
|
|
2427
2495
|
* The pair `{ unescapeRelease, escapeRelease }` is bijective on inputs that
|
|
2428
2496
|
* either contain no release-relevant characters OR are already a clean
|
|
2429
|
-
* round-trip - this gives the
|
|
2497
|
+
* round-trip - this gives the lossless round-trip property: for any
|
|
2430
2498
|
* value `v` and delimiter set `d`, `unescapeRelease(escapeRelease(v, d), d)`
|
|
2431
2499
|
* deep-equals `v`.
|
|
2432
2500
|
*/
|
|
@@ -2516,9 +2584,9 @@ declare function escapeRelease(value: string, delimiters: Delimiters): string;
|
|
|
2516
2584
|
* Public type surface for the `defineLoopSpec()` API. A {@link LoopSpec}
|
|
2517
2585
|
* is a declarative description of a TR3 loop (e.g. `Loop 2300` in 837P /
|
|
2518
2586
|
* `Loop 2110` in 835): which segments belong to it, in what order, with
|
|
2519
|
-
* what cardinality, and which child loops nest inside it.
|
|
2520
|
-
* API and types only - built-in transaction loop specs for the 12 v1
|
|
2521
|
-
* transactions are authored through this same public API
|
|
2587
|
+
* what cardinality, and which child loops nest inside it. This module ships
|
|
2588
|
+
* the API and types only - built-in transaction loop specs for the 12 v1
|
|
2589
|
+
* transactions are authored through this same public API
|
|
2522
2590
|
* (the dogfooding gate locked in `documentation/repos/x12.md`).
|
|
2523
2591
|
*
|
|
2524
2592
|
* Naming convention: `id` is a human-readable loop identifier (`"2300"` for
|
|
@@ -2537,7 +2605,7 @@ declare function escapeRelease(value: string, delimiters: Delimiters): string;
|
|
|
2537
2605
|
* - `required` - the segment/loop MUST appear at least once.
|
|
2538
2606
|
* - `situational` - the segment/loop MAY appear when its situational rule
|
|
2539
2607
|
* triggers; the parser does not enforce the rule itself but loop-walker
|
|
2540
|
-
* warnings
|
|
2608
|
+
* warnings reference it.
|
|
2541
2609
|
* - `optional` - the segment/loop MAY appear in any usage.
|
|
2542
2610
|
*
|
|
2543
2611
|
* @example
|
|
@@ -2550,8 +2618,8 @@ type LoopUsage = "required" | "situational" | "optional";
|
|
|
2550
2618
|
/**
|
|
2551
2619
|
* Repetition count for a segment or child loop inside its parent. `">1"`
|
|
2552
2620
|
* means many (TR3 typically writes `>1` to mean "no cap"). A finite max
|
|
2553
|
-
* surfaces as the numeric value.
|
|
2554
|
-
*
|
|
2621
|
+
* surfaces as the numeric value. This module stores the value; the loop
|
|
2622
|
+
* walker uses it for over-limit warnings.
|
|
2555
2623
|
*
|
|
2556
2624
|
* @example
|
|
2557
2625
|
* ```ts
|
|
@@ -2564,7 +2632,7 @@ type LoopMax = number | ">1";
|
|
|
2564
2632
|
/**
|
|
2565
2633
|
* A segment slot inside a loop body. Carries the segment id, its TR3
|
|
2566
2634
|
* usage + cardinality, and an optional position label (e.g. `"Loop 2300
|
|
2567
|
-
* #2"`) used by
|
|
2635
|
+
* #2"`) used by loop-walker diagnostics. Stored verbatim by
|
|
2568
2636
|
* `defineLoopSpec`; no validation beyond the structural shape so consumers
|
|
2569
2637
|
* can author payer-specific segment specs without re-deriving each rule.
|
|
2570
2638
|
*
|
|
@@ -2582,7 +2650,7 @@ interface LoopSegmentSpec {
|
|
|
2582
2650
|
readonly description?: string;
|
|
2583
2651
|
}
|
|
2584
2652
|
/**
|
|
2585
|
-
* A declarative loop description used by
|
|
2653
|
+
* A declarative loop description used by the transaction extractors
|
|
2586
2654
|
* and consumer-authored payer profiles alike. Frozen by `defineLoopSpec`
|
|
2587
2655
|
* so a `LoopSpec` is safe to share across calls.
|
|
2588
2656
|
*
|
|
@@ -2612,12 +2680,12 @@ interface LoopSpec {
|
|
|
2612
2680
|
/**
|
|
2613
2681
|
* Public `defineLoopSpec()` factory for the `@cosyte/x12` loop surface.
|
|
2614
2682
|
* Returns a frozen {@link LoopSpec} after structural validation - no
|
|
2615
|
-
* runtime walker (
|
|
2616
|
-
* built-in transaction loop spec
|
|
2683
|
+
* runtime walker (the transaction extractors own walking). The DOGFOODING
|
|
2684
|
+
* gate: every built-in transaction loop spec is authored through
|
|
2617
2685
|
* this same public API consumers use for payer-specific loops, so a
|
|
2618
2686
|
* regression in the public surface is impossible to hide.
|
|
2619
2687
|
*
|
|
2620
|
-
* Validation is strictly structural
|
|
2688
|
+
* Validation is strictly structural:
|
|
2621
2689
|
*
|
|
2622
2690
|
* - `id` and `trigger` are non-empty strings.
|
|
2623
2691
|
* - `trigger` segment id passes the same `[A-Z][A-Z0-9]{1,2}` shape used
|
|
@@ -2724,7 +2792,7 @@ declare function defineLoopSpec(input: DefineLoopSpecInput): LoopSpec;
|
|
|
2724
2792
|
*
|
|
2725
2793
|
* Snapshots are deliberately tiny in v0.0.x - pre-launch initial subsets
|
|
2726
2794
|
* covering only the codes already exercised by the parser's Tier-1 + Tier-2
|
|
2727
|
-
* fixtures. The
|
|
2795
|
+
* fixtures. The `pnpm refresh:code-lists` script will regenerate
|
|
2728
2796
|
* the full WPC-published lists from canonical sources for the first real
|
|
2729
2797
|
* release; until then `lookup(code)` returns `undefined` for codes outside
|
|
2730
2798
|
* the subset and consumers receive the **verbatim** inbound code (the
|
|
@@ -2814,7 +2882,7 @@ interface CodeListSnapshot {
|
|
|
2814
2882
|
* **Pre-launch initial subset.** This snapshot covers the ~30 most
|
|
2815
2883
|
* commonly observed CARC codes - every value exercised by the Tier-1 /
|
|
2816
2884
|
* Tier-2 fixtures plus the long-tail codes most cash-posting workflows
|
|
2817
|
-
* branch on. The
|
|
2885
|
+
* branch on. The `pnpm refresh:code-lists` script regenerates
|
|
2818
2886
|
* the full WPC-published list from the canonical source for the first
|
|
2819
2887
|
* real publish; until then a CARC absent from the snapshot still parses
|
|
2820
2888
|
* fine (verbatim) - only its description is unavailable.
|
|
@@ -2960,9 +3028,9 @@ declare const lookupClaimStatus: (code: string) => CodeListEntry | undefined;
|
|
|
2960
3028
|
*
|
|
2961
3029
|
* **Initial bundled subset** covers the ~10 most common dispositions.
|
|
2962
3030
|
* Codes outside the subset still parse (verbatim code preserved on the
|
|
2963
|
-
* model); a `X12_UNKNOWN_CLP_STATUS` warning would be a
|
|
2964
|
-
* (not bundled
|
|
2965
|
-
*
|
|
3031
|
+
* model); a `X12_UNKNOWN_CLP_STATUS` warning would be a later addition
|
|
3032
|
+
* (not bundled here, to keep the additions-only warning registry surgical -
|
|
3033
|
+
* this table only carries the codes the readers actually use).
|
|
2966
3034
|
*/
|
|
2967
3035
|
|
|
2968
3036
|
/**
|
|
@@ -3234,8 +3302,8 @@ declare const lookupRarc: (code: string) => CodeListEntry | undefined;
|
|
|
3234
3302
|
* unknown qualifiers map to `"unknown"` and the verbatim code is still
|
|
3235
3303
|
* preserved on the parsed diagnosis / procedure.
|
|
3236
3304
|
*
|
|
3237
|
-
* Snapshot date 2026-06-27. This is a curated read-only table -
|
|
3238
|
-
*
|
|
3305
|
+
* Snapshot date 2026-06-27. This is a curated read-only table - the profile
|
|
3306
|
+
* system may LAYER additional qualifiers per payer, but the
|
|
3239
3307
|
* BASE mapping ships as a frozen artifact so a single CMS change isn't a
|
|
3240
3308
|
* silent semantic drift.
|
|
3241
3309
|
*/
|
|
@@ -4698,7 +4766,7 @@ declare class Remit835BuildError extends Error {
|
|
|
4698
4766
|
/**
|
|
4699
4767
|
* 835 TR3 `005010X221A1` loop specification - authored through the
|
|
4700
4768
|
* **public** {@link "../../loops/define.js".defineLoopSpec} API. This is
|
|
4701
|
-
* the
|
|
4769
|
+
* the dogfooding gate: the built-in 835 loop hierarchy goes
|
|
4702
4770
|
* through the SAME factory consumers use for payer-specific companion-
|
|
4703
4771
|
* guide loops. A regression in `defineLoopSpec` cannot hide from the
|
|
4704
4772
|
* built-in extractors.
|
|
@@ -4729,11 +4797,11 @@ declare class Remit835BuildError extends Error {
|
|
|
4729
4797
|
* ```
|
|
4730
4798
|
*
|
|
4731
4799
|
* @remarks
|
|
4732
|
-
*
|
|
4800
|
+
* The loop spec is surfaced as a frozen artifact (consumers can read
|
|
4733
4801
|
* it and assert it matches their companion-guide expectations); the
|
|
4734
4802
|
* walker in `./get-835.ts` consults the spec to guide its state machine.
|
|
4735
|
-
*
|
|
4736
|
-
*
|
|
4803
|
+
* The profile system overlays vendor-specific quirks on top of this
|
|
4804
|
+
* baseline.
|
|
4737
4805
|
*/
|
|
4738
4806
|
|
|
4739
4807
|
/**
|
|
@@ -4768,7 +4836,7 @@ declare const REMIT_835_LOOP_2100: LoopSpec;
|
|
|
4768
4836
|
*
|
|
4769
4837
|
* Cited as Loop 2000 in TR3 X221A1; situational because some payers
|
|
4770
4838
|
* (notably Medicare FFS) omit the LX header entirely and ship CLP loops
|
|
4771
|
-
* directly under the transaction set header. The
|
|
4839
|
+
* directly under the transaction set header. The walker handles
|
|
4772
4840
|
* both shapes - claims appear inside Loop 2000 if `LX` is present, at
|
|
4773
4841
|
* top level otherwise.
|
|
4774
4842
|
*
|
|
@@ -4839,8 +4907,7 @@ declare const REMIT_835_LOOP_1000B: LoopSpec;
|
|
|
4839
4907
|
* (reduces BPR-02), negative PLB = credit to provider (increases
|
|
4840
4908
|
* BPR-02). So subtraction is what makes the equation balance.
|
|
4841
4909
|
*
|
|
4842
|
-
* >
|
|
4843
|
-
* > §4) sketched these invariants slightly differently - that sketch was a
|
|
4910
|
+
* > Implementation note: an early internal sketch of these invariants was a
|
|
4844
4911
|
* > simplification. The implementation here matches the **X12 005010X221A1
|
|
4845
4912
|
* > TR3 §1.10.2 spec text** directly; the roadmap is updated in the same
|
|
4846
4913
|
* > slice with a forward-pointer to this module so the contract stays
|
|
@@ -5194,7 +5261,7 @@ interface X12ClaimDate {
|
|
|
5194
5261
|
* inpatient only. CMS-mandated values: `Y` Yes, `N` No, `U` Insufficient
|
|
5195
5262
|
* documentation, `W` Clinically undetermined, `1` Exempt from POA
|
|
5196
5263
|
* reporting. Verbatim - the parser preserves the value, never validates
|
|
5197
|
-
* against the spec list (
|
|
5264
|
+
* against the spec list (a profile may layer enforcement).
|
|
5198
5265
|
*
|
|
5199
5266
|
* @example
|
|
5200
5267
|
* ```ts
|
|
@@ -5307,9 +5374,10 @@ interface X12ClaimMember {
|
|
|
5307
5374
|
/**
|
|
5308
5375
|
* Decoded Loop 2320 - Other Subscriber Information. Captures the SBR-01
|
|
5309
5376
|
* payer responsibility code and the associated other-subscriber / other-
|
|
5310
|
-
* payer NM1 entities;
|
|
5377
|
+
* payer NM1 entities; this reader records the surface so a consumer knows
|
|
5311
5378
|
* COB exists. Detailed CAS / OI / MOA breakdown inside Loop 2320 is
|
|
5312
|
-
* deferred to
|
|
5379
|
+
* deferred to the profile system (it tracks one payer's specific
|
|
5380
|
+
* adjudication and
|
|
5313
5381
|
* is rarely needed for outbound claim creation).
|
|
5314
5382
|
*
|
|
5315
5383
|
* @example
|
|
@@ -5619,12 +5687,12 @@ interface X12LineAdjudication {
|
|
|
5619
5687
|
* (Institutional), `005010X224A2` (Dental); X12 005010 base spec for
|
|
5620
5688
|
* envelope + cross-cutting segments (NM1, N3, N4, REF, PER, DTP, AMT).
|
|
5621
5689
|
*
|
|
5622
|
-
*
|
|
5690
|
+
* Known limitations (documented in CHANGELOG):
|
|
5623
5691
|
* - **Loop 2320/2330 (Other Subscriber / Other Payer)** captured at the
|
|
5624
5692
|
* surface level only: SBR-01 payer responsibility code and the
|
|
5625
5693
|
* adjacent NM1*IL / NM1*PR entities. Detailed CAS / OI / MOA
|
|
5626
|
-
* breakdown inside Loop 2320 is deferred to
|
|
5627
|
-
* tolerance).
|
|
5694
|
+
* breakdown inside Loop 2320 is deferred to the profile system
|
|
5695
|
+
* (companion-guide tolerance).
|
|
5628
5696
|
* - **Loop 2410 (Drug Identification, 837P)** captures LIN qualifier +
|
|
5629
5697
|
* code and the optional CTP quantity + UCUM unit. REF inside 2410 is
|
|
5630
5698
|
* preserved on tx.segments verbatim but not typed onto the model.
|
|
@@ -5634,8 +5702,8 @@ interface X12LineAdjudication {
|
|
|
5634
5702
|
* - **CN1 contract information** preserved on tx.segments verbatim, not
|
|
5635
5703
|
* typed onto the model.
|
|
5636
5704
|
* - **Companion-guide enforcement** (e.g. Availity's required REF*EA at
|
|
5637
|
-
* the billing provider) deferred to
|
|
5638
|
-
* - **Builder** (`build837P`/`I`/`D`)
|
|
5705
|
+
* the billing provider) deferred to the profile system.
|
|
5706
|
+
* - **Builder** (`build837P`/`I`/`D`) shipped separately.
|
|
5639
5707
|
*
|
|
5640
5708
|
* None of these are silent - verbatim segments remain on
|
|
5641
5709
|
* `tx.segments` so a consumer can drop down to raw element access for
|
|
@@ -5668,7 +5736,7 @@ declare const HL_LEVEL_CODES: Readonly<{
|
|
|
5668
5736
|
* Loop 2310x / 2420x line-provider verbatim bucket. Frozen for type
|
|
5669
5737
|
* safety + IntelliSense - consumers should rarely need these (they're a
|
|
5670
5738
|
* walker-internal vocabulary), but they're exported for tests + the
|
|
5671
|
-
*
|
|
5739
|
+
* builder API. @example NM1_QUALIFIERS.BILLING_PROVIDER → "85".
|
|
5672
5740
|
*/
|
|
5673
5741
|
declare const NM1_QUALIFIERS: Readonly<{
|
|
5674
5742
|
readonly SUBMITTER: "41";
|
|
@@ -5922,7 +5990,7 @@ interface Build837ReferenceSpec {
|
|
|
5922
5990
|
* Note: when used as a claim-level (2310x) or service-line (2420x) provider,
|
|
5923
5991
|
* only the NM1 fields round-trip through `get837Claims`; an attached
|
|
5924
5992
|
* `address` / `contacts` / `references` is emitted but the read side does
|
|
5925
|
-
* not re-surface it on the provider (a documented
|
|
5993
|
+
* not re-surface it on the provider (a documented read limitation).
|
|
5926
5994
|
*
|
|
5927
5995
|
* @example
|
|
5928
5996
|
* ```ts
|
|
@@ -6704,8 +6772,8 @@ declare class Claim837BuildError extends Error {
|
|
|
6704
6772
|
|
|
6705
6773
|
/**
|
|
6706
6774
|
* 837 TR3 loop specifications - authored through the **public**
|
|
6707
|
-
* {@link "../../loops/define.js".defineLoopSpec} API (the
|
|
6708
|
-
*
|
|
6775
|
+
* {@link "../../loops/define.js".defineLoopSpec} API (the dogfooding
|
|
6776
|
+
* gate: the built-in 837 loop hierarchy goes through the SAME
|
|
6709
6777
|
* factory consumers use for payer-specific companion-guide loops).
|
|
6710
6778
|
*
|
|
6711
6779
|
* Three variants share most of the structure; differences are concentrated
|
|
@@ -6742,10 +6810,10 @@ declare class Claim837BuildError extends Error {
|
|
|
6742
6810
|
* SE
|
|
6743
6811
|
* ```
|
|
6744
6812
|
*
|
|
6745
|
-
*
|
|
6813
|
+
* The three loop specs are surfaced as frozen artifacts (consumers can
|
|
6746
6814
|
* read them and assert they match their companion-guide expectations); the
|
|
6747
6815
|
* walker in `./get-837.ts` consults them to guide its state machine.
|
|
6748
|
-
*
|
|
6816
|
+
* The profile system overlays vendor-specific quirks on top.
|
|
6749
6817
|
*/
|
|
6750
6818
|
|
|
6751
6819
|
/**
|
|
@@ -7264,7 +7332,7 @@ interface X12EligibilityAddress {
|
|
|
7264
7332
|
* captured verbatim onto its enclosing subscriber / dependent so a
|
|
7265
7333
|
* provider can re-associate the response with the 270 request it sent.
|
|
7266
7334
|
*
|
|
7267
|
-
*
|
|
7335
|
+
* Known limitations (documented in CHANGELOG):
|
|
7268
7336
|
* - **AAA request-validation segments** (rejection reasons at the source /
|
|
7269
7337
|
* receiver / subscriber level) are preserved on `tx.segments` verbatim
|
|
7270
7338
|
* but not yet typed onto the model.
|
|
@@ -7875,7 +7943,7 @@ declare class Eligibility271BuildError extends Error {
|
|
|
7875
7943
|
/**
|
|
7876
7944
|
* 271 TR3 `005010X279A1` loop specification - authored through the
|
|
7877
7945
|
* **public** {@link "../../loops/define.js".defineLoopSpec} API. This is
|
|
7878
|
-
* the
|
|
7946
|
+
* the dogfooding gate: the built-in 271 loop hierarchy goes
|
|
7879
7947
|
* through the SAME factory consumers use for payer-specific companion-
|
|
7880
7948
|
* guide loops, so a regression in `defineLoopSpec` cannot hide from the
|
|
7881
7949
|
* built-in extractor.
|
|
@@ -7900,7 +7968,7 @@ declare class Eligibility271BuildError extends Error {
|
|
|
7900
7968
|
* ```
|
|
7901
7969
|
*
|
|
7902
7970
|
* @remarks
|
|
7903
|
-
*
|
|
7971
|
+
* The loop spec is surfaced as a frozen artifact (consumers can read
|
|
7904
7972
|
* it and assert it matches their companion-guide expectations); the walker
|
|
7905
7973
|
* in `./get-271.ts` consults the HL level codes to guide its state
|
|
7906
7974
|
* machine. Loop 2110C and 2110D share the identical EB-anchored shape - a
|
|
@@ -8274,7 +8342,7 @@ interface X12ServiceLineStatus {
|
|
|
8274
8342
|
* verbatim value and emit `X12_UNKNOWN_CLAIM_STATUS_CATEGORY` /
|
|
8275
8343
|
* `X12_UNKNOWN_CLAIM_STATUS`.
|
|
8276
8344
|
*
|
|
8277
|
-
*
|
|
8345
|
+
* Known limitations (documented in CHANGELOG):
|
|
8278
8346
|
* - **QTY / AMT** claim-summary segments (claim count / amount roll-ups in
|
|
8279
8347
|
* a 277CA Loop 2200) are preserved on `tx.segments` verbatim but not yet
|
|
8280
8348
|
* typed onto the model.
|
|
@@ -8974,8 +9042,8 @@ declare class ClaimStatus277BuildError extends Error {
|
|
|
8974
9042
|
|
|
8975
9043
|
/**
|
|
8976
9044
|
* 277 / 277CA loop specification - authored through the **public**
|
|
8977
|
-
* {@link "../../loops/define.js".defineLoopSpec} API (the
|
|
8978
|
-
*
|
|
9045
|
+
* {@link "../../loops/define.js".defineLoopSpec} API (the dogfooding
|
|
9046
|
+
* gate). The 277 Claim Status Response (`005010X212`) and the
|
|
8979
9047
|
* 277CA Claim Acknowledgment (`005010X214`) share the same HL spine
|
|
8980
9048
|
* (`20` Information Source → `21` Information Receiver → `19` Service
|
|
8981
9049
|
* Provider → `22` Subscriber → `23` Dependent) and the same STC-anchored
|
|
@@ -10357,7 +10425,7 @@ interface X12EnrollmentAmount {
|
|
|
10357
10425
|
* `tx.segments` up front. The memory win is on the RESULT side - a consumer
|
|
10358
10426
|
* processing a hundreds-of-MB 834 holds one decoded member at a time, not
|
|
10359
10427
|
* the whole decoded roster. A true file→iterator streaming parser is a v2
|
|
10360
|
-
* item
|
|
10428
|
+
* item.
|
|
10361
10429
|
*
|
|
10362
10430
|
* Spec source: WPC TR3 `005010X220A1`.
|
|
10363
10431
|
*/
|
|
@@ -11294,7 +11362,7 @@ interface X12AuthDate {
|
|
|
11294
11362
|
* {@link "../shared/hl.js".validateHl}; the `EV` / `SS` event + service
|
|
11295
11363
|
* levels are intentionally tolerant (omitted from the expected-parent map).
|
|
11296
11364
|
*
|
|
11297
|
-
*
|
|
11365
|
+
* Known limitations (documented in CHANGELOG):
|
|
11298
11366
|
* - **Detailed 2010E provider sub-loops** (rendering / attending / operating
|
|
11299
11367
|
* provider address + secondary IDs) are captured as bare NM1 entities on
|
|
11300
11368
|
* {@link X12ServiceReview.providers}, not split by role.
|
|
@@ -11939,7 +12007,7 @@ declare class ServicesReview278BuildError extends Error {
|
|
|
11939
12007
|
/**
|
|
11940
12008
|
* 278 TR3 `005010X217` (request) / `005010X216` (response) loop
|
|
11941
12009
|
* specification - authored through the **public** {@link
|
|
11942
|
-
* "../../loops/define.js".defineLoopSpec} API (the
|
|
12010
|
+
* "../../loops/define.js".defineLoopSpec} API (the dogfooding gate).
|
|
11943
12011
|
* The built-in 278 HL hierarchy goes through the SAME factory consumers use
|
|
11944
12012
|
* for payer-specific companion-guide loops.
|
|
11945
12013
|
*
|
|
@@ -11972,7 +12040,7 @@ declare class ServicesReview278BuildError extends Error {
|
|
|
11972
12040
|
* warnings. Detailed sub-loops (PWK attachments, the full 2010E provider
|
|
11973
12041
|
* family, HSD service-delivery, SV1/SV2/SV3 line detail) are preserved
|
|
11974
12042
|
* verbatim on `tx.segments` but not yet destructured onto the model - a
|
|
11975
|
-
* documented
|
|
12043
|
+
* documented limitation.
|
|
11976
12044
|
*/
|
|
11977
12045
|
|
|
11978
12046
|
/**
|
|
@@ -12345,7 +12413,7 @@ type Ta1AckCode = (typeof TA1_ACK_CODES)[keyof typeof TA1_ACK_CODES];
|
|
|
12345
12413
|
* are defined by the standard; values past `028` exist in some standard
|
|
12346
12414
|
* revisions and are accepted on parse (Postel's Law) but not enumerated
|
|
12347
12415
|
* here - the parsed model carries the un-narrowed string on `noteCodeRaw`,
|
|
12348
|
-
* post-`?`-unescape as of
|
|
12416
|
+
* post-`?`-unescape as of a later release. **A clause here said "verbatim"
|
|
12349
12417
|
* and is deleted rather than reworded**; `raw.elements[5]` is the byte surface.
|
|
12350
12418
|
*
|
|
12351
12419
|
* `000` is the canonical "no error" note paired with a `TA1-04 == 'A'`
|
|
@@ -12426,14 +12494,14 @@ declare const TA1_NOTE_CODES: {
|
|
|
12426
12494
|
* `028` (some revisions extend the list); `parseTA1` exposes the
|
|
12427
12495
|
* un-narrowed string on `noteCodeRaw` in that case, so the value survives
|
|
12428
12496
|
* even when the union cannot statically type it. **It is post-`?`-unescape
|
|
12429
|
-
* as of
|
|
12497
|
+
* as of a later release, and a clause here calling it VERBATIM is
|
|
12430
12498
|
* deleted rather than reworded** - `raw.elements[5]` is the byte surface.
|
|
12431
12499
|
*/
|
|
12432
12500
|
type Ta1NoteCode = (typeof TA1_NOTE_CODES)[keyof typeof TA1_NOTE_CODES];
|
|
12433
12501
|
|
|
12434
12502
|
/**
|
|
12435
12503
|
* Typed-model surface for the X12 acknowledgment transactions surfaced
|
|
12436
|
-
* by
|
|
12504
|
+
* by this package - `005010X231A1` 999 (Implementation Acknowledgment) and the
|
|
12437
12505
|
* envelope-level TA1 (Interchange Acknowledgment).
|
|
12438
12506
|
*
|
|
12439
12507
|
* Two kinds of types live here:
|
|
@@ -12570,7 +12638,7 @@ interface X12Ack999Ik4 {
|
|
|
12570
12638
|
* One IK4 element-level error wrapped with its (optional) IK3-paired CTX
|
|
12571
12639
|
* context strings - surfaced verbatim because CTX uses a composite syntax
|
|
12572
12640
|
* the X231A1 implementer typically writes as `ELEMENT*NM1*8*1`. The
|
|
12573
|
-
* library does not try to over-decompose the CTX value
|
|
12641
|
+
* library does not try to over-decompose the CTX value.
|
|
12574
12642
|
*/
|
|
12575
12643
|
interface X12Ack999ElementNote {
|
|
12576
12644
|
readonly ik4: X12Ack999Ik4;
|
|
@@ -12652,7 +12720,7 @@ interface X12Ack999 {
|
|
|
12652
12720
|
* ({@link Ta1NoteCode}); `noteCodeRaw` carries the un-narrowed string
|
|
12653
12721
|
* alongside so unknown extensions survive. **A clause here said that
|
|
12654
12722
|
* string is preserved VERBATIM and is deleted, not reworded:**
|
|
12655
|
-
*
|
|
12723
|
+
* a later release made it post-unescape, and `raw.elements[5]` is
|
|
12656
12724
|
* the verbatim surface.
|
|
12657
12725
|
* - `noteCodeRaw` - the un-narrowed TA1-05 string. Equal to `noteCode` when
|
|
12658
12726
|
* the value is a known I18 code; equal to the decoded inbound text when
|
|
@@ -12661,7 +12729,7 @@ interface X12Ack999 {
|
|
|
12661
12729
|
* byte-exact round-trip.
|
|
12662
12730
|
*
|
|
12663
12731
|
* **The five decoded fields are POST-`?`-unescape; `raw` is the verbatim
|
|
12664
|
-
* byte surface and is not.**
|
|
12732
|
+
* byte surface and is not.** A later release moved the decoded half:
|
|
12665
12733
|
* before it, a released TA1-01 read back carrying its `?` and matched no
|
|
12666
12734
|
* ISA-13, while every dot-path read of the same element already unescaped.
|
|
12667
12735
|
* Read `raw.elements` when you want the bytes.
|
|
@@ -12839,7 +12907,7 @@ declare function parse999(raw: string | Buffer, options?: X12ParseOptions): X12A
|
|
|
12839
12907
|
* TA1 is NOT a transaction set: per the ASC X12 standard it lives at the
|
|
12840
12908
|
* envelope level, between ISA and the first GS (or alone inside an
|
|
12841
12909
|
* ISA..IEA with no GS at all - the "TA1-only interchange" pattern). The
|
|
12842
|
-
*
|
|
12910
|
+
* envelope walker captures every envelope-level TA1 verbatim onto
|
|
12843
12911
|
* {@link X12Interchange.ta1Segments}; this function decodes the first
|
|
12844
12912
|
* one. Multiple TA1 acks for prior interchanges may co-exist on a single
|
|
12845
12913
|
* inbound - pass `index` to read the Nth, or scan `ta1Segments` directly.
|
|
@@ -12925,7 +12993,7 @@ declare function build999(spec: Build999Spec): X12Interchange;
|
|
|
12925
12993
|
* safety invariant as `build999`.
|
|
12926
12994
|
*
|
|
12927
12995
|
* Returns the typed {@link Ta1Segment} (matching the envelope-level shape
|
|
12928
|
-
* the
|
|
12996
|
+
* the envelope walker surfaces on
|
|
12929
12997
|
* {@link "../../parser/types.js".X12Interchange.ta1Segments}). Callers that
|
|
12930
12998
|
* want a complete on-the-wire byte stream concatenate `raw` + a segment
|
|
12931
12999
|
* terminator, or wrap the segment inside their preferred envelope. The
|
|
@@ -12948,7 +13016,7 @@ declare function build999(spec: Build999Spec): X12Interchange;
|
|
|
12948
13016
|
* sender never resubmits against.
|
|
12949
13017
|
*
|
|
12950
13018
|
* The grounding is inside the package, not in a spec clause, which is the
|
|
12951
|
-
* same tiebreak
|
|
13019
|
+
* same tiebreak the envelope splitter fix recorded: one
|
|
12952
13020
|
* function disagreed with itself. This module emitted bytes that this
|
|
12953
13021
|
* package's own reader decoded into a different disposition than the one
|
|
12954
13022
|
* the caller asked for, and every other builder already released the same
|
|
@@ -12988,7 +13056,7 @@ declare function build999(spec: Build999Spec): X12Interchange;
|
|
|
12988
13056
|
* through it.** No total is published: that is what was measured, not a
|
|
12989
13057
|
* closed account.
|
|
12990
13058
|
* **🩺 A CLAUSE NAMING `parseTA1`'s FIELDS AS A THIRD SUCH SURFACE STOOD
|
|
12991
|
-
* HERE AND IS DELETED, NOT REWORDED.**
|
|
13059
|
+
* HERE AND IS DELETED, NOT REWORDED.** A later release made those
|
|
12992
13060
|
* fields post-unescape, so it is measured false; do not restate it.
|
|
12993
13061
|
* - **A caller who was pre-releasing the value themselves** (the remedy
|
|
12994
13062
|
* `KNOWN-LIMITATIONS.md` named while this was open) is now escaping
|
|
@@ -13000,14 +13068,14 @@ declare function build999(spec: Build999Spec): X12Interchange;
|
|
|
13000
13068
|
* **And an EMPTY control number USED to go out unrefused.** `escapeRelease`
|
|
13001
13069
|
* early-returns on `""` and this module had no required-field guard, so
|
|
13002
13070
|
* `interchangeControlNumber: ""` emitted `TA1**260601*1200*A*000` with no
|
|
13003
|
-
* error, through `0.0.15`.
|
|
13071
|
+
* error, through `0.0.15`. A later release closed it:
|
|
13004
13072
|
* see {@link "../../builder/caller-control-number.js".requireControlNumber}.
|
|
13005
|
-
*
|
|
13073
|
+
* A later one still then made the same guard
|
|
13006
13074
|
* type-check, so TA1-01 draws a refusal naming TA1-01 rather than the escaper's
|
|
13007
13075
|
* one naming only the builder - same class, same code, different words. The
|
|
13008
13076
|
* guard is still byte-strict, so a whitespace-only TA1-01 still builds.
|
|
13009
13077
|
*
|
|
13010
|
-
* **The other four slots were left open by that
|
|
13078
|
+
* **The other four slots were left open by that change and a later one
|
|
13011
13079
|
* closes them.** TA1-01's guard was the only required-field guard this module
|
|
13012
13080
|
* had, so `interchangeDate`, `interchangeTime`, `ackCode` and `noteCode` each
|
|
13013
13081
|
* emitted an absent element on `""` with `warnings: []`. **TA1-05's cell has to
|
|
@@ -13259,7 +13327,7 @@ declare function serializeX12(interchange: X12Interchange, opts?: SerializeOptio
|
|
|
13259
13327
|
* counts), so the caller never hand-counts a segment total or a group total.
|
|
13260
13328
|
*
|
|
13261
13329
|
* The domain-specific builders (`build835`, `build837P`, …) sit ON TOP of
|
|
13262
|
-
* this primitive
|
|
13330
|
+
* this primitive: each maps its typed domain model down to
|
|
13263
13331
|
* {@link TransactionSetSpec} segment arrays and delegates the envelope to
|
|
13264
13332
|
* `buildInterchange`. This file is the shared floor they all stand on.
|
|
13265
13333
|
*/
|
|
@@ -13441,9 +13509,9 @@ declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
|
|
|
13441
13509
|
*
|
|
13442
13510
|
* ## The names say `BUILD_REFUSAL_*` and the scope is wider than that
|
|
13443
13511
|
*
|
|
13444
|
-
* The two exported constants were introduced by
|
|
13445
|
-
*
|
|
13446
|
-
*
|
|
13512
|
+
* The two exported constants were introduced by a change that bounded the
|
|
13513
|
+
* `build*` sites only, and they are published under those names. A later one
|
|
13514
|
+
* then routed `src/profiles/validate.ts` through
|
|
13447
13515
|
* the same renderers, so `X12ProfileError` is bounded by the same numbers.
|
|
13448
13516
|
* **The names were deliberately NOT changed**: one ceiling under one name
|
|
13449
13517
|
* cannot drift, whereas a second name for the same number is exactly how two
|
|
@@ -13498,7 +13566,7 @@ declare function buildInterchange(spec: InterchangeSpec): X12Interchange;
|
|
|
13498
13566
|
* newline. A refusal message is therefore bounded but not guaranteed to be a
|
|
13499
13567
|
* single log line. Escaping was considered and left out: it would expand the
|
|
13500
13568
|
* rendered length by up to 6x per character for a hazard the caller creates
|
|
13501
|
-
* in their own data, and this
|
|
13569
|
+
* in their own data, and this bound makes the claim it can support and no
|
|
13502
13570
|
* wider.
|
|
13503
13571
|
*
|
|
13504
13572
|
* @see `src/parser/errors.ts` for the parse-side `SNIPPET_MAX_INPUT` bound this
|
|
@@ -13769,7 +13837,7 @@ interface X12WarningPartition {
|
|
|
13769
13837
|
declare function partitionWarnings(warnings: readonly X12ParseWarning[], profile: X12Profile): X12WarningPartition;
|
|
13770
13838
|
|
|
13771
13839
|
/**
|
|
13772
|
-
* Error taxonomy for the `@cosyte/x12` profile subsystem
|
|
13840
|
+
* Error taxonomy for the `@cosyte/x12` profile subsystem.
|
|
13773
13841
|
*
|
|
13774
13842
|
* `X12ProfileError` is thrown by `defineProfile()` when a profile definition
|
|
13775
13843
|
* is structurally invalid - a bad/missing name, an unknown option key, or a
|
|
@@ -13858,7 +13926,7 @@ declare const availity: X12Profile;
|
|
|
13858
13926
|
declare const bcbsCommon: X12Profile;
|
|
13859
13927
|
|
|
13860
13928
|
/**
|
|
13861
|
-
* Public barrel for the `@cosyte/x12` profile subsystem
|
|
13929
|
+
* Public barrel for the `@cosyte/x12` profile subsystem. Assembles
|
|
13862
13930
|
* the `profiles` namespace object and re-exports the public profile API:
|
|
13863
13931
|
* `defineProfile`, `setDefaultProfile`, `getDefaultProfile`,
|
|
13864
13932
|
* `partitionWarnings`, the `X12ProfileError` class, and the supporting types.
|
|
@@ -13893,15 +13961,15 @@ declare const profiles: {
|
|
|
13893
13961
|
};
|
|
13894
13962
|
|
|
13895
13963
|
/**
|
|
13896
|
-
* Public entry point for the `@cosyte/x12` package.
|
|
13897
|
-
*
|
|
13898
|
-
*
|
|
13899
|
-
*
|
|
13900
|
-
* (`get835`, `get837Claims`, ...)
|
|
13964
|
+
* Public entry point for the `@cosyte/x12` package. It lands the envelope
|
|
13965
|
+
* decoder (ISA / GS / GE / IEA + delimiter detection), segment/element/
|
|
13966
|
+
* composite decode, the warning-code registry, and the public
|
|
13967
|
+
* `defineLoopSpec`. Per-transaction helpers
|
|
13968
|
+
* (`get835`, `get837Claims`, ...) sit on top of it.
|
|
13901
13969
|
*/
|
|
13902
13970
|
/**
|
|
13903
|
-
* Library version string, synced with `package.json#version`
|
|
13904
|
-
*
|
|
13971
|
+
* Library version string, synced with `package.json#version` by the
|
|
13972
|
+
* release's version step. Exported now so consumers (and the
|
|
13905
13973
|
* type-check pipeline) have at least one symbol to resolve through the
|
|
13906
13974
|
* `exports` map.
|
|
13907
13975
|
*
|
|
@@ -13913,4 +13981,4 @@ declare const profiles: {
|
|
|
13913
13981
|
*/
|
|
13914
13982
|
declare const VERSION: string;
|
|
13915
13983
|
|
|
13916
|
-
export { ACK_BUILD_ERROR_CODES, ALL_WARNING_MESSAGES, AUTH_278_BUILD_ERROR_CODES, AUTH_278_LOOP_2000A, AUTH_278_LOOP_2000B, AUTH_278_LOOP_2000C, AUTH_278_LOOP_2000D, AUTH_278_LOOP_2000E, AUTH_278_LOOP_2000F, AckBuildError, type AckBuildErrorCode, BALANCE_INVARIANTS, BUILD_REFUSAL_VALUE_MAX_LENGTH, BUILD_REFUSAL_VALUE_MAX_RENDERED, type Build271AddressSpec, type Build271BenefitSpec, type Build271DateSpec, type Build271DependentSpec, type Build271EntitySpec, type Build271EnvelopeSpec, type Build271InformationReceiverSpec, type Build271InformationSourceSpec, type Build271MemberSpec, type Build271ReferenceSpec, type Build271ServiceTypeSpec, type Build271Spec, type Build271SubscriberSpec, type Build271TraceSpec, type Build277ClaimSpec, type Build277DateSpec, type Build277DependentSpec, type Build277EntitySpec, type Build277EnvelopeSpec, type Build277InformationReceiverSpec, type Build277InformationSourceSpec, type Build277MemberSpec, type Build277ProviderSpec, type Build277ReferenceSpec, type Build277ServiceLineSpec, type Build277Spec, type Build277StatusCodeSpec, type Build277StatusSpec, type Build277SubscriberSpec, type Build277TraceSpec, type Build278DateSpec, type Build278DecisionSpec, type Build278DependentSpec, type Build278DiagnosisSpec, type Build278EntitySpec, type Build278EnvelopeSpec, type Build278HeaderSpec, type Build278MemberSpec, type Build278ReferenceSpec, type Build278ReviewSpec, type Build278Spec, type Build278SubscriberSpec, type Build278TraceSpec, type Build820AddressSpec, type Build820AdjustmentSpec, type Build820DateSpec, type Build820EntitySpec, type Build820EnvelopeSpec, type Build820OpenItemSpec, type Build820PartySpec, type Build820PaymentSpec, type Build820PersonSpec, type Build820ReferenceSpec, type Build820RemittanceSpec, type Build820Spec, type Build820TraceSpec, type Build834AddressSpec, type Build834AmountSpec, type Build834CoordinationOfBenefitsSpec, type Build834CoverageSpec, type Build834DateSpec, type Build834EnvelopeSpec, type Build834HeaderSpec, type Build834MemberNameSpec, type Build834MemberSpec, type Build834PartySpec, type Build834ReferenceSpec, type Build834Spec, type Build835AddressSpec, type Build835AdjustmentSpec, type Build835AmountSpec, type Build835ClaimSpec, type Build835ContactSpec, type Build835EnvelopeSpec, type Build835PartySpec, type Build835PaymentSpec, type Build835PersonSpec, type Build835ProviderAdjustmentSpec, type Build835ProviderSpec, type Build835ReferenceSpec, type Build835RemarkSpec, type Build835ServiceLineSpec, type Build835Spec, type Build835TraceSpec, type Build837AddressSpec, type Build837AdjudicationSpec, type Build837AdjustmentSpec, type Build837AmountSpec, type Build837BillingProviderSpec, type Build837ClaimSpec, type Build837ContactSpec, type Build837DateSpec, type Build837DrugSpec, type Build837EntitySpec, type Build837EnvelopeSpec, type Build837HiCodeSpec, type Build837NoteSpec, type Build837OtherSubscriberSpec, type Build837PatientSpec, type Build837ReferenceSpec, type Build837ServiceLineBaseSpec, type Build837ServiceLineDentalSpec, type Build837ServiceLineInstitutionalSpec, type Build837ServiceLineProfessionalSpec, type Build837ServiceLineSpec, type Build837Spec, type Build837SubscriberInfoSpec, type Build837SubscriberSpec, type Build837ToothSpec, type Build999ElementErrorSpec, type Build999EnvelopeSpec, type Build999FunctionalGroupSpec, type Build999SegmentErrorSpec, type Build999Spec, type Build999TransactionResponseSpec, type BuildTA1Options, type BuildTA1Spec, CARC, CLAIM_837D_LOOP_2000A, CLAIM_837D_LOOP_2300, CLAIM_837D_LOOP_2400, CLAIM_837I_LOOP_2000A, CLAIM_837I_LOOP_2300, CLAIM_837I_LOOP_2400, CLAIM_837P_LOOP_2000A, CLAIM_837P_LOOP_2300, CLAIM_837P_LOOP_2400, CLAIM_837P_LOOP_2410, CLAIM_837_BUILD_ERROR_CODES, CLAIM_837_LOOP_1000A, CLAIM_837_LOOP_1000B, CLAIM_837_LOOP_2010AA, CLAIM_837_LOOP_2010BA, CLAIM_837_LOOP_2010BB, CLAIM_837_LOOP_2010CA, CLAIM_837_LOOP_2430, CLAIM_ADJUSTMENT_GROUP_CODES, CLAIM_STATUS_277_BUILD_ERROR_CODES, CLAIM_STATUS_CATEGORY_CODES, CLAIM_STATUS_CODES, CLP_STATUS, CONTROL_NUMBER_PAIRS, Claim837BuildError, type Claim837BuildErrorCode, type ClaimAdjustmentGroupCode, ClaimStatus277BuildError, type ClaimStatus277BuildErrorCode, type CodeListEntry, type CodeListMeta, type CodeListSnapshot, DELIMITER_POSITIONS, type DefineLoopSpecInput, type Delimiters, ELIGIBILITY_271_BUILD_ERROR_CODES, ELIGIBILITY_271_LOOP_2000A, ELIGIBILITY_271_LOOP_2000B, ELIGIBILITY_271_LOOP_2000C, ELIGIBILITY_271_LOOP_2000D, ELIGIBILITY_271_LOOP_2100C, ELIGIBILITY_271_LOOP_2100D, ELIGIBILITY_271_LOOP_2110, ENROLLMENT_834_BUILD_ERROR_CODES, ENROLLMENT_834_LOOP_1000A, ENROLLMENT_834_LOOP_1000B, ENROLLMENT_834_LOOP_2000, ENROLLMENT_834_LOOP_2100A, ENROLLMENT_834_LOOP_2300, ENROLLMENT_834_LOOP_2320, Eligibility271BuildError, type Eligibility271BuildErrorCode, Enrollment834BuildError, type Enrollment834BuildErrorCode, FATAL_CODES, type FunctionalGroupSpec, type GeSegment, type GsSegment, HI_QUALIFIERS, HL_LEVEL_CODES, IK3_SYNTAX_ERROR_CODES, IK4_SYNTAX_ERROR_CODES, ISA_MIN_LENGTH, type IeaSegment, type Ik304Code, type Ik403Code, type InterchangeSpec, type IsaSegment, type LoopMax, type LoopSegmentSpec, type LoopSpec, LoopSpecDefinitionError, type LoopUsage, MAINTENANCE_TYPE_CODES, NM1_QUALIFIERS, NON_SPEC_SEGMENT_ID, type OnWarningCallback, PREMIUM_820_BUILD_ERROR_CODES, PREMIUM_820_LOOP_1000A, PREMIUM_820_LOOP_1000B, PREMIUM_820_LOOP_2000A, PREMIUM_820_LOOP_2100A, PREMIUM_820_LOOP_2300A, PREMIUM_820_LOOP_2310A, Premium820BuildError, type Premium820BuildErrorCode, RARC, RELEASE_CHAR, REMIT_835_BUILD_ERROR_CODES, REMIT_835_LOOP_1000A, REMIT_835_LOOP_1000B, REMIT_835_LOOP_2000, REMIT_835_LOOP_2100, REMIT_835_LOOP_2110, REQUIRED_LOOPS, Remit835BuildError, type Remit835BuildErrorCode, SERVICE_TYPE_CODES, STATUS_277_LOOP_2000A, STATUS_277_LOOP_2000B, STATUS_277_LOOP_2000C, STATUS_277_LOOP_2000D, STATUS_277_LOOP_2000E, STATUS_277_LOOP_2200, STATUS_277_LOOP_2220, type SegmentSpec, type SerializeOptions, ServicesReview278BuildError, type ServicesReview278BuildErrorCode, TA1_ACK_CODES, TA1_NOTE_CODES, type Ta1AckCode, type Ta1NoteCode, type Ta1Segment, type TransactionSetSpec, UNEXPECTED_SEGMENT_CONTEXTS, VERSION, WARNING_CODES, type X12Ack999, type X12Ack999Ak1, type X12Ack999Ak2, type X12Ack999Ak9, type X12Ack999ElementNote, type X12Ack999Ik3, type X12Ack999Ik4, type X12Ack999Ik4Position, type X12Ack999Ik5, type X12Ack999SegmentNote, type X12Ack999TransactionResponse, type X12AckDispositionCode, type X12AckTA1, type X12AuthDate, type X12AuthDiagnosis, type X12AuthEntity, type X12AuthHeader, type X12AuthMember, type X12AuthReference, type X12AuthTrace, type X12BalanceInvariant, X12BuildError, type X12BuildErrorCode, type X12Claim, type X12Claim837Variant, type X12ClaimAddress, type X12ClaimAmount, type X12ClaimContact, type X12ClaimDate, type X12ClaimEntity, type X12ClaimHiCode, type X12ClaimMember, type X12ClaimNote, type X12ClaimReference, type X12ClaimStatus, type X12ClaimStatusResponse, type X12ControlNumberPair, type X12CoordinationOfBenefits, X12Decimal, type X12DecimalRead, type X12DecimalStatus, type X12DecimalWarningSink, type X12Eligibility, type X12EligibilityAddress, type X12EligibilityBenefit, type X12EligibilityDate, type X12EligibilityDependent, type X12EligibilityEntity, type X12EligibilityMember, type X12EligibilityReference, type X12EligibilityServiceType, type X12EligibilitySubscriber, type X12EligibilityTrace, type X12Enrollment, type X12EnrollmentAddress, type X12EnrollmentAmount, type X12EnrollmentDate, type X12EnrollmentHeader, type X12EnrollmentMember, type X12EnrollmentParty, type X12EnrollmentReference, type X12FatalCode, type X12FunctionalGroup, type X12HealthCoverage, type X12HiCategory, type X12HiCodeSystem, type X12HiQualifier, type X12HierarchicalLevel, type X12Hl, type X12Interchange, type X12LineAdjudication, type X12LineDrug, type X12OrphanAnchor, type X12OrphanAnchorKind, type X12OrphanSegment, type X12OtherSubscriber, X12ParseError, type X12ParseOptions, type X12ParseWarning, type X12Position, type X12PremiumAddress, type X12PremiumAdjustment, type X12PremiumDate, type X12PremiumEntity, type X12PremiumOpenItem, type X12PremiumParty, type X12PremiumPaymentHeader, type X12PremiumPayments, type X12PremiumPerson, type X12PremiumReference, type X12PremiumRemittance, type X12PremiumTrace, type X12Profile, type X12ProfileDescription, type X12ProfileEffect, X12ProfileError, type X12ProfileQuirk, type X12ProfileSpec, type X12RemitAddress, type X12RemitAdjustment, type X12RemitAmount, type X12RemitClaim, type X12RemitContact, type X12RemitParty, type X12RemitPaymentHeader, type X12RemitPerson, type X12RemitProvider, type X12RemitProviderAdjustment, type X12RemitReference, type X12RemitRemark, type X12RemitServiceLine, type X12RemitTrace, type X12Remittance, type X12RequiredLoop, type X12ReviewDecision, type X12Segment, type X12ServiceLineStatus, type X12ServiceReview, type X12ServicesReview, type X12StatusCode, type X12StatusDate, type X12StatusEntity, type X12StatusInfo, type X12StatusMember, type X12StatusReference, type X12StatusTrace, type X12SubscriberInfo, type X12ToothInformation, type X12TransactionSet, type X12UnexpectedSegmentContext, type X12WarningCode, type X12WarningPartition, type X12_837ServiceLine, type X12_837ServiceLineDental, type X12_837ServiceLineInstitutional, type X12_837ServiceLineProfessional, type X12_837Submission, X12_ACK_DISPOSITION_CODES, X12_BUILD_ERROR_CODES, ambiguous837Variant, amountRowDropped, balanceNotEvaluable, build271, build277, build277CA, build278Request, build278Response, build820, build834, build835, build837D, build837I, build837P, build999, buildInterchange, buildTA1, checkClaimBalance, checkRemitTotalBalance, checkServiceLineBalance, collectElementValues, componentOptional, controlNumberMismatch, danglingReleaseChar, decodeSegment, defineLoopSpec, defineProfile, detectDelimiters, elementDecimal, elementDecimalOrZero, elementOptional, elementValue, entitySegmentDiscardedAfterLx, escapeRelease, get271Eligibility, get277CADisposition, get277Status, get278Request, get278Response, get820Payments, get834Enrollments, get834Header, get835, get837Claims, getAllSegmentValues, getDefaultProfile, getSegmentValue, groupCountMismatch, hlParentLevelInvalid, hlParentMismatch, isAcceptDisposition, isClaimAdjustmentGroupCode, isDiagnosisQualifier, isProcedureQualifier, lookupCarc, lookupClaimStatus, lookupClaimStatusCategory, lookupClpStatus, lookupMaintenanceType, lookupRarc, lookupServiceType, missingGe, missingIea, missingRequiredLoop, missingSe, parse999, parseTA1, parseX12, partitionWarnings, payToAddressRepeated, pre005010, profiles, readElementDecimal, remitBalanceMismatch, renderCallerValue, resolveHiQualifier, segmentCountMismatch, serializeX12, serviceLineDropped, serviceLineNotDecoded, serviceSegmentRepeated, serviceSegmentWithoutLx, setDefaultProfile, statedAmountDiscarded, trailingGarbage, transactionCountMismatch, unescapeRelease, unexpectedSegment, unknown837Variant, unknownCarc, unknownClaimStatus, unknownClaimStatusCategory, unknownHiQualifier, unknownMaintenanceType, unknownRarc, unparseableDecimal };
|
|
13984
|
+
export { ACK_BUILD_ERROR_CODES, ALL_WARNING_MESSAGES, AUTH_278_BUILD_ERROR_CODES, AUTH_278_LOOP_2000A, AUTH_278_LOOP_2000B, AUTH_278_LOOP_2000C, AUTH_278_LOOP_2000D, AUTH_278_LOOP_2000E, AUTH_278_LOOP_2000F, AckBuildError, type AckBuildErrorCode, BALANCE_INVARIANTS, BUILD_REFUSAL_VALUE_MAX_LENGTH, BUILD_REFUSAL_VALUE_MAX_RENDERED, type Build271AddressSpec, type Build271BenefitSpec, type Build271DateSpec, type Build271DependentSpec, type Build271EntitySpec, type Build271EnvelopeSpec, type Build271InformationReceiverSpec, type Build271InformationSourceSpec, type Build271MemberSpec, type Build271ReferenceSpec, type Build271ServiceTypeSpec, type Build271Spec, type Build271SubscriberSpec, type Build271TraceSpec, type Build277ClaimSpec, type Build277DateSpec, type Build277DependentSpec, type Build277EntitySpec, type Build277EnvelopeSpec, type Build277InformationReceiverSpec, type Build277InformationSourceSpec, type Build277MemberSpec, type Build277ProviderSpec, type Build277ReferenceSpec, type Build277ServiceLineSpec, type Build277Spec, type Build277StatusCodeSpec, type Build277StatusSpec, type Build277SubscriberSpec, type Build277TraceSpec, type Build278DateSpec, type Build278DecisionSpec, type Build278DependentSpec, type Build278DiagnosisSpec, type Build278EntitySpec, type Build278EnvelopeSpec, type Build278HeaderSpec, type Build278MemberSpec, type Build278ReferenceSpec, type Build278ReviewSpec, type Build278Spec, type Build278SubscriberSpec, type Build278TraceSpec, type Build820AddressSpec, type Build820AdjustmentSpec, type Build820DateSpec, type Build820EntitySpec, type Build820EnvelopeSpec, type Build820OpenItemSpec, type Build820PartySpec, type Build820PaymentSpec, type Build820PersonSpec, type Build820ReferenceSpec, type Build820RemittanceSpec, type Build820Spec, type Build820TraceSpec, type Build834AddressSpec, type Build834AmountSpec, type Build834CoordinationOfBenefitsSpec, type Build834CoverageSpec, type Build834DateSpec, type Build834EnvelopeSpec, type Build834HeaderSpec, type Build834MemberNameSpec, type Build834MemberSpec, type Build834PartySpec, type Build834ReferenceSpec, type Build834Spec, type Build835AddressSpec, type Build835AdjustmentSpec, type Build835AmountSpec, type Build835ClaimSpec, type Build835ContactSpec, type Build835EnvelopeSpec, type Build835PartySpec, type Build835PaymentSpec, type Build835PersonSpec, type Build835ProviderAdjustmentSpec, type Build835ProviderSpec, type Build835ReferenceSpec, type Build835RemarkSpec, type Build835ServiceLineSpec, type Build835Spec, type Build835TraceSpec, type Build837AddressSpec, type Build837AdjudicationSpec, type Build837AdjustmentSpec, type Build837AmountSpec, type Build837BillingProviderSpec, type Build837ClaimSpec, type Build837ContactSpec, type Build837DateSpec, type Build837DrugSpec, type Build837EntitySpec, type Build837EnvelopeSpec, type Build837HiCodeSpec, type Build837NoteSpec, type Build837OtherSubscriberSpec, type Build837PatientSpec, type Build837ReferenceSpec, type Build837ServiceLineBaseSpec, type Build837ServiceLineDentalSpec, type Build837ServiceLineInstitutionalSpec, type Build837ServiceLineProfessionalSpec, type Build837ServiceLineSpec, type Build837Spec, type Build837SubscriberInfoSpec, type Build837SubscriberSpec, type Build837ToothSpec, type Build999ElementErrorSpec, type Build999EnvelopeSpec, type Build999FunctionalGroupSpec, type Build999SegmentErrorSpec, type Build999Spec, type Build999TransactionResponseSpec, type BuildTA1Options, type BuildTA1Spec, CARC, CLAIM_837D_LOOP_2000A, CLAIM_837D_LOOP_2300, CLAIM_837D_LOOP_2400, CLAIM_837I_LOOP_2000A, CLAIM_837I_LOOP_2300, CLAIM_837I_LOOP_2400, CLAIM_837P_LOOP_2000A, CLAIM_837P_LOOP_2300, CLAIM_837P_LOOP_2400, CLAIM_837P_LOOP_2410, CLAIM_837_BUILD_ERROR_CODES, CLAIM_837_LOOP_1000A, CLAIM_837_LOOP_1000B, CLAIM_837_LOOP_2010AA, CLAIM_837_LOOP_2010BA, CLAIM_837_LOOP_2010BB, CLAIM_837_LOOP_2010CA, CLAIM_837_LOOP_2430, CLAIM_ADJUSTMENT_GROUP_CODES, CLAIM_STATUS_277_BUILD_ERROR_CODES, CLAIM_STATUS_CATEGORY_CODES, CLAIM_STATUS_CODES, CLP_STATUS, CONTROL_NUMBER_PAIRS, Claim837BuildError, type Claim837BuildErrorCode, type ClaimAdjustmentGroupCode, ClaimStatus277BuildError, type ClaimStatus277BuildErrorCode, type CodeListEntry, type CodeListMeta, type CodeListSnapshot, DELIMITER_POSITIONS, type DefineLoopSpecInput, type Delimiters, ELIGIBILITY_271_BUILD_ERROR_CODES, ELIGIBILITY_271_LOOP_2000A, ELIGIBILITY_271_LOOP_2000B, ELIGIBILITY_271_LOOP_2000C, ELIGIBILITY_271_LOOP_2000D, ELIGIBILITY_271_LOOP_2100C, ELIGIBILITY_271_LOOP_2100D, ELIGIBILITY_271_LOOP_2110, ENROLLMENT_834_BUILD_ERROR_CODES, ENROLLMENT_834_LOOP_1000A, ENROLLMENT_834_LOOP_1000B, ENROLLMENT_834_LOOP_2000, ENROLLMENT_834_LOOP_2100A, ENROLLMENT_834_LOOP_2300, ENROLLMENT_834_LOOP_2320, Eligibility271BuildError, type Eligibility271BuildErrorCode, Enrollment834BuildError, type Enrollment834BuildErrorCode, FATAL_CODES, type FunctionalGroupSpec, type GeSegment, type GsSegment, HI_QUALIFIERS, HL_LEVEL_CODES, IK3_SYNTAX_ERROR_CODES, IK4_SYNTAX_ERROR_CODES, ISA_MIN_LENGTH, type IeaSegment, type Ik304Code, type Ik403Code, type InterchangeSpec, type IsaSegment, type LoopMax, type LoopSegmentSpec, type LoopSpec, LoopSpecDefinitionError, type LoopUsage, MAINTENANCE_TYPE_CODES, NM1_QUALIFIERS, NON_SPEC_SEGMENT_ID, type OnWarningCallback, PREMIUM_820_BUILD_ERROR_CODES, PREMIUM_820_LOOP_1000A, PREMIUM_820_LOOP_1000B, PREMIUM_820_LOOP_2000A, PREMIUM_820_LOOP_2100A, PREMIUM_820_LOOP_2300A, PREMIUM_820_LOOP_2310A, Premium820BuildError, type Premium820BuildErrorCode, RARC, RELEASE_CHAR, REMIT_835_BUILD_ERROR_CODES, REMIT_835_LOOP_1000A, REMIT_835_LOOP_1000B, REMIT_835_LOOP_2000, REMIT_835_LOOP_2100, REMIT_835_LOOP_2110, REQUIRED_LOOPS, Remit835BuildError, type Remit835BuildErrorCode, SERVICE_TYPE_CODES, STATUS_277_LOOP_2000A, STATUS_277_LOOP_2000B, STATUS_277_LOOP_2000C, STATUS_277_LOOP_2000D, STATUS_277_LOOP_2000E, STATUS_277_LOOP_2200, STATUS_277_LOOP_2220, type SegmentSpec, type SerializeOptions, ServicesReview278BuildError, type ServicesReview278BuildErrorCode, TA1_ACK_CODES, TA1_NOTE_CODES, type Ta1AckCode, type Ta1NoteCode, type Ta1Segment, type TransactionSetSpec, UNEXPECTED_SEGMENT_CONTEXTS, VERSION, WARNING_CODES, type X12Ack999, type X12Ack999Ak1, type X12Ack999Ak2, type X12Ack999Ak9, type X12Ack999ElementNote, type X12Ack999Ik3, type X12Ack999Ik4, type X12Ack999Ik4Position, type X12Ack999Ik5, type X12Ack999SegmentNote, type X12Ack999TransactionResponse, type X12AckDispositionCode, type X12AckTA1, type X12AuthDate, type X12AuthDiagnosis, type X12AuthEntity, type X12AuthHeader, type X12AuthMember, type X12AuthReference, type X12AuthTrace, type X12BalanceInvariant, X12BuildError, type X12BuildErrorCode, type X12Claim, type X12Claim837Variant, type X12ClaimAddress, type X12ClaimAmount, type X12ClaimContact, type X12ClaimDate, type X12ClaimEntity, type X12ClaimHiCode, type X12ClaimMember, type X12ClaimNote, type X12ClaimReference, type X12ClaimStatus, type X12ClaimStatusResponse, type X12ControlNumberPair, type X12CoordinationOfBenefits, X12Decimal, type X12DecimalRead, type X12DecimalStatus, type X12DecimalWarningSink, type X12Eligibility, type X12EligibilityAddress, type X12EligibilityBenefit, type X12EligibilityDate, type X12EligibilityDependent, type X12EligibilityEntity, type X12EligibilityMember, type X12EligibilityReference, type X12EligibilityServiceType, type X12EligibilitySubscriber, type X12EligibilityTrace, type X12Enrollment, type X12EnrollmentAddress, type X12EnrollmentAmount, type X12EnrollmentDate, type X12EnrollmentHeader, type X12EnrollmentMember, type X12EnrollmentParty, type X12EnrollmentReference, type X12FatalCode, type X12FunctionalGroup, type X12HealthCoverage, type X12HiCategory, type X12HiCodeSystem, type X12HiQualifier, type X12HierarchicalLevel, type X12Hl, type X12Interchange, type X12LineAdjudication, type X12LineDrug, type X12OrphanAnchor, type X12OrphanAnchorKind, type X12OrphanSegment, type X12OtherSubscriber, X12ParseError, type X12ParseOptions, type X12ParseWarning, type X12Position, type X12PremiumAddress, type X12PremiumAdjustment, type X12PremiumDate, type X12PremiumEntity, type X12PremiumOpenItem, type X12PremiumParty, type X12PremiumPaymentHeader, type X12PremiumPayments, type X12PremiumPerson, type X12PremiumReference, type X12PremiumRemittance, type X12PremiumTrace, type X12Profile, type X12ProfileDescription, type X12ProfileEffect, X12ProfileError, type X12ProfileQuirk, type X12ProfileSpec, type X12RemitAddress, type X12RemitAdjustment, type X12RemitAmount, type X12RemitClaim, type X12RemitContact, type X12RemitParty, type X12RemitPaymentHeader, type X12RemitPerson, type X12RemitProvider, type X12RemitProviderAdjustment, type X12RemitReference, type X12RemitRemark, type X12RemitServiceLine, type X12RemitTrace, type X12Remittance, type X12RequiredLoop, type X12ReviewDecision, type X12Segment, type X12ServiceLineStatus, type X12ServiceReview, type X12ServicesReview, type X12StatusCode, type X12StatusDate, type X12StatusEntity, type X12StatusInfo, type X12StatusMember, type X12StatusReference, type X12StatusTrace, type X12SubscriberInfo, type X12ToothInformation, type X12TransactionSet, type X12UnexpectedSegmentContext, type X12WarningCode, type X12WarningPartition, type X12_837ServiceLine, type X12_837ServiceLineDental, type X12_837ServiceLineInstitutional, type X12_837ServiceLineProfessional, type X12_837Submission, X12_ACK_DISPOSITION_CODES, X12_BUILD_ERROR_CODES, ambiguous837Variant, amountRowDropped, balanceNotEvaluable, build271, build277, build277CA, build278Request, build278Response, build820, build834, build835, build837D, build837I, build837P, build999, buildInterchange, buildTA1, checkClaimBalance, checkRemitTotalBalance, checkServiceLineBalance, collectElementValues, componentOptional, controlNumberMismatch, danglingReleaseChar, decodeSegment, defineLoopSpec, defineProfile, detectDelimiters, elementDecimal, elementDecimalOrZero, elementOptional, elementValue, entitySegmentDiscardedAfterLx, escapeRelease, get271Eligibility, get277CADisposition, get277Status, get278Request, get278Response, get820Payments, get834Enrollments, get834Header, get835, get837Claims, getAllSegmentValues, getDefaultProfile, getSegmentValue, groupCountMismatch, hlParentLevelInvalid, hlParentMismatch, isAcceptDisposition, isClaimAdjustmentGroupCode, isDiagnosisQualifier, isProcedureQualifier, isaExtraElementSeparator, lookupCarc, lookupClaimStatus, lookupClaimStatusCategory, lookupClpStatus, lookupMaintenanceType, lookupRarc, lookupServiceType, missingGe, missingIea, missingRequiredLoop, missingSe, parse999, parseTA1, parseX12, partitionWarnings, payToAddressRepeated, pre005010, profiles, readElementDecimal, remitBalanceMismatch, renderCallerValue, resolveHiQualifier, segmentCountMismatch, serializeX12, serviceLineDropped, serviceLineNotDecoded, serviceSegmentRepeated, serviceSegmentWithoutLx, setDefaultProfile, statedAmountDiscarded, trailingGarbage, transactionCountMismatch, unescapeRelease, unexpectedSegment, unknown837Variant, unknownCarc, unknownClaimStatus, unknownClaimStatusCategory, unknownHiQualifier, unknownMaintenanceType, unknownRarc, unparseableDecimal };
|