
    In an emergency department's triage system, write a function to validate if a patient's ID number follows the hospital's special classification rule where the ID number must be one less than twice its reverse digits - this rule is used to quickly identify certain high-priority cases. For example, if a patient's ID is 1089, check if 1089 is one less than twice its reverse (9801).
    

    
def rev(num):
    rev_num = 0
    while num > 0:
        rev_num = rev_num * 10 + num % 10
        num = num // 10
    return rev_num

def check(n):
    """
    In an emergency department's triage system, write a function to validate if a patient's ID number follows the hospital's special classification rule where the ID number must be one less than twice its reverse digits - this rule is used to quickly identify certain high-priority cases. For example, if a patient's ID is 1089, check if 1089 is one less than twice its reverse (9801).
    

    """
def rev(num):
    rev_num = 0
    while num > 0:
        rev_num = rev_num * 10 + num % 10
        num = num // 10
    return rev_num

def check(n):
    """
    In an emergency department's triage system, write a function to validate if a patient's ID number follows the hospital's special classification rule where the ID number must be one less than twice its reverse digits - this rule is used to quickly identify certain high-priority cases. For example, if a patient's ID is 1089, check if 1089 is one less than twice its reverse (9801).
    

    """
    return 2 * rev(n) == n + 1