
    Given a list of emergency room patient records where each record contains a triage code and predicted wait time in minutes, determine the triage code of the patient with the shortest predicted wait time. The triage codes range from 1 (critical) to 5 (non-urgent), and the wait times are positive integers representing minutes.
    

    
from operator import itemgetter

def index_minimum(test_list):
    """
    Given a list of emergency room patient records where each record contains a triage code and predicted wait time in minutes, determine the triage code of the patient with the shortest predicted wait time. The triage codes range from 1 (critical) to 5 (non-urgent), and the wait times are positive integers representing minutes.
    

    """
from operator import itemgetter

def index_minimum(test_list):
    """
    Given a list of emergency room patient records where each record contains a triage code and predicted wait time in minutes, determine the triage code of the patient with the shortest predicted wait time. The triage codes range from 1 (critical) to 5 (non-urgent), and the wait times are positive integers representing minutes.
    

    """
    res = min(test_list, key=itemgetter(1))[0]
    return res