The lives of patients in rural and coastal areas could be at risk due to a nationwide shortage of country doctors, say experts.