What is the process of separating patients based on the urgency of need for care called?
The action is called triaging, the verb is to triage.
A triage system helps ration supplies and minimize fatalities by directing a majority of the available resources to patients who are in a critical-care situation (need immediate care to survive). Patients who are of the least concern, people with minor scrapes or bruises, for example, might only receive palliative care (making the patient feel better but not actually addressing their injuries) or no care at all (contingent upon what resources are available).
Thankfully in most developed nations hospitals rarely have to operate under a hospital-wide triage system. Entire hospitals typically only resort to triaging patients when resources are in short supply and/or when there is a mass-casualty event such as during a natural or man-made disaster, however it is common practice in emergency rooms to triage patients (someone who comes in via ambulance takes priority over someone who walks in [even walk-ins are triaged by a nurse, the nurse typically asks a series of medically-relevant questions in order to determine their condition]).
The triage system attempts to streamline care through color-coding, each color corresponds to the severity the individual's injuries. The color-coding system goes from green to yellow then red and black, green being the least severe, red being the most severe, yellow is a mid-grade (patients are taken after red but before green), and black is deceased. Below is an image of a hospital's color-coded triage system (zombie humor implied, and no zombie is not an actual classification [thank God]).
**Image courtesy of: http://www.nclexquiz.com/blog/triage-flow-chart/**