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.

Count down

Featured Replies

Hello!

I have a calculation which takes a supply on hand, and subtracts a daily use amount by day. How do I stop it from subtracting once the supply runs out?

To make matters more complicated, the calculation already uses an 'and' statement, as two other variables are involved (ie in A = a certain value, and B = a certain value, then do this calculation). I can't add another 'and' to an 'and' statement, eg if A = certain value and B = certain value and self is < 0, then 0.

Hope this makes sense. Thanks for any help you can give me.

Pat

Hi

which is your actual calculation ?

Hope this makes sense.

Hope springs eternal, but...

I would think that if someone records using a non-existing resource, then it's not the calculation's fault.

In any case, there's no reason why you couldn't add together several statements using multiple AND operators.

  • Author

Hi

which is your actual calculation ?

here it is:

Case (

RXUsagePattern__lxt = "acute-regular" and not IsEmpty ( TotalDailyQuantity__lxn );

OnHandQuantityCount__lxn -

( TotalDailyQuantity__lxn * (Get ( CurrentDate ) - DateOfQuantityOnHand__lxd));

RXUsagePattern__lxt = "acute-regular" and not IsEmpty ( TotalWeeklyQuantity__lxn );

OnHandQuantityCount__lxn -

(TotalWeeklyQuantity__lxn * ((Get ( CurrentDate ) - DateOfQuantityOnHand__lxd) / 7 ));

RXUsagePattern__lxt = "chronic-regular" and not IsEmpty ( TotalDailyQuantity__lxn );

OnHandQuantityCount__lxn -

(( OriginalRefillNumber__lxn - NumberRefillsInOnHandQuantity__lxn) * PrescribedQuantity__lxn) -

(TotalDailyQuantity__lxn * (Get ( CurrentDate ) - DateOfQuantityOnHand__lxd));

RXUsagePattern__lxt = "chronic-regular" and not IsEmpty ( TotalWeeklyQuantity__lxn );

OnHandQuantityCount__lxn -

(( OriginalRefillNumber__lxn - NumberRefillsInOnHandQuantity__lxn) * PrescribedQuantity__lxn) -

(TotalWeeklyQuantity__lxn * ((Get ( CurrentDate ) - DateOfQuantityOnHand__lxd) / 7 ));

""

)

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.