
    In a hospital's patient management system, develop a function that identifies the first unique character in a patient's medical identifier string to ensure proper record distinction and prevent duplicate entries. The function should analyze the medical identifier composed of department codes, admission dates, and patient initials, and return the first character that appears exactly once in the identifier string.
    

    
def first_non_repeating_character(str1):
    """
    In a hospital's patient management system, develop a function that identifies the first unique character in a patient's medical identifier string to ensure proper record distinction and prevent duplicate entries. The function should analyze the medical identifier composed of department codes, admission dates, and patient initials, and return the first character that appears exactly once in the identifier string.
    

    """
def first_non_repeating_character(str1):
    """
    In a hospital's patient management system, develop a function that identifies the first unique character in a patient's medical identifier string to ensure proper record distinction and prevent duplicate entries. The function should analyze the medical identifier composed of department codes, admission dates, and patient initials, and return the first character that appears exactly once in the identifier string.
    

    """
    char_order = []
    ctr = {}
    for c in str1:
        if c in ctr:
            ctr[c] += 1
        else:
            ctr[c] = 1
            char_order.append(c)
    for c in char_order:
        if ctr[c] == 1:
            return c
    return None