Blogs Home
Wednesday, September 29, 2010 1:42 PM

Meditech-L: Attribute Help

Written by Joe Cocuzzo, Senior VP of Report Writing Services - iatricSystems

Your expression will always return a true. This is because you have the first expression test for the Y, but an independent second expression (the IF statement) that always returns a 1.

Since "",1 = true, the cursor stops.

You need to make the test for the Y control the total value of the expression

Change:

IFE=[ANS,"NURSTRKE98"]|0="Y",
IFE=IF{ANS^/ANS,%MIS.zcus.library.M.total1(/ANS),1}

To this:

IFE=IF{[ANS,"NURSTRKE98"]|0="Y" "";
IFE=ANS^/ANS,%MIS.zcus.library.M.total1(/ANS),1}

Or to this:

IFE=[ANS,"NURSTRKE98"]|0'="Y"&
IFE=IF{ANS^/ANS,%MIS.zcus.library.M.total1(/ANS),1}

Or to this:

IFE=IF{ANS^/ANS,%MIS.zcus.library.M.total1(/ANS),[ANS,"NURSTRKE98"]|0'="Y"}

Not sure why you need to put ANS into /ANS and then pass it as an argument to your macro.

This would do the same thing:

%MIS.zcus.library.M.total1(ANS)

Read more.