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

Complex days calcualtion help

Featured Replies

I have a database where the numerical results of a subject's blood test is created. The test is the same, just offered at different times (which are random times). So there is a field bloodtest1 and Daysafterappt1. (so the blood test1 is the result of the test, and the daysafterappt1 is the days after an office visit). The same are paired for bloodtest2, daysafterappt2, etc and so on up to 6 blood test results and 6 "days after appt".

OK, here is what I want to do.

I want to categorize the results in each record as a range of the following. 0-5 days after appt, 6-15 days after appt, 16-45 days after appt, 46-100 days after appt, 101 to 200 days after appt, 201-400 days after appt, 401-800 days after appt, 801-1200 days after appt.

is this possible, any ideas?

This is not a good structure to have. Instead of multiple fields, you should have a separate record for each test, related to a parent subject. Then you'll only need to do one calculation instead of six (among other advantages).

As for the calculation, it could be something like:

Case (

DaysAfterApp ≤ 5 ; "A" ;

DaysAfterApp ≤ 15 ; "B" ;

DaysAfterApp ≤ 45 ; "C" ;

DaysAfterApp ≤ 100 ; "D" ;

DaysAfterApp ≤ 200 ; "E" ;

DaysAfterApp ≤ 400 ; "F" ;

DaysAfterApp ≤ 800 ; "G" ;

"H"

)

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.