Chameleon and Iguana Plugin C# Class Libraries

LlpServer.MakeMessagePrintable Method 

Make message printable by changing plain carriage return characters "\r" to carriage return and newline characters "\r\n".

[Visual Basic]
Public Function MakeMessagePrintable( _
   ByVal InputString As String, _
   ByVal NewLine As String, _
   ByVal MaximumLength As Integer _
) As String
[C#]
public string MakeMessagePrintable(
   string InputString,
   string NewLine,
   int MaximumLength
);

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.

Return Value

Printable string, with "\r" characters changed to "\r\n"

Remarks

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.

See Also

LlpServer Class | iNTERFACEWARE.Chameleon Namespace