All messages should be posted in plain text.  HTML will be converted to
attachments.    The meditech-l web site is MTUsers.com
======================================

Hi Shirley,

I see a couple of problems with your macro and call.

1)  When calling a macro, you must attach an argument... even if it is nil!

IFE=%MIS.USER.zcus.attribute.macros.M.vaccine(""),1

The ,1 on the end prevents the cursor from skipping to the next query if the 
value of your preceeding logic is nil.  However, it appears that you may be 
using the macro to determine whether or not to skip the query based on the 
value of the marco (The final value within the macro is passed back as the 
value of the macro).  If this is true, remove the ,1 and if the final value of 
the macro is not nil, the cursor will stop, otherwise a nil value for the macro 
will cause the cursor to skip.

2)  When calling macros, a new symbol table is opened.  Any values from the 
symbol table that the CDS is working on must be passed to the macro symbol 
table using arguments.  Because of this, referring to the temporary query 
response as [ANS,"QUERY"]|0 will not work.  Instead, refer to the 
/[ANS%0,"QUERY"]|0 as this is a global variable available to any symbol table 
and will prevent the issue of having to pass values.

Hope this helps,
Kenny Whiteside

Kenny Whiteside RN, BSN
Patient Care Information Systems
Catawba Valley Medical Center
810 Fairgrove Church Road
Hickory, NC 28602
[EMAIL PROTECTED]


>>> "Shirley Hammack" <[EMAIL PROTECTED]> 06/20/06 6:11 PM >>>
All messages should be posted in plain text.  HTML will be converted to
attachments.    The meditech-l web site is MTUsers.com
======================================

Since the logic on our vaccine screen has gotten too complicated to be 
contained in one attribute statement we have attempted to use a macro.  Here is 
our call to the macro:

IFE=%MIS.USER.zcus.attribute.macros.M.vaccine="1"

Here is our macro text:

""^ORS,
""^RESULT,
"1"^ANDS,
IF{[ANS,"NURPNE002"]|0="Y" "1"^ORS},
IF{[ANS,"NURPNE003"]|0="Y" "1"^ORS},
IF{[ANS,"NURPNE004"]|0="Y" "1"^ORS},
IF{[ANS,"NURPNE005"]|0="Y" "1"^ORS},
IF{[ANS,"NURPNE006"]|0="Y" "1"^ORS},
;
IF{[ANS,"NURPNE016"]|0="Y" "0"^ANDS},
IF{[ANS,"NURPNE011"]|0="Y" "0"^ANDS},
IF{[ANS,"NURPNE009"]|0="Y" "0"^ANDS},
IF{[ANS,"NURPNE010a"]|0="Y" "0"^ANDS},
;
IF{ORS="1" IF{ANDS="1" "1"^RESULT}},
RESULT;

What are we doing wrong?



Shirley Hammack
I.T. Financial Analyst
Jackson County Memorial Hospital
580-477-7484


The documents accompanying this transmission contain confidential information, 
belonging to the sender, that is legally privileged.  This information is 
intended only for the use of the individual or entity named above.  The 
authorized recipient of this information is prohibited from disclosing this 
information after its stated need has been fulfilled.

If you are not the intended recipient, you are hereby notified that any 
reading, disclosure, copying, distribution, or action taken in reliance on the 
contents of these documents is strictly prohibited.  Violators may be 
prosecuted.  If you have received this email in error, please notify the sender 
immediately and destroy the transmitted information.

_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l


_______________________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to