Skip to main content


class EnsLib.InteropTools.HL7.MessageAnalyzer.API.IdentifyMessages extends %Library.RegisteredObject

API to the message-identification facility

Method Inventory


method %OnNew(pConfig As Config, pLogger As Logger, pVersion As %String = "") as %Status
The arguments are constructed with sensible defaults if omitted but if you want to set Config flags or options you will need to construct and configure your own Config object and pass that.
method AnalyzeMessages(pMessageSource As %String, pCombine As %Boolean, pSetConfigFlags As %List, pQuiet As %Boolean, pOutput As Logger, pLogOutput As Logger)
Given a message source, a list of Config flag names to set and a couple of loggers

Load the messages and classify by schema

The message source is a path to a file or folder

The schema is taken from the message type if given, otherwise it is one of:

  • Some existing schema which matches all the relevant messages
  • A schema which has been modified to match any originally-mismatching messages
  • The schema which most nearly matches the messages but which the program was unable to modify to match completely
method IdentifyMatchingSchemas(pMessageSpec As %String, pQuiet As %Boolean = 1, pMessageType As %String = "") as %List
Given a message as a CSV string of message types (e.g. "MSH,PID,PVN"): return $LB($LB(SCHEMANAME,SCHEMASPEC),..) with all schemas that match the message exactly.
method LoadSchemas(pSchemaSpec As %String, pQuiet As %Boolean = 1)
Given a string which would be acceptable to enter into the shell (RigImpl): load the given schemas into this object.

- this can be an explicit schema definition, a single schema name, or something using "+" or the "*" suffix

- this method can be called more than once and the schemas accumulate - they are NOT cleared before each load This method will take an appreciable time (perhaps 30s or more) to load all schemas (i.e. when passing "*") but it only needs to be done once and any number of messages can subsequently be processed using IdentifyMatchingSchemas or AnalyzeMessages.

method LoadedSchemaNames() as %List
Return a list of loaded schema names
classmethod MessageListPassesSchema(pMessageSpecList As %List, pSchemaSpec As %String) as %Boolean
Quick call to check a list of messages against a single schema specification

Given a message as a $List of CSV strings of message types (typical CSV string: "MSH,PID,PVN") and a schema name/spec: return 1 if every message matches, 0 otherwise

classmethod MessagePassesSchema(pMessageSpec As %String, pSchemaSpec As %String, pVersion As %String = "") as %Boolean
Quick call to check a single message against a single schema specification

Given a message as a CSV string of message types (e.g. "MSH,PID,PVN") and a schema name/spec: return 1 if the message matches, 0 otherwise

Inherited Members

Inherited Methods

FeedbackOpens in a new tab