This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Home > Class Reference > ENSLIB namespace > EnsLib.HL7.Segment

EnsLib.HL7.Segment

class EnsLib.HL7.Segment extends %Library.RegisteredObject, EnsLib.EDI.Segment

Property Inventory (Including Private)

Method Inventory (Including Private)

Properties (Including Private)

property CS as %String [ Calculated ];
Component Separator character
Property methods: CSDisplayToLogical(), CSGet(), CSIsValid(), CSLogicalToDisplay(), CSLogicalToOdbc(), CSNormalize(), CSSet()
property ESC as %String [ Calculated ];
Escape Character
Property methods: ESCDisplayToLogical(), ESCGet(), ESCIsValid(), ESCLogicalToDisplay(), ESCLogicalToOdbc(), ESCNormalize(), ESCSet()
property FS as %String [ Calculated ];
Field Separator character
Property methods: FSDisplayToLogical(), FSGet(), FSIsValid(), FSLogicalToDisplay(), FSLogicalToOdbc(), FSNormalize(), FSSet()
property FullSize as %Integer [ Calculated , ReadOnly ];
Size in bytes of the full segment content including any continuation nodes.
Property methods: FullSizeDisplayToLogical(), FullSizeGet(), FullSizeIsValid(), FullSizeLogicalToDisplay(), FullSizeNormalize()
property Name as %String (MAXLEN = 6, MINLEN = 3) [ Calculated , ReadOnly ];
Segment Type name
Property methods: NameCompute(), NameDisplayToLogical(), NameGet(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSQLCompute()
property RS as %String [ Calculated ];
Repetition Separator character
Property methods: RSDisplayToLogical(), RSGet(), RSIsValid(), RSLogicalToDisplay(), RSLogicalToOdbc(), RSNormalize(), RSSet()
property SS as %String [ Calculated ];
Subcomponent Separator character
Property methods: SSDisplayToLogical(), SSGet(), SSIsValid(), SSLogicalToDisplay(), SSLogicalToOdbc(), SSNormalize(), SSSet()
property SegType as %String [ Calculated ];
Deprecated: use DocType
Property methods: SegTypeCategoryDisplayToLogical(), SegTypeCategoryGet(), SegTypeCategoryIsValid(), SegTypeCategoryLogicalToDisplay(), SegTypeCategoryLogicalToOdbc(), SegTypeCategoryNormalize(), SegTypeDisplayToLogical(), SegTypeGet(), SegTypeIsValid(), SegTypeLogicalToDisplay(), SegTypeLogicalToOdbc(), SegTypeNameDisplayToLogical(), SegTypeNameGet(), SegTypeNameIsValid(), SegTypeNameLogicalToDisplay(), SegTypeNameLogicalToOdbc(), SegTypeNameNormalize(), SegTypeNormalize(), SegTypeSet()
property SegTypeCategory as %String [ Calculated , ReadOnly ];
Deprecated: use DocTypeCategory
Property methods: SegTypeCategoryDisplayToLogical(), SegTypeCategoryGet(), SegTypeCategoryIsValid(), SegTypeCategoryLogicalToDisplay(), SegTypeCategoryLogicalToOdbc(), SegTypeCategoryNormalize()
property SegTypeName as %String [ Calculated , ReadOnly ];
Deprecated: use DocTypeName
Property methods: SegTypeNameDisplayToLogical(), SegTypeNameGet(), SegTypeNameIsValid(), SegTypeNameLogicalToDisplay(), SegTypeNameLogicalToOdbc(), SegTypeNameNormalize()
property Separators as %String (MAXLEN = 5, MINLEN = 5) [ InitialExpression = $$$HL7DefSeparators ];
All 5 Separators as a single String
Property methods: SeparatorsDisplayToLogical(), SeparatorsGet(), SeparatorsIsValid(), SeparatorsLogicalToDisplay(), SeparatorsLogicalToOdbc(), SeparatorsNormalize(), SeparatorsSet()
property TC as %String;
Truncation Character
Property methods: TCDisplayToLogical(), TCGet(), TCIsValid(), TCLogicalToDisplay(), TCLogicalToOdbc(), TCNormalize(), TCSet()

Methods (Including Private)

method CopyValues(pSource As EnsLib.HL7.Segment, pSourcePath As %String, pTargetPath As %String, pAction As %String, pKey As %String, pEmptyFieldAsNull As %Boolean = 0, pIgnoreMissingSource As %Boolean = 0) as %Status
Inherited description: Copy a whole set of values from source to target when iteration is implied between 2 VDocs pSourcePath contains the property path to the source set
pTargetPath contains the property path to the target set
pAction contains an action code: "set", etc..
pKey contains an optional key value or a set of comma-separated key values to be used as array indices where empty array index placeholders are present in pPropertyPath.
method DumpMaps() as %Status
classmethod EnumerateDocTypesClose(ByRef qHandle As %Binary) as %Status
classmethod EnumerateDocTypesExecute(ByRef qHandle As %Binary, Category As %String, IncludeBase As %Boolean) as %Status
classmethod EnumerateDocTypesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
classmethod EnumerateTypeCategoriesClose(ByRef qHandle As %Binary) as %Status
classmethod EnumerateTypeCategoriesExecute(ByRef qHandle As %Binary, Standard As %String = "") as %Status
classmethod EnumerateTypeCategoriesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer = 0) as %Status
method Escape(pData) as %String
classmethod EscapeEx(pData, pSeparators, pEscapeChar) as %String
classmethod GetContentArray(Output pContents, pMode As %String, pDocType As %String, pLevel As %Integer, pIncludeBase As %Boolean = 0) as %Status
Inherited description: Returns array of properties that make up the contents of this object.
This method in implemented within the document class.
The content array is in the form:
pContents(n,"type")="%String"
pContents(n,"name")="Field"
pContents(n,"alias")=alias code
If pContents(n) is non-zero then the property is a composite type with
sub-properties. The sub-properties are indexed with a similar structure under
pContents(n,m) where m is the index of the subtype property.
method GetFieldStreamBase64(ByRef pStream As %Stream.Object, pPropertyPath As %String = "", Output pRemainder As %String = "", pUnescapeFirst As %Boolean = 1) as %Status
Read a field from a segment into a stream, decoding from Base64 to plain binary. pRemainder is the remainder of the segment after the stream field, including the field's terminating separator
method GetFieldStreamRaw(ByRef pStream As %Stream.Object, pPropertyPath As %String = "", Output pRemainder As %String = "", pProc As %String = "writeRaw", ByRef pHint) as %Status
Read a field from a segment into a stream. pRemainder is the remainder of the segment after the stream field, including the field's terminating separator
method GetFieldStreamUnescaped(ByRef pStream As %Stream.Object, pPropertyPath As %String = "", Output pRemainder As %String = "") as %Status
Read a field from a segment into a stream, unescaping any encoded separators or newlines, to plain text. pRemainder is the remainder of the segment after the stream field, including the field's terminating separator
method GetNextIndex(pPath As %String, pIndex As %String, ByRef pStatus As %Status = $$$OK) as %String
Gets the next index in an array
method GetValueAt(pPropertyPath As %String, pSeparators As %String, Output pStatus As %Status) as %String
pPropertyPath is of syntax: field [ ( array ) ] [ . component [ . subcomponent ] ] Returns the value at the specified property path. pSeparators is used to specify the separators to be used when a non-atomic value is returned. All property path elements must be either name or index. If a segment's total length is greater than the maximum string length on the system, then fields beyond the maximum string length can't be retrieved using this method. (Note that on older Ensemble systems, this limit was 32K, but with long strings enabled the limit is approximately 3.6MB.) If you are dealing with strings longer than the string limit, use one of the following methods:
classmethod ImportFromIOStream(pIOStream As %IO.I.CharacterStream, Output pStatus As %Status = $$$OK, pSeparators As %String, pIOFormatClassname As %String = "") as EnsLib.HL7.Message
classmethod ImportFromString(pString As %String, Output pStatus As %Status, pSeparators As %String, ByRef pConfigItem As %String = "", pIOFormatClassname As %String) as EnsLib.HL7.Segment
method OutputHTML() as %Status
Display Segment as HTML, using DocType info if available
method OutputHTMLZen() as %Status
Display Segment as HTML, using DocType info if available
method OutputToDevice(pSeparators As %String, pSequenceNumber As %String, pSegNum As %String, pSegPath As %String, pParentDoc As EnsLib.EDI.Document, pIOFormatClassname As %String) as %Status
method OutputToIOStream(pIOStream As %IO.I.CharacterStream, pSeparators As %String, pSequenceNumber As %String = "", pSegNum As %String, pSegPath As %String, pParentDoc As EnsLib.EDI.Document, pIOFormatClassname As %String = "") as %Status
Convert segments back to Stream, using sequence number
method OutputToLibraryStream(pLibStream As %Stream.Object, pSeparators As %String, pSequenceNumber As %String, pSegNum As %String, pSegPath As %String, pParentDoc As EnsLib.EDI.Document, pIOFormatClassname As %String) as %Status
method OutputToOldStream(pOldStream As %Stream.Object, pSeparators As %String, pSequenceNumber As %String) as %Status
deprecated - use OutputToLibraryStream
method OutputToString(pSeparators As %String, pSequenceNumber As %String, Output pStatus As %Status, pCharEncoding As %String = "", pSegNum As %String, pSegPath As %String, pParentDoc As EnsLib.EDI.Document, pIOFormatClassname As %String) as %String
method PokeDocType(pDocType As %String) as %Status
method SaveData(pSeparators As %String = "") as %Status
Compose the segment and store it at a new ID
method SetValueAt(pValue As %String, pPropertyPath As %String = "", pAction As %String = "set", pKey As %String = "") as %Status
Sets the value at the specified property path. pPropertyPath is of syntax: field [ ( array ) ] [ . component [ . subcomponent ] ] All property path elements must be either name or index. pKey is used to append an array index to the value at the given property path. pAction corresponds to the actions in the DTL statement. If a segment's total length is more than the current string length limit, or will be after setting the value, then this method can't be used. Instead, use one of the methods StoreFieldStreamRaw(), StoreFieldStreamEscaped() or StoreFieldStreamBase64()
method StoreFieldStreamBase64(pStream As %Stream.Object, pPropertyPath As %String = "", pRemainder As %String = "", pEscapeAfter As %Boolean = 1) as %Status
Store a stream into a segment field, encoding as Base64. Note that this renders the segment immutable after completing, and therefore works only once per segment.
method StoreFieldStreamEscaped(pStream As %Stream.Object, pPropertyPath As %String = "", pRemainder As %String = "") as %Status
Store a stream into a segment field, applying HL7 escaping. Note that this renders the segment immutable after completing, and therefore works only once per segment.
method StoreFieldStreamRaw(pStream As %Stream.Object, pPropertyPath As %String = "", pRemainder As %String = "", pProc As %String = "readRaw", ByRef pHint) as %Status
Store a stream into a segment field. Note that this renders the segment immutable after completing, and therefore works only once per segment. pRemainder contains trailing segment text to be appended raw after the stream value.
method StoreRawDataStream(pStream As %Stream.Object, pPropertyPath As %String = "") as %Status
deprecated: use StoreFieldStreamRaw(), StoreFieldStreamEscaped() or StoreFieldStreamBase64()
method Unescape(pData) as %String
classmethod UnescapeEx(pData, pSeparators, pEscapeChar, ByRef pLastPos) as %String
classmethod buildSchema(pType As %String, pTag As %String, ByRef schema) as %Status
Deprecated - to be removed - only used by deprecated toEasyXML
method decompose() as %Status
Decompose the segment from a single string into a multidimensional array
method decomposeData(pData As %String) as %Status
method getAtFromArray(pPropertyPath As %String = "", pSeparators As %String, Output pStatus As %Status) as %String
method getAtFromGlobal(pPropertyPath As %String = "", pSeparators As %String, Output pStatus As %Status) as %String
method getRemainderFromArray(pPropertyPath As %String = "", Output pStatus As %Status = $$$OK)
method outputHTMLSeg(pSeparators As %String, pSegNum As %String = "", pSegPath As %String = "", pDocument As EnsLib.EDI.Document = $$$NULLOREF) as %Status
method outputHTMLSegZen(pSeparators As %String, pSegNum As %String = "", pSegPath As %String = "", pDocument As EnsLib.EDI.Document = $$$NULLOREF) as %Status
method parsePropertyPath(pPropertyPath As %String, Output pField As %Integer, Output pArray As %Integer, Output pComponent As %Integer, Output pSubcomponent As %Integer) as %Status
Given a property path, determine the Field, Array, Component and Subcomponent positions
classmethod replaceSeparators(pInputData, oSeparators) as %String

Queries

query EnumerateDocTypes(Category As %String = "", IncludeBase As %Boolean = 0)
Selects Type As %String
Returns a list of available DocTypes for this document class.
The DocType is returned as the first column in the result set.
The Category parameter can be used to restrict the list.
If Category is:
0 - return only DocTypes in standard categories
+ - return only DocTypes in user-defined categories
empty - return DocTypes from all categories
a category name - return only DocTypes in the named category
a partial name suffixed with '%' - return only DocTypes in categories matching the partial category name
other - return nothing
If IncludeBase is:
0 - return only DocTypes defined in the current schema category itself
1 - return all DocTypes in the current schema category's base category in addition to those defined in the current category itself
query EnumerateTypeCategories(Standard As %String = "")
Selects Category As %String, Description As %String, IsStandard As %Boolean, Base As %String
Returns a list of document type schema categories for the document class.
The Standard parameter can be used to restrict the list.
If Standard is: 0 - return only standard categories + - return only user-defined categories empty - return all categories a partial category name - return only categories starting with the given category name part
other - return nothing

Inherited Members

Inherited Properties (Including Private)

Inherited Methods (Including Private)

FeedbackOpens in a new window