If an airline asks a doctor to attend an emergency, they should pay the market rate for the intervention and there should be a standard rate agreed with the medical profession to cover this.
After all, the doctor is still liable for his intervention and possibly subject to lawsuits etc and if the airline asked a medical company on the ground for assistance, they would pay for it.
The airline could raise a very small levy on all passengers to pay for it. Given the very small percentage of medical incidents versus the number of pax flown, the additional levy would be miniscule.
I believe that would be fair for doctors and paramedics.