Package ca.cdr.api.hl7v2.util
Class Hl7v2FormattedTextEncoder
java.lang.Object
ca.cdr.api.hl7v2.util.Hl7v2FormattedTextEncoder
Utility class for encoding the following character sequences contained in HL7v2 FT (formatted text) fields:
- \h\ \n\ - Bold text highlighting
- \.br\ - Line break
- \.ce\ - Center line
- \.fi\ - Fill mode (word wrap)
- \.nf\ - No-fill mode (no wrap)
- \.in X\ - Indent by X spaces
- \.ti X\ - Temporarily indent by X spaces
- \.sk X\ - Skip X spaces to the right
- \.sp X\ - Skip X vertical spaces
See Hl7v2FormattedTextEncoder.OutputFormat
for available output formats.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic String
encode
(String theFormattedText, Hl7v2FormattedTextEncoder.OutputFormat theOutputFormat) Encodes a String with HL7v2 FT character sequences to the specified output format
-
Method Details
-
encode
public static String encode(String theFormattedText, Hl7v2FormattedTextEncoder.OutputFormat theOutputFormat) Encodes a String with HL7v2 FT character sequences to the specified output format- Parameters:
theFormattedText
- - A String containing HL7v2 FT character sequences to be encodedtheOutputFormat
- - TheHl7v2FormattedTextEncoder.OutputFormat
- Returns:
- A String with HL7v2 FT character sequences encoded
-