Grouping patients based on the severity of their injuries and the likelihood of their survival is called triage. In a triage situation, urgent cases are seen by doctors first, and non-life-threatening emergencies go last.
You can also apply the sorting and prioritizing of triage to more general situations. If you're overwhelmed with homework, you can perform triage by organizing it into subjects and prioritizing assignments based on their due dates. The word triage comes from the French word trier meaning to sort. Although the medical sense is now the most common, it wasn't used that way until World War One.