Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

I still have a billing database and I developed a time on call field which defined dates and times physicians were on call with a strict definition of "on call" being M-F from 1800 to 0600, Sat, Sun, and holidays (which I imported from the archives here) That went fine.

Then the definition changed. Now they want to include minutes starting from 1800. So for a case that started at 1730 and went to 1830 previously would NOT be a call case because it started before 1800. Now they want this same case to count towards 30 minutes of call. Here is my calc with an explanation below.

Case(DayOfWeek = ("Monday" or "Tuesday" or "Wednesday" or "Thursday" or "Friday") and (Start Time >= Time(6,0,0) or Start Time <= Time(18,0,0)) and (End Time <= Time(18,0,0) and End Time >= Time(6,0,0)), Total Time, (DayOfWeek = "Monday" or "Tuesday" or "Wednesday" or "Thursday" or "Friday") and (Start Time >= Time(6,0,0) and Start Time <= Time(18,0,0)) and (End Time >= Time(18,0,0) and End Time <= Time(6,0,0)) , If(End Date - Start Date = 1 , Time(24,0,0 + End Time) - Time(18,0,0) , End Time - Time(18,0,0)),0)

This should calculate and give the total time (a field in the db that calculates total time for the case regardless, and works) if the case starts after 1800 or before 0600. If I end the calc at total time with a , O. It works, giving the total time for cases in that range and O otherwise. When I add the second case statement, the first no longer works nor does the second. I want the second to calculate for a start time of 1730 and end time of 1830, to calculate 30 minutes (time after 1800) or say 1735 and 1922, 1 hour 22 minutes (again time after 1800). Saturday and Sunday are all day so they are easy to do. Any ideas.

I didn't try to dissect the rest of this, but wanted to point out:

DayOfWeek = ("Monday" or "Tuesday" or "Wednesday" or "Thursday" or "Friday")

will always return FALSE, I believe. It should probably be written:

DayOfWeek = "Monday" or DayOfWeek = "Tuesday" or ...

or you can shorten that to:

not (DayOfWeek = "Saturday" or DayOfWeek = "Sunday")

HTH.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.