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
| Field | Name | Note |
|---|---|---|
| OBX-5 | Observation Value | Type set by OBX-2 (Value Type) |
| MFA-5 | Primary Key Value - MFA | Type varies by master file |
| MFE-4 | Primary Key Value - MFE | Type varies by master file |
| QPD-3 | User Parameters (in successive fields) | Query-specific parameters |
| RDT-1 | Column Value | Type 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