The Demo site for our new HL7 Version 2+ (plus) Standard
visit the hl7 website

Draft Website - For Review Purposes Only

ST - string data

HL7 Component Table - ST - string data
Seq# Description Implement Flags Cardinality Length C.LEN Vocabulary Data Type
1 String Data [0..1]    

Definition: The String data type is used for text data when the appearance of text does not bear meaning. This is true for formalized text, symbols and formal expressions, and all kinds of names intended for machine processing (e.g., sorting, querying, indexing, etc.).

String data is left justified (i.e., no leading blank space) with trailing blanks optional, which may be trimmed, and SHOULD be ignored on string compare operations for 2 values of type ST. Any displayable (printable) characters are allowed based on the character set identified in MSH-18. For the default ASCII character set this is hexadecimal values between 20 and 7E, inclusive, or decimal values between 32 and 126, except the defined escape characters and defined delimiter characters. For Unicode this is any code point with a Basic Type of Graphic, except the defined escape characters and defined delimiter characters; see The Unicode Standard section 2.4 <> for details.

Example1: A textual ST field:

|almost any data at all|

Example 2: URL encoded in an ST component:


Example 3: ISO OID encoded in an ST subcomponent:


To include any HL7 delimiter character (except the segment terminator) within a string data field, use the appropriate HL7 escape sequence (see Section 2.7.1, "Formatting Codes”).

Minimum Length: Not specified for the type. May be specified in the context of use. Defaults to 1

Maximum Length: Not specified for the type. May be specified in the context of use

ST has no inbuilt semantics – these are assigned where the ST is used. In each case where ST is used, minimum, maximum, and conformance lengths may be specified. Unless specified in the context of use, values of type ST may not be truncated.

Usage note: The ST data type is intended for short strings (e.g., less than 1000 characters). For longer strings the TX or FT data types should be used (see Sections 2.A.79, “TX - text data” or 2.A.31, “FT - formatted text data”).

Alternate character set note: ST - string data may also be used to express other character sets. See Section, "Character set," and Section, "Alternate character set handling" for details.