HL7 v2.5.1 Specificationsv2.5.1

to moveEnter to openTry PID-5, ADT, 0004

Cardinality in HL7 v2

Cardinality says how many times a field may appear: a minimum and a maximum, written here as 0..*. The standard does not print it. It prints optionality in the OPT column and repetition in the RP/# column and leaves the two to be combined. This site does that combining and shows the result, which is why cardinality is the one column on a segment page that HL7 did not publish.

The minimum comes from OPT

OPTMeaningMinimum
RRequired. The field must be present and populated.1
RERequired but may be empty. Send it if you have it.1
OOptional. The standard states no requirement either way.0
CConditional on a rule stated in the field notes.0
CEConditional, and may be empty when the condition holds.0
XNot supported. Do not send it.0
BKept for backward compatibility only. Do not use in new work.0
WWithdrawn. It no longer carries meaning.0
UNot designated in the source table for this version.0

The maximum comes from RP/#

RP/#MeaningMaximum
blank or NDoes not repeat.1
YRepeats, with no stated limit.*
Y/3Repeats, at most three times.3
3Repeats, at most three times.3

Put together

OPTRP/#CardinalityReads as
Rblank1..1exactly once
Oblank0..1never or once
RY1..*at least once, no upper limit
OY0..*any number of times, including none
OY/30..3up to three times

Where it is less certain

Conditional fields are shown with a minimum of 0. A field marked C is required when its condition holds, and that condition is written out in the field notes rather than given in a column. Showing 0 keeps us from claiming a requirement the table never states. It also means the cardinality on its own will not tell you whether your message is valid.

HL7 publishes XML schemas for v2.5.1. We take the maximum from the schema's maxOccurs rather than the printed RP/# column, because the schema states it exactly. The two agree almost everywhere they overlap.

Cardinality describes the segment definition, not any particular message. A message profile can constrain a field further, and most real interfaces do. A field this site shows as 0..* may be required exactly once by the specification you were handed.