Neil is a
Curious Researcher
Recap 2022
Publications:
1question
3comments
Top Post:
81
people reached
User bio
404 bio not found
Member since Nov 23, 2020
Replies:

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.

Hi Marcus,

Sometimes it easier not copy all the addresses across in the first place, so that the target addresses field is empty when you start the 'for each' loop, but if you have copied all the addresses across then I would clear all the target addresses out, before your 'for each' loop.

So the code would be something like:

<assign value='' property='target.{PatientAddress}' action='clear' />
<foreach property='source.{PatientAddress()}' key='k1' >
<if condition='source.{PatientAddress(k1).addresstype}="H"' >
<true>
<assign value='source.{PatientAddress(k1)}' property='target.{PatientAddress(1)}' action='set' />
<assign value='"HOME"' property='target.{PatientAddress(1).addresstype}' action='set' />
</true>
</if>
</foreach>

Hop this helps.

Regards

Neil

Hi Prashanth,

There is a 'Add-In' in Studio that will allow you to do this.
From within Studio select Tools => Add-In, then add the 'SOAD Wizard' madd-in.
Once the 'SOAP Wizard' has been added, run it from the same path, i.e. Tools => Add-Ins'

Regards

Neil

Followers:
Neil has no followers yet.
Following:
Neil has not followed anybody yet.
Global Masters badges:
Neil has no Global Masters badges yet.