Skip to main content

EnsLib.HL7.Parser

class EnsLib.HL7.Parser extends %Library.RegisteredObject

This is the HL7 v2.x file format parser

Property Inventory

Method Inventory

Properties

property %CharCount as %Integer;
Property methods: %CharCountDisplayToLogical(), %CharCountGet(), %CharCountIsValid(), %CharCountLogicalToDisplay(), %CharCountNormalize(), %CharCountSet()
property %CurrentDocument as EnsLib.EDI.Document;
The current Document
Property methods: %CurrentDocumentGet(), %CurrentDocumentGetSwizzled(), %CurrentDocumentIsValid(), %CurrentDocumentNewObject(), %CurrentDocumentSet()
property %CurrentParentSegIndex as %String;
The segment position within the current parent Document
Property methods: %CurrentParentSegIndexDisplayToLogical(), %CurrentParentSegIndexGet(), %CurrentParentSegIndexIsValid(), %CurrentParentSegIndexLogicalToDisplay(), %CurrentParentSegIndexLogicalToOdbc(), %CurrentParentSegIndexNormalize(), %CurrentParentSegIndexSet()
property %CurrentParents [ InitialExpression = 0 , MultiDimensional ];
List of enclosing parent objects ordered from outermost to immediate As EnsLib.EDI.Document
Property methods: %CurrentParentsDisplayToLogical(), %CurrentParentsGet(), %CurrentParentsIsValid(), %CurrentParentsLogicalToDisplay(), %CurrentParentsLogicalToOdbc(), %CurrentParentsNormalize(), %CurrentParentsSet()
property %EndBlock as %String;
EndBlock character(s) to look for as message end marker
Property methods: %EndBlockDisplayToLogical(), %EndBlockGet(), %EndBlockIsValid(), %EndBlockLogicalToDisplay(), %EndBlockLogicalToOdbc(), %EndBlockNormalize(), %EndBlockSet()
property %LineCount as %Integer;
Property methods: %LineCountDisplayToLogical(), %LineCountGet(), %LineCountIsValid(), %LineCountLogicalToDisplay(), %LineCountNormalize(), %LineCountSet()
property %LookaheadLine as %String;
Lookahead line left over from previous document parse
Property methods: %LookaheadLineDisplayToLogical(), %LookaheadLineGet(), %LookaheadLineIsValid(), %LookaheadLineLogicalToDisplay(), %LookaheadLineLogicalToOdbc(), %LookaheadLineNormalize(), %LookaheadLineSet()
property %LookaheadLineIsNew as %Boolean;
Lookahead buffer for line terminator of unframed MSH
Property methods: %LookaheadLineIsNewDisplayToLogical(), %LookaheadLineIsNewGet(), %LookaheadLineIsNewIsValid(), %LookaheadLineIsNewLogicalToDisplay(), %LookaheadLineIsNewNormalize(), %LookaheadLineIsNewSet()
property %LookaheadLineTerminator as %String;
Lookahead buffer for line terminator of unframed MSH
Property methods: %LookaheadLineTerminatorDisplayToLogical(), %LookaheadLineTerminatorGet(), %LookaheadLineTerminatorIsValid(), %LookaheadLineTerminatorLogicalToDisplay(), %LookaheadLineTerminatorLogicalToOdbc(), %LookaheadLineTerminatorNormalize(), %LookaheadLineTerminatorSet()
property %NumChildren as %Integer [ MultiDimensional ];
List of counts of nested documents, ordered from outer to innermost
Property methods: %NumChildrenDisplayToLogical(), %NumChildrenGet(), %NumChildrenIsValid(), %NumChildrenLogicalToDisplay(), %NumChildrenNormalize(), %NumChildrenSet()
property %ParentIds as %String;
List of enclosing parent objects ordered from immediate to outermost
Property methods: %ParentIdsDisplayToLogical(), %ParentIdsGet(), %ParentIdsIsValid(), %ParentIdsLogicalToDisplay(), %ParentIdsLogicalToOdbc(), %ParentIdsNormalize(), %ParentIdsSet()
property %SegmentCount as %Integer;
Count of Segments tallied during parse
Property methods: %SegmentCountDisplayToLogical(), %SegmentCountGet(), %SegmentCountIsValid(), %SegmentCountLogicalToDisplay(), %SegmentCountNormalize(), %SegmentCountSet()
property %ServiceInterface as EnsLib.EDI.ServiceInterface;
The config provider
Property methods: %ServiceInterfaceGet(), %ServiceInterfaceGetSwizzled(), %ServiceInterfaceIsValid(), %ServiceInterfaceNewObject(), %ServiceInterfaceSet()
property %Stream as %IO.I.CharacterStream;
Property methods: %StreamGet(), %StreamGetSwizzled(), %StreamIsValid(), %StreamNewObject(), %StreamSet()
property %inFraming as %String;
pre-parse of Framing setting
Property methods: %inFramingDisplayToLogical(), %inFramingGet(), %inFramingIsValid(), %inFramingLogicalToDisplay(), %inFramingLogicalToOdbc(), %inFramingNormalize(), %inFramingSet()
property %outFraming as %String;
Framing to use on output if input framing is "Flexible"
Property methods: %outFramingDisplayToLogical(), %outFramingGet(), %outFramingIsValid(), %outFramingLogicalToDisplay(), %outFramingLogicalToOdbc(), %outFramingNormalize(), %outFramingSet()
property DefCharEncoding as %String;
Default Character Encoding to use when reading or writing HL7 messages.

If MSH field 18 (Character Set) is empty, this encoding will be used. Choices you can use for this setting include:

  • Native - use the default character encoding of the installed locale of the Ensemble server
  • latin1 - the ISO Latin1 8-bit encoding; this is the default
  • ISO-8859-1 - the ISO Latin1 8-bit encoding
  • UTF-8 - the Unicode 8-bit encoding
  • Unicode - the Unicode 16-bit encoding (Little-Endian)
  • UnicodeBig - the Unicode 16-bit encoding (Big-Endian)
  • Any other NLS definitions installed on this Ensemble server
  • @<ttable> - <ttable> means a raw InterSystems character translation table name. A prefix of '@' means to use the named table.
Putting ! before the encoding name will force the use of the named encoding and will ignore any value found in MSH:18.

Property methods: DefCharEncodingDisplayToLogical(), DefCharEncodingGet(), DefCharEncodingIsValid(), DefCharEncodingLogicalToDisplay(), DefCharEncodingLogicalToOdbc(), DefCharEncodingNormalize(), DefCharEncodingSet()
property Done as %Boolean [ Calculated , ReadOnly ];
Property methods: DoneDisplayToLogical(), DoneIsValid(), DoneLogicalToDisplay(), DoneNormalize()
property Framing as %String;
See your HL7 Config Items for a description of accepted values.
Property methods: FramingDisplayToLogical(), FramingGet(), FramingIsValid(), FramingLogicalToDisplay(), FramingLogicalToOdbc(), FramingNormalize(), FramingSet()
property IgnoreBlankLines as %Boolean;
Don't consider a blank line to indicate the end of a document
Property methods: IgnoreBlankLinesDisplayToLogical(), IgnoreBlankLinesGet(), IgnoreBlankLinesIsValid(), IgnoreBlankLinesLogicalToDisplay(), IgnoreBlankLinesNormalize(), IgnoreBlankLinesSet()
property ReadTimeout as %Numeric (MINVAL = -1) [ InitialExpression = 5 ];
Number of seconds to wait for each read of document data inside a started document to be available on the input stream
Property methods: ReadTimeoutDisplayToLogical(), ReadTimeoutGet(), ReadTimeoutIsValid(), ReadTimeoutLogicalToDisplay(), ReadTimeoutNormalize(), ReadTimeoutSet()
property RememberFlex as %Boolean [ InitialExpression = 0 ];
Set this if you want to make an interface that is set to Framing='Flexible' continue with the Framing style it detects in the first message it receives. This can increase performance, reduce latency due to timeouts and ensure consistent behavior after initialization. However, it will also reduce the ability of the interface to interpret changing input formats in successive messages from the same source or from different sources on sequential connections.
Property methods: RememberFlexDisplayToLogical(), RememberFlexGet(), RememberFlexIsValid(), RememberFlexLogicalToDisplay(), RememberFlexNormalize(), RememberFlexSet()
property StartTimeout as %Numeric (MINVAL = -1) [ InitialExpression = 5 ];
Number of seconds to wait for the start of a document to be available on the input stream
Property methods: StartTimeoutDisplayToLogical(), StartTimeoutGet(), StartTimeoutIsValid(), StartTimeoutLogicalToDisplay(), StartTimeoutNormalize(), StartTimeoutSet()

Methods

method DoneGet() as %Boolean
method ParseFramedIOStream(pIOStream As %IO.I.CharacterStream, ByRef pMsg As EnsLib.HL7.Message, pInbound As %Boolean = 0, ByRef pIOLogEntry As Ens.Util.IOLog = $$$NULLOREF) as %Status
Read an HL7 Message from the given IO Stream Returned %Status codes are not logged, except for Exceptions
method ParseIOStream(pIOStream As %IO.I.CharacterStream, ByRef pMsg As EnsLib.HL7.Message, pInbound As %Boolean = 0, pFramed As %Boolean = 0) as %Status
Parse a complete document from the stream, including any nested documents inside it
method Reset()
method ResetPosition()
classmethod applyFraming(pFraming As %String, pFlexDefault As %String = "xxf") as %String
classmethod split(pPrev As %String, ByRef pBuf As %String, pDelims As %String) as %String
merge prev buf with current buf, return new trailing overflow buf. Split on delimiter boundary if possible return next subscript for the extra remnant

Inherited Members

Inherited Methods

FeedbackOpens in a new tab