Based on the article nurse practitioners ranked fourth and RNs sixth on U.S. News & World Report’s annual list of the best jobs. Employment opportunity, salary, work-life balance and job security were among the factors in the rankings.

NPs and RNs were second and third, respectively, among healthcare jobs. Dentists were first, and were No. 3 overall behind software developers and computer systems analysts.

The rankings cite NPs’ “array of capabilities, coupled with the fact that they can work independently of physicians when treating patients” in some states. There will be a net gain of 37,100 NP jobs between 2012 and 2022, and the median salary in 2012 was $89,960.

RNs’ high ranking had much to do with the labor market: “Tremendous growth” of 19.4% — a net gain of 526,800 jobs — is projected in the RN workforce between 2012 and 2022, and the RN unemployment rate was only 2.6% in 2012. The median salary was $65,470.

Licensed practical nurses also made the list, at No. 38. “The nature of their work means that licensed practical and licensed vocational nurses often have the most intimate, hands-on relationship with patients of any other [job] in this industry’s sphere,” according to the rankings. Median salary in 2012 was $41,540. The projected growth in the LPN labor market by 2022 is almost 25%.

Other healthcare positions near the top of the rankings were pharmacist (No. 5), physical therapist (No. 7), physician (No. 8) and dental hygienist (No. 10).

Full rankings and methodology: