
    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 measurement. The system must identify the smallest possible higher number that can be formed using the exact same digits as the current measurement to help medical staff set appropriate alert boundaries for patient monitoring.
    

    
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 measurement. The system must identify the smallest possible higher number that can be formed using the exact same digits as the current measurement to help medical staff set appropriate alert boundaries for patient monitoring.
    

    """
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 measurement. The system must identify the smallest possible higher number that can be formed using the exact same digits as the current measurement to help medical staff set appropriate alert boundaries for patient monitoring.
    

    """
    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