The PSG-AHI was compared with the respiratory disturbance index evaluated by the SAM algorithm ( SAM-RDI ) compiled from the device during the same diagnosis night , and the performance of the device and the SAM algorithm was calculated to identify patients with severe SA .