User bio
404 bio not found
Member since Nov 6, 2015
Posts:
Replies:
Here's how you can iterate through the results:
set query = "SELECT Facility FROM FROM osuwmc_EnterpriseDirDB.RelationshipMedCtrID WHERE OSUmedcenterID = ?"
SET rset = ##class(%SQL.Statement).%New()
SET qStatus = rset.%Prepare(query)
SET rset = rset.%Execute($Get(ID))
while (rset.%Next()) {
// Check Facility value in each row
set facility=rset.%Get("Facility")
if (facility = "SOMEVALUE") {
//...
}
}
As Enrico mentioned, the rule logic is stored as XML in a rule class, so you can't query the logic directly via SQL.
You can find the names of all rule classes using SQL:
SELECT ID FROM %Dictionary.ClassDefinition where Super='Ens.Rule.Definition'
To then view the rule logic you would need to open a class and view the "RuleDefinition" XData block:
Class ORU.RouterRoutingRule Extends Ens.Rule.Definition { Parameter RuleAssistClass = "EnsLib.HL7.MsgRouter.RuleAssist"; XData RuleDefinition [ XMLNamespace = "http://www.intersystems.com/rule" ] { <ruleDefinition alias="" context="EnsLib.HL7.MsgRouter.RoutingEngine" production="ADTPKG.FoundationProduction"> <ruleSet name="" effectiveBegin="" effectiveEnd=""> <rule name=""> <when condition="1" comment=""> <send transform="Demo.ORUTransformation" target="ORU.Out"></send> <send transform="Demo.ORUTransformation" target="ORU.Two"></send> </when> </rule> </ruleSet> </ruleDefinition> } }
Open Exchange applications:
Certifications & Credly badges:
Marc has no Certifications & Credly badges yet.
Global Masters badges:







Followers:
Following:
Marc has not followed anybody yet.
For using this from a DTL you can put the query logic in a custom function which takes the identifier from the MFN and returns the facility.