varies

Variable Data Type

Pseudo-Type

The varies data type is a polymorphic placeholder in HL7 v2. It indicates that the actual data type of a field is determined at runtime by the value of a companion field within the same segment.

How It Works

The most common use is in the OBX (Observation) segment. OBX-2 (Value Type) declares which data type OBX-5 (Observation Value) actually contains:

OBX|1|NM|... (OBX-5 is Numeric)

OBX|1|CWE|... (OBX-5 is Coded with Exceptions)

OBX|1|ST|... (OBX-5 is String Data)

Fields Using This Type

FieldNameNote
OBX-5Observation ValueType set by OBX-2 (Value Type)
MFA-5Primary Key Value - MFAType varies by master file
MFE-4Primary Key Value - MFEType varies by master file
QPD-3User Parameters (in successive fields)Query-specific parameters
RDT-1Column ValueType defined by RDF segment

Common Value Types for OBX-5

These are the most frequently used OBX-2 codes. The value in OBX-2 determines the data type of OBX-5.

STString Data
NMNumeric
CWECoded with Exceptions
TXText Data
FTFormatted Text
EDEncapsulated Data
DTMDate/Time
SNStructured Numeric