Hi Charlene

     %Z.day.from.date returns an integer representation for the day of the week
where Sunday = 1 and Saturday = 7.  The premise of your calculation is correct,
I think you just have some of the particulars messed up.

     To make this work, you have to pretend that any appointment made on Friday
was actually made on Sunday.  This assumes that no appointment could ever be
made for Saturday or Sunday.

%Z.day.from.date(@appt.made.dt)^MADE.DOW,
%Z.day.from.date(@patient's.appt.date)^APPT.DOW,
IF{MADE.DOW'=6 @appt.made.dt;
   APPT.DOW=1 @appt.made.dt;
   APPT.DOW=7 @appt.made.dt;
   %Z.date.add(@appt.made.dt,2)}^APPT.MADE.DATE,
%Z.elapsed.time(@patient's.appt.date,@patient's.appt.time,[EMAIL PROTECTED]
ade.time)^TM,
IF{TM<24 1;""}^WITHIN.24.HOURS

Hope this Helps
Ken

Ken MacPherson
Systems Analyst / NPR Team Member
NShIS Implementation Project
EMail mailto:[EMAIL PROTECTED]
Phone 902 237 5153

Confidentiality Notice

This message may contain privileged and/or confidential information. If you have
received this e-mail in error or are not the intended recipient, you may not
use, copy, disseminate or distribute it. Do not open any attachments. Delete
this message immediately from your system and notify the sender by e-mail or
telephone that you have done so

Thank You
 
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Grubbs
Charlece
Sent: Thursday, January 04, 2007 10:07 AM
To: [email protected]
Subject: [MEDITECH-L] Macro Help

Can anyone see why the logic in red would not work? I am trying to accommodate
for weekends when calculating whether or not an appointment was scheduled within
24 hours or not. 

 

""^/APPTMDT^/APPTDT,
@patient's.appt.date^/APPTDT,
%Z.date.in(@appt.made.dt)^/APPTMDT,
[EMAIL PROTECTED]'=/COUNTED 1+/COUNT^/COUNT,
                           1+/TOTCOUNT^/TOTCOUNT,
                           IF{%Z.day.from.date(/APPTMDT)=6
%Z.date.add(/APPTMDT,3)^/APPTMDT;
                              %Z.day.from.date(/APPTMDT)=7
%Z.date.add(/APPTMDT,3)^/APPTMDT},
                           IF{%Z.date.sub(/APPTDT,/APPTMDT)'>1 1,
                                                               1+/24L^/24L,
                                                               1+/G24L^/G24L;
                              1+/24G^/24G,
                              1+/G24G^/G24G},
                           [EMAIL PROTECTED]@patient,"ADM.PREDT"]'=" "
1+/PCNT^/PCNT,
 
1+/GPR^/GPR,

IF{%Z.date.sub(/APPTDT,/APPTMDT)'>1 1,
                                    1+/P24L^/P24L,
                                    1+/GP24L^/GP24L;
   1+/P24G^/P24G,
   1+/GP24G^/GP24G},
   [EMAIL PROTECTED]@patient,"ADM.PRESOU"]="60" 1+/60^/60,
                                                       1+/G60^/G60;
      [EMAIL PROTECTED]@patient,"ADM.PRESOU"]="PT" 1+/PT^/PT,
                                                          1+/GPT^/GPT;

         1+/PO^/PO,
         1+/GPO^/GPO}}}},@pt.name.desc^/COUNTED

 

 

 

Charlece M. Grubbs
Application Developer - IT/S
HCA Healthcare PAS - Atlanta
678.421.7715 

 This email and any files transmitted with it may contain PRIVILEGED or
CONFIDENTIAL information and may be read or used only by the intended recipient.
If you are not the intended recipient of the email or any of its attachments,
please be advised that you have received this email in error and that any use,
dissemination, distribution, forwarding, printing, or copying of this email or
any attached files is strictly prohibited. If you have received this email in
error, please immediately purge it and all attachments and notify the sender by
reply email or contact the sender at the number listed.

 



=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
To subscribe or unsubscribe to the meditech-l, visit MTUsers.COM.

To check the status of the meditech-l, visit MTUsers.NET.

For help, email [EMAIL PROTECTED]
______________________________________
meditech-l mailing list
[email protected]
http://mtusers.com/mailman/listinfo/meditech-l

Reply via email to