Reads HL7 messages from a text file.

Namespace: Mergecom.HL7
Assembly: Mergecom.HL7 (in Mergecom.HL7.dll) Version: 4.3.0.0

Syntax

C#
public class HL7MessageFile : IDisposable
Visual Basic
Public Class HL7MessageFile _
	Implements IDisposable
Visual C++
public ref class HL7MessageFile : IDisposable

Remarks

The file can contain multiple HL7 messages. The start of a message is determined by the presence of an MSH segment. The end of a message is reached if it meets either of the conditions: 1. The end of the file; 2. The end of a line with presence of MSH segment in the next line. A line is defined as a sequence of characters followed by a carriage return ("\r"), a line feed ("\n") or a carriage return immediately followed by a line feed ("\r\n")

This class implements the IDisposable interface. If you invoke the member function ReadMessage()()()(), it will create a stream reader. So a Close()()()() method or Dispose()()()() are recommended to be invoked or the relative code blocks must be put in the "using" statement to make sure the release of system resources.

Encoding can be specified to decode the file and if it's not specified, system default ASCII encoding will be used. It also provides two static method to write a message into a file using specified encoding and appending mode.

Inheritance Hierarchy

System..::..Object
  Mergecom.HL7..::..HL7MessageFile

See Also