Jump to content

Count down


 Share

This topic is 4394 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 ));

""

)

Link to comment
Share on other sites

This topic is 4394 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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