In Jane Austen’s time, or the early part of the 19th century, there was a clear distinction between a doctor, surgeon, and apothecary.
Doctors and physicians occupied the highest rung on the social ladder. Such citizens could still be considered "upper class" because 1) their training did not include apprenticeship and 2) the profession excluded, supposedly, manual labor
Because surgeons actually treated the patient by performing physical labor – a trade, so to speak – they occupied a lower rung on the social ladder.
Apothecaries, who learned their profession through apprenticeship and who were definitely considered to be in “trade," ranked even lower on the social scale.
Read more here