The law doesn’t say if you have a broken foot you have to take an ambulance to get treated at the ER.
State law regulates drivers, medical transport is a subsection and medical transport is further broken down into emergency transportation and non-emergency transportation. What the law says is you can’t just start offering medical transportation services to the public in exchange for money without complying with the law/regulations.
Further, as you might imagine doctors are regulated, and if you are treating a patient who needs to be transported to an ER for emergency services, the doctor should understand a Lyft/Uber isn’t the appropriate standard of care and is per se illegal under those facts. The doctor may have had his/her heart in the right place be not calling an abmbulance to reserve that for a hypothetical life/death patient, but it’s hard to argue this isn’t an emergency when your a doctor sending your patient to the ER, at which point emergency medical transportation laws/regulations apply.