HL7 Data Types

HL7 data types define the kind of data that can be included in a field, and are used throughout the HL7 message structure. Examples would be a string, formatted text, timestamp, address, or coded element. Each data type may contain additional data types that are referenced as components or subcomponents. Complex data types use other data types to define the kind of data they can contain.

Certain data types cannot reference each other due to the nature of the components. For instance, a data type cannot reference data types that already reference multiple components, because there is no way to code the information at that level.

Below is a list of the HL7 data types:

DATA TYPE CATEGORY/ DATA TYPE DATA TYPE NAME
Alphanumeric  
ST String
TX Text data
FT Formatted text
Numerical  
CQ Composite quantity with units
MO Money
NM Numeric
SI Sequence ID
SN Structured numeric
Identifier  
ID Coded values for HL7 tables
IS Coded values for user-defined tables
HD Hierarchic designator
EI Entity identifier
RP Reference pointer
PL Person location
PT Processing type
Date/Time  
DT Date
TM Time
TS Time stamp
Code Values  
CE Coded element
CF Coded element with formatted values
CK Composite ID with check digit
CN Composite ID number and name
CX Extended composite ID with check digit
XCN Extended composite ID number and name
Generic  
CM Composite
Demographics  
AD Address
PN Person name
TN Telephone number
XAD Extended address
XPN Extended person name
XON Extended composite name and ID number for organizations
XTN Extended telecommunications number
Specialty/Chapter specific  
CD Channel definition
MA Multiplexed array
NA Numeric array
ED Encapsulated data
CP Composite price
FC Financial class
Extended Queries  
QSC Query selection criteria
QIP Query input parameter list
RCD Row column definition
Master Files  
DLN Driver’s license number
JCC Job code/class
VH Visiting hours
Medical Records/Info Mgmt  
PPN Performing person time stamp
Time Series  
DR Date/time range
RI Repeat interval
SCV Scheduling class value pair
TQ Timing/quantity

Understanding components and subcomponents

A data type may reference one or more additional data types as components or subcomponents. For example, the CK (composite ID with check digit) data type can be broken down into four components, each referencing a specific data type. One of these components (HD) also references three other data types as subcomponents.

CK data type:

SEQ DATA TYPE COMPONENT NAME
1 NM ID Number
2 ST Check Digit
3 ID Code Identifying the Check Digit Scheme Employed
4 HD Assigning Authority

HD component:

SEQ DATA TYPE COMPONENT NAME
1 IS Namespace ID
2 ST Universal ID
3 ID Universal ID Type