Skip to main content
Version: v0.0.2

Interface: LoopSpec

A declarative loop description used by Phase 3+ transaction extractors and consumer-authored payer profiles alike. Frozen by defineLoopSpec so a LoopSpec is safe to share across calls.

Example

import { defineLoopSpec } from "@cosyte/x12";
const Loop2300 = defineLoopSpec({
id: "2300",
description: "837 Claim Information",
trigger: "CLM",
segments: [
{ id: "CLM", usage: "required", max: 1 },
{ id: "DTP", usage: "situational", max: ">1" },
{ id: "HI", usage: "situational", max: ">1" },
],
});

Properties

children

readonly children: readonly LoopSpec[]


description?

readonly optional description?: string


id

readonly id: string


segments

readonly segments: readonly LoopSegmentSpec[]


trigger

readonly trigger: string