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?
readonlyoptionalmax?:number|"*"
min?
readonlyoptionalmin?:number