This is the Data Integration, MRI, and Bioinformatics Component of the National Consortium on Alcohol and NeuroDevelopment in Adolescence (NCANDA), funded by the NIAAA.
(Technically not a codebase change, but not sure where else this should go.)
Currently, any Redcap calculation results in a float. The float precision varies between:
Javascript (invoked on frontend load) and PHP (invoked on backend load, e.g. via API record change),
Javascript implementations.
This results in value instability. Opening "Visit notes" instrument in Redcap recomputes all calc fields using the Javascript driver in the used browser. See e.g. on this record how the value fluctuates.
Two things are annoying about this:
We cannot guarantee equal precision between releases,
An annoying UX side-effect is that opening any form with a calculated field results in the form changing, and then prompting the user to save or discard changes on exit.
Per Redcap Community Forums, rounding to a specified precision is the best practice here. This means wrapping any calculation with this issue in round() and specifying precision as second argument.
(Technically not a codebase change, but not sure where else this should go.)
Currently, any Redcap calculation results in a float. The float precision varies between:
This results in value instability. Opening "Visit notes" instrument in Redcap recomputes all calc fields using the Javascript driver in the used browser. See e.g. on this record how the value fluctuates.
Two things are annoying about this:
Per Redcap Community Forums, rounding to a specified precision is the best practice here. This means wrapping any calculation with this issue in
round()
and specifying precision as second argument.