You are passing no arguments to your macro so ANS is nil
Your A^urn isn't going to do anything either as A is nil if you call
macro like this %MIS.zcus.library.M.tb("")
The stuff in between the parenthesis gets passed to the program as
variables A,B,C
Like so:
%MIS.zcus.is.some.report.M.macro("HI","THERE")
Inside the program MIS.zcus.is.some.report.M.macro
A = "HI"
B = "THERE"
So, pass ANS as A (the only argument you need)
Then use a single IF statement to check all your queries
Another thing..
You are doing /[ANS%0,"QUERY"]|0 but you only need to resort to this
if you are assigning data into a query.
[ANS,QUERY]|0 works fine and is easier to type.
Try writing your macro like this:
IFE=%MIS.zcus.library.M.tb(ANS)
Macro
A^ANS,
IF{[ANS, "EDMTRTB1"] |0="Y" 1;
[ANS, "EDMTRTB2"] |0="Y" 1;
[ANS, "EDMMD2154"] |0="Y" 1;
[ANS, "EDMTRTB4"] |0="Y" 1;
[ANS, "EDMTRTB5"] |0="Y" 1;
[ANS, "EDMTRTB6"] |0="Y" 1};
Joe Cocuzzo
Vice President
NPR Services
Iatric Systems, Inc.
Phone/Fax: (978) 805-4115
Email: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
Web: www.iatric.com <http://www.iatric.com>
________________________________
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Brogneaux, Jeffrey
Sent: Friday, March 23, 2007 12:32 PM
To: [email protected]
Subject: [MEDITECH-L] macro help
I am attempting to design a macro that will allow me to skip a query
based on answers to several queries above it. I have an attribute that
works but it is to long so I have to take out 2 queries in top half.
IFE=IF{([ANS,"EDMTRTB1"]|0="Y")!
IFE=([ANS,"EDMTRTB2"]|0="Y")!
IFE=([ANS,"EDMMD2154"]|0="Y")!
IFE=([ANS,"EDMTRTB4"]|0="Y")!
IFE=([ANS,"EDMTRTB5"]|0="Y")!
IFE=([ANS,"EDMTRTB6"]|0="Y") 1,
[EMAIL PROTECTED]@Z.mouse.click IF{E(/["buL"]#0)=64 "Y";
IFE="N"}^/[ANS%0,"EDMTRTB8"]|0,
IFE=P(R,S,[ANS,"EDMTRTB8"]|0)^#},1;""}
This is what I have attempted so far as a macro
attribute IFE=%MIS.zcus.library.M.tb("")
Macro
A^urn,
""^TB1^TB2^MD^TB4^TB5^TB6,
IF{/[ANS%0, "EDMTRTB1"] |0="Y"}^TB1,
IF{/[ANS%0, "EDMTRTB2"] |0="Y"}^TB2,
IF{/[ANS%0, "EDMMD2154"] |0="Y"}^MD,
IF{/[ANS%0, "EDMTRTB4"] |0="Y"}^TB4,
IF{/[ANS%0, "EDMTRTB5"] |0="Y"}^TB5,
IF{/[ANS%0, "EDMTRTB6"] |0="Y"}^TB6,
IF{TB1;TB2;MD;TB4;TB5;TB6};
Jeff Brogneaux RN
Clinical Administrator
Wayne Memorial Hospital
Goldsboro, NC 27533
919-731-6954 office
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
To subscribe or unsubscribe to the meditech-l, visit MTUsers.NET.
To check the status of the meditech-l, visit MTUsers.NET.
For help, email [EMAIL PROTECTED]
Visit the MTUsers WikiPedia at MTUsers.NET/mwiki
______________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l