Greetings,

Note the use of Exit sub in each If statement evaluation which you did
not have in your example (nice work Ambur!) - this is critical with
Rules if you are setting the value of Step inside an Action!

 

Anytime you set Step= in a Rules Action you MUST use Exit Sub inside all
your evaluator statements  and also not have a Goto on that Rule.

 

Autosave is in the works btw...

 

Regards,

Thom

 

Thom C. Blackwell

Product Manager

Boston Software Systems

(866) 653-5105 ex 807

www.bossoft.com <http://www.bossoft.com/> 

Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx> 

 

LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.

 

From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 09, 2008 9:54
To: Talk
Subject: [talkbws] RE: Comparing Dates

 

Hi Brian,

   I got this code to work. The only difference is that I didn't pull
the date from meditech, I just set it equal to the current date. 

These were the dates in my file:

11/28/08

03/09/08

10/09/08

 

The first time through it went to step "Check Anyhow", the second it
made it to "Bad Date" and the third "correct date". Maybe try formatting
"mm/dd/yy" with those "/" in there.

 

 

F("OrgDate") = Format(Left$(D("1"), 8), "MM/DD/YY") 

F("Date") = Format(Now, "MM/DD/YY")  

If F("Date") = F("OrgDate") Then

Step = "CORRECT DATE"

Exit Sub

                  

ElseIf F("Date") < F("OrgDate") Then

Step = "CHECK ANYHOW"

Exit Sub

 

Else

 'current date is greater than date in file

 Step = "BADDATE"

 Exit Sub

End If

End Sub

 

Ambur Tiller

Adena Health System

Programmer Analyst

Information Technology

272 Hospital Road, Chillicothe, OH 45601

Tel: (740)-779-7854

Email: [EMAIL PROTECTED]

 

From: [email protected] [mailto:[EMAIL PROTECTED] 
Sent: Thursday, October 09, 2008 9:26 AM
To: [email protected]
Subject: [talkbws] Comparing Dates

 

Morning all,

 

I'm have a bit of an dilemma this morning.  I'm comparing Dates (equal
or less than) and thought I had it working last night. I have a
pre-defined date in my datastation and want to check it against the
viewed date from Meditech.  

 

This is my latest coding modification

F("OrgDate") =Left$(D("6"),8) '03/22/08

F("Date") =Trim$(View(Row:=Row, Col:=22, Length:=8) ) '10/24/06

 

If F("Date")= F("OrgDate") then
Step = "Correct Date"

End if                      ' no problems here, works just fine

 

If F("Date")< F("OrgDate") then
Step = "Check Anyhow"
End                     ' I thought this was working, but it turns out
it is only checking DD for the condition.  

 

 

If I change the code to this;

F("OrgDate") =Format(Left$(D("6"),8),"MMDDYY")  '032208

F("Date") =Format(Trim$(View(Row:=Row, Col:=22, Length:=8) ),"MMDDYY")
'102406

 

If F("Date")= F("OrgDate") then
Step = "Correct Date"

End if   

                   

If F("Date")< F("OrgDate") then
Step = "Check Anyhow"
End 

 

I don't think the MMDDYY actually converts the data to a date, if it
did, the less than statement would be true, but it remains false.

 

Any thoughts for a solution?

 

p.s. each of these are in different steps, I don't have them all crammed
into one rule. :)

 

p.p.s Thom, any chance one of the next BWS releases will have an
"auto-save" function? 

 

Thanks.

 

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

--- 
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 

******************************************************************

This email and any files transmitted with it are proprietary and
confidential
and intended solely for the use of the individual or entity to whom they
are
addressed. If you have received this email in error please notify the
system 
manager at [EMAIL PROTECTED] Please note that any views or opinions
presented 
in this email are solely those of the author and do not necessarily
represent 
those of the company. No employee or agent is authorized to conclude any
binding 
agreement on behalf of Adena Health System with another party by email
without 
express written confirmation from Adena Health System authorized
individuals. 

Finally, the recipient should check this email and any attachments for
the presence of viruses. 
The company accepts no liability for any damage caused by any virus
transmitted by this email. 

Adena Health System, 272 Hospital Road, Chillicothe, Ohio, USA,
http://www.adena.org

******************************************************************

 

--- 
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

Reply via email to