MakeMessagePrintable method
Make message printable by changing plain carriage return characters "\r" to carriage return and newline characters "\r\n".
Applies to
CHMllpServer
Declaration
Public Function MakeMessagePrintable(ByVal InputString As String, ByVal NewLine As String, ByVal MaximumLength As Long) As String
Description
HL7 messages use the carriage return character "\r" to separate the segments. This makes it difficult to print them out in console windows because the cursor overwrites each previous segment instead of moving on to a newline for each segment. This method is intended to be a simple utility method to make it easier to convert HL7 messages into a printable format. This function also allows the output string to be truncated.
Parameters |
InputString | Input message string. |
NewLine | Line feed string. |
MaximumLength | Maximum length of the message to print out. Characters after this length will be truncated. If you want to output the whole message, set the length to -1. |
Returns
Printable string, with "\r" characters changed to "\r\n"