how to calculate heart rate and spo2 from maxrefdes117

You have to read the datasheet to understand the algorithm written here
https://github.com/MaximIntegratedRefDesTeam/RD117_ARDUINO/blob/master/algorithm.cpp
Maybe there is also an application note that explain it better.