[MEDITECH-L] NPR Report - select date and time range

110 views
Skip to first unread message

Richard Perryman

unread,
Jan 21, 2010, 5:12:22 PM1/21/10
to medit...@mtusers.com
I have a PHA.RX report that I want it to automatically select a
particular date & time range, but I can't figure it out. We are magic
5.61.



On Page 2 I basically have:

enter.date.and.time GE Z.date.add(@.today-1,0))_"-1900"

enter.date.and.time LE Z.date.add(@.today-0,0))_"-0659"



Obviously these don't work. Any help is appreciated.



Thanks,

Richard Perryman
Pharmacy IS Coordinator
SE Missouri Hospital
rper...@sehosp.org
Phone: (573) 651-5582







-----------------------------------------
The materials in this e-mail are private and may contain Protected
Health Information. If you are not the intended recipient, be
advised that any unauthorized use, disclosure, copying,
distribution or the taking of any action in reliance on the
contents of this information is strictly prohibited. If you have
received this email in error, please immediately notify the sender
via telephone or by return e-mail.

www.southeastmissourihospital.com

Richard Perryman

unread,
Jan 22, 2010, 10:24:17 AM1/22/10
to medit...@mtusers.com
Thanks - I had to make a slight modification in the macro to this:
%Z.date.out(%Z.date.add(@.today,0-1))_"-1900"^/FIRST,
%Z.date.out(@.today)_"-0659"^/LAST

Now it works! Thank-you so much.

Thanks,
Richard Perryman
Pharmacy IS Coordinator
SE Missouri Hospital
rper...@sehosp.org
Phone: (573) 651-5582

-----Original Message-----
From: Blount, Mark [mailto:Mark....@waynehealth.org]
Sent: Friday, January 22, 2010 7:51 AM
To: Richard Perryman
Subject: RE: select date and time range

Richard! Good morning...
Looking at the field in DPM Online, it's actually the product of %Z.date.out(@enter.date)_"-"_...@enter.time
I'm not certain what that means in diddling with the format but I'd guess the field, if placed on the picture, would look like 01/22/10-1900.
The field enter.date is the standard Meditech format...YYYYMMDD
You might try a little start macro to create your default range...

Your footnote...
AL START start

And make your start macro just the date manipulations..
%Z.date.out(%Z.date.add(@enter.date,0-1))_"-1900"^/FIRST,
%Z.date.out(enter.date)_ "-0659"^/LAST

enter.date.and.time GE /FIRST
enter.date.and.time LE /LAST

And remember to translate from the "Process Reports" screen to incorporate the macro code.

I'm slapping this together hurriedly without verifying any of it but I think your routine will run for yesterday at 1900 through today at 0659...
You could try those date manipulations in computed fields first and put them on your output to see what you'll be getting..

Sometimes using Z routines on fields that are themselves products of Z routines causes some problems.

Mark Blount
Programmer Analyst, Information Technology
Wayne Memorial Hospital
Goldsboro, NC
919.731.6588

www.waynehealth.org
"Although our sins testify against us, O Lord, do something for the sake of your name. For our backsliding is great; we have sinned against you." - Jeremiah 14:7
 

enter.date.and.time GE Z.date.add(@.today-1,0))_"-1900"

enter.date.and.time LE Z.date.add(@.today-0,0))_"-0659"

www.southeastmissourihospital.com

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

Please do NOT send messages that ask "Please post to the list" 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.

The meditech-l archives (and other tips) can be found at
http://mtusers.net/zarchives

Job opportunities in the Meditech community can be found at
http://mtusers.net/zjobs

Jeff Castles

unread,
Jan 22, 2010, 12:38:44 PM1/22/10
to Richard Perryman, medit...@mtusers.com
This is from LAB.L.SPEC but it uses the date/time from/to setup. I hope
this helps.

Thanks,
Jeff Castles
LIS Coordinator
Conway Regional Health System
Phone # 501-450-2115
Pager # 501-465-0064

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