@cosyte/x12 0.0.9 → 0.0.11

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/dist/index.d.ts CHANGED
@@ -81,6 +81,11 @@ declare const WARNING_CODES: {
81
81
  readonly X12_UNKNOWN_CLAIM_STATUS_CATEGORY: "X12_UNKNOWN_CLAIM_STATUS_CATEGORY";
82
82
  readonly X12_UNKNOWN_CLAIM_STATUS: "X12_UNKNOWN_CLAIM_STATUS";
83
83
  readonly X12_834_UNKNOWN_MAINTENANCE_TYPE: "X12_834_UNKNOWN_MAINTENANCE_TYPE";
84
+ readonly X12_UNPARSEABLE_DECIMAL: "X12_UNPARSEABLE_DECIMAL";
85
+ readonly X12_837_SERVICE_LINE_NOT_DECODED: "X12_837_SERVICE_LINE_NOT_DECODED";
86
+ readonly X12_837_SERVICE_LINE_DROPPED: "X12_837_SERVICE_LINE_DROPPED";
87
+ readonly X12_837_SERVICE_SEGMENT_WITHOUT_LX: "X12_837_SERVICE_SEGMENT_WITHOUT_LX";
88
+ readonly X12_837_ENTITY_SEGMENT_DISCARDED_AFTER_LX: "X12_837_ENTITY_SEGMENT_DISCARDED_AFTER_LX";
84
89
  };
85
90
  /**
86
91
  * Discriminant type for `X12ParseWarning.code`. Narrowing a warning by this
@@ -559,13 +564,116 @@ declare function missingRequiredLoop(position: X12Position, loop: X12RequiredLoo
559
564
  * walker does its best on shared structure (envelope, HL, claim header) and
560
565
  * skips variant-specific service-line decoding.
561
566
  *
567
+ * `get837Claims` anchors this at the **ST**, which is `tx.segments[0]` and
568
+ * carries the ST-03 the resolution reads. Through `0.0.10` it passed
569
+ * `segmentIndex: 1`, which is the BHT and has no part in resolving a variant.
570
+ *
562
571
  * @example
563
572
  * ```ts
564
573
  * import { unknown837Variant } from "@cosyte/x12";
565
- * const w = unknown837Variant({ segmentIndex: 1, groupIndex: 0, transactionIndex: 0 });
574
+ * const w = unknown837Variant({ segmentIndex: 0, groupIndex: 0, transactionIndex: 0 });
566
575
  * ```
567
576
  */
568
577
  declare function unknown837Variant(position: X12Position): X12ParseWarning;
578
+ /**
579
+ * Build an `X12_837_SERVICE_LINE_NOT_DECODED` warning. Emitted by the 837
580
+ * helper when a Loop 2400 service line is closed without ever having
581
+ * decoded an SV1 / SV2 / SV3 for the resolved variant: either the line
582
+ * carries no SVx at all, or it carries one belonging to a different 837
583
+ * variant than ST-03 (or the caller's `type` option) named. The line is
584
+ * still retained, and every segment stays verbatim on the transaction set,
585
+ * but the line's `charge` and `units` are the accumulator's seeded
586
+ * `X12Decimal.ZERO` rather than anything read off the wire. `position`
587
+ * names the LX segment that opened the line.
588
+ *
589
+ * @example
590
+ * ```ts
591
+ * import { serviceLineNotDecoded } from "@cosyte/x12";
592
+ * const w = serviceLineNotDecoded({ segmentIndex: 9, transactionIndex: 0 });
593
+ * ```
594
+ */
595
+ declare function serviceLineNotDecoded(position: X12Position): X12ParseWarning;
596
+ /**
597
+ * Build an `X12_837_SERVICE_LINE_DROPPED` warning. Emitted by the 837
598
+ * helper when an LX opens no Loop 2400 at all, so the service line never
599
+ * reaches any claim's `serviceLines`: either no CLM is open at that point
600
+ * in the walk, or the submission's variant is not one of `P` / `I` / `D`
601
+ * and there is no variant-specific line shape to build. That second cause
602
+ * is reachable WITHOUT `X12_837_UNKNOWN_VARIANT`, because a caller-supplied
603
+ * `opts.type` outside the union (from JavaScript or a JSON payload) is a
604
+ * variant this reader never resolved and never warned about. Distinct from
605
+ * {@link serviceLineNotDecoded}, where the line IS retained and only its
606
+ * service segment went unread. `position` names the LX itself - the same
607
+ * anchor, for the same reason: it is the one segment present in every
608
+ * case. Nothing is fabricated to stand in, and the segments stay verbatim
609
+ * on the transaction set.
610
+ *
611
+ * @example
612
+ * ```ts
613
+ * import { serviceLineDropped } from "@cosyte/x12";
614
+ * const w = serviceLineDropped({ segmentIndex: 7, transactionIndex: 0 });
615
+ * ```
616
+ */
617
+ declare function serviceLineDropped(position: X12Position): X12ParseWarning;
618
+ /**
619
+ * Build an `X12_837_SERVICE_SEGMENT_WITHOUT_LX` warning. Emitted by the 837
620
+ * helper when an SV1 / SV2 / SV3 arrives with no Loop 2400 open, so there is
621
+ * no service line to decode it into and nothing the segment carries is read.
622
+ * `position` names the service segment itself, because it is the only
623
+ * segment the case has: the other two 837 service-line codes both anchor at
624
+ * an LX, and there is no LX in scope here to anchor to. An LX may still
625
+ * appear elsewhere in the transaction - in an earlier claim, say - so read
626
+ * the condition as "no line was open", not as "the file has no LX".
627
+ *
628
+ * The three do not overlap on one segment. {@link serviceLineDropped} is
629
+ * raised at an LX that opened no line, {@link serviceLineNotDecoded} at an
630
+ * LX whose line was retained undecoded, and this one only where no line is
631
+ * open. Nothing is fabricated to stand in and no line or claim is
632
+ * synthesized; the segments stay verbatim on the transaction set.
633
+ *
634
+ * It says nothing about the submission's variant. A caller-supplied `type`
635
+ * option wins first; absent one, and where ST-03 names no known
636
+ * implementation convention, the reader falls back to the first
637
+ * SV1 / SV2 / SV3 in the transaction, and a segment reported here is
638
+ * eligible for that fallback like any other - pre-existing behaviour,
639
+ * documented in `KNOWN-LIMITATIONS.md`.
640
+ *
641
+ * @example
642
+ * ```ts
643
+ * import { serviceSegmentWithoutLx } from "@cosyte/x12";
644
+ * const w = serviceSegmentWithoutLx({ segmentIndex: 8, transactionIndex: 0 });
645
+ * ```
646
+ */
647
+ declare function serviceSegmentWithoutLx(position: X12Position): X12ParseWarning;
648
+ /**
649
+ * Build an `X12_837_ENTITY_SEGMENT_DISCARDED_AFTER_LX` warning. Emitted by
650
+ * the 837 helper for an `N3` / `N4` / `PER` / `REF` that reached no party
651
+ * because an earlier `LX` with no `CLM` open closed the entity loop that was
652
+ * current at it. `position` names the discarded segment itself, not the `LX`:
653
+ * the loss is per segment (two `N3`s are two losses), and the segment is the
654
+ * one thing a consumer needs to resolve back through `tx.segments`.
655
+ *
656
+ * It is the narrow companion to {@link serviceLineDropped}, which is raised at
657
+ * that same `LX` and reports the SERVICE LINE. Neither reports what the other
658
+ * does, and both can be on one transaction's channel.
659
+ *
660
+ * **Read its bound literally: this is not a general "unattached entity
661
+ * segment" code.** It fires only after such an `LX` and only while nothing has
662
+ * opened a new loop since, so an `N3` / `N4` / `PER` / `REF` that reaches no
663
+ * party by any other route stays silent, exactly as it did before this code
664
+ * existed. Widening it is a guard change and would be its own decision.
665
+ *
666
+ * It reports that the segment reached no party, NOT that it would have reached
667
+ * one: this reader surfaces neither a `PER` on a patient nor one on a pay-to
668
+ * address, on any release.
669
+ *
670
+ * @example
671
+ * ```ts
672
+ * import { entitySegmentDiscardedAfterLx } from "@cosyte/x12";
673
+ * const w = entitySegmentDiscardedAfterLx({ segmentIndex: 8, transactionIndex: 0 });
674
+ * ```
675
+ */
676
+ declare function entitySegmentDiscardedAfterLx(position: X12Position): X12ParseWarning;
569
677
  /**
570
678
  * Build an `X12_UNKNOWN_CLAIM_STATUS_CATEGORY` warning. Emitted by the 277
571
679
  * / 277CA helpers when an STC composite's Claim Status Category Code
@@ -610,6 +718,35 @@ declare function unknownClaimStatus(position: X12Position): X12ParseWarning;
610
718
  * ```
611
719
  */
612
720
  declare function unknownMaintenanceType(position: X12Position): X12ParseWarning;
721
+ /**
722
+ * Build an `X12_UNPARSEABLE_DECIMAL` warning. Emitted whenever an element
723
+ * read as a decimal held bytes that are NOT empty and do not match the shape
724
+ * {@link "../decimal.js".X12Decimal} decodes, `[+-]?digits(.digits?)?` - a
725
+ * thousands separator, a currency symbol, `N/A`, two decimal points, a
726
+ * trailing sign, and so on. That shape is what this library reads, stated as
727
+ * such: no clause of X12.6 is cited for it here, so do not read the code as
728
+ * an assertion about what type R does and does not permit.
729
+ *
730
+ * The warning is a property of the READ, not of what the caller does with
731
+ * the result: it fires whether the decoded slot ends up on the model, is
732
+ * discarded, or is replaced by a stand-in. That is what makes it countable
733
+ * against the input rather than against the walker's control flow.
734
+ *
735
+ * `position.elementIndex` is the 1-indexed element that failed, so a
736
+ * consumer can go read the verbatim bytes off the segment. The message
737
+ * takes NO discriminant and deliberately does not name which stand-in
738
+ * landed: a reader may put `X12Decimal.ZERO` on a slot typed `X12Decimal`,
739
+ * leave an optional slot `undefined`, or drop the row entirely, and the one
740
+ * thing true of all three is that the number now in that slot is not the
741
+ * sender's. Read the model field itself to see which happened.
742
+ *
743
+ * @example
744
+ * ```ts
745
+ * import { unparseableDecimal } from "@cosyte/x12";
746
+ * const w = unparseableDecimal({ segmentIndex: 3, transactionIndex: 0, elementIndex: 2 });
747
+ * ```
748
+ */
749
+ declare function unparseableDecimal(position: X12Position): X12ParseWarning;
613
750
 
614
751
  /**
615
752
  * Type definitions for the `@cosyte/x12` profile subsystem (Phase 9).
@@ -1184,30 +1321,127 @@ declare function elementOptional(seg: X12Segment, n: number, delimiters: Delimit
1184
1321
  * ```
1185
1322
  */
1186
1323
  declare function componentOptional(seg: X12Segment, n: number, p: number, delimiters: Delimiters): string | undefined;
1324
+ /**
1325
+ * Why a decimal read produced no {@link X12Decimal}, or that it produced
1326
+ * one. The three states are spec-distinct and were previously collapsed
1327
+ * onto a single `undefined`:
1328
+ *
1329
+ * - `"decoded"` - the element matched the shape {@link "../decimal.js".X12Decimal}
1330
+ * decodes, `[+-]?digits(.digits?)?`.
1331
+ * - `"absent"` - the element was missing or empty. The sender said nothing.
1332
+ * - `"unparseable"` - the element held bytes outside that shape. The sender
1333
+ * said something and this library could not read it, which is a materially
1334
+ * different fact from `"absent"`. **That shape is what this library reads;
1335
+ * no clause of X12.6 is cited for it, so do not read this as an assertion
1336
+ * about what type R does and does not permit.**
1337
+ *
1338
+ * @example
1339
+ * ```ts
1340
+ * import type { X12DecimalStatus } from "@cosyte/x12";
1341
+ * const status: X12DecimalStatus = "unparseable";
1342
+ * ```
1343
+ */
1344
+ type X12DecimalStatus = "decoded" | "absent" | "unparseable";
1345
+ /**
1346
+ * The tri-state result of {@link readElementDecimal}: the decoded value
1347
+ * (when there is one) alongside the reason there is not.
1348
+ *
1349
+ * @example
1350
+ * ```ts
1351
+ * import { readElementDecimal } from "@cosyte/x12";
1352
+ * const read = readElementDecimal(seg, 2, delim);
1353
+ * if (read.status === "unparseable") {
1354
+ * // the element was PRESENT and did not decode - do not read it as absent
1355
+ * }
1356
+ * ```
1357
+ */
1358
+ interface X12DecimalRead {
1359
+ /** The decoded decimal, or `undefined` for both non-`"decoded"` states. */
1360
+ readonly value: X12Decimal | undefined;
1361
+ /** Which of the three spec-distinct outcomes this read hit. */
1362
+ readonly status: X12DecimalStatus;
1363
+ }
1364
+ /**
1365
+ * Where {@link elementDecimal} / {@link elementDecimalOrZero} put an
1366
+ * `X12_UNPARSEABLE_DECIMAL` warning, and the segment-level position it is
1367
+ * anchored to. The helpers add the failing `elementIndex` themselves, so a
1368
+ * caller passes the position of the SEGMENT it is decoding and never has to
1369
+ * remember to narrow it per element.
1370
+ *
1371
+ * @example
1372
+ * ```ts
1373
+ * import { elementDecimalOrZero, type X12DecimalWarningSink } from "@cosyte/x12";
1374
+ * const sink: X12DecimalWarningSink = { warnings, position: { segmentIndex: 3 } };
1375
+ * elementDecimalOrZero(seg, 2, delim, sink);
1376
+ * ```
1377
+ */
1378
+ interface X12DecimalWarningSink {
1379
+ /** The walker's warning accumulator. Appended to, never read. */
1380
+ readonly warnings: X12ParseWarning[];
1381
+ /** Position of the segment being decoded; `elementIndex` is supplied by the helper. */
1382
+ readonly position: X12Position;
1383
+ }
1384
+ /**
1385
+ * Read element N (1-indexed) as an {@link X12Decimal} and say WHY when
1386
+ * there is no value. This is the chokepoint every decimal read in the
1387
+ * library goes through, and the only surface that distinguishes an element
1388
+ * the sender omitted from one this library could not decode.
1389
+ *
1390
+ * Pure: it never warns and never throws. {@link elementDecimal} and
1391
+ * {@link elementDecimalOrZero} wrap it and add the diagnostic.
1392
+ *
1393
+ * @example
1394
+ * ```ts
1395
+ * import { readElementDecimal } from "@cosyte/x12";
1396
+ * readElementDecimal(seg, 2, delim); // { value: undefined, status: "unparseable" }
1397
+ * ```
1398
+ */
1399
+ declare function readElementDecimal(seg: X12Segment, n: number, delimiters: Delimiters): X12DecimalRead;
1187
1400
  /**
1188
1401
  * Read element N (1-indexed) as an {@link X12Decimal}, or `undefined`
1189
1402
  * when absent / empty / malformed. The walker discipline for every
1190
1403
  * monetary or quantity field - NEVER `parseFloat`.
1191
1404
  *
1405
+ * **`undefined` here means "not decoded", not "absent."** When `sink` is
1406
+ * supplied, a PRESENT element that does not decode emits
1407
+ * `X12_UNPARSEABLE_DECIMAL` carrying `elementIndex: n`, so the two cases are
1408
+ * told apart on the warning channel. Without a sink the ambiguity is
1409
+ * silent, which is why every reader in this library passes one; use
1410
+ * {@link readElementDecimal} when you want the distinction in-band instead.
1411
+ * An ABSENT element returns `undefined` and does NOT warn.
1412
+ *
1192
1413
  * @example
1193
1414
  * ```ts
1194
1415
  * import { elementDecimal } from "@cosyte/x12";
1195
1416
  * elementDecimal(seg, 2, delim)?.toString(); // BPR-02 verbatim decimal
1196
1417
  * ```
1197
1418
  */
1198
- declare function elementDecimal(seg: X12Segment, n: number, delimiters: Delimiters): X12Decimal | undefined;
1419
+ declare function elementDecimal(seg: X12Segment, n: number, delimiters: Delimiters, sink?: X12DecimalWarningSink): X12Decimal | undefined;
1199
1420
  /**
1200
1421
  * Read element N (1-indexed) as an {@link X12Decimal}, defaulting to
1201
1422
  * `X12Decimal.ZERO` when absent. Convenient for fields the walker treats
1202
1423
  * as "missing means zero" (charge totals, etc.).
1203
1424
  *
1425
+ * **The `0` this returns for a PRESENT-but-unparseable element is a
1426
+ * stand-in, not a reading.** A slot typed `X12Decimal` cannot express
1427
+ * "did not decode", so a consumer looking only at the model cannot tell
1428
+ * that `0` from a `0` the sender sent: on a paid amount that is a fabricated
1429
+ * amount presented as read. When `sink` is supplied the case emits
1430
+ * `X12_UNPARSEABLE_DECIMAL`, which is the only signal that distinguishes
1431
+ * them. Pass one, or use {@link readElementDecimal} and decide for
1432
+ * yourself.
1433
+ *
1434
+ * An ABSENT element still returns `X12Decimal.ZERO` and does NOT warn: that
1435
+ * is the documented "missing means zero" convention of the slots that use
1436
+ * this helper, and it is unchanged.
1437
+ *
1204
1438
  * @example
1205
1439
  * ```ts
1206
1440
  * import { elementDecimalOrZero } from "@cosyte/x12";
1207
1441
  * elementDecimalOrZero(seg, 2, delim).toString();
1208
1442
  * ```
1209
1443
  */
1210
- declare function elementDecimalOrZero(seg: X12Segment, n: number, delimiters: Delimiters): X12Decimal;
1444
+ declare function elementDecimalOrZero(seg: X12Segment, n: number, delimiters: Delimiters, sink?: X12DecimalWarningSink): X12Decimal;
1211
1445
  /**
1212
1446
  * Collect non-empty element values across the 1-indexed inclusive range
1213
1447
  * `[start, end]`. Returns a new array preserving order, omitting empty /
@@ -3343,6 +3577,16 @@ interface X12RemitRemark {
3343
3577
  * code. The qualifier governs interpretation - **misreading it picks
3344
3578
  * the wrong code system** and corrupts the clinical context.
3345
3579
  *
3580
+ * X221A1 is reported to default an absent SVC-05 to one (secondhand, via
3581
+ * X12's RFI #2163 - this library has not read the TR3). This reader does
3582
+ * **not** apply that default, because fabricating a count the sender did not
3583
+ * send is inventing data. Apply it yourself if you want it.
3584
+ *
3585
+ * **`undefined` on either quantity means "not decoded", not "absent".** The
3586
+ * element may have been missing, or present and unparseable as a decimal -
3587
+ * the two are not distinguished here and neither raises a warning. Read the
3588
+ * verbatim element off `tx.segments` if you need to tell them apart.
3589
+ *
3346
3590
  * @example
3347
3591
  * ```ts
3348
3592
  * import type { X12RemitServiceLine } from "@cosyte/x12";
@@ -3359,8 +3603,16 @@ interface X12RemitServiceLine {
3359
3603
  readonly modifiers: readonly string[];
3360
3604
  readonly chargeAmount: X12Decimal;
3361
3605
  readonly paymentAmount: X12Decimal;
3606
+ /** SVC-04 - NUBC revenue code. Absent on a professional line. */
3362
3607
  readonly revenueCode: string | undefined;
3608
+ /** SVC-05 - Units of Service Paid Count: what the payer adjudicated. */
3363
3609
  readonly paidUnitsOfService: X12Decimal | undefined;
3610
+ /**
3611
+ * SVC-07 - Original Units of Service Count: the units as SUBMITTED. Sent
3612
+ * only when they differ from the paid count in SVC-05, so `undefined` here
3613
+ * does NOT mean zero submitted units - it means "same as paid".
3614
+ */
3615
+ readonly originalUnitsOfService: X12Decimal | undefined;
3364
3616
  readonly originalServiceId: string | undefined;
3365
3617
  readonly originalServiceIdQualifier: string | undefined;
3366
3618
  readonly serviceDateStart: string | undefined;
@@ -3815,10 +4067,19 @@ interface Build835ServiceLineSpec {
3815
4067
  readonly chargeAmount: X12Decimal;
3816
4068
  /** SVC-03 - line item provider payment amount. */
3817
4069
  readonly paymentAmount: X12Decimal;
3818
- /** SVC-05 - revenue code (institutional). */
4070
+ /** SVC-04 - NUBC revenue code (institutional). */
3819
4071
  readonly revenueCode?: string;
3820
- /** SVC-07 - units of service paid. */
4072
+ /**
4073
+ * SVC-05 - Units of Service Paid Count. The count the payer actually
4074
+ * adjudicated. Distinct from {@link Build835ServiceLineSpec.originalUnitsOfService},
4075
+ * which is what was submitted.
4076
+ */
3821
4077
  readonly paidUnitsOfService?: X12Decimal;
4078
+ /**
4079
+ * SVC-07 - Original Units of Service Count: the units as SUBMITTED, sent
4080
+ * only when they differ from the paid count in SVC-05.
4081
+ */
4082
+ readonly originalUnitsOfService?: X12Decimal;
3822
4083
  /** SVC-06-2 - original (submitted) product/service ID. */
3823
4084
  readonly originalServiceId?: string;
3824
4085
  /** SVC-06-1 - original product/service ID qualifier. */
@@ -7550,6 +7811,19 @@ interface X12ServiceLineStatus {
7550
7811
  readonly lineChargeAmount: X12Decimal | undefined;
7551
7812
  readonly linePaymentAmount: X12Decimal | undefined;
7552
7813
  readonly revenueCode: string | undefined;
7814
+ /**
7815
+ * SVC-07, data element 380 (Quantity). Named "Units of Service Count" by
7816
+ * TR3 `005010X212` and "Original Units of Service Count" by `005010X214`;
7817
+ * the same element in the same position either way, so one field serves
7818
+ * both and the walker never has to know which TR3 it is reading.
7819
+ *
7820
+ * SVC-05 is NOT USED in both TR3s, so unlike the 835 there is no second,
7821
+ * paid quantity to tell this one apart from. `undefined` means **not
7822
+ * decoded**, not "the sender sent zero": an absent element and a present
7823
+ * one that is not an X12 R-type decimal share it, and only the latter
7824
+ * raises `X12_UNPARSEABLE_DECIMAL` at `position.elementIndex` 7.
7825
+ */
7826
+ readonly unitsOfService: X12Decimal | undefined;
7553
7827
  readonly statuses: readonly X12StatusInfo[];
7554
7828
  readonly references: readonly X12StatusReference[];
7555
7829
  readonly dates: readonly X12StatusDate[];
@@ -7887,6 +8161,8 @@ interface Build277DateSpec {
7887
8161
  * const l: Build277ServiceLineSpec = {
7888
8162
  * serviceIdQualifier: "HC", procedureCode: "99213", modifiers: ["25"],
7889
8163
  * lineChargeAmount: X12Decimal.fromString("150.00")!,
8164
+ * // SVC-07 is required in 005010X212, so `build277` refuses a line without it.
8165
+ * unitsOfService: X12Decimal.fromString("1")!,
7890
8166
  * statuses: [{ statuses: [{ categoryCode: "F2", statusCode: "65" }] }],
7891
8167
  * };
7892
8168
  * ```
@@ -7904,6 +8180,19 @@ interface Build277ServiceLineSpec {
7904
8180
  readonly linePaymentAmount?: X12Decimal;
7905
8181
  /** SVC-04 - revenue code. */
7906
8182
  readonly revenueCode?: string;
8183
+ /**
8184
+ * SVC-07 - units of service count (data element 380).
8185
+ *
8186
+ * **Usage differs by TR3 and so does the builder.** In `005010X212` the
8187
+ * element is REQUIRED, so {@link "./build-277.js".build277} REFUSES a
8188
+ * service line that omits it rather than emit a document short a required
8189
+ * element. In `005010X214` it is SITUATIONAL, so
8190
+ * {@link "./build-277.js".build277CA} emits it when supplied and omits it
8191
+ * otherwise. Nothing is ever defaulted: a count the caller did not supply
8192
+ * is a count nobody sent, and inventing one would put a quantity on the
8193
+ * wire that no submitter stands behind.
8194
+ */
8195
+ readonly unitsOfService?: X12Decimal;
7907
8196
  /** Loop 2220 STC statuses. */
7908
8197
  readonly statuses?: readonly Build277StatusSpec[];
7909
8198
  /** Loop 2220 REF identifiers. */
@@ -8096,6 +8385,13 @@ interface Build277Spec {
8096
8385
  * inconsistent hierarchy is therefore unrepresentable, and the SE-01
8097
8386
  * segment count is correct by construction.
8098
8387
  *
8388
+ * The two variants do NOT share every element usage, and the builder
8389
+ * follows the TR3 rather than a single house rule: SVC-07, the units of
8390
+ * service count, is REQUIRED in `005010X212` and SITUATIONAL in
8391
+ * `005010X214`, so `build277` refuses a service line that omits it and
8392
+ * `build277CA` emits the same line happily. A count is never defaulted in
8393
+ * either direction.
8394
+ *
8099
8395
  * The read side ({@link "./get-277.js".get277Status}) is lenient - a real
8100
8396
  * 277 with a broken HL parent pointer is WARNED, never rejected. The builder
8101
8397
  * takes the opposite stance: it REFUSES rather than emit a hierarchy a
@@ -8193,8 +8489,11 @@ declare function build277CA(spec: Build277Spec): X12Interchange;
8193
8489
  * structural indices + counts only - never a member id / name.
8194
8490
  * - `X12_277_BUILD_INVALID_SPEC` - a non-hierarchy precondition failed (a
8195
8491
  * claim that would not materialize on read - no trace, no statuses, no
8196
- * service lines; a status whose first composite has no category code; an
8197
- * over-long ISA-13 control number).
8492
+ * service lines; a status whose first composite has no category code; a
8493
+ * service line with no SVC-07 units of service count, which `005010X212`
8494
+ * makes REQUIRED and `005010X214` does not, so this arm fires for
8495
+ * `build277` and never for `build277CA`; an over-long ISA-13 control
8496
+ * number).
8198
8497
  *
8199
8498
  * @example
8200
8499
  * ```ts
@@ -10893,7 +11192,17 @@ interface Build278DecisionSpec {
10893
11192
  * ```
10894
11193
  */
10895
11194
  interface Build278ReviewSpec {
10896
- /** HL-03 - review level code (`EV` patient event / `SS` service). Default `"EV"`. */
11195
+ /**
11196
+ * HL-03 - review level code (`EV` patient event / `SS` service). Default
11197
+ * `"EV"`.
11198
+ *
11199
+ * The only caller-supplied HL-03 in the library; every other level on every
11200
+ * builder's spine is a module constant selected by tree position. A value
11201
+ * outside `EV` / `SS` is **refused** (`X12_278_BUILD_INVALID_SPEC`) rather
11202
+ * than emitted: it produces a well-formed document whose review loop no
11203
+ * reader opens, so the review and its HCR-01 certification decision would
11204
+ * fail to decode. An absent value still defaults to `EV`.
11205
+ */
10897
11206
  readonly levelCode?: "EV" | "SS";
10898
11207
  /** UM-01 - request category code (required; a review with none is refused). */
10899
11208
  readonly requestCategoryCode: string;
@@ -11046,7 +11355,8 @@ interface Build278Spec {
11046
11355
  /**
11047
11356
  * `build278Request` - assemble a 005010X217 278 Request for Review around the
11048
11357
  * supplied spec. Refuses any review carrying an HCR `decision` (HCR is
11049
- * response-only).
11358
+ * response-only), and any review whose HL-03 `levelCode` is outside
11359
+ * `EV` / `SS`.
11050
11360
  *
11051
11361
  * @example
11052
11362
  * ```ts
@@ -11073,7 +11383,10 @@ declare function build278Request(spec: Build278Spec): X12Interchange;
11073
11383
  * `build278Response` - assemble a 005010X216 278 Response around the supplied
11074
11384
  * spec. The HCR `actionCode` on each review's `decision` is emitted VERBATIM
11075
11385
  * (never inferred), so the response round-trips the exact certification
11076
- * outcome through {@link "./get-278.js".get278Response}.
11386
+ * outcome through {@link "./get-278.js".get278Response}. A review whose HL-03
11387
+ * `levelCode` is outside `EV` / `SS` is REFUSED, because that round trip is
11388
+ * what an out-of-enum level breaks: the emitted review loop is one no reader
11389
+ * opens, so the decision fails to decode.
11077
11390
  *
11078
11391
  * @example
11079
11392
  * ```ts
@@ -11122,10 +11435,12 @@ declare function build278Response(spec: Build278Spec): X12Interchange;
11122
11435
  * dependent with no review). The message carries structural indices +
11123
11436
  * counts only - never a member id / name.
11124
11437
  * - `X12_278_BUILD_INVALID_SPEC` - a non-hierarchy precondition failed (a
11125
- * review with no `requestCategoryCode`; a request spec carrying an `HCR`
11126
- * certification decision - `HCR` is response-only; a response review with a
11127
- * decision whose `actionCode` is empty; an over-long ISA-13 control
11128
- * number).
11438
+ * review whose HL-03 `levelCode` is outside `EV` / `SS`; a review with no
11439
+ * `requestCategoryCode`; a request spec carrying an `HCR` certification
11440
+ * decision - `HCR` is response-only; a response review with a decision whose
11441
+ * `actionCode` is empty; an over-long ISA-13 control number). The message
11442
+ * carries structural indices, counts and X12 control codes - never a member
11443
+ * id / name.
11129
11444
  *
11130
11445
  * @example
11131
11446
  * ```ts
@@ -12666,7 +12981,7 @@ declare const BUILD_REFUSAL_VALUE_MAX_RENDERED: number;
12666
12981
  * Render a caller-supplied value as a bounded, quoted fragment for a `build*`
12667
12982
  * refusal message. **This is the only sanctioned route a caller value takes
12668
12983
  * into a thrown message**, and `test/builder-refusal-bounds.test.ts` scans
12669
- * `src/` for any other route - a twenty-fourth refusal site that interpolates a
12984
+ * `src/` for any other route - a twenty-fifth refusal site that interpolates a
12670
12985
  * value directly reds that test. That scan keys on `throw new *BuildError(` and
12671
12986
  * on template-literal holes, so it is a strong tripwire for the shape this
12672
12987
  * library uses rather than a proof over every shape one could write.
@@ -13031,4 +13346,4 @@ declare const profiles: {
13031
13346
  */
13032
13347
  declare const VERSION: string;
13033
13348
 
13034
- 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 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, 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, 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, pre005010, profiles, remitBalanceMismatch, renderCallerValue, resolveHiQualifier, segmentCountMismatch, serializeX12, setDefaultProfile, trailingGarbage, transactionCountMismatch, unescapeRelease, unexpectedSegment, unknown837Variant, unknownCarc, unknownClaimStatus, unknownClaimStatusCategory, unknownHiQualifier, unknownMaintenanceType, unknownRarc };
13349
+ 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, 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, pre005010, profiles, readElementDecimal, remitBalanceMismatch, renderCallerValue, resolveHiQualifier, segmentCountMismatch, serializeX12, serviceLineDropped, serviceLineNotDecoded, serviceSegmentWithoutLx, setDefaultProfile, trailingGarbage, transactionCountMismatch, unescapeRelease, unexpectedSegment, unknown837Variant, unknownCarc, unknownClaimStatus, unknownClaimStatusCategory, unknownHiQualifier, unknownMaintenanceType, unknownRarc, unparseableDecimal };