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.

Newbie modification date calculation question

Featured Replies

  • Newbies

I'm a 3rd year OB/Gyn resident and I've created a simple patient db. I have two tables -- patient info and pending issues. The patient info includes the usual stuff (name, resident physician, complications, etc.). The issues table includes pending labs and/or follow-up tests, therefore each patient can have several "issues". End users can add "pending issues" for a patient via a portal from within the "patient info" table.

What I would like to do is create a field which represents the most recent modification date for a patient, i.e. either the modification date for the "patient info" table or the most recent "pending issue" mod date for a particular patient. I can't figure out how to do this within a single field calculation, so I'm thinking I might have to write a script. Is there an easier way?

Thanks in advance!

Create a calculation (date) within Patients. It will automatically be unstored:

If(Last(Issues::ModDate) > ModDate; Last(Issues::ModDate); ModDate)

Max( Last(Issues::ModDate); ModDate ) may be faster.

In either case, the Issues relationship should be sorted by ModDate to ensure Last does indeed retrieve the most recent one.

If Issues is sorted in ModDate descending order, you could use Max( Issues::ModDate; ModDate ).

In either case, the Issues relationship should be sorted by ModDate to ensure Last does indeed retrieve the most recent one.

Thanks for the catch Queue. I tend to think of date as Activity Date or Creation Date; usually appearing in ascending date order. Modification date would indeed be out of sequence. smirk.gif

  • 2 weeks later...
  • Author
  • Newbies

Thanks for the input -- works like a champ!

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.