Skip to main content

%Api.InteropEditors.Utils

Class %Api.InteropEditors.Utils

Parameters

WhenCommentDelimeter

Parameter WhenCommentDelimeter = "&sep;";

Comments on 'when's are stored in an attribute rather than an array of elements. This string acts a the delimeter for the comment attribute on each when.

AllRulesRead

Parameter AllRulesRead = 1;

AllRulesWrite

Parameter AllRulesWrite = 2;

BusinessRulesRead

Parameter BusinessRulesRead = 3;

BusinessRulesWrite

Parameter BusinessRulesWrite = 4;

RoutingRulesRead

Parameter RoutingRulesRead = 5;

RoutingRulesWrite

Parameter RoutingRulesWrite = 6;

Methods

GetInputPlugins

ClassMethod GetInputPlugins(contextClassName As %String, ByRef plugins As %DynamicArray) As %Status

Get properties and plugin metadata of an extended context class. The method arguments hold values for: namespace, Namespace to search for extensions in. contextClassName, Context class to get properties and plugin metadata of.

SaveRule

ClassMethod SaveRule(ruleClass As %String, ruleDefinition As %DynamicObject) As %Status

Save 'ruleDefinition' into class 'ruleClass'. If a class 'ruleClass' exists it will be overwritten.

ExpandRuleSet

ClassMethod ExpandRuleSet(actions As %DynamicArray) As %Status

Transform generated rule definition JSON to be more complete and internally consistent. Recursively iterate through the actions array of a ruleSet Rename each when.condition to match action.expression naming style and deserialize when.comment string into when.comments array. Performs inverse of ContractRuleSet.

ContractRuleSet

ClassMethod ContractRuleSet(actions As %DynamicArray) As %Status

Transform provided rule definition JSON to match generated rule definition structure. Recursively iterate through the actions array of a ruleSet. Remove each action.expression.valueObject and move each action.expression.value to action.value. Rename each when.expression.value to when.condition and when.expression.valueObject to when.conditionObject and deserialize when.comments array into delimeted when.comment string. Performs inverse of ExpandRuleSet.

IsReadOnly

ClassMethod IsReadOnly(ruleClass As %String) As %Boolean

Check if this 'ruleClass' is read only for this user Class will be considered read only if the database underlying the namespace this rule is in is read only

GetRulePerms

ClassMethod GetRulePerms() As %Binary

Get permissions the current user has on rules. Permissions are returned in a bitstring with the following mapping:
1: %Ens_Rules Read
2: %Ens_Rules Write
3: %Ens_BusinessRules Read
4: %Ens_BusinessRules Write
5: %Ens_RoutingRules Read
6: %Ens_RoutingRules Write

HasPermsByRuleClass

ClassMethod HasPermsByRuleClass(ruleClass As %String, permStr As %String, perms As %Binary)

Check if the current user has specified permissions on this rule class. Input 'permString' defines what permissions to check: valid values are "R", "W", and "RW". Input 'perms' defines the permissions the current user has on rules: expected format is a bitstring as returned by GetRulePerms.

HasPermsByAssistClass

ClassMethod HasPermsByAssistClass(assistClass As %String, permStr As %String, perms As %Binary) As %Boolean

Check if the current user has specified permissions on rules that use this assist class. Input 'permString' defines what permissions to check: valid values are "R", "W", and "RW". Input 'perms' defines the permissions the current user has on rules: expected format is a bitstring as returned by GetRulePerms.

HasPermsByRuleType

ClassMethod HasPermsByRuleType(ruleTypes As %String, permStr As %String, perms As %Binary) As %Boolean [ CodeMode = expression ]

Check if the current user has specified permissions on all rules in 'ruleTypes' input: valid values are "B" (Business Rules), "R" (Routing Rules), "A" (All Rules), and "*" (Any Rules). Input 'permString' defines what permissions to check: valid values are "R", "W", and "RW". Input 'perms' defines the permissions the current user has on rules: expected format is a bitstring as returned by GetRulePerms.

IsSubClass

ClassMethod IsSubClass(class As %String, superClass As %String) As %Integer

Check if the given 'class' is a subclass of 'superClass': if class is guaranteed to be compiled use %Extends instead.

HasKey

ClassMethod HasKey(parent As %DynamicObject, key As %String) As %Integer

Check if 'parent' has key 'key'

CallSourceControlCallback

ClassMethod CallSourceControlCallback(className As %String, callback As %String = "", Output serverOutput As %DynamicArray, Output usesSourceControl As %Boolean, Output sourceControlInstance As %Studio.SourceControl.Base, enforceCanEdit As %Boolean = 0, wasNewCode As %Boolean = 0) As %Status [ Internal ]

Invoke request Source Control callback as appropriate

GetInternalName

ClassMethod GetInternalName(className) As %String [ Internal ]

Return the internal name of the rule.

AddSCInfoToContainer

ClassMethod AddSCInfoToContainer(ByRef container As %DynamicObject, scProperty, msgArrays...) [ Internal ]

evaluateRule

ClassMethod evaluateRule(pContext As %RegisteredObject, pRuleName As %String, Output pRuleLogData As %String = "", pDebugFlags As %String = "crd", pSelectMode As %Integer = 2) As %Status

Given a context object evaluate the rule and create result output as JSON

ServerGetQueryData

ClassMethod ServerGetQueryData(pParam As %String = "", assistClassName As %String = "", pValue As %String = "") As %String [ Internal, ZenMethod ]

Internal server side method to retrieve list of Schema categories or structures. This is only called if the context is EnsLib.HL7.Message and hence EnsLib.HL7.MsgRouter.RuleAssist will exist in this namespace.

serializeMessageAsHTML

ClassMethod serializeMessageAsHTML(pMessageObject As %RegisteredObject, Output pNeedsHTMLEscaping As %Boolean = 1, Output tXMLStream As %Stream.TmpCharacter) As %Status

Given an object create an HTML serialization of the object.