0 Replies Latest reply on Mar 20, 2012 6:51 PM by ChemProtocol

    ROUNDING - Automatically rounding to whole Number - HELP

    ChemProtocol

      Hi all,

       

      Have a major problem using LC version 8. Designing on-line chemotherapy templates for the hospital.

       

      Issue:

       

      1. calculated fields are automatically rounding to the whole number

      2. subsequent global values are rounded even if I use: $=round($,2) for the first calculated field

       

       

      The only area in the form where I deliberately made the decimal round is by using javascript:

       

      function roundNumber(num, dec) {

              var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);

        return result;

         }

      BSA.rawValue=roundNumber(Math.pow(Table34.Row1.wt.rawValue,0.425) * Math.pow(Table33.Row1.ht.rawValue,0.725) * 0.007184,2);

       

       

      I'm really stuck as a lot of the drug calculations are reliant on the accuracy of weight, body surface area etc

      Here is the working example: http://www.lotusinteractive.com.au/chemo_adobehelp/CLADRIBINE.pdf

       

       

      Note: BSA works fine (height and weight data need to be added to get the BSA value). The percentage dose is filled in to used to get the CALCULATED DOSE value (0.14mg x weight)

      eg. if weight is 55kg X 100% (0.14mg) the result should be = 7.7mg

      Result calculated is = 8mg

       

      HAS ANYONE GOT ANY IDEAS???