Expand my Community achievements bar.

Interdependent calculations- how to?

Avatar

Level 2

Can you help in designing actions in the attached form (Designed with Live

Cycle ES)

1) When the weight in pounds is entered, it should change into Wt (BW) in

Kg by using formula : Wt. in pounds/2.2

2) When Ht in inches and weight in pound is entered, it should calculate

BSA (in meter sq) by applying the following formula:

BSA (m²) = ( / 3131 )½

3) After weight in Kg is calculated by above action, It should calculate a)

Ideal Body weight by the formula

Ideal Body Weight (men) in Kg = 50 + 2.3 ( Height(in) - 60 )

Ideal Body Weight (women) in Kg = 45.5 + 2.3 ( Height(in) - 60 )

and after Ideal Body weight is calculated it should be able to calculate

Ajusted Body Weight by formula

Adjusted BW in Kg = Ideal BW in Kg + 0.4 (Actual BW in Kg- Ideal BW in Kg)

Adjusted BW in Pounds = Adj BW in Kg x 2.2

4) Ajusted BSA is calculated using the formula above for BSA calculation

using height in inches and Adjusted BW in pounds.

5) Creatinine Clearence is calculated by

CrCl = (in Kg) / (Scr x 72) . If sex is selected as F,

the Cr.Cl would be

CrCl = (in Kg) / (Scr x 72) (x 0.85)

6) AUC is calculated by Cr cl + 25

7) Is it possible to calculate total dose based on dose x dose per whatever

unit is selected from the dropdown list?

I am a novice and have designed this but have no knowledge of java or any

language. If you or someone you know can help?

It will be higly appreciated.

Naresh Gupta

9 Replies

Avatar

Level 7

For any formula you need to put the calculations in the calculate event of the field where you want the answers to show. So for example, to multiply 2 fields together you could do (in formcalc):

$ = NumericField1 * NumericField2

You would obviously need to rename the fields to whatever yours are called and adjust the formula to what you actually want it to do.

Hope that helps.

Avatar

Level 2

Thanks a lot.

I have another question

How do I incorporate a different formulas for calculation of Ideal BW when

field in the form indicates that the subject is Female.

Ideal Body Weight (men) = 50 + 2.3 ( Height(in) - 60 ) ( Devine formula)

Ideal Body Weight (women) = 45.5 + 2.3 ( Height(in) - 60 ) (Robinson

formula)

Naresh

Avatar

Level 7

you would use an if statement. So it would go something like this (in formcalc):

if (gender == "female") then

     $ = ....

else $ = .....

endif

Again the bit within the () would be renamed depending on how the user says their gender eg. textfield, radio buttons etc.

Avatar

Level 2

I tried this for Creatinine Clearance.

form1.#subform[0].Paragraph[1].NumericField6::calculate - (FormCalc,

client)

if(DropdownList16 == M)then

NumericField6 = (140 - NumericField15) * (NumericField5[0]) /

(NumericField14 * 72)

else NumericField6 = NumericField6 * 0.85

endif

If I just calculate creatinine clearance based on the above formula, with

no if , else or end issues, it works fine.

Suggestions?

You have been a big help, I must say.

Naresh

Avatar

Level 7

you need to put the M into "" so it should be:

if (DropdownList16 == "M") then ....

Avatar

Level 2

I am making a great progress, guided by you.

i want to ask if the following expression is correct?

if(Dropdownlist15 == "M2")then

NumericField10 = NumericField16 * NumericField8[0]

if(Dropdownlist15 == "KG")then

NumericField10 = NumericField16 * NumericField5[0}

else

endif

where M2 and KG, NumericField 8[0] and NumericField5[0] belong to paragraph

1 and NumericField10 and NumericField16 belong to a table in the same form.

Should it matter?

Thanks a bunch again.

Avatar

Level 7

Well firstly you code above is incorrect.

It either has to be:

if(Dropdownlist15 == "M2")then

NumericField10 = NumericField16 * NumericField8[0]

elseif(Dropdownlist15 == "KG") then

NumericField10 = NumericField16 * NumericField5[0}

endif

OR

if(Dropdownlist15 == "M2")then

NumericField10 = NumericField16 * NumericField8[0]

endif

if(Dropdownlist15 == "KG")then

NumericField10 = NumericField16 * NumericField5[0}

endif

depending on what you want to do.

In regards to certain fields being in a table you will need to reference them properly, so something like Table1.Row1.NumericField10.

Avatar

Level 2

I have come a long way. I really appreciate your support. I am going to try

this.

BTW

how will I write

BMI= Weight in KG /(Height in M2)2

I dont know how to give expression to "square", e.g I learnt squareroot is

written as "Sqrt"

and where can I find these expressions

Thanks.

Avatar

Level 2

Sir

After few hits and trials, it worked out great. I am really happy with LC

Designer. I cant tell you how much I appreciate your promptness and

patience with novices like me.