2

Not sure if possible, but here's a working version of a form I want to reproduce in Redcap- http://extubation.net/

Provided equation that is calculated- Extubation Success Calculator

Gestational age, oxygen, respiratory score, day of life, pH, and weight at extubation are the input fields.

Is this possible to reproduce within a Redcap form?

RickP
  • 67
  • 6

1 Answers1

2

Yes, it should be straightforward. I just plugged some random numbers into a calculation I defined based on your image and this popped out:

enter image description here

I don't know these metrics and the numbers I put in might be way off, so this might be off by some orders of magnitude, but the important points are:

  1. In REDCap calculations, base and exponents are both wrapped in parentheses, so (3)^(2) yields 9, while 3^2 is not syntactic.
  2. To get Euler's number, you can either hardcode it to some degree of precision yourself in the calculation (2.718281828459045)^(-47.3379 + 0.40635*[gage]..., or you can use the JavaScript Math library and use (Math.E)^(-47.3379 + 0.40635*[gage].... If you do the latter, you must have your admin add the calculation for you, as JavaScript in calculations is reserved for administrators. It might only give you so much precision anyway, so you might as well hard code it.

My calculation was:

(Math.E) ^ (-47.3379 + 0.40635*[gage] - 0.0701*[o2] - 0.1273*[rss] + 0.04202*[edol] + 0.52154*10*[bgph] + 0.0016*[ext_weight_g])
Jangari
  • 690
  • 4
  • 12