It's kind of a round about way to do it, but you can do it with steps and flags.

Set the steps and conditions and then use something like the following in the 
Actions window.


First Step;
F("SetTimeDate") = Format(Now, "HH:MMAM/PM")
F("AMPM") = Trim$(Right$(F("SetTimeDate"),2))
F("Hour") = Trim$(Left$(F"(SetTimeDate"),2)


Second Step (or could be condition)

If F("Hour") > "11" or F("AMPM") = "PM" then            ' is it after midnight 
or after Noon
    If F("Hour") < "02" and F("AMPM") = "PM then      ' is it past lunch time
        F("Meal") = "L"                                               ' Not 
past lunch set L for the flag
    Else
        F("Meal") = "D"                                               ' Past 
lunch next meal is dinner, set D for flag
    End if
Else
    F("Meal") = "B"                                                    ' it's 
before Noon, but not close enough for lunch, set B for flag.
End if

Then just check your Flags to dictate the next step.  Its not as clean as could 
be, but it works.  I suppose you could use CASE instead of a nested if, but 
it's only 2 comparisons.

Brian Bennett
Affinity Health Systems
PBS Systems Analyst
PBS\Clinic Billing
(920)628-9055
[email protected]



________________________________
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, February 16, 2011 1:13 PM
To: [email protected]
Subject: RE: [talkbws] vb in rules based scripting

I am trying to get my script to use vb to store the time of day as a variable 
and depending on what time it is, run a different configuration of the report. 
Here are the steps for the script:

Login to MT
Sign into OE
Run the Process Diets routine
Here - look at what hour it is, depending on what the hour is, enter B for 
breakfast, L for lunch, or D for dinner.
Choose printer and file.

Sarah Koenigsman
HPMIN Applications Analyst
[email protected]<mailto:[email protected]>
785.623.5023
________________________________
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, February 16, 2011 12:57 PM
To: [email protected]
Subject: RE: [talkbws] vb in rules based scripting

For what type of tasks?

Vicky L. Moore, BS, MT(ASCP)
Quest Diagnostics | Hospital CPU Interface Specialist, Client Interface 
Services| 1777 Montreal Circle | Tucker, GA  30085 USA | phone +1.678.406.1777 
-or- +1.866.709.0772 opt1, ext1777 | fax +1.484.676.8628| 
[email protected] | www.QuestDiagnostics.com

P Please think about resource conservation before you print this message


________________________________
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, February 16, 2011 1:55 PM
To: [email protected]
Subject: [talkbws] vb in rules based scripting
Hi,
Would someone be willing to share a rules based script (preferably for Meditech 
C/S 5.6x) that incorporates visual basic in the script?

Your help would be greatly appreciated!

Sarah Koenigsman
HPMIN Applications Analyst
[email protected]<mailto:[email protected]>
785.623.5023



---  To post a message to this list, send mail to: [email protected]    You are 
currently subscribed as: [email protected]    Unsubscribe in 
the customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx


---  To post a message to this list, send mail to: [email protected]    You are 
currently subscribed as: [email protected]    Unsubscribe in the 
customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx


---  To post a message to this list, send mail to: [email protected]    You are 
currently subscribed as: [email protected]    Unsubscribe in the 
customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx

------------------------------------------
The contents of this message, together with any attachments, are intended only 
for the use of the person(s) to which they are addressed and may contain 
confidential and/or privileged information. Further, any medical information 
herein is confidential and protected by law. It is unlawful for unauthorized 
persons to use, review, copy, disclose, or disseminate confidential medical 
information. If you are not the intended recipient, immediately advise the 
sender and delete this message and any attachments. Any distribution, or 
copying of this message, or any attachment, is prohibited.
________________________________
CONFIDENTIALITY NOTICE: This e-mail communication and any attachments may 
contain confidential and privileged information for the use of the designated 
recipient(s) named above. If you are not the intended recipient, you are hereby 
notified that you have received this communication in error and that any 
review, disclosure, dissemination, distribution or copying of it or its 
contents is prohibited. If you have received this communication in error, 
please notify the sender at the electronic mail address noted above and destroy 
all copies of this communication and any attachments. Thank you for your 
cooperation.

---  To post a message to this list, send mail to: [email protected]    You are 
currently subscribed as: [email protected]    Unsubscribe in the 
customer center on our website: 
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx   

Reply via email to