
    In a hospital's vital sign monitoring system, develop an algorithm that determines the next higher critical threshold by rearranging the digits of a patient's current vital reading. The system should identify the smallest possible higher number that can be formed using the same digits of the current reading, which will serve as an early warning indicator for medical staff to monitor the patient more closely.
    

    
def rearrange_bigger(n):
    """
    In a hospital's vital sign monitoring system, develop an algorithm that determines the next higher critical threshold by rearranging the digits of a patient's current vital reading. The system should identify the smallest possible higher number that can be formed using the same digits of the current reading, which will serve as an early warning indicator for medical staff to monitor the patient more closely.
    

    """
def rearrange_bigger(n):
    """
    In a hospital's vital sign monitoring system, develop an algorithm that determines the next higher critical threshold by rearranging the digits of a patient's current vital reading. The system should identify the smallest possible higher number that can be formed using the same digits of the current reading, which will serve as an early warning indicator for medical staff to monitor the patient more closely.
    

    """
    nums = list(str(n))
    for i in range(len(nums) - 2, -1, -1):
        if nums[i] < nums[i + 1]:
            z = nums[i:]
            y = min(filter(lambda x: x > z[0], z))
            z.remove(y)
            z.sort()
            nums[i:] = [y] + z
            return int(''.join(nums))
    return False