From: Joe Cocuzzo
Sent: 2/8/2011 5:48:00 PM (GMT)
Subject: Re: [MT-L] Need Help with NPR Report Calculate date to select by.

%Z.day.from.date(@.today) = DOW 1-7

%Z.date.add(DATE,0-N) will subtract N days from any date and give you the date.

Combine these in a start macro to put your date range into /FROM and /THRU and then use those in your selections.

If "a whole week from two weeks ago" means back up to the current week's Sunday and then go back two weeks from that to get to the start date:

%Z.day.from.date(@.today)^DOW,
%Z.date.add(@.today,0-(DOW-1))^SUN,
%Z.date.add(SUN,0-14)^/START,
%Z.date.add(/START,7)^/END





Joe Cocuzzo
Vice President
NPR Services
Iatric Systems, Inc.
Phone/Fax: (978) 805-4115
Email: mailto:Joe.Cocuzzo@iatric.com
Web: http://www.iatric.com/

Iatric Systems is a leading provider of integrated software applications, interfaces and reporting solutions for hospitals and healthcare systems.
__________
-----Original Message-----
From: meditech-l-bounces@mtusers.com [mailto:meditech-l-bounces@mtusers.com] On Behalf Of Wayne Willis
Sent: Tuesday, February 08, 2011 12:37 PM
To: meditech-l@mtusers.com
Subject: [MT-L] Need Help with NPR Report Calculate date to select by.

Hello



I have a report that needs to choose a date range each time it runs.
So if the report runs every Friday, it should collect data for a whole
week from two weeks ago.



How do I add this into my select so I do not get a prompt?

I thought I had it figured out with a computed field, but since I was
not using the value on my picture I lose the computed field.



Thanks



------------------------

Wayne Willis

Onslow Memorial Hospital



===================================
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 or to SUBSCRIBE, 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

Do NOT send email to meditech-l-owner@MTUsers.com. This is a system email box that is NOT monitored by a human. If you need help or advice on how to use the meditech-l, email lorna@MTUsers.com or julia@MTUsers.net. Both of these people help manage the meditech-l, so they are your best resource.




===================================
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 or to SUBSCRIBE, 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

Do NOT send email to meditech-l-owner@MTUsers.com. This is a system email box that is NOT monitored by a human. If you need help or advice on how to use the meditech-l, email lorna@MTUsers.com or julia@MTUsers.net. Both of these people help manage the meditech-l, so they are your best resource.