Skip to main content

EnsLib.InteropTools.HL7.MessageAnalyzer.Message.SimpleMessage

class EnsLib.InteropTools.HL7.MessageAnalyzer.Message.SimpleMessage extends %Library.RegisteredObject

Method Inventory

Methods

method %OnNew(pMessageText As %String) as %Status
Inherited description: This callback method is invoked by the %New() method to provide notification that a new instance of an object is being created.

If this method returns an error then the object will not be created.

It is passed the arguments provided in the %New call. When customizing this method, override the arguments with whatever variables and types you expect to receive from %New(). For example, if you're going to call %New, passing 2 arguments, %OnNew's signature could be:

Method %OnNew(dob as %Date = "", name as %Name = "") as %Status If instead of returning a %Status code this returns an oref and this oref is a subclass of the current class then this oref will be the one returned to the caller of %New method.

method Access(pSegment As %String, pFieldIndex As %Integer, pComponentIndex As %Integer = "", pSubcomponentIndex As %Integer = "", pFieldRepeatIndex As %Integer = "") as %String
Given a segment, a field index and zero or more of component index, subcomponent index and field repeat index: return the data

To omit one of the optional indexes: either pass "" or omit the argument

method AccessComps(pSegment As %String, pFieldIndex As %Integer, pStartComponentIndex As %Integer, pEndComponentIndex As %Integer) as %List
Given a segment, a field index, a start component index and an end component index: return a $List of the given components
method ComponentSubcomponents(pComponent As %String) as %List
Given a component, return a $List of the subcomponents
method FieldComponents(pField As %String) as %List
Given a field, return a $List of the components
method FirstSegmentByName(pSegmentType As %String) as %String
Return the first segment of the given name in the message
method GetMessage(pSegSep As %String = $Char(13)) as %String
Return the whole message as a string with carriage-return segment-separators (by default)
method GetMessageWithSeps(pSegSep As %String = $Char(13)) as %String
Return the whole message as a string with carriage-return segment-separators (by default)

Separator characters are included in the first segment, even if absent from the original message

method SegmentByIndex(pIndex As %Integer) as %String
Return the pIndex'th message segment
method SegmentCount() as %Integer
Return the number of segments in the message
method SegmentFields(pSegment As %String) as %List
Given a segment, return a $List of the fields
method SegmentIndexes(pSegmentType As %String) as %List
Return a list of all the indexes at which the given segment name appears
method ToHL7Message(Output pSC=$$$OK) as Message

Inherited Members

Inherited Methods

FeedbackOpens in a new tab