Skip to main content
Version: v0.0.3

Interface: Cardinality

A repetition-count constraint. min / max are inclusive bounds on the number of repetitions (for a field rule) or occurrences (for a segment rule). max may be the literal "*" for "unbounded". Omitted bounds are unconstrained on that side.

Cardinality min is checked only when the element is present. An absent Required element is reported as FINDING_CODES.PROFILE_REQUIRED_ABSENT (a usage finding), not a cardinality finding: so a missing R field with cardinality.min = 1 yields exactly one finding, never two.

Example

import type { Cardinality } from "@cosyte/hl7";
const once: Cardinality = { min: 1, max: 1 };
const many: Cardinality = { min: 1, max: "*" };

Properties

max?

readonly optional max?: number | "*"


min?

readonly optional min?: number