During the Napoleonic Wars, French army surgeons faced the overwhelming task of treating a large number of wounded soldiers. They needed a system to prioritize care, so they developed a method of sorting patients into three categories based on their severity of injury and chances of survival. This system was called "triage", which reflects the act of "sorting" patients into different groups.
Over time, the term "triage" evolved to describe the process of prioritizing treatment in any situation with limited resources, especially in medical emergencies.