I'm trying to perform a calculation that includes a square root. I'm not sure this is possible with MEL, but before giving up I'm posting it here for the experts.
I'm trying to calculate the Fibrosis-4 score which requires this calculation:
FIB-4 = (Age x AST)/(Platelet x Squareroot(ALT))
If I want to see it in a data display in VFE I have this together so far.
(PATIENT_AGE()*val(OBSANY("SGOT (AST)")))/val(OBSANY("PLATELETS"))* ([Squareroot of ] val(OBSANY("SGPT (ALT)")))
I am stuck on how to calculate the square root of val(OBSANY("SGPT (ALT)"))
Is this possible?
49^.5 will equal 7 - so a square root is a number with an exponent of .5
I have a form of primary math functions located in the CHUG Marketplace, Free. it is called "Math Functions for MEL" Square root is an approximation unless found, so if you need something very accurate increase the accuracy in my function, if you need something quick lower the accuracy.
Functions in the form are:
• Absolute
• Square Root (Change accuracy for faster results)
• Factorial
• Power
• Is Number Prime?
• Random Number in Range X to X
• Random Number 1 to 100
• Sine
• Cosine
• Tangent
• Degrees to Radians
• Radians to Degrees
• Exponential
• Natural Log
• Logarithm
• Logarithm Base 10
• Logarithm Base 2
• Time (Month | Day | Year | Hour | Min (MEL Doesn’t have Nano Seconds))