EnsLib.EDI.X12.Document
persistent class EnsLib.EDI.X12.Document extends %Library.Persistent, EnsLib.EDI.BatchDocument, EnsLib.EDI.Segmented, EnsLib.EDI.X12.MsgBodyMethods
SQL Table Name: EnsLib_EDI_X12.Document
Represents an Interchange or a TransactionSet. FunctionalGroups are represented as Segments within an Interchange.Property Inventory
- %maps
- Attachments
- ChildCount
- ComponentSeparator
- DocTypeCategory
- DocTypeName
- ElementSeparator
- Envelope
- FullSize
- FunctionalGroups
- Identifier
- Name
- ParentGE
- ParentGEId
- ParentGS
- ParentGSId
- ParentIEA
- ParentIEAId
- ParentISA
- ParentISAId
- ParentIds
- ParentInterchange
- RawContent
- RepetitionSeparator
- SegCount
- SegmentTerminator
- Separators
- TransactionSets
- TypeVersion
Method Inventory
- %ConstructClone()
- AddAttachment()
- AddEndSegment()
- AddFunctionalGroup()
- AddTransactionSet()
- BuildMap()
- Clear()
- ComponentSeparatorGet()
- CopyValues()
- DetermineReplyVersion()
- DocTypeSet()
- DumpMaps()
- ElementSeparatorGet()
- EnumerateDocTypesClose()
- EnumerateDocTypesExecute()
- EnumerateDocTypesFetch()
- EnumerateSegTypesClose()
- EnumerateSegTypesExecute()
- EnumerateSegTypesFetch()
- EnumerateTypeCategoriesClose()
- EnumerateTypeCategoriesExecute()
- EnumerateTypeCategoriesFetch()
- FindSegment()
- FullSizeGet()
- GetAlias()
- GetContentArray()
- GetFullSize()
- GetManagerLinks()
- GetNextGroupPath()
- GetNextIndex()
- GetReplyGroupSegs()
- GetSegmentIndex()
- GetSegmentPath()
- GetValueAsStream()
- GetValueAt()
- IdentifierGet()
- ImportFromDevice()
- ImportFromFile()
- ImportFromIOStream()
- ImportFromLibraryStream()
- ImportFromString()
- KillGlobals()
- NameGet()
- New997OuterGroupSegs()
- NewControlID()
- NewDocumentReply997Segs()
- NewGroupReply997Segs()
- NewReplyDocument()
- NewReplyGroupSegs()
- NewReplyHeaderSegs()
- NewReplyHeaderSegsFromString()
- NewReplyTA1Seg()
- NewReplyTA1SegFromString()
- OutputHTML()
- OutputHTMLZen()
- OutputToDevice()
- OutputToFile()
- OutputToIOStream()
- OutputToLibraryStream()
- OutputToString()
- ParentGEGet()
- ParentGEIdGet()
- ParentGSGet()
- ParentGSIdGet()
- ParentIEAGet()
- ParentIEAIdGet()
- ParentISAGet()
- ParentISAIdGet()
- ParentInterchangeGet()
- ParentInterchangeGetObjectId()
- PokeDocType()
- Purge()
- RawContentGet()
- RepetitionSeparatorGet()
- SegCountGet()
- SegmentTerminatorGet()
- SetValueAt()
- SourceGet()
- TotalCount()
- TypeVersionGet()
- buildRuntimePathFromIndex()
- checkDocType()
- commitCollectionOpenSegments()
- commitSegmentByIndex()
- commitSegmentByPath()
- convertRuntimePathToSchemaPath()
- getGEId()
- getGSId()
- getIEAId()
- getISAId()
- getId()
- getIdentifier()
- getName()
- getSegmentIdByIndex()
- getSegmentIdByPath()
- getSegsAsString()
- getTypeVersion()
- resolveChildDocType()
Parameters
parameter DEFSEARCHCLASS = EnsLib.EDI.X12.SearchTable;
Name of the default SearchTable indexing class used in UI choices and MessageBank submissions
parameter DOCCLASSFULLNAME = ASC X12 EDI Document;
Inherited description: Full descriptive name for this subclass of document
parameter DOCCLASSNAME = X12 Document;
Inherited description: Compact descriptive name for this subclass of document
parameter DOCSHORTNAME = X12;
parameter DOMAIN = Ensemble;
Use our own domain for localization
parameter EXTENTSIZE = 2000000;
Inherited description: The EXTENTSIZE parameter is used to inform the SQL Query Optimizer
of the approximate number of instances in the extent containing instances of this class.
For example, a class that expects to have about 1,000,000 instances should define:
parameter EXTENTSIZE = 1000000;
parameter SCHEMACLASS = EnsLib.EDI.X12.Schema:DS;
Name of the associated schema class and after a colon the schema element code that represents a DocType
Properties
property %maps [ MultiDimensional , Transient ];
A local array of orefs
"orefs" - a local map of integer ids to segment objects
And either a subscript into ^IRIS.Temp for this object's LVD maps (for notes on LVD implementation see EnsEDI.inc)
or local storage for these additional maps:
"runtimeIndex" - array for runtime index to segment; will always be defined unless mapRuntimePath is defined
"runtimePath" - array for runtime path to segment
"bidirectionalLink" - array for runtime path and index linkage
Property methods: %mapsDisplayToLogical(), %mapsGet(), %mapsIsValid(), %mapsLogicalToDisplay(), %mapsLogicalToOdbc(), %mapsNormalize(), %mapsSet()
property Attachments as array of Ens.StreamContainer;
Attachment streams associated with this document
Property methods: AttachmentsBuildValueArray(), AttachmentsCollectionToDisplay(), AttachmentsCollectionToOdbc(), AttachmentsDisplayToCollection(), AttachmentsGet(), AttachmentsGetObject(), AttachmentsGetObjectId(), AttachmentsGetStored(), AttachmentsGetSwizzled(), AttachmentsIsValid(), AttachmentsOdbcToCollection(), AttachmentsSet(), AttachmentsSetObject(), AttachmentsSetObjectId()
property ChildCount as %Integer [ Calculated , Transient , ReadOnly ];
Number of Children
Property methods: ChildCountCompute(), ChildCountDisplayToLogical(), ChildCountIsValid(), ChildCountLogicalToDisplay(), ChildCountNormalize(), ChildCountSQLCompute()
property ComponentSeparator as %String [ Calculated , Transient ];
Sub-element component separator character
Property methods: ComponentSeparatorDisplayToLogical(), ComponentSeparatorIsValid(), ComponentSeparatorLogicalToDisplay(), ComponentSeparatorLogicalToOdbc(), ComponentSeparatorNormalize()
property DocTypeCategory as %String [ Transient , ReadOnly ];
the category portion of the DocType
Property methods: DocTypeCategoryDisplayToLogical(), DocTypeCategoryGet(), DocTypeCategoryIsValid(), DocTypeCategoryLogicalToDisplay(), DocTypeCategoryLogicalToOdbc(), DocTypeCategoryNormalize(), DocTypeCategorySet()
property DocTypeName as %String [ Transient , ReadOnly ];
Stored raw document type name ; the secondary type name portion of the DocType
Property methods: DocTypeNameDisplayToLogical(), DocTypeNameGet(), DocTypeNameIsValid(), DocTypeNameLogicalToDisplay(), DocTypeNameLogicalToOdbc(), DocTypeNameNormalize()
property ElementSeparator as %String [ Calculated , Transient ];
Data-element separator character
Property methods: ElementSeparatorDisplayToLogical(), ElementSeparatorIsValid(), ElementSeparatorLogicalToDisplay(), ElementSeparatorLogicalToOdbc(), ElementSeparatorNormalize()
property Envelope as %String);
XML or other 'envelope' for the X12 document message. The X12 document will be inserted in place of the "<!--X12DOC-->"
string If present, otherwise after the end of the Envelope.
Property methods: EnvelopeDisplayToLogical(), EnvelopeGet(), EnvelopeGetStored(), EnvelopeIsValid(), EnvelopeLogicalToDisplay(), EnvelopeLogicalToOdbc(), EnvelopeNormalize(), EnvelopeSet()
property FullSize as %Integer [ Calculated , Transient , ReadOnly ];
Size in bytes of the message content.
The calculation assumes 1-byte segment terminators and includes any segments that use more than one storage node (> X12MaxSegLen).
Property methods: FullSizeCompute(), FullSizeDisplayToLogical(), FullSizeIsValid(), FullSizeLogicalToDisplay(), FullSizeNormalize(), FullSizeSQLCompute()
property FunctionalGroups as EnsLib.EDI.X12.Document [ MultiDimensional , Transient ];
Temporary property used to hold pointers to FunctionalGroup child documents
Used in DTL Editor when using the DocType Batch multiple structure
Only used if Name is Interchange
Setter/Getter methods are overridden
Used in DTL Editor when using the DocType Batch multiple structure
Only used if Name is Interchange
Setter/Getter methods are overridden
Property methods: FunctionalGroupsGet(), FunctionalGroupsGetObject(), FunctionalGroupsGetObjectId(), FunctionalGroupsGetSwizzled(), FunctionalGroupsIsValid(), FunctionalGroupsNewObject(), FunctionalGroupsSet(), FunctionalGroupsSetObject(), FunctionalGroupsSetObjectId(), FunctionalGroupsUnSwizzle()
property Identifier as %String [ Calculated , Transient , ReadOnly ];
Unique document identification string found in document content
Property methods: IdentifierCompute(), IdentifierDisplayToLogical(), IdentifierIsValid(), IdentifierLogicalToDisplay(), IdentifierLogicalToOdbc(), IdentifierNormalize(), IdentifierSQLCompute()
property Name as %String [ Calculated , Transient , ReadOnly ];
Raw type name of document
Property methods: NameCompute(), NameDisplayToLogical(), NameIsValid(), NameLogicalToDisplay(), NameLogicalToOdbc(), NameNormalize(), NameSQLCompute()
property ParentGE as EnsLib.EDI.X12.Segment [ Calculated , Transient , ReadOnly ];
property ParentGEId as %Integer [ Calculated , Transient , ReadOnly ];
Id of the GE segment of the FunctionalGroup in the Interchange within which this TransactionSet arrived
or Id of the IEA segment of the Interchange within which this FunctionGroup arrived
Property methods: ParentGEIdCompute(), ParentGEIdDisplayToLogical(), ParentGEIdIsValid(), ParentGEIdLogicalToDisplay(), ParentGEIdNormalize(), ParentGEIdSQLCompute()
property ParentGS as EnsLib.EDI.X12.Segment [ Calculated , Transient , ReadOnly ];
property ParentGSId as %Integer [ Calculated , Transient , ReadOnly ];
Id of the GS segment of the FunctionalGroup in the Interchange within which this TransactionSet arrived
or Id of the ISA segment of the Interchange within which this FunctionGroup arrived
Property methods: ParentGSIdCompute(), ParentGSIdDisplayToLogical(), ParentGSIdIsValid(), ParentGSIdLogicalToDisplay(), ParentGSIdNormalize(), ParentGSIdSQLCompute()
property ParentIEA as EnsLib.EDI.X12.Segment [ Calculated , Transient , ReadOnly ];
property ParentIEAId as %Integer [ Calculated , Transient , ReadOnly ];
Id of the IEA segment of the Interchange within which this TransactionSet arrived
Property methods: ParentIEAIdCompute(), ParentIEAIdDisplayToLogical(), ParentIEAIdIsValid(), ParentIEAIdLogicalToDisplay(), ParentIEAIdNormalize(), ParentIEAIdSQLCompute()
property ParentISA as EnsLib.EDI.X12.Segment [ Calculated , Transient , ReadOnly ];
property ParentISAId as %Integer [ Calculated , Transient , ReadOnly ];
Id of the ISA segment of the Interchange within which this TransactionSet arrived
Property methods: ParentISAIdCompute(), ParentISAIdDisplayToLogical(), ParentISAIdIsValid(), ParentISAIdLogicalToDisplay(), ParentISAIdNormalize(), ParentISAIdSQLCompute()
property ParentIds as %String [ Calculated , Transient , ReadOnly ];
A $List of the Ids of all the enclosing parent documents of this nested document, if nested,
in order from from immediate to outermost
E.g. for Id of enclosing EncounterBatch if we are an Encounter
Property methods: ParentIdsCompute(), ParentIdsDisplayToLogical(), ParentIdsIsValid(), ParentIdsLogicalToDisplay(), ParentIdsLogicalToOdbc(), ParentIdsNormalize(), ParentIdsSQLCompute()
property ParentInterchange as EnsLib.EDI.X12.Document [ Calculated , Transient , ReadOnly ];
property RawContent as %String (MAXLEN = 10000) [ Calculated , Transient , ReadOnly ];
The raw text content of the document. Note that this is a truncated version suitable for use in SQL results and visual inspection,
but not a complete or definitive representation of the document.
Property methods: RawContentCompute(), RawContentDisplayToLogical(), RawContentIsValid(), RawContentLogicalToDisplay(), RawContentLogicalToOdbc(), RawContentNormalize(), RawContentSQLCompute()
property RepetitionSeparator as %String [ Calculated , Transient ];
Repetition separator character
Property methods: RepetitionSeparatorDisplayToLogical(), RepetitionSeparatorIsValid(), RepetitionSeparatorLogicalToDisplay(), RepetitionSeparatorLogicalToOdbc(), RepetitionSeparatorNormalize()
property SegCount as %Integer [ Calculated , Transient , ReadOnly ];
Count of segments composing this document
Property methods: SegCountCompute(), SegCountDisplayToLogical(), SegCountIsValid(), SegCountLogicalToDisplay(), SegCountNormalize(), SegCountSQLCompute()
property SegmentTerminator as %String [ Calculated , Transient ];
Segment Terminator character(s)
Property methods: SegmentTerminatorDisplayToLogical(), SegmentTerminatorIsValid(), SegmentTerminatorLogicalToDisplay(), SegmentTerminatorLogicalToOdbc(), SegmentTerminatorNormalize()
property Separators as %String (MAXLEN = 6, MINLEN = 3) [ Transient ];
All 3 Separators as a String, plus optionally SegmentTerminator: ELESEP_COMSEP_REPSEP
Additional characters will be output as the Segment Terminator; may have up to 3 additional chars for output with newlines
Property methods: SeparatorsDisplayToLogical(), SeparatorsGet(), SeparatorsIsValid(), SeparatorsLogicalToDisplay(), SeparatorsLogicalToOdbc(), SeparatorsNormalize(), SeparatorsSet()
property TransactionSets as EnsLib.EDI.X12.Document [ MultiDimensional , Transient ];
Temporary property used to hold pointers to TransactionSet child documents
Used in the DTL Editor when using the DocType Batch multiple structure
Only used if Name is Group
Setter/Getter methods are overridden
Used in the DTL Editor when using the DocType Batch multiple structure
Only used if Name is Group
Setter/Getter methods are overridden
Property methods: TransactionSetsGet(), TransactionSetsGetObject(), TransactionSetsGetObjectId(), TransactionSetsGetSwizzled(), TransactionSetsIsValid(), TransactionSetsNewObject(), TransactionSetsSet(), TransactionSetsSetObject(), TransactionSetsSetObjectId(), TransactionSetsUnSwizzle()
property TypeVersion as %String [ Calculated , Transient , ReadOnly ];
Raw type version name of message found at MSH:12 in message content
Property methods: TypeVersionCompute(), TypeVersionDisplayToLogical(), TypeVersionIsValid(), TypeVersionLogicalToDisplay(), TypeVersionLogicalToOdbc(), TypeVersionNormalize(), TypeVersionSQLCompute()
Methods
method %ConstructClone(deep As %Integer = 0, ByRef cloned As %String, location As %String) as %RegisteredObject
Clone the current document object to a new object and return the new cloned object.
By default references to parent documents are not preserved and child documents are not copied.
If deep is 1 then this does a deep copy which will also construct clones of any child documents.
method AddAttachment(pStream As %Stream.Object) as %Status
method AddEndSegment() as %Status
See Ens.X12.FunctionSet for updated helper class methods
method AddFunctionalGroup(pGS As EnsLib.EDI.X12.Segment, Output pGroupSegIndex As %Integer = "") as %Status
See Ens.X12.FunctionSet for updated helper class methods
method AddTransactionSet(pTxnSet As EnsLib.EDI.X12.Document, pGroupSegIndex As %Integer, pAttachment As %Stream.Object = $$$NULLOREF) as %Status
Add a TransactionSet to the Interchange. Add it to a group given the segment index of the placeholder segment between GS and GE segments.
See Ens.X12.FunctionSet for updated helper class methods
method BuildMap(pKeepParsingAfterError As %Boolean = 1, pReportMissingLoopAsFirstSeg As %Boolean = 0) as %Status
pKeepParsingAfterError means keep trying to parse after errors are encountered; returned Status will contain all errors encountered
pReportMissingLoopAsFirstSeg means to report the first segment from loop as missing instead of naming the loop if the loop is missing
method Clear() as %Status
Delete All Content and reset all properties
method ComponentSeparatorGet() as %String
method CopyValues(pSource As EnsLib.EDI.X12.Document, pSourcePath As %String = "", pTargetPath As %String = "", pAction As %String = "set", 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.
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.
Determine the reply type to use with the given Implementation Guide reference. We send a 999 response to HIPAA standard transactions with version 5010 or greater.
Otherwise we send a 997 response.
method DumpMaps() as %Status
method ElementSeparatorGet() as %String
classmethod EnumerateDocTypesExecute(ByRef qHandle As %Binary, Category As %String, IncludeBase As %Boolean, IncludeInterchangeTree As %Boolean) as %Status
classmethod EnumerateDocTypesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) as %Status
classmethod EnumerateSegTypesExecute(ByRef qHandle As %Binary, Category As %String, Level As %String, IncludeBase As %Boolean) as %Status
classmethod EnumerateSegTypesFetch(ByRef qHandle As %Binary, ByRef Row As %List, ByRef AtEnd As %Integer) 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) as %Status
method FindSegment(pSegName As %String, ByRef pIndex As %String = "", Output pStatus As %Status) as EnsLib.EDI.X12.Segment
Gets the next segment after index pIndex with name pSegName.
Supports pSegName = '*' to match any segment.
method FullSizeGet() as %Integer
This method computes the Alias string for a property name, given the property's node in the Content Array.
classmethod GetContentArray(Output pContents, pMode As %String, pDocType As %String, pLevel As %Integer, pIncludeBase As %Boolean) 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.
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.
classmethod GetFullSize(pMsgId) as %Integer
classmethod GetManagerLinks(Output pColumns) as %Boolean
Returns an array of links to manager pages for this type of VDoc; item 0 is the family description
method GetNextGroupPath(pGroup As %String, pPath As %String, ByRef pStatus As %Status = $$$OK) as %String
Gets the next path alphabetically within a group.
No need to worry about possiblity of a pPath value which is missing its keyfield, since we only ever pass in values which have been the return value from a previous call to this method or are the pGroup itself
method GetNextIndex(pPath As %String, pIndex As %String, ByRef pStatus As %Status = $$$OK) as %String
Gets the next index in an array
classmethod GetReplyGroupSegs(pLocalApplicationID As %String = "", pOriginalReceiversCode As %String, pOriginalSendersCode As %String, pVersion As %String, Output pReplyGESeg As EnsLib.EDI.X12.Segment, Output pSC As %Status, pSeparators As %String = $$$X12DefSeparators) as EnsLib.EDI.X12.Segment
Create new GS/GE group segments as a reply, having been given relevant values from original ISA or GS
Given a segment path, find the corresponding segment index
Given a segment index, find the corresponding segment path
method GetValueAsStream(pSegmentPropertyPath As %String, pSeparators As %String, Output pStatus As %Status, pTreatEmptyAsNull As %Boolean = 0) as %Stream.GlobalCharacter
pSegmentPropertyPath is of syntax: [loop-containing-segment [ . nested-loop-containing-segment ] . ] segment-name [ : element [ ( array ) ] [ . component ] ]
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.
When retrieving full segment data any trailing Data Element, Component Element or Repetition Separators will be removed unless the segment is ISA. This method will return the value as a stream even if its length is less than the maximum string length.
When retrieving full segment data any trailing Data Element, Component Element or Repetition Separators will be removed unless the segment is ISA. This method will return the value as a stream even if its length is less than the maximum string length.
method GetValueAt(pSegmentPropertyPath As %String, pSeparators As %String, Output pStatus As %Status, pTreatEmptyAsNull As %Boolean = 0, pReturnStreamIfLong As %Boolean = 0, Output pIsIncomplete As %Boolean) as %String
pSegmentPropertyPath is of syntax: [loop-containing-segment [ . nested-loop-containing-segment ] . ] segment-name [ : element [ ( array ) ] [ . component ] ]
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.
When retrieving full segment data any trailing Data Element, Component Element or Repetition Separators will be removed unless the segment is ISA. If the length of the field is greater than the maximum string length on the system, then only the maximum string length will be retrieved using this method unless pReturnStreamIfLong is set to 1. If pReturnStreamIfLong is set to 0 and the value is longer than the maximum string length, output parameter pIsIncomplete will be set to 1 to indicate that there is more to the value than what is returned. (Note that with long strings enabled the limit is approximately 3.6MB.)
When retrieving full segment data any trailing Data Element, Component Element or Repetition Separators will be removed unless the segment is ISA. If the length of the field is greater than the maximum string length on the system, then only the maximum string length will be retrieved using this method unless pReturnStreamIfLong is set to 1. If pReturnStreamIfLong is set to 0 and the value is longer than the maximum string length, output parameter pIsIncomplete will be set to 1 to indicate that there is more to the value than what is returned. (Note that with long strings enabled the limit is approximately 3.6MB.)
method IdentifierGet() as %String
classmethod ImportFromDevice(Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String, pDefaultRepSep As %String = "", pDefaultCompSep As %String = "", pDefaultSegTerminator As %String = "") as EnsLib.EDI.X12.Document
classmethod ImportFromFile(pFilename As %String, pDocNum As %Integer = 1, Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String, pDefaultRepSep As %String = "", pDefaultCompSep As %String = "", pDefaultSegTerminator As %String = "") as EnsLib.EDI.X12.Document
classmethod ImportFromIOStream(pIOStream As %IO.I.CharacterStream, Output pStatus As %Status = $$$OK, ByRef pConfigItem As %String = "", pIOFormatClassname As %String = "", pDefaultRepSep As %String = "", pDefaultCompSep As %String = "", pDefaultSegTerminator As %String = "") as EnsLib.EDI.X12.Document
classmethod ImportFromLibraryStream(pLibStream As %Stream.Object, Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String, pDefaultRepSep As %String = "", pDefaultCompSep As %String = "", pDefaultSegTerminator As %String = "") as EnsLib.EDI.X12.Document
classmethod ImportFromString(pString As %String, Output pStatus As %Status, ByRef pConfigItem As %String, pIOFormatClassname As %String, pDefaultRepSep As %String = "", pDefaultCompSep As %String = "", pDefaultSegTerminator As %String = "") as EnsLib.EDI.X12.Document
classmethod KillGlobals(Output pDeletedCount, pKeepExtentCount=0, pDisplayLog=1)
method NameGet() as %String
classmethod New997OuterGroupSegs(pOriginalISASeg As EnsLib.EDI.X12.Segment, pLocalApplicationID As %String = "", pFuncID As %String, pVersion As %String, Output pReplyGESeg As EnsLib.EDI.X12.Segment, Output pSC As %Status) as EnsLib.EDI.X12.Segment
Create new 997 GS/GE group segment as a reply corresponding to an original ISA segment
Get a new unique control number. Control number type can be Interchange control numbers "I", group Control numbers "G", TransactionSet control numbers "T".
classmethod NewDocumentReply997Segs(pOriginalSTSeg As EnsLib.EDI.X12.Segment, pCodes As %String = 0, Output pReplyAK5Seg As EnsLib.EDI.X12.Segment, Output pSC As %Status, pGSGreater As %String = "", pRejectErrors As %Boolean = 1) as EnsLib.EDI.X12.Segment
Create new AK2/AK5 acknowledgement segments as a reply corresponding to an original ST Transaction Set
classmethod NewGroupReply997Segs(pOriginalGSSeg As EnsLib.EDI.X12.Segment, pOriginalGESeg As EnsLib.EDI.X12.Segment = $$$NULLOREF, pCodes As %String = 0, Output pReplyAK1Seg As EnsLib.EDI.X12.Segment, Output pReplyAK9Seg As EnsLib.EDI.X12.Segment, Output pReplySESeg As EnsLib.EDI.X12.Segment, Output pSC As %Status) as EnsLib.EDI.X12.Segment
Create new ST(997)/AK1/AK9/SE group reply segments as a reply corresponding to an original GS segment
method NewReplyDocument(pDocType As %String = "", pLocalApplicationID As %String, Output pSC As %Status) as EnsLib.EDI.X12.Document
classmethod NewReplyGroupSegs(pOriginalGSSeg As EnsLib.EDI.X12.Segment, pLocalApplicationID As %String = "", pFuncID As %String, pVersion As %String, Output pReplyGESeg As EnsLib.EDI.X12.Segment, Output pSC As %Status) as EnsLib.EDI.X12.Segment
Create new GS/GE group segment as a reply corresponding to an original GS segment
classmethod NewReplyHeaderSegs(pOriginalISASeg As EnsLib.EDI.X12.Segment, pLocalApplicationID As %String = "", Output pReplyIEASeg As EnsLib.EDI.X12.Segment, Output pSC As %Status) as EnsLib.EDI.X12.Segment
Create new ISA/IEA interchange segments as a reply corresponding to an original ISA segment
classmethod NewReplyHeaderSegsFromString(pOriginalISAString, pLocalApplicationID As %String = "", Output pReplyIEASeg As EnsLib.EDI.X12.Segment, Output pSC As %Status, pDefaultSeparators As %String = $$$X12DefSeparators, pDocType As %String) as EnsLib.EDI.X12.Segment
Create new ISA/IEA interchange segments as a reply corresponding to an original ISA segment, while recognizing that the original segment may be incomplete
classmethod NewReplyTA1Seg(pOriginalISASeg As EnsLib.EDI.X12.Segment, pCode As %String = $$$CodeTA1I18NoError, Output pSC As %Status, pRejectErrors As %Boolean = 1) as EnsLib.EDI.X12.Segment
Create a new TA1 acknowledgement segment as a reply corresponding to an original ISA segment
classmethod NewReplyTA1SegFromString(pOriginalISAString As %String, pCode As %String = $$$CodeTA1I18NoError, Output pSC As %Status, pRejectErrors As %Boolean = 1, pDefaultSeps As %String = $$$X12DefSeparators) as EnsLib.EDI.X12.Segment
Create a new TA1 acknowledgement segment as a reply corresponding to an original ISA segment
method OutputHTML() as %Status
Display Segments as HTML, using DocType info if available
method OutputHTMLZen() as %Status
Display Segments as HTML, using DocType info if available
method OutputToFile(pFilename As %String, pOverwrite As %Boolean, pSeparators As %String, pIOFormatClassname As %String) as %Status
method OutputToIOStream(pIOStream As %IO.I.CharacterStream, pSeparators As %String, pFlush As %Boolean = 1, pIOFormatClassname As %String = "", pIsIncomplete As %Boolean) as %Status
method OutputToLibraryStream(pLibStream As %Stream.Object, pSeparators As %String, pIOFormatClassname As %String) as %Status
method OutputToString(pSeparators As %String, Output pStatus As %Status, pIOFormatClassname As %String, Output pIsIncomplete As %Boolean) as %String
Output the entire document contents to a string.
If pSeparators is specified and is different from the original separators for the document, output the document using the new set of separators.
Output pIncomplete will be set to 1 if the length of the document is greater than the maximum string length (Note that the limit is approximately 3.6MB.)
method ParentGEGet() as EnsLib.EDI.X12.Segment
method ParentGEIdGet() as %String
method ParentGSGet() as EnsLib.EDI.X12.Segment
method ParentGSIdGet() as %String
method ParentIEAGet() as EnsLib.EDI.X12.Segment
method ParentIEAIdGet() as %String
method ParentISAGet() as EnsLib.EDI.X12.Segment
method ParentISAIdGet() as %String
method ParentInterchangeGet() as EnsLib.EDI.X12.Document
Required for AutoForm
classmethod Purge(Output pDeletedCount As %Integer, pDaysToKeep As %Integer = 7, pDummy As %Boolean = 0) as %Status
method RawContentGet() as %String
method RepetitionSeparatorGet() as %String
method SegCountGet() as %Integer
method SegmentTerminatorGet() as %String
method SetValueAt(pValue As %String, pSegmentPropertyPath As %String, pAction As %String = "set", pKey As %String = "") as %Status
pSegmentPropertyPath is of syntax: [loop-containing-segment [ . nested-loop-containing-segment ] . ] segment-name [ : element [ ( array ) ] [ . component ] ]
Set the value at the specified property path.
All property path elements must be either name or index.
Use of the "append" action to make a field or component's total length more than the maximum string length (approximately 3.6MB) is not supported. Instead, use the method StoreRawDataStream()
Use of the "append" action to make a field or component's total length more than the maximum string length (approximately 3.6MB) is not supported. Instead, use the method StoreRawDataStream()
method SourceGet() as %String
Retrieve Source document name from parent, if available
classmethod TotalCount() as %Integer
method TypeVersionGet() as %String
Inherited description: Subclasses should override this if the version can be gotten from the document content
method buildRuntimePathFromIndex(pId As %String, pPath As %String, pContentArray As %String, pType As %String, ByRef pCurrSeg As %Integer, pParentGrpOpt As %Boolean, pSC As %Status = $$$OK, pKeepParsingAfterError As %Boolean, pReportMissingLoopAsFirstSeg As %Boolean = 0) as %Status
Build a segment map for the current segment index array based on the document schema
If pKeepParsingAfterError is false then stop parsing when first error is encountered
If pKeepParsingAfterError is false then stop parsing when first error is encountered
collapse segment objects within the collectionPath into just Id; Save if necessary
collapse segment object into just ID; Save if necessary
collapse segment object into just Id; Save if necessary
classmethod getGEId(pId As %RawString) as %String
classmethod getGSId(pId As %RawString) as %String
classmethod getIEAId(pParentId As %RawString) as %String
classmethod getISAId(pParentId As %RawString) as %String
method getId() as %String
The same as %Id(), but allocates the Id even if the object hasn't been saved already
classmethod getIdentifier(pId As %RawString) as %String
classmethod getName(pId As %RawString) as %String
classmethod getSegsAsString(pId As %String, pMaxLen As %Integer = 10000, pStartOffset As %Integer = 1) as %String
This method is for use from the RawContent property's SQL Compute invocation
classmethod getTypeVersion(pId As %RawString, pParentId As %String) as %String
method resolveChildDocType() as %String
Return the DocType of this document
Queries
query EnumerateDocTypes(Category As %String = "", IncludeBase As %Boolean = 0, IncludeInterchangeTree 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
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 EnumerateSegTypes(Category As %String = "", Level As %String = "", IncludeBase As %Boolean = 0)
Returns a list of schema categories and segment types and segment fields for this document class.
The Category and Level parameters can be used to restrict the list.
If Category is:
0 - return only standard categories
+ - return only user-defined categories
empty - return all categories
a category name - return only SegTypes in the named category
a category name:segment type name - return only information about the named SegType
a partial name suffixed with '%' - return only SegTypes in categories matching the partial category name
other - return nothing
If Level is:
0 - return all segment names
n - return the given number of levels of nested field names within each segment
empty - return all levels of nested field names within each segment
If IncludeBase is:
0 - return only segment names defined in the current schema category itself
1 - return all segment names in the current schema category's base category in addition to those defined in the current category itself
The Category and Level parameters can be used to restrict the list.
If Category is:
0 - return only standard categories
+ - return only user-defined categories
empty - return all categories
a category name - return only SegTypes in the named category
a category name:segment type name - return only information about the named SegType
a partial name suffixed with '%' - return only SegTypes in categories matching the partial category name
other - return nothing
If Level is:
0 - return all segment names
n - return the given number of levels of nested field names within each segment
empty - return all levels of nested field names within each segment
If IncludeBase is:
0 - return only segment names defined in the current schema category itself
1 - return all segment names in the current schema category's base category in addition to those defined in the current category itself
query EnumerateTypeCategories(Standard 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
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
Indexes
index (Extent on ) [Extent, Type = bitmap];
Index methods: ExtentClose(), ExtentExecute(), ExtentFetch(), ExtentFetchRows(), ExtentFunc(), ExtentGetInfo(), ExtentGetODBCInfo(), ExtentPrepare(), ExtentSendODBC()
index (IDKEY on ) [IdKey, Type = key];
Index methods: IDKEYCheck(), IDKEYDelete(), IDKEYExists(), IDKEYOpen(), IDKEYSQLCheckUnique(), IDKEYSQLExists(), IDKEYSQLFindPKeyByConstraint(), IDKEYSQLFindRowIDByConstraint()
index (OriginalDocId on OriginalDocId);
Index methods: OriginalDocIdDisplayToLogical(), OriginalDocIdExists(), OriginalDocIdGet(), OriginalDocIdGetStored(), OriginalDocIdIsValid(), OriginalDocIdLogicalToDisplay(), OriginalDocIdLogicalToOdbc(), OriginalDocIdNormalize(), OriginalDocIdSet()
index (ParentId on ParentId);
Index methods: ParentIdDisplayToLogical(), ParentIdExists(), ParentIdGet(), ParentIdGetStored(), ParentIdIsValid(), ParentIdLogicalToDisplay(), ParentIdLogicalToOdbc(), ParentIdNormalize(), ParentIdSet(), ParentIdsCompute(), ParentIdsDisplayToLogical(), ParentIdsGet(), ParentIdsIsValid(), ParentIdsLogicalToDisplay(), ParentIdsLogicalToOdbc(), ParentIdsNormalize(), ParentIdsSQLCompute()
Triggers
trigger OnDelete (BEFORE event DELETE);
Inherited Members
Inherited Properties
- AutoBuildMap
- BuildMapStatus
- CacheSegsGotten
- DocType
- IsMutable
- OriginalDocId
- Parent
- ParentId
- Source
- TimeCreated
- TopParentId
- UserValues
Inherited Methods
- %%CLASSNAMELogicalToStorage()
- %%CLASSNAMEStorageToLogical()
- %AddToSaveSet()
- %AddToSyncSet()
- %BMEBuilt()
- %BuildIndicesAsync()
- %BuildIndicesAsyncResponse()
- %CheckConstraints()
- %CheckConstraintsForExtent()
- %ClassIsLatestVersion()
- %ClassName()
- %CompareContents()
- %ComposeOid()
- %Delete()
- %DeleteExtent()
- %DeleteId()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchGetProperty()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %DispatchSetProperty()
- %DrawHTMLForm()
- %DrawHTMLTable()
- %Exists()
- %ExistsId()
- %Extends()
- %GUID()
- %GUIDSet()
- %GetContentType()
- %GetLock()
- %GetParameter()
- %GetSwizzleObject()
- %Id()
- %InsertBatch()
- %IsA()
- %IsModified()
- %IsNull()
- %KillExtent()
- %KillExtentData()
- %LoadFromMemory()
- %LockExtent()
- %LockId()
- %New()
- %NormalizeObject()
- %ObjectIsNull()
- %ObjectModified()
- %Oid()
- %OnBeforeAddToSync()
- %OnDeleteFinally()
- %OnDetermineClass()
- %OnOpenFinally()
- %OnSaveFinally()
- %OnTimeout()
- %Open()
- %OpenId()
- %OriginalNamespace()
- %PackageName()
- %PhysicalAddress()
- %ProcessSubmit()
- %PurgeIndices()
- %Reload()
- %RemoveFromSaveSet()
- %ResolveConcurrencyConflict()
- %RollBack()
- %Save()
- %SaveDirect()
- %SaveIndices()
- %SerializeObject()
- %SetModified()
- %ShowContents()
- %ShowContentsHead()
- %SortBegin()
- %SortEnd()
- %SyncObjectIn()
- %SyncTransport()
- %UnlockExtent()
- %UnlockId()
- %ValidateIndices()
- %ValidateObject()
- %ValidateTable()
- AddChild()
- AddChildArray()
- AppendSegment()
- AppendSegmentId()
- ChildCountGet()
- DrawFormButtons()
- DrawHTMLContentsForm()
- DrawHTMLForm()
- EnumerateVDocsClose()
- EnumerateVDocsExecute()
- EnumerateVDocsFetch()
- FindSegmentValues()
- FindSegmentValuesArray()
- GenerateGenericDAOFromObject()
- GetChildIdsArray()
- GetMutableSegmentAt()
- GetNewManagerLinks()
- GetSegmentAt()
- GetSegmentIdAt()
- GetSegmentTypeAt()
- GetStatsDimension()
- GetValues()
- GetValuesArray()
- InsertSegmentAt()
- InsertSegmentIdAt()
- IsMutableSet()
- NewSegment()
- NextChild()
- NextChildId()
- OnShowJSONContents()
- OnShowXMLContents()
- OutputFormattedJSON()
- ParentGet()
- ParentGetObjectId()
- ParentIdsGet()
- RemoveSegmentAt()
- SetSegmentAt()
- SetSegmentIdAt()
- TopParentIdGet()
- Validate()
- WriteNoJSONFormat()
- chooseDocType()
- getChildCount()
- getNextChildId()
- getParentIds()
- getTestNewArg()
- getValsArray()
Storage
Storage Model: Storage (EnsLib.EDI.X12.Document)
^EnsLib.EDI.X12.DocumentD(ID,"Attachments",n) |
= | Attachments(n) |
Storage Model: Storage (EnsLib.EDI.X12.Document)
^EnsLib.EDI.X12.DocumentD(ID) |
= | %%CLASSNAME
ParentId
DocType
IsMutable
TimeCreated
Source
OriginalDocId
Envelope
HandledIndividually
%ParsingError
|
Storage Model: Storage (EnsLib.EDI.X12.Document)
^EnsLib.EDI.X12.DocumentD(ID,"UserValues",n) |
= | UserValues(n) |