Looking up value in Cache Table via a Business Rule (Routing)
I need another set of eyes to look at the following. Instead of a Data Lookup table, I wanted to try to lookup a value against a Cache table that I had build. So I thought I could write a function to run a simple SQL query against the Cache Table and return me a %Boolean value back to my routing rule. However today I found that it was not working properly.
Can someone take a look at the following method and verify that I am doing this correct?
index = column name
value = HL7 field that I am passing into the method
ClassMethod TecsysUnitExists(index As %String, value As %String) As %Boolean
set ValidUnitID = ""
&sql(SELECT :index INTO :ValidUnitID
FROM osuwmc_Tecsys.UnitReference WHERE :index=:value)
if ValidUnitID '= ""