OrbitalRotationMatrix(oldOrbitals, newOrbitals) takes two lists of strings which it tries to interpret as atomic orbitals (compare CreateAtomicIndicesDict()). It then returns the matrix that rotates from the first basis set to the second one, taking permutations as well as changes from relativistic to non-relativistic orbitals into account (assuming spherical harmonics for non-relativistic orbitals).
A very short example (to the point of nonexistence):
-- some example code
text produced as output