what it will return if key not found in lookup table
Hi Firneds
I have few odscodes in Lookup table named "AllowLT" .
Now I need to continue if I found value in lookup table or stop it. For that I have colleting the value form lookup table for input HL7 message OBR:21 value.
I know if found in lookup table it will return 1 or 0 . If not found what it will return below line? to return 0 in case , given key not available in lookup table , what I need to write?
if isallowed=1
{
}
else
{
}
Product version: IRIS 2021.2
Here's the documentation for that function.
It looks like ##CLASS(Ens.Util.FunctionSet).Lookup("AllowLT", pRequest.GetValueAt("OBR:21"),"0",4) would do what you're asking; if the table or value can't be found, it'll return a 0.
Thanks a Lot David
That should be 3, not 4, for the last parameter, so:
##CLASS(Ens.Util.FunctionSet).Lookup("AllowLT", pRequest.GetValueAt("OBR:21"),"0",3)
There are 4 options on how to handle the default and the values are 0 to 3.
3 being return the default if either table or value is empty.