Hi Gary, I would suggest using a case statement...Set your time as a variable (currTime), and then providing multiple statements/choices:
Select Case currTime Case = > 20 or < 75: code = 99289 Case = > 76 or <120: code = 99290 Case = >121 or < 150: code = 99291 End Select I know that's probably not exactly the correct syntax, but below is a good link that explains the select case statement. I had a similar issue with scripting the other day. http://www.informit.com/library/content.aspx?b=STY_VB6_24hours&seqNum=83 (http://www.informit.com/library/content.aspx?b=STY_VB6_24hours&seqNum=83) Hope this helps! --------------------------------------- Heather Castillo Module Coordinator/HPMIN Support Information Systems 785.623.5084 HaysMedicalCenter [EMAIL PROTECTED] (mailto:[EMAIL PROTECTED]) __________________________________________________ >From Gary Williams <[EMAIL PROTECTED]> Sent Thu 2/14/2008 9:45 AM To [email protected] Subject [Talk] greater and less than I am working on a script that will take the time spent in our ER and compare it with a chart to determine the CPT code to enter into meditech. Right now I am trying something along these lines, if time > 20 or < 75 then code = 99289 if time > 76 or <120 then code = 99290 if time >121 or < 150 then code = 99291 it seems like the first line will work but not go on to the second. Is there a better way to do this? This is something my VB training hasn't covered yet. Thanks, Gary Williams
Important: This email and any attachments may contain confidential information subject to protection under the Federal Standards for Privacy of Individually Identifiable Health Information (45 C.F.R. Parts 160 and 164). If you or your organization is a “Covered Entity” under the above mentioned regulations, you are obligated to treat such information in a manner consistent with the regulations. If it appears that this email was sent to you in error, (1) you are prohibited from utilizing or disseminating this email or any attachments; (2) please immediately delete it from your computer and any servers or other locations where it might be stored, and email this sender or call the Hays Medical Center Privacy Officer at (785) 623-2188 advising that you have done so. We appreciate your cooperation.
