Rookie mistake in overlay code in clinicr.js. variable not defined in correct scope.