Skip to main content

EnsLib.InteropTools.HL7.MessageAnalyzer.Common

abstract class EnsLib.InteropTools.HL7.MessageAnalyzer.Common

Method Inventory

Parameters

parameter ZEROES = 000000000000000000000000000000000000;

Methods

classmethod AppConfiguration(pMessageSkipCount As %Integer) as %String
classmethod AsCSF(pSpec As %String) as %String
Return the given spec to standard (unsimplified) format if needed - otherwise leave as-is
classmethod AsSSF(pSpec As %String) as %String
Return the given spec to simplified format if needed - otherwise leave as-is
classmethod CompileSchema(pPattern As %String) as Base
classmethod DotFilePath(pFileName As %String) as %String
classmethod FileContents(Path As %String) as %String
classmethod Hash(pStr As %String) as %String
Return a hex string hash corresponding to the input string
classmethod IndexOf(pStr As %String, pLookFor As %String, pStartFrom As %Integer = 1) as %Integer
If pLookFor occurs in pStr: returns the offset in pStr of the start of the first occurrence of pLookFor which is at or after pStartFrom

Otherwise: returns 0

classmethod IsStandardSchema(pSchema As %String) as %String
Returns 1 for the HL7 schema format, 0 for the simplified format
classmethod LZ(pN As %Integer, pWidth As %Integer) as %String
Return number with enough leading zeroes to make the result fill the given width
classmethod LastFolderSegment(pFolder As %String) as %String
classmethod LatestSchemaVersion() as %String
classmethod ListToPattern(pList As %List) as %String
Given a list of SSF pattern-components: return an SSF pattern which is either the only element of a singleton list or a choice of all the elements of a larger list
classmethod MakeRigSchema(pPattern As %String, pConfig As Config, pLogger As Logger, pQuiet As %Boolean, pNewSchemaName As %String = "") as RigSchema
classmethod ParseSchemaSpec(pSpec As %String, OptionalVersion As %String = "") as %String

Given a schema specification:

  • if the spec is a schema definition: return the original text
  • if the spec identifies a schema in the database: return the schema raw text from the database
  • if the spec contains a "_" but is not found in the database: return ""
  • otherwise assume the spec is a simplified schema definition: return the converted text
classmethod PatternScore(pPattern As %String) as %List
classmethod ProcessSchemaSelection(pIn As %String, pRigSchemas As RigSchemaCollection, pVersion As %String = "", pConfig As Config, pLogger As Logger, pQuiet As %Boolean)
classmethod PutBackSquiggles(pSpec As %String) as %String
Input format differs from raw schema format in that all compound tokens with a "~" (e.g. "[~", "~]") have their "~"s removed and the sequence-separator "~"s are replaced by commas.
classmethod RawHash(pStr As %String) as %String
Return a raw hash corresponding to the input string
classmethod ReadFileStream(Path As %String) as %Stream.Object
Given a path, returns a stream reading the file at the path

- throws an exception if the file does not exist

classmethod RunImplMatch(MessageSegmentTypes As %List, RigSchema As RigSchema, Config As Config, Quiet As %Boolean = 0, Output FailureOutcome As FailureOutcome) as %List
Returns $LB(anysucc,furthestreport,$LB(summary1,summary2,..),message->schema xref)
- anysucc is whether there were any full matches
- furthestreport is the report for the longest partial match
- each summary is the description of a branch outcome
- message->schema xref
classmethod RunImplScan(MessageSegmentTypes As %List, RigSchema As RigSchema, Config As Config, pBacktracking As %Boolean, Quiet As %Boolean = 0, Output FailureOutcome As FailureOutcome, Output pShortestFinalDiffRecords)
Returns pShortestFinalDiffRecords(1..*)=Diff
classmethod SchemaSourceList(RawSource As %String, OptionalVersion As %String = "") as %List
classmethod SchemaStandardSource(pSchema As %String, OptionalVersion As %String = "") as %String
Given a schema name return the standard schema source, or "" if not found in database
classmethod SchemaTerms(pPattern As %String) as %List
Given a pattern, return a list of the message codes in it (in their original order)

In the $Translate call: the list of commas must be the same length as the string which precedes it

classmethod SchemaVersion(OptionalVersion As %String = "") as %String
classmethod ShowDigraph(pDigraph As %CPT.Tree.SimpleDigraph, pFileName As %String, pConfig As Config, pLogGraphWrittenTo As %Boolean = 0)
classmethod ShowExistingDigraph(pFileName As %String, pConfig As Config)
classmethod ShowSortedDeriveResults(ByRef pDerivePatterns, pLogger As Logger, pWithHistory As %Boolean = 0, pShowRemainingResults As %Boolean = 0)
classmethod SimplifyRawSchema(pRawSpec As %String) as %String
Convert raw schema format to simplified format (the reverse of PutBackSquiggles)
classmethod Status(pSC As %Status) as %String
classmethod StatusToErrorList(pSC As %Status, Output pErrorList)
classmethod StructureCount(pPattern As %String) as %Integer
classmethod SvgFilePath(pFileName As %String) as %String
classmethod TermCount(pPattern As %String) as %Integer
Given a pattern, return the number of message codes in it

In the $Translate call: the list of commas must be the same length as the string which precedes it

classmethod Throw(pMessage As %String)
classmethod ToHexString(pChars As %String) as %String
Given a string of bytes: return a string of 2-character hex numbers corresponding to the bytes
classmethod WithoutVersionPrefixes(pSchemaSource As %String, pVersion As %String) as %String
classmethod WriteFile(pFilePath As %String, pFileLines As %List)
classmethod WriteFileStream(Path As %String, LineTerminator As %String = "") as %Stream.Object
FeedbackOpens in a new tab