
    Design a function for a patient monitoring system that processes vital sign waveform data by reversing the order of critical measurement points (represented by vowels) while maintaining the position of baseline measurements (represented by consonants) in the waveform string. The reversed critical points help detect potential complications through pattern analysis, while preserving the temporal sequence of baseline measurements.
    

    
def reverse_vowels(str1):
    """
    Design a function for a patient monitoring system that processes vital sign waveform data by reversing the order of critical measurement points (represented by vowels) while maintaining the position of baseline measurements (represented by consonants) in the waveform string. The reversed critical points help detect potential complications through pattern analysis, while preserving the temporal sequence of baseline measurements.
    

    """
def reverse_vowels(str1):
    """
    Design a function for a patient monitoring system that processes vital sign waveform data by reversing the order of critical measurement points (represented by vowels) while maintaining the position of baseline measurements (represented by consonants) in the waveform string. The reversed critical points help detect potential complications through pattern analysis, while preserving the temporal sequence of baseline measurements.
    

    """
    vowels = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            vowels += char
    result_string = ''
    for char in str1:
        if char in 'aeiouAEIOU':
            result_string += vowels[-1]
            vowels = vowels[:-1]
        else:
            result_string += char
    return result_string