how to calculate heart rate and spo2 from maxrefdes117