@cosyte/x12 0.0.15 → 0.0.17
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 +700 -12
- package/KNOWN-LIMITATIONS.md +436 -28
- package/README.md +1 -1
- package/dist/index.cjs +365 -37
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +156 -70
- package/dist/index.d.ts +156 -70
- package/dist/index.mjs +365 -38
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -45,6 +45,12 @@ var DELIMITER_POSITIONS = {
|
|
|
45
45
|
component: 104,
|
|
46
46
|
segment: 105
|
|
47
47
|
};
|
|
48
|
+
function isVisibleDelimiterChar(c) {
|
|
49
|
+
const code = c.charCodeAt(0);
|
|
50
|
+
if (code < 32 || code === 127) return false;
|
|
51
|
+
if (/\s/u.test(c)) return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
48
54
|
function detectDelimiters(raw) {
|
|
49
55
|
const fatalPosition = { segmentIndex: 0, interchangeIndex: 0 };
|
|
50
56
|
const snip = snippet(raw);
|
|
@@ -68,19 +74,13 @@ function detectDelimiters(raw) {
|
|
|
68
74
|
const repetition = raw.charAt(DELIMITER_POSITIONS.repetition);
|
|
69
75
|
const component = raw.charAt(DELIMITER_POSITIONS.component);
|
|
70
76
|
const segment = raw.charAt(DELIMITER_POSITIONS.segment);
|
|
71
|
-
const isValidDelimiterChar = (c) => {
|
|
72
|
-
const code = c.charCodeAt(0);
|
|
73
|
-
if (code < 32 || code === 127) return false;
|
|
74
|
-
if (/\s/u.test(c)) return false;
|
|
75
|
-
return true;
|
|
76
|
-
};
|
|
77
77
|
for (const [name, ch] of [
|
|
78
78
|
["element", element],
|
|
79
79
|
["repetition", repetition],
|
|
80
80
|
["component", component],
|
|
81
81
|
["segment", segment]
|
|
82
82
|
]) {
|
|
83
|
-
if (!
|
|
83
|
+
if (!isVisibleDelimiterChar(ch)) {
|
|
84
84
|
throw new X12ParseError(
|
|
85
85
|
FATAL_CODES.X12_INVALID_DELIMITERS,
|
|
86
86
|
`Delimiter "${name}" at ISA byte ${String(DELIMITER_POSITIONS[name] + 1)} is whitespace, control, or empty.`,
|
|
@@ -119,6 +119,7 @@ function detectDelimiters(raw) {
|
|
|
119
119
|
var WARNING_CODES = {
|
|
120
120
|
X12_CONTROL_NUMBER_MISMATCH: "X12_CONTROL_NUMBER_MISMATCH",
|
|
121
121
|
X12_PRE_005010: "X12_PRE_005010",
|
|
122
|
+
X12_ISA_EXTRA_ELEMENT_SEPARATOR: "X12_ISA_EXTRA_ELEMENT_SEPARATOR",
|
|
122
123
|
X12_GROUP_COUNT_MISMATCH: "X12_GROUP_COUNT_MISMATCH",
|
|
123
124
|
X12_TRANSACTION_COUNT_MISMATCH: "X12_TRANSACTION_COUNT_MISMATCH",
|
|
124
125
|
X12_SEGMENT_COUNT_MISMATCH: "X12_SEGMENT_COUNT_MISMATCH",
|
|
@@ -194,6 +195,7 @@ var WARNING_MESSAGES = {
|
|
|
194
195
|
X12_CONTROL_NUMBER_MISMATCH_GROUP: "Control number mismatch: GS-06 (header) and GE-02 (trailer) disagree. Both values are preserved verbatim on the model; neither is echoed here.",
|
|
195
196
|
X12_CONTROL_NUMBER_MISMATCH_TRANSACTION: "Control number mismatch: ST-02 (header) and SE-02 (trailer) disagree. Both values are preserved verbatim on the model; neither is echoed here.",
|
|
196
197
|
X12_PRE_005010: 'ISA-12 declares a version other than the HIPAA baseline "00501", so the input may diverge from 005010 semantics. The declared version is preserved verbatim on the model.',
|
|
198
|
+
X12_ISA_EXTRA_ELEMENT_SEPARATOR: "The ISA element area carries at least one element separator beyond the 16 sitting at their fixed 005010 byte positions, so the header does not split into `ISA` plus 16 elements. `isa.elements` is that split as it came out: an element containing an extra separator comes back a prefix and everything after it is displaced. How far is NOT derivable from `isa.elements`, so any other ISA-derived diagnostic on this interchange may be reporting a displaced value. All 106 bytes are preserved verbatim on `isa.raw`, which with the ISA's fixed widths is the route back. Which reading is correct - the byte as data under the ISA's fixed widths, or as a separator - is NOT decided here, and nothing is re-framed.",
|
|
197
199
|
X12_GROUP_COUNT_MISMATCH: "IEA-01 does not equal the number of GS..GE groups actually present in the interchange. The declared count is preserved verbatim on the model and is NEVER silently corrected.",
|
|
198
200
|
X12_TRANSACTION_COUNT_MISMATCH: "GE-01 does not equal the number of ST..SE transaction sets actually present in the group. The declared count is preserved verbatim on the model and is NEVER silently corrected.",
|
|
199
201
|
X12_SEGMENT_COUNT_MISMATCH: "SE-01 does not equal the number of segments actually present in the transaction set it closes. The declared count is preserved verbatim and is corrected only on `serializeX12(ix, { specClean: true, recomputeCounts: true })`.",
|
|
@@ -222,7 +224,7 @@ var WARNING_MESSAGES = {
|
|
|
222
224
|
X12_MISSING_REQUIRED_LOOP_2000B: 'Missing required loop "2000B" (Subscriber HL): no Subscriber HL precedes the CLM.',
|
|
223
225
|
X12_MISSING_REQUIRED_LOOP_2010BA: 'Missing required loop "2010BA" (Subscriber Name): no Subscriber Name follows the Subscriber HL.',
|
|
224
226
|
X12_MISSING_REQUIRED_LOOP_2010BB: 'Missing required loop "2010BB" (Payer Name): no Payer Name follows the Subscriber HL.',
|
|
225
|
-
X12_837_UNKNOWN_VARIANT: "837 variant could not be resolved: ST-03's implementation convention reference is absent, empty, or not an 837 Technical Report Type 3 identifier this reader recognises, and no SVx service-line segment was present to fall back on. The set of references it recognises covers the professional, institutional and dental 837 guides HIPAA adopts at 45 CFR 162.1102 together with their published errata; it is NOT claimed to be exhaustive, and this message deliberately does not enumerate it, because a list here goes stale the moment a guide is added. A reference outside that set is not asserted to be invalid - all this code reports is that this reader could not turn it into a variant and had nothing to fall back on.
|
|
227
|
+
X12_837_UNKNOWN_VARIANT: "837 variant could not be resolved: ST-03's implementation convention reference is absent, empty, or not an 837 Technical Report Type 3 identifier this reader recognises, and no SVx service-line segment was present to fall back on. The set of references it recognises covers the professional, institutional and dental 837 guides HIPAA adopts at 45 CFR 162.1102 together with their published errata; it is NOT claimed to be exhaustive, and this message deliberately does not enumerate it, because a list here goes stale the moment a guide is added. A reference outside that set is not asserted to be invalid - all this code reports is that this reader could not turn it into a variant and had nothing to fall back on.",
|
|
226
228
|
X12_837_AMBIGUOUS_VARIANT: "837 variant resolved from a service segment while the transaction body carries service segments of more than one variant: no caller `type` option was supplied and ST-03's implementation convention reference is absent, empty, or not an 837 Technical Report Type 3 identifier this reader recognises, so this reader fell back to the FIRST SV1 / SV2 / SV3 in the body, and a later one names a different variant. `submission.variant` is therefore a guess between contradictory evidence, and every claim and service line in the submission was read against it. Which service segment is the stray one is NOT decided here and is not derivable from the TR3s: this reader cannot tell a stray service segment from a conformant one, and the fallback takes the first regardless of whether any Loop 2400 was open at it, so an orphan segment decides the variant like any other. Read the bound literally, as a property of the RESOLUTION rather than of the document: this reports the fallback's own ambiguity, so a caller-supplied `type`, or an ST-03 this reader does turn into a variant, means no guess was made and this code is NOT raised however mixed the body is. Whatever else this reader raised on a document that reaches this code, it still raises, at the same position, and this one is added beside them. It is NOT a list of what else you will see, and it does not promise that any particular loss on such a document is reported at all. Re-read with the `type` option to decode the document against a variant you trust. The verbatim segments are preserved on the transaction set; read them there before acting on the submission's type.",
|
|
227
229
|
X12_UNKNOWN_CLAIM_STATUS_CATEGORY: "Unknown claim status category (CSCC): the STC composite's first component is outside the bundled snapshot. The verbatim code is preserved on the status; only its description is unavailable.",
|
|
228
230
|
X12_UNKNOWN_CLAIM_STATUS: "Unknown claim status code (CSC): the STC composite's second component is outside the bundled snapshot. The verbatim code is preserved on the status; only its description is unavailable.",
|
|
@@ -282,6 +284,13 @@ function pre005010(position) {
|
|
|
282
284
|
position
|
|
283
285
|
};
|
|
284
286
|
}
|
|
287
|
+
function isaExtraElementSeparator(position) {
|
|
288
|
+
return {
|
|
289
|
+
code: WARNING_CODES.X12_ISA_EXTRA_ELEMENT_SEPARATOR,
|
|
290
|
+
message: WARNING_MESSAGES.X12_ISA_EXTRA_ELEMENT_SEPARATOR,
|
|
291
|
+
position
|
|
292
|
+
};
|
|
293
|
+
}
|
|
285
294
|
function groupCountMismatch(position) {
|
|
286
295
|
return {
|
|
287
296
|
code: WARNING_CODES.X12_GROUP_COUNT_MISMATCH,
|
|
@@ -866,8 +875,11 @@ function boundSegmentId(first) {
|
|
|
866
875
|
return SEGMENT_ID_SHAPE_RE.test(first) ? first : NON_SPEC_SEGMENT_ID;
|
|
867
876
|
}
|
|
868
877
|
function decodeSegment(raw, delimiters, emit, position) {
|
|
869
|
-
const
|
|
870
|
-
|
|
878
|
+
const degenerate = delimiters.element === RELEASE_CHAR;
|
|
879
|
+
const elements = Object.freeze(
|
|
880
|
+
degenerate ? raw.split(delimiters.element) : splitWithRelease(raw, delimiters.element)
|
|
881
|
+
);
|
|
882
|
+
if (!degenerate && raw.length > 0 && raw.endsWith(RELEASE_CHAR)) {
|
|
871
883
|
let trailingRun = 0;
|
|
872
884
|
for (let j = raw.length - 1; j >= 0 && raw.charAt(j) === RELEASE_CHAR; j -= 1) trailingRun += 1;
|
|
873
885
|
if (trailingRun % 2 === 1) {
|
|
@@ -1043,6 +1055,7 @@ function collectElementValues(seg, start, end, delimiters) {
|
|
|
1043
1055
|
}
|
|
1044
1056
|
|
|
1045
1057
|
// src/parser/envelope.ts
|
|
1058
|
+
var ISA_DECODED_PART_COUNT = 17;
|
|
1046
1059
|
function decodeIsa(raw, delimiters) {
|
|
1047
1060
|
const isaRaw = raw.slice(0, ISA_MIN_LENGTH);
|
|
1048
1061
|
const isaHead = isaRaw.slice(0, ISA_MIN_LENGTH - 1);
|
|
@@ -1109,6 +1122,9 @@ function decodeEnvelope(raw, delimiters) {
|
|
|
1109
1122
|
warnings.push(w);
|
|
1110
1123
|
};
|
|
1111
1124
|
const isa = decodeIsa(raw, delimiters);
|
|
1125
|
+
if (isa.elements.length !== ISA_DECODED_PART_COUNT) {
|
|
1126
|
+
warnings.push(isaExtraElementSeparator({ segmentIndex: 0, interchangeIndex: 0 }));
|
|
1127
|
+
}
|
|
1112
1128
|
const isa12 = el(isa.elements, 12);
|
|
1113
1129
|
if (isa12 !== "00501") {
|
|
1114
1130
|
warnings.push(pre005010({ segmentIndex: 0, interchangeIndex: 0, elementIndex: 12 }));
|
|
@@ -2704,10 +2720,70 @@ function requireCallerString(value, at, refuse) {
|
|
|
2704
2720
|
`${at}: every element value must be a string, but received ${describeCallerValue(value)}. Values are never coerced - a JavaScript number cannot carry a leading-zero identifier, so converting here could emit a different value than the caller sent. Convert at the call site.`
|
|
2705
2721
|
);
|
|
2706
2722
|
}
|
|
2723
|
+
var DELIMITER_ROLES = [
|
|
2724
|
+
["element", "element separator"],
|
|
2725
|
+
["repetition", "repetition separator"],
|
|
2726
|
+
["component", "component separator"],
|
|
2727
|
+
["segment", "segment terminator"]
|
|
2728
|
+
];
|
|
2729
|
+
function requireEscapableDelimiters(delimiters, at, refuse) {
|
|
2730
|
+
const degenerate = DELIMITER_ROLES.filter(([role]) => delimiters[role] === RELEASE_CHAR).map(
|
|
2731
|
+
([, name]) => name
|
|
2732
|
+
);
|
|
2733
|
+
if (degenerate.length === 0) return;
|
|
2734
|
+
const roles = degenerate.length === 1 ? `the ${degenerate[0] ?? ""}` : `the ${degenerate.slice(0, -1).join(", the ")} and the ${degenerate[degenerate.length - 1] ?? ""}`;
|
|
2735
|
+
refuse(
|
|
2736
|
+
`${at}: "${RELEASE_CHAR}" is the X12 release character and cannot also be ${roles}. An escape is written by prefixing "${RELEASE_CHAR}" to the byte it protects, so on this set the protection is emitted as structure; and a composite or a repetition joined with "${RELEASE_CHAR}" is emitted as an escape. Neither reads back, and no element value avoids it. Declare a delimiter set in which no role is "${RELEASE_CHAR}".`
|
|
2737
|
+
);
|
|
2738
|
+
}
|
|
2739
|
+
function requireWellShapedDelimiters(delimiters, at, refuse) {
|
|
2740
|
+
const REMEDY = `A delimiter occupies ONE fixed position of the ISA (ISA-11, ISA-16 and the position after it), so this set cannot be transmitted and this library's own parser would reject a document declaring it. Declare four distinct, visible, single-character delimiters.`;
|
|
2741
|
+
for (const [role, name] of DELIMITER_ROLES) {
|
|
2742
|
+
const value = delimiters[role];
|
|
2743
|
+
if (typeof value !== "string") {
|
|
2744
|
+
refuse(
|
|
2745
|
+
`${at}: the ${name} must be a string, but received ${describeCallerValue(value)}. Values are never coerced - a coerced delimiter frames the document while the release escape still compares against what you passed, so no element value is protected from it. ${REMEDY}`
|
|
2746
|
+
);
|
|
2747
|
+
}
|
|
2748
|
+
if (value.length !== 1) {
|
|
2749
|
+
refuse(
|
|
2750
|
+
`${at}: the ${name} must be exactly one character, but the declared value is ${value.length === 0 ? "empty" : `${String(value.length)} characters long`}. ${REMEDY}`
|
|
2751
|
+
);
|
|
2752
|
+
}
|
|
2753
|
+
if (!isVisibleDelimiterChar(value)) {
|
|
2754
|
+
refuse(
|
|
2755
|
+
`${at}: the ${name} must be a visible character, but the declared value is whitespace or a control character. ${REMEDY}`
|
|
2756
|
+
);
|
|
2757
|
+
}
|
|
2758
|
+
}
|
|
2759
|
+
for (const [i, [role, name]] of DELIMITER_ROLES.entries()) {
|
|
2760
|
+
const earlier = DELIMITER_ROLES.slice(0, i).find(([r]) => delimiters[r] === delimiters[role]);
|
|
2761
|
+
if (earlier !== void 0) {
|
|
2762
|
+
refuse(
|
|
2763
|
+
`${at}: the ${name} and the ${earlier[1]} are the same character. A reader cannot tell which role a character is playing. ${REMEDY}`
|
|
2764
|
+
);
|
|
2765
|
+
}
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2707
2768
|
function makeCallerEscaper(delimiters, at, refuse) {
|
|
2769
|
+
requireEscapableDelimiters(delimiters, at, refuse);
|
|
2770
|
+
requireWellShapedDelimiters(delimiters, at, refuse);
|
|
2708
2771
|
return (value) => escapeRelease(requireCallerString(value, at, refuse), delimiters);
|
|
2709
2772
|
}
|
|
2710
2773
|
|
|
2774
|
+
// src/builder/caller-control-number.ts
|
|
2775
|
+
function requireControlNumber(value, slot, field, at, refuse) {
|
|
2776
|
+
if (typeof value !== "string") {
|
|
2777
|
+
refuse(
|
|
2778
|
+
`${at}: ${field} must be a string, but received ${describeCallerValue(value)}. ${slot} is a required control number and this builder never coerces one, so nothing is emitted. Convert ${field} at the call site.`
|
|
2779
|
+
);
|
|
2780
|
+
}
|
|
2781
|
+
if (value !== "") return value;
|
|
2782
|
+
refuse(
|
|
2783
|
+
`${at}: ${field} is empty. ${slot} is a required control number and this builder never invents one, so nothing is emitted. Supply ${field}.`
|
|
2784
|
+
);
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2711
2787
|
// src/transactions/remit/build-835.ts
|
|
2712
2788
|
function refuseSpec(message) {
|
|
2713
2789
|
throw new Remit835BuildError(REMIT_835_BUILD_ERROR_CODES.X12_835_BUILD_INVALID_SPEC, message);
|
|
@@ -2752,6 +2828,27 @@ function build835(spec) {
|
|
|
2752
2828
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
2753
2829
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
2754
2830
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
2831
|
+
requireControlNumber(
|
|
2832
|
+
envelope.interchangeControlNumber,
|
|
2833
|
+
"ISA-13 / IEA-02",
|
|
2834
|
+
"interchangeControlNumber",
|
|
2835
|
+
"build835",
|
|
2836
|
+
refuseSpec
|
|
2837
|
+
);
|
|
2838
|
+
requireControlNumber(
|
|
2839
|
+
envelope.groupControlNumber,
|
|
2840
|
+
"GS-06 / GE-02",
|
|
2841
|
+
"groupControlNumber",
|
|
2842
|
+
"build835",
|
|
2843
|
+
refuseSpec
|
|
2844
|
+
);
|
|
2845
|
+
requireControlNumber(
|
|
2846
|
+
envelope.transactionSetControlNumber,
|
|
2847
|
+
"ST-02 / SE-02",
|
|
2848
|
+
"transactionSetControlNumber",
|
|
2849
|
+
"build835",
|
|
2850
|
+
refuseSpec
|
|
2851
|
+
);
|
|
2755
2852
|
const interchangeControlNumber = padControl(envelope.interchangeControlNumber, 9);
|
|
2756
2853
|
const isa = [
|
|
2757
2854
|
"ISA",
|
|
@@ -3329,6 +3426,14 @@ function wireLookup(entries) {
|
|
|
3329
3426
|
return Object.freeze(table);
|
|
3330
3427
|
}
|
|
3331
3428
|
|
|
3429
|
+
// src/transactions/shared/st03.ts
|
|
3430
|
+
var noopWarningSink = (_w) => {
|
|
3431
|
+
};
|
|
3432
|
+
function decodeSt03(raw, delimiters, position) {
|
|
3433
|
+
if (raw === void 0) return void 0;
|
|
3434
|
+
return unescapeRelease(raw, delimiters, noopWarningSink, position);
|
|
3435
|
+
}
|
|
3436
|
+
|
|
3332
3437
|
// src/transactions/claim/address-segments.ts
|
|
3333
3438
|
function emitsStreetLines(address) {
|
|
3334
3439
|
return address.lines.length > 0;
|
|
@@ -3387,9 +3492,14 @@ function get837Claims(delimiters, tx, opts) {
|
|
|
3387
3492
|
if (tx.st.elements[1] !== "837") return void 0;
|
|
3388
3493
|
const warnings = [];
|
|
3389
3494
|
const body = tx.se === void 0 ? tx.segments.slice(1) : tx.segments.slice(1, -1);
|
|
3390
|
-
const
|
|
3495
|
+
const implementationConventionReferenceRaw = tx.st.elements[3];
|
|
3496
|
+
const implementationConventionReference = decodeSt03(
|
|
3497
|
+
implementationConventionReferenceRaw,
|
|
3498
|
+
delimiters,
|
|
3499
|
+
{ segmentIndex: 0, transactionIndex: 0 }
|
|
3500
|
+
);
|
|
3391
3501
|
const explicitType = opts?.type;
|
|
3392
|
-
const variantFromIcr =
|
|
3502
|
+
const variantFromIcr = implementationConventionReferenceRaw !== void 0 && implementationConventionReferenceRaw !== "" ? VARIANT_BY_ICR[implementationConventionReferenceRaw] : void 0;
|
|
3393
3503
|
let variantFromSegment;
|
|
3394
3504
|
let serviceSegmentVariantsConflict = false;
|
|
3395
3505
|
if (explicitType === void 0 && variantFromIcr === void 0) {
|
|
@@ -4640,6 +4750,27 @@ function buildClaim837(variant, spec) {
|
|
|
4640
4750
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
4641
4751
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
4642
4752
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
4753
|
+
requireControlNumber(
|
|
4754
|
+
envelope.interchangeControlNumber,
|
|
4755
|
+
"ISA-13 / IEA-02",
|
|
4756
|
+
"interchangeControlNumber",
|
|
4757
|
+
"build837",
|
|
4758
|
+
refuseSpec2
|
|
4759
|
+
);
|
|
4760
|
+
requireControlNumber(
|
|
4761
|
+
envelope.groupControlNumber,
|
|
4762
|
+
"GS-06 / GE-02",
|
|
4763
|
+
"groupControlNumber",
|
|
4764
|
+
"build837",
|
|
4765
|
+
refuseSpec2
|
|
4766
|
+
);
|
|
4767
|
+
requireControlNumber(
|
|
4768
|
+
envelope.transactionSetControlNumber,
|
|
4769
|
+
"ST-02 / SE-02",
|
|
4770
|
+
"transactionSetControlNumber",
|
|
4771
|
+
"build837",
|
|
4772
|
+
refuseSpec2
|
|
4773
|
+
);
|
|
4643
4774
|
const interchangeControlNumber = padControl2(envelope.interchangeControlNumber, 9);
|
|
4644
4775
|
const isa = [
|
|
4645
4776
|
"ISA",
|
|
@@ -5811,6 +5942,27 @@ function build271(spec) {
|
|
|
5811
5942
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
5812
5943
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
5813
5944
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
5945
|
+
requireControlNumber(
|
|
5946
|
+
envelope.interchangeControlNumber,
|
|
5947
|
+
"ISA-13 / IEA-02",
|
|
5948
|
+
"interchangeControlNumber",
|
|
5949
|
+
"build271",
|
|
5950
|
+
refuseSpec3
|
|
5951
|
+
);
|
|
5952
|
+
requireControlNumber(
|
|
5953
|
+
envelope.groupControlNumber,
|
|
5954
|
+
"GS-06 / GE-02",
|
|
5955
|
+
"groupControlNumber",
|
|
5956
|
+
"build271",
|
|
5957
|
+
refuseSpec3
|
|
5958
|
+
);
|
|
5959
|
+
requireControlNumber(
|
|
5960
|
+
envelope.transactionSetControlNumber,
|
|
5961
|
+
"ST-02 / SE-02",
|
|
5962
|
+
"transactionSetControlNumber",
|
|
5963
|
+
"build271",
|
|
5964
|
+
refuseSpec3
|
|
5965
|
+
);
|
|
5814
5966
|
const interchangeControlNumber = padControl3(envelope.interchangeControlNumber, 9);
|
|
5815
5967
|
const isa = [
|
|
5816
5968
|
"ISA",
|
|
@@ -6181,8 +6333,13 @@ function get277CADisposition(delimiters, tx) {
|
|
|
6181
6333
|
function walk277(delimiters, tx) {
|
|
6182
6334
|
const warnings = [];
|
|
6183
6335
|
const body = tx.se === void 0 ? tx.segments.slice(1) : tx.segments.slice(1, -1);
|
|
6184
|
-
const
|
|
6185
|
-
const
|
|
6336
|
+
const implementationConventionReferenceRaw = tx.st.elements[3];
|
|
6337
|
+
const implementationConventionReference = decodeSt03(
|
|
6338
|
+
implementationConventionReferenceRaw,
|
|
6339
|
+
delimiters,
|
|
6340
|
+
{ segmentIndex: 0, transactionIndex: 0 }
|
|
6341
|
+
);
|
|
6342
|
+
const transactionType = implementationConventionReferenceRaw === ICR_277CA ? "claim-acknowledgment" : "claim-status";
|
|
6186
6343
|
const hierarchies = [];
|
|
6187
6344
|
const hlIndex = /* @__PURE__ */ new Map();
|
|
6188
6345
|
const claims = [];
|
|
@@ -6537,6 +6694,27 @@ function buildClaimStatus(version, spec) {
|
|
|
6537
6694
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
6538
6695
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
6539
6696
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
6697
|
+
requireControlNumber(
|
|
6698
|
+
envelope.interchangeControlNumber,
|
|
6699
|
+
"ISA-13 / IEA-02",
|
|
6700
|
+
"interchangeControlNumber",
|
|
6701
|
+
"build277",
|
|
6702
|
+
refuseSpec4
|
|
6703
|
+
);
|
|
6704
|
+
requireControlNumber(
|
|
6705
|
+
envelope.groupControlNumber,
|
|
6706
|
+
"GS-06 / GE-02",
|
|
6707
|
+
"groupControlNumber",
|
|
6708
|
+
"build277",
|
|
6709
|
+
refuseSpec4
|
|
6710
|
+
);
|
|
6711
|
+
requireControlNumber(
|
|
6712
|
+
envelope.transactionSetControlNumber,
|
|
6713
|
+
"ST-02 / SE-02",
|
|
6714
|
+
"transactionSetControlNumber",
|
|
6715
|
+
"build277",
|
|
6716
|
+
refuseSpec4
|
|
6717
|
+
);
|
|
6540
6718
|
const interchangeControlNumber = padControl4(envelope.interchangeControlNumber, 9);
|
|
6541
6719
|
const isa = [
|
|
6542
6720
|
"ISA",
|
|
@@ -7328,6 +7506,27 @@ function build820(spec) {
|
|
|
7328
7506
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
7329
7507
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
7330
7508
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
7509
|
+
requireControlNumber(
|
|
7510
|
+
envelope.interchangeControlNumber,
|
|
7511
|
+
"ISA-13 / IEA-02",
|
|
7512
|
+
"interchangeControlNumber",
|
|
7513
|
+
"build820",
|
|
7514
|
+
refuseSpec5
|
|
7515
|
+
);
|
|
7516
|
+
requireControlNumber(
|
|
7517
|
+
envelope.groupControlNumber,
|
|
7518
|
+
"GS-06 / GE-02",
|
|
7519
|
+
"groupControlNumber",
|
|
7520
|
+
"build820",
|
|
7521
|
+
refuseSpec5
|
|
7522
|
+
);
|
|
7523
|
+
requireControlNumber(
|
|
7524
|
+
envelope.transactionSetControlNumber,
|
|
7525
|
+
"ST-02 / SE-02",
|
|
7526
|
+
"transactionSetControlNumber",
|
|
7527
|
+
"build820",
|
|
7528
|
+
refuseSpec5
|
|
7529
|
+
);
|
|
7331
7530
|
const interchangeControlNumber = padControl5(envelope.interchangeControlNumber, 9);
|
|
7332
7531
|
const isa = [
|
|
7333
7532
|
"ISA",
|
|
@@ -8035,6 +8234,27 @@ function build834(spec) {
|
|
|
8035
8234
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
8036
8235
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
8037
8236
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
8237
|
+
requireControlNumber(
|
|
8238
|
+
envelope.interchangeControlNumber,
|
|
8239
|
+
"ISA-13 / IEA-02",
|
|
8240
|
+
"interchangeControlNumber",
|
|
8241
|
+
"build834",
|
|
8242
|
+
refuseSpec6
|
|
8243
|
+
);
|
|
8244
|
+
requireControlNumber(
|
|
8245
|
+
envelope.groupControlNumber,
|
|
8246
|
+
"GS-06 / GE-02",
|
|
8247
|
+
"groupControlNumber",
|
|
8248
|
+
"build834",
|
|
8249
|
+
refuseSpec6
|
|
8250
|
+
);
|
|
8251
|
+
requireControlNumber(
|
|
8252
|
+
envelope.transactionSetControlNumber,
|
|
8253
|
+
"ST-02 / SE-02",
|
|
8254
|
+
"transactionSetControlNumber",
|
|
8255
|
+
"build834",
|
|
8256
|
+
refuseSpec6
|
|
8257
|
+
);
|
|
8038
8258
|
const interchangeControlNumber = padControl6(envelope.interchangeControlNumber, 9);
|
|
8039
8259
|
const isa = [
|
|
8040
8260
|
"ISA",
|
|
@@ -8487,7 +8707,10 @@ function walk278(delimiters, tx, direction) {
|
|
|
8487
8707
|
}
|
|
8488
8708
|
}
|
|
8489
8709
|
flushReview();
|
|
8490
|
-
const icr = tx.st.elements[3]
|
|
8710
|
+
const icr = decodeSt03(tx.st.elements[3], delimiters, {
|
|
8711
|
+
segmentIndex: 0,
|
|
8712
|
+
transactionIndex: 0
|
|
8713
|
+
});
|
|
8491
8714
|
return Object.freeze({
|
|
8492
8715
|
direction,
|
|
8493
8716
|
implementationConventionReference: icr === void 0 || icr === "" ? void 0 : icr,
|
|
@@ -8711,6 +8934,27 @@ function buildServicesReview(version, direction, spec) {
|
|
|
8711
8934
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
8712
8935
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
8713
8936
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
8937
|
+
requireControlNumber(
|
|
8938
|
+
envelope.interchangeControlNumber,
|
|
8939
|
+
"ISA-13 / IEA-02",
|
|
8940
|
+
"interchangeControlNumber",
|
|
8941
|
+
"build278",
|
|
8942
|
+
refuseSpec7
|
|
8943
|
+
);
|
|
8944
|
+
requireControlNumber(
|
|
8945
|
+
envelope.groupControlNumber,
|
|
8946
|
+
"GS-06 / GE-02",
|
|
8947
|
+
"groupControlNumber",
|
|
8948
|
+
"build278",
|
|
8949
|
+
refuseSpec7
|
|
8950
|
+
);
|
|
8951
|
+
requireControlNumber(
|
|
8952
|
+
envelope.transactionSetControlNumber,
|
|
8953
|
+
"ST-02 / SE-02",
|
|
8954
|
+
"transactionSetControlNumber",
|
|
8955
|
+
"build278",
|
|
8956
|
+
refuseSpec7
|
|
8957
|
+
);
|
|
8714
8958
|
const interchangeControlNumber = padControl7(envelope.interchangeControlNumber, 9);
|
|
8715
8959
|
const isa = [
|
|
8716
8960
|
"ISA",
|
|
@@ -9418,11 +9662,12 @@ function parseTA1(interchange) {
|
|
|
9418
9662
|
const ta1 = interchange.ta1Segments[0];
|
|
9419
9663
|
if (ta1 === void 0) return void 0;
|
|
9420
9664
|
const elements = ta1.elements;
|
|
9421
|
-
const
|
|
9422
|
-
const
|
|
9423
|
-
const
|
|
9424
|
-
const
|
|
9425
|
-
const
|
|
9665
|
+
const value = (index) => unescapeRelease(elements[index] ?? "", interchange.delimiters, noop3, { segmentIndex: 0 });
|
|
9666
|
+
const interchangeControlNumber = value(1);
|
|
9667
|
+
const interchangeDate = value(2);
|
|
9668
|
+
const interchangeTime = value(3);
|
|
9669
|
+
const ackCodeRaw = value(4);
|
|
9670
|
+
const noteCodeRaw = value(5);
|
|
9426
9671
|
const ackCode = narrowAckCode(ackCodeRaw) ?? TA1_ACK_CODES.R;
|
|
9427
9672
|
const noteCode = narrowNoteCode(noteCodeRaw);
|
|
9428
9673
|
return Object.freeze({
|
|
@@ -9435,6 +9680,8 @@ function parseTA1(interchange) {
|
|
|
9435
9680
|
raw: ta1
|
|
9436
9681
|
});
|
|
9437
9682
|
}
|
|
9683
|
+
var noop3 = (_w) => {
|
|
9684
|
+
};
|
|
9438
9685
|
function narrowAckCode(value) {
|
|
9439
9686
|
switch (value) {
|
|
9440
9687
|
case "A":
|
|
@@ -9476,6 +9723,27 @@ function build999(spec) {
|
|
|
9476
9723
|
const senderQualifier = envelope.senderQualifier ?? "ZZ";
|
|
9477
9724
|
const receiverQualifier = envelope.receiverQualifier ?? "ZZ";
|
|
9478
9725
|
const usageIndicator = envelope.usageIndicator ?? "P";
|
|
9726
|
+
requireControlNumber(
|
|
9727
|
+
envelope.interchangeControlNumber,
|
|
9728
|
+
"ISA-13 / IEA-02",
|
|
9729
|
+
"interchangeControlNumber",
|
|
9730
|
+
"build999",
|
|
9731
|
+
refuseSpec8
|
|
9732
|
+
);
|
|
9733
|
+
requireControlNumber(
|
|
9734
|
+
envelope.groupControlNumber,
|
|
9735
|
+
"GS-06 / GE-02",
|
|
9736
|
+
"groupControlNumber",
|
|
9737
|
+
"build999",
|
|
9738
|
+
refuseSpec8
|
|
9739
|
+
);
|
|
9740
|
+
requireControlNumber(
|
|
9741
|
+
envelope.transactionSetControlNumber,
|
|
9742
|
+
"ST-02 / SE-02",
|
|
9743
|
+
"transactionSetControlNumber",
|
|
9744
|
+
"build999",
|
|
9745
|
+
refuseSpec8
|
|
9746
|
+
);
|
|
9479
9747
|
const interchangeControlNumber = padControl8(envelope.interchangeControlNumber, 9);
|
|
9480
9748
|
const isa = [
|
|
9481
9749
|
"ISA",
|
|
@@ -9544,6 +9812,13 @@ function build999(spec) {
|
|
|
9544
9812
|
elementSeparator,
|
|
9545
9813
|
segmentTerminator
|
|
9546
9814
|
);
|
|
9815
|
+
requireControlNumber(
|
|
9816
|
+
functionalGroup.groupControlNumber,
|
|
9817
|
+
"AK1-02",
|
|
9818
|
+
"functionalGroup.groupControlNumber",
|
|
9819
|
+
"build999",
|
|
9820
|
+
refuseSpec8
|
|
9821
|
+
);
|
|
9547
9822
|
const ak1 = joinSeg(
|
|
9548
9823
|
[
|
|
9549
9824
|
"AK1",
|
|
@@ -9650,6 +9925,13 @@ function responseHasAnyError(response) {
|
|
|
9650
9925
|
return false;
|
|
9651
9926
|
}
|
|
9652
9927
|
function buildAk2(response, esc, elementSeparator, segmentTerminator) {
|
|
9928
|
+
requireControlNumber(
|
|
9929
|
+
response.transactionSetControlNumber,
|
|
9930
|
+
"AK2-02",
|
|
9931
|
+
"transactionResponses[].transactionSetControlNumber",
|
|
9932
|
+
"build999",
|
|
9933
|
+
refuseSpec8
|
|
9934
|
+
);
|
|
9653
9935
|
const parts = [
|
|
9654
9936
|
"AK2",
|
|
9655
9937
|
esc(response.transactionSetIdCode),
|
|
@@ -9768,13 +10050,29 @@ function buildTA1(spec, options = {}) {
|
|
|
9768
10050
|
segment: options.segmentTerminator ?? "~"
|
|
9769
10051
|
};
|
|
9770
10052
|
const esc = makeCallerEscaper(delimiters, "buildTA1", refuseSpec9);
|
|
10053
|
+
requireControlNumber(
|
|
10054
|
+
spec.interchangeControlNumber,
|
|
10055
|
+
"TA1-01",
|
|
10056
|
+
"interchangeControlNumber",
|
|
10057
|
+
"buildTA1",
|
|
10058
|
+
refuseSpec9
|
|
10059
|
+
);
|
|
10060
|
+
const interchangeControlNumber = esc(spec.interchangeControlNumber);
|
|
10061
|
+
const interchangeDate = esc(spec.interchangeDate);
|
|
10062
|
+
const interchangeTime = esc(spec.interchangeTime);
|
|
10063
|
+
const ackCode = esc(spec.ackCode);
|
|
10064
|
+
const noteCode = esc(spec.noteCode);
|
|
10065
|
+
requireTa1Element(interchangeDate, "TA1-02", "interchangeDate");
|
|
10066
|
+
requireTa1Element(interchangeTime, "TA1-03", "interchangeTime");
|
|
10067
|
+
requireTa1Element(ackCode, "TA1-04", "ackCode");
|
|
10068
|
+
requireTa1Element(noteCode, "TA1-05", "noteCode");
|
|
9771
10069
|
const elements = Object.freeze([
|
|
9772
10070
|
"TA1",
|
|
9773
|
-
|
|
9774
|
-
|
|
9775
|
-
|
|
9776
|
-
|
|
9777
|
-
|
|
10071
|
+
interchangeControlNumber,
|
|
10072
|
+
interchangeDate,
|
|
10073
|
+
interchangeTime,
|
|
10074
|
+
ackCode,
|
|
10075
|
+
noteCode
|
|
9778
10076
|
]);
|
|
9779
10077
|
const raw = elements.join(delimiters.element);
|
|
9780
10078
|
return Object.freeze({ raw, elements });
|
|
@@ -9782,6 +10080,12 @@ function buildTA1(spec, options = {}) {
|
|
|
9782
10080
|
function refuseSpec9(message) {
|
|
9783
10081
|
throw new AckBuildError(ACK_BUILD_ERROR_CODES.X12_ACK_INVALID_SPEC, message);
|
|
9784
10082
|
}
|
|
10083
|
+
function requireTa1Element(emitted, slot, field) {
|
|
10084
|
+
if (emitted !== "") return;
|
|
10085
|
+
refuseSpec9(
|
|
10086
|
+
`buildTA1: ${field} is empty. ${slot} is a required element and this builder never invents one, so nothing is emitted. Supply ${field}.`
|
|
10087
|
+
);
|
|
10088
|
+
}
|
|
9785
10089
|
function enforceAcceptIsClean2(spec) {
|
|
9786
10090
|
if (spec.ackCode === TA1_ACK_CODES.A && spec.noteCode !== "000") {
|
|
9787
10091
|
throw new AckBuildError(
|
|
@@ -9989,6 +10293,13 @@ function buildInterchange(spec) {
|
|
|
9989
10293
|
const receiverQualifier = spec.receiverQualifier ?? "ZZ";
|
|
9990
10294
|
const usageIndicator = spec.usageIndicator ?? "P";
|
|
9991
10295
|
const version = spec.version ?? "00501";
|
|
10296
|
+
requireControlNumber(
|
|
10297
|
+
spec.interchangeControlNumber,
|
|
10298
|
+
"ISA-13 / IEA-02",
|
|
10299
|
+
"interchangeControlNumber",
|
|
10300
|
+
"buildInterchange",
|
|
10301
|
+
refuseSpec10
|
|
10302
|
+
);
|
|
9992
10303
|
const interchangeControlNumber = padControl9(spec.interchangeControlNumber, 9);
|
|
9993
10304
|
const isa = [
|
|
9994
10305
|
"ISA",
|
|
@@ -10038,23 +10349,32 @@ function buildInterchange(spec) {
|
|
|
10038
10349
|
return parseX12(raw);
|
|
10039
10350
|
}
|
|
10040
10351
|
function buildGroup(group, spec, esc, elementSeparator, segmentTerminator) {
|
|
10352
|
+
requireControlNumber(
|
|
10353
|
+
group.groupControlNumber,
|
|
10354
|
+
"GS-06 / GE-02",
|
|
10355
|
+
"groupControlNumber",
|
|
10356
|
+
"buildInterchange",
|
|
10357
|
+
refuseSpec10
|
|
10358
|
+
);
|
|
10041
10359
|
const applicationSenderCode = group.applicationSenderCode ?? spec.senderId;
|
|
10042
10360
|
const applicationReceiverCode = group.applicationReceiverCode ?? spec.receiverId;
|
|
10043
10361
|
const groupDate = group.groupDate ?? expandYY9(spec.interchangeDate);
|
|
10044
10362
|
const groupTime = group.groupTime ?? spec.interchangeTime;
|
|
10045
10363
|
const responsibleAgencyCode = group.responsibleAgencyCode ?? "X";
|
|
10364
|
+
const gsParts = [
|
|
10365
|
+
"GS",
|
|
10366
|
+
group.functionalIdCode,
|
|
10367
|
+
applicationSenderCode,
|
|
10368
|
+
applicationReceiverCode,
|
|
10369
|
+
groupDate,
|
|
10370
|
+
groupTime,
|
|
10371
|
+
group.groupControlNumber,
|
|
10372
|
+
responsibleAgencyCode,
|
|
10373
|
+
group.versionRelease
|
|
10374
|
+
];
|
|
10375
|
+
requireCallerSegment(gsParts, "buildInterchange", refuseSpec10);
|
|
10046
10376
|
const gs = joinSeg2(
|
|
10047
|
-
|
|
10048
|
-
"GS",
|
|
10049
|
-
esc(group.functionalIdCode),
|
|
10050
|
-
esc(applicationSenderCode),
|
|
10051
|
-
esc(applicationReceiverCode),
|
|
10052
|
-
groupDate,
|
|
10053
|
-
groupTime,
|
|
10054
|
-
esc(group.groupControlNumber),
|
|
10055
|
-
responsibleAgencyCode,
|
|
10056
|
-
esc(group.versionRelease)
|
|
10057
|
-
],
|
|
10377
|
+
gsParts.map((value, index) => index === 0 ? value : esc(value)),
|
|
10058
10378
|
elementSeparator,
|
|
10059
10379
|
segmentTerminator
|
|
10060
10380
|
);
|
|
@@ -10070,6 +10390,13 @@ function buildGroup(group, spec, esc, elementSeparator, segmentTerminator) {
|
|
|
10070
10390
|
return gs + transactions + ge;
|
|
10071
10391
|
}
|
|
10072
10392
|
function buildTransaction(tx, esc, elementSeparator, segmentTerminator) {
|
|
10393
|
+
requireControlNumber(
|
|
10394
|
+
tx.transactionSetControlNumber,
|
|
10395
|
+
"ST-02 / SE-02",
|
|
10396
|
+
"transactionSetControlNumber",
|
|
10397
|
+
"buildInterchange",
|
|
10398
|
+
refuseSpec10
|
|
10399
|
+
);
|
|
10073
10400
|
const stParts = ["ST", esc(tx.transactionSetIdCode), esc(tx.transactionSetControlNumber)];
|
|
10074
10401
|
if (tx.implementationConventionReference !== void 0) {
|
|
10075
10402
|
stParts.push(esc(tx.implementationConventionReference));
|
|
@@ -10407,8 +10734,8 @@ var profiles = Object.freeze({
|
|
|
10407
10734
|
});
|
|
10408
10735
|
|
|
10409
10736
|
// src/index.ts
|
|
10410
|
-
var VERSION = "0.0.
|
|
10737
|
+
var VERSION = "0.0.17";
|
|
10411
10738
|
|
|
10412
|
-
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, BALANCE_INVARIANTS, BUILD_REFUSAL_VALUE_MAX_LENGTH, BUILD_REFUSAL_VALUE_MAX_RENDERED, 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, ClaimStatus277BuildError, DELIMITER_POSITIONS, 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, Enrollment834BuildError, FATAL_CODES, HI_QUALIFIERS, HL_LEVEL_CODES, IK3_SYNTAX_ERROR_CODES, IK4_SYNTAX_ERROR_CODES, ISA_MIN_LENGTH, LoopSpecDefinitionError, MAINTENANCE_TYPE_CODES, NM1_QUALIFIERS, NON_SPEC_SEGMENT_ID, 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, 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, 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, ServicesReview278BuildError, TA1_ACK_CODES, TA1_NOTE_CODES, UNEXPECTED_SEGMENT_CONTEXTS, VERSION, WARNING_CODES, X12BuildError, X12Decimal, X12ParseError, X12ProfileError, 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 };
|
|
10739
|
+
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, BALANCE_INVARIANTS, BUILD_REFUSAL_VALUE_MAX_LENGTH, BUILD_REFUSAL_VALUE_MAX_RENDERED, 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, ClaimStatus277BuildError, DELIMITER_POSITIONS, 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, Enrollment834BuildError, FATAL_CODES, HI_QUALIFIERS, HL_LEVEL_CODES, IK3_SYNTAX_ERROR_CODES, IK4_SYNTAX_ERROR_CODES, ISA_MIN_LENGTH, LoopSpecDefinitionError, MAINTENANCE_TYPE_CODES, NM1_QUALIFIERS, NON_SPEC_SEGMENT_ID, 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, 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, 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, ServicesReview278BuildError, TA1_ACK_CODES, TA1_NOTE_CODES, UNEXPECTED_SEGMENT_CONTEXTS, VERSION, WARNING_CODES, X12BuildError, X12Decimal, X12ParseError, X12ProfileError, 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 };
|
|
10413
10740
|
//# sourceMappingURL=index.mjs.map
|
|
10414
10741
|
//# sourceMappingURL=index.mjs.map
|