
    In a hospital's patient readmission tracking system, develop a validation function that checks how many characters in a patient's identifier code appear in their correct alphabetical positions (where 'A' should be in position 1, 'B' in position 2, etc.). The function should help verify the authenticity of hospital-generated codes by counting these position matches, regardless of letter case.
    

    
def count_char_position(str1):
    """
    In a hospital's patient readmission tracking system, develop a validation function that checks how many characters in a patient's identifier code appear in their correct alphabetical positions (where 'A' should be in position 1, 'B' in position 2, etc.). The function should help verify the authenticity of hospital-generated codes by counting these position matches, regardless of letter case.
    

    """
def count_char_position(str1):
    """
    In a hospital's patient readmission tracking system, develop a validation function that checks how many characters in a patient's identifier code appear in their correct alphabetical positions (where 'A' should be in position 1, 'B' in position 2, etc.). The function should help verify the authenticity of hospital-generated codes by counting these position matches, regardless of letter case.
    

    """
    count_chars = 0
    for i in range(len(str1)):
        if i == ord(str1[i]) - ord('A') or i == ord(str1[i]) - ord('a'):
            count_chars += 1
    return count_chars