Please enable JavaScript to view this site.


Online Help - Region 1: [CORE HL7 API Basic]

Other CORE HL7 API Help Regions

Download the API Libraries


Object: HL7DataAnalyzer

NOTE: No public entry point. Created only through a Controller object.

Description: The HL7DataAnalyzer is an aggregate batch analyzer class that incorporates the best parts of the HL7FileAnalyzer and the HL7StringAnalyzer into one easy to use class object.


HL7DataAnalyzer Object

HL7DataAnalyzer Object



The HL7FileAnalyzer maps and parses HL7 messages from a data file on the file-system using file position pointers and buffers. The HL7StringAnalyzer performs the same operation but acts on a simple string "blob" so the entire operation is done in memory resulting in much greater processing speed. There is always a spirited debate on which one you should use (see HL7FileAnalyzer Vs HL7StringAnalyzer) when the unavoidable answer is obvious, use BOTH.


Thus was born the HL7DataAnalyzer class object. It has the same public facing interface to load a HL7 Message string (see LoadHL7String() below) which follows the same rules and restrictions as the HL7StringAnalyzer object. What makes it special is the public facing FILE interface (see LoadHL7File() below). When you call LoadHL7File() and pass in a HL7 data file name the data analyzer will first determine the file size and IF the size of the file is less than MaximumStringCapacity it will very quickly load the entire file into memory similar to File.ReadAllText(fileName) and pass the buffer to the string analyzer. If the size is greater than MaximumStringCapacity it will initiate a File Analysis operation using the internal HL7FileAnalyzer object. If you are working with HL7 data files on the file system this object will always insure that you get the best analysis performance without you having to code the decision on which object to use.


Public Properties:


Property Name

Data Type


Uses the Standard Exceptions Interface


bool (read only) - Will return true if the internal HL7FileAnalyzer object is holding (locking) a data file open. Echoes the FileIsOpen property on the file analyzer object.


int (Default = 30 megabyts (30000 * 1024)) - Echoes the MaximumCapacity property of the internal HL7StringAnalyzer object. Although read only it CAN be changed (see ResetMaximumStringCapacity() below)


int (read only) - Will be the number of HL7 Messages detected during the last analysis operation.


Controller Object (read only) - Will be the parent controller object that created the analyzer.


CORETag object - General purpose Tag object for custom programming code






Public Methods:



Return Value


Uses the Standard Exceptions Interface


COREExceptionEX[] - Returns a single dimension array of COREExceptionEX objects (See GetMessageEX()). Will be an empty array if MessageCount == 0.


string[] - Returns a single dimension array of raw HL7 message strings loaded. Will be an empty array if MessageCount == 0.


void - Clears the object. NOTE: Clear() is always called internally at the start of any analysis operation.

GetHL7Message(int index)

HL7Message object - Returns the HL7Message object loaded at #index in the file #index between 1 and MessageCount

GetMessageEX(int index)

COREExceptionEX object - See GetMessageEX() a Better Iterator below.

GetRawHL7(int index)

string - Returns the raw HL7 string value loaded at #index in the file #index between 1 and MessageCount

LoadHL7File(string fileName)

bool - Examines a data file and loads it either through the HL7StringAnalyzer or the HL7FileAnalyzer kept internally (See Example Code Below)

LoadHL7String(string hl7Blob)

bool - Returns true if hl7Blob was successfully examined and HL7 messages were discovered.

ResetMaximumStringCapacity(int valueMB)

void - Calls the ResetMaximumCapacity() method on the internal HL7StringAnalyzer object.


















Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC