[MT-L] Help with an NPR report

4 views
Skip to first unread message

Berube, Sandra

unread,
Mar 9, 2010, 11:04:04 AM3/9/10
to medit...@mtusers.com

Good Morning,

I was hoping someone strong in macros could help me out...I need to
assign values on a report and there are many, many of them so I need to
do it in a macro.

I need to write a report that takes an employee type and job code(s),
and based on that assigns a value, and I want to print the value.

For example..and I know this is wrong...

IF{@empl.type'="PD")&(@job.code="4085"!@job.code="4086") 1}^1

IF{(@empl.type'="PD")&(@job.code="4055"!@job.code="4056"!@job.code="4066
") 5}^5

So if the employee type does not equal PD, and the job code does equal
4085 or 4086, I want the value 1 to print on the main page of the
report.

2nd one is if the employee type does not equal PD, and the job code
equals 4055,4056 or 4066, I want the value 5 to print on the main page
of the report.

How can I write multiple IF statements in a macro to give me that value
on my report?

In advance, I appreciate any help I can get as this was given to me this
morning and is due Friday...

Sandi Berube

Sr. Application Analyst

Northeast Rehabilitation Health Network

70 Butler Street

Salem, NH 03079

Direct Line-603-890-7637

Fax-603-890-7682

mailto:sbe...@northeastrehab.com

"Life isn't about waiting for the storm to pass, it's about learning to
dance in the rain"



Confidentiality Notice: The information contained in this e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthourized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, and have received this message in error, please contact the sender by reply email and destroy all copies of the original message.

THE POWER OF REHAB SINCE 1984!

McGaw, Douglas

unread,
Mar 9, 2010, 12:00:33 PM3/9/10
to Berube, Sandra, medit...@mtusers.com
I would try it this way:

IF{@empl.type'="PD")&(@job.code="4085"!@job.code="4086")

1^RESULT;@empl.type'="PD"&(@job.code="4055"!@job.code="4056"!@job.code="
4066") 5^RESULT;10^RESULT}

(You'll have to break the lines at commas or semicolons; the formatting
of email fudges it up.)

What this would do is send 1 to the variable of RESULT if the first
condition is true, 5 if the second condition is true, and 10 if anything
else is true. Then just put VAL=RESULT into a computed field.

Douglas B. McGaw
Senior Systems Analyst
Newman Regional Health
1201 W. 12th Ave.
Emporia, KS 66801

620-343-6800 x 1130 (fax: 620-340-6799)
dbm...@newmanrh.org

Good Morning,

Sandi Berube

Sr. Application Analyst

Northeast Rehabilitation Health Network

70 Butler Street

Salem, NH 03079

Direct Line-603-890-7637

Fax-603-890-7682

mailto:sbe...@northeastrehab.com


====================================

Please do NOT send messages that ask "Please post to the list" or "I'd like to see your answers" or "Send that info to me, too" These are useless messages that just waste the email server's resources. Instead, email the original requester and ask that they send you or post the results of their question.

To UNSUBSCRIBE, go to http://MTUSers.net
for information.

You can locate the:
1) meditech-l archives
2) NPR/Magic/CS tips
3) job opportunities in the Meditech community
http://mtusers.net

If you need help or advice on how to use the meditech-l, email lo...@MTUsers.com or ju...@MTUsers.net. Both of these people help manage the meditech-l, so they are your best resource.

Reply all
Reply to author
Forward
0 new messages