[MEDITECH-L] Scheduling a report every 14 days - Magic

4 views
Skip to first unread message

Rip Hunt

unread,
Jul 8, 2008, 10:54:23 AM7/8/08
to medit...@mtusers.com
I need to schedule a report bi-weekly (every 14 days). A MIS person
at Meditech said this can't be done using the Report Scheduler. Anyone
have a workaround to do this?
Thanks,

Rip Hunt
IS Dept.
Grays Harbor Community Hospital
Aberdeen, WA
360-537-6004

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

Keep up to date on recent announcements about MUSE by visiting the meditech-l web site at MTUsers.net and go to the tab labeled "MUSE - Dallas 05/08"

If you want to ask a question from the meditech-l users who will be attending MUSE or share something about MUSE with each other, you can post messages on the web site on the tab "MUSE - Dallas 05/08"

Howard Chase

unread,
Jul 8, 2008, 11:50:11 AM7/8/08
to Rip Hunt, medit...@mtusers.com
I had received a couple of suggestions but never got any to work.

So I ended up putting all the dates in the Scheduler like so:

MIS MIS Start
Start Time Within Reschedule
Frequency Days Time Zone Hours Mode (A,S,N)
ANNUALLY 11/4,11/18 0003 0.2 A
12/2,12/16,12/30,1/13,1/27 0003 0.2 A
2/10,2/24,3/9,3/23,4/13,4/27 0003 0.2 A

Of course I have to update it yearly... I guess it is a Manual Automatic thing... I remember
American Motors used to have a Manumatic... you shifted but it had no clutch. Now Porsche and
Ferrari charge more than the old Rambler used to cost for the same thing.

Let me know if you do figure it out.

Howard

Howard Chase, RN
Senior Clinical Analyst
Androscoggin Valley Hospital
59 Page Hill Road
Berlin, NH 03570
(603)326-5669

Howard Chase

unread,
Jul 8, 2008, 12:25:40 PM7/8/08
to Rip Hunt, medit...@mtusers.com
This was a Brian Schmit suggestion. I can't remember what my problems were with it. Maybe it
will work for you.

Here is one way to do it:

1) Create an xx field called xx.days.since.last.run with the following attributes:

DAT=PINT
LEN=2
VAL=IF{"MIS SCHED MNEMONIC"^MIS.JOB.mnemonic,
VAL=%Z.link(":","MIS","%.MIS.data","MIS")^OLD,
VAL=@MIS.JOB.last.run.date^LRD,
VAL=ZZ%O(:,OLD),
VAL=%Z.date.sub(@.today,LRD)}
WITH=START

This VAL attribute connects to your MIS data and stores the last run date in the local
variable called LRD. It then calculates the number of days from then to the current date.
You will need to replace "MIS SCHED MNEMONIC" with the name of your MIS schedule mnemonic.

2) Use xx.days.since.last.run as Select Field with the Operator GT and the value "7"

Using the WITH=START Field Attribute will instruct your report to calculate this value at the
start of the report. It will not run if the number of days since your report last ran is not
greater than 7.

Please let me know if you have any questions.

Good luck,

Brian Schmit
Sr. Programmer, Picis
Direct: 781 557 3315
Fax: 781 557 3140
100 Quannapowitt Parkway
Suite 405
Wakefield, MA 01880


Howard Chase, RN
Senior Clinical Analyst
Androscoggin Valley Hospital
59 Page Hill Road
Berlin, NH 03570
(603)326-5669

Stephen Tavares

unread,
Jul 8, 2008, 12:39:13 PM7/8/08
to Howard Chase, Rip Hunt, medit...@mtusers.com
If you haven't got something like Boston Workstation try a cheapie called MyMacros. I think it was $29 it uses screen coordinates and has it's flaws but the bottom line is it can be added to MS scheduled tasks and it works as long as the PC is logged in. I actually use it on thin-clients for or ED trackers. Create a user account with access to run that report and script it out.

Stephen Tavares
Data Center Manager
Greenwich Hospital
5 Perryridge Rd.
Greenwich, CT 06830
ph. 203-863-3283
fax 203-863-3231
Step...@greenhosp.org

Howard

**********************************************************************
This message originates from Yale New Haven Health System. The information contained in this message may be privileged and confidential. If you are the intended recipient, you must maintain this message in a secure and confidential manner. If you are not the intended recipient, please notify the sender immediately and destroy this message. Thank you.
**********************************************************************

Bill Mullins

unread,
Jul 8, 2008, 4:43:08 PM7/8/08
to Howard Chase, Rip Hunt, medit...@mtusers.com
Why not the first and the 15 of each month, I know some months have more
or less days in them, but how precise does this report need to be?

Or

1 and 3 weeks of each month?

-----Original Message-----
From: meditech-...@mtusers.com
[mailto:meditech-...@mtusers.com] On Behalf Of Howard Chase
Sent: Tuesday, July 08, 2008 11:26 AM
To: Rip Hunt
Cc: medit...@mtusers.com
Subject: Re: [MEDITECH-L] Scheduling a report every 14 days - Magic

Howard Chase

unread,
Jul 9, 2008, 7:06:51 AM7/9/08
to Bill Mullins, medit...@mtusers.com
In our case the report has to be every other Sat. No give, no flex.That is why I ended up
using the dates.

Can't speak for RIP.

Howard

Ganesh Seshadri

unread,
Jul 9, 2008, 11:43:30 AM7/9/08
to medit...@mtusers.com
we had a similar need - it had to do with our pay periods - every
fourteen days, "no give, no flex". what I ended up doing was scheduling
it to run every week, but the end user just doesn't look at the "off
week's" spool file.
regards, ganesh seshadri, indiana regional

Barb Stump

unread,
Jul 9, 2008, 4:33:42 PM7/9/08
to Rip Hunt, medit...@mtusers.com
Rip,
I can't take credit for this as I used logic posted by Joe Cocuzzo on
the Meditech-l to accomplish a biweekly report. The posting was for
someone who wanted a report every 21 days and I changed it to every 14
days. Below is the posting. My report schedule is set up with a
frequency of DAILY and WED as the days. The report schedule runs every
Wednesday, but only produces a valid spool file every other week. On
the off week, the spool file created has no End Page so if you try and
view it you receive the error "Cannot load page 1". I attached the
report written in Magic 5.61. This report is set up to send the detail
as a MOX email.

Joe's posting from 2/09/2006
------------------------------------------------------------------------
----
Schedule report daily.

Include a start macro like this:

"20060208"^START,
1^/R.FOUND^/R.PAGE.NUM,
IF{@.today=START 1^OK;
DO{START'>@.today %Z.date.add(START,21)^START,IF{START=@.today 1^OK}}},
IF{OK;%Z.rw.close.up(0)}

Just pick the seed date that suits you. Report will start up every day,
but only really run every 21 days from seed date (and on seed date).
------------------------------------------------------------------------
----

Barb Stump
Applications Analyst III
Lima Memorial Health System
p: 419-998-4441
f: 419-998-4725
www.limamemorial.org

biwksched.npr
Reply all
Reply to author
Forward
0 new messages