Summary
The Glomerular Filtration Rate Estimate by CKD-EPI Equation method calculates its output using form inputs and data retrieved from the Demographics form. See Merk Manuals for details about the equation itself as well as an online calculator.
Formal Expression
var isBlackItemName = 'DM Race - Black Or African American'; var demographicsEventName = 'Screening'; var demographicsFormName = 'Demographics'; var serumCreatinine = findFirstItemByName(formJson,'Serum Creatinine').value; var demographics = findFormData(demographicsEventName, demographicsFormName); var isBlack = findFirstItemByName(demographics[0], isBlackItemName).value; var sex = findFirstItemByName(demographics[0], 'Sex').value; var age = findFirstItemByName(demographics[0], 'Age').value; var sexFactor = 1.018; var alpha = -0.329; var kappa = 0.7; var raceFactor = (isBlack == 'true') ? 1.159 : 1; if (sex == 'MALE') { sexFactor = 1; alpha = -0.411; kappa = 0.9; } // GFR = 141 * min(Serum_creatinine/kappa, 1)alpha * max(Serum_creatinine/kappa, 1) -1.209 * 0.993Age * Sex * Race var gfr = 141 * Math.pow(Math.min(serumCreatinine/kappa, 1),alpha) * Math.pow(Math.max(serumCreatinine/kappa, 1),-1.209) * Math.pow(0.993, age) * sexFactor * raceFactor ; return parseFloat(toFixed(gfr, 2)); function toFixed(num, fixed) { // truncate after fixed # of decimals, no rounding var re = new RegExp('^-?\\d+(?:\.\\d{0,' + (fixed || -1) + '})?'); return num.toString().match(re)[0]; }