RCMbox Docs

parse-x12

Parses a raw X12 EDI string into a structured object using the full spec-based X12 parser with XSD schema support. Automatically detects the transaction type from the GS-08 element (supports 835, 837P, 837I, 277, 999).

Script path: @aidbox-billing/x12/parse-x12

Input

ParameterTypeDescription
rawX12stringRaw X12 file content as a string

Output

FieldTypeDescription
parsedParsedX12Full parsed X12 structure with loops, segments, and composite elements

Supported transaction types

GS-08 CodeTransaction
835Healthcare claim payment / remittance advice (ERA)
837PProfessional healthcare claim
837IInstitutional healthcare claim
277Healthcare claim status response
999Functional acknowledgment

Usage in workflow YAML

- id: parse-x12
  script: "@aidbox-billing/x12/parse-x12"
  params:
    rawX12: $input.rawX12
  children: [map-835]

The ParsedX12 type

import type { ParsedX12 } from "@aidbox-billing/built-in-activities/x12/_types";

The ParsedX12 type is available from the config project's manifests/types/ declarations for use in project-specific activity TypeScript files.

See also

Last updated: