If someone has sleep apnea and needs a Cpap machine to sleep, can that person use it on Shabbos and Yom Tov? Since it requires it to be turned on electrically? But is necessary to prevent serious medical complications?
It can be used, provided it is turned on automatically by means of a “time-clock.”
I know several people who make use of the machine on Shabbos by this method.
Best wishes and hope it helps.