Skip to main content
Version: v0.0.3

Interface: NcpdpProfileQuirk

A single trading-partner convention captured by a profile. Every quirk is fixture-grounded: fixture points at a real Tier-2 corpus file that demonstrates the convention, and sourceCategory records where it is documented. This is the locked hard rule: a quirk without a demonstrating fixture is forbidden, enforced both by this required field and by the accuracy test.

Example

import type { NcpdpProfileQuirk } from "@cosyte/ncpdp/profiles";
const quirk: NcpdpProfileQuirk = {
id: "person-code-required",
standard: "telecom",
effect: "requires",
summary: "Insurance segment carries a Person Code (303-C3) cardholder/dependent value.",
fixture: "telecom/pbm-person-code.ncpdp",
sourceCategory: "NCPDP Telecommunication vD.0: Person Code (303-C3); PBM payer sheets",
};

Properties

effect

readonly effect: NcpdpProfileEffect

Which describe() bucket this quirk renders into.


expectedWarnings?

readonly optional expectedWarnings?: readonly NcpdpWarningCode[]

Warning codes this quirk leads a consumer to EXPECT when the convention is present. Drives partitionWarnings. Often empty: the lenient parser absorbs most conventions with zero warnings, and that "lossless, no warning" outcome is itself the documented behavior.


fixture

readonly fixture: string

Path to the Tier-2 fixture demonstrating the convention, relative to test/fixtures/ (e.g. "telecom/pbm-person-code.ncpdp"). REQUIRED: the locked hard rule. The accuracy test parses this file and asserts the claimed convention is present.


id

readonly id: string

Stable, kebab-case identifier: unique within a profile's quirk set.


sourceCategory

readonly sourceCategory: string

Where the convention is documented (standard clause / companion guide).


standard

readonly standard: NcpdpStandard

Which NCPDP standard the quirk (and its cited fixture) belongs to.


summary

readonly summary: string

One-line human summary. NEVER contains PHI: describes structure only.