import re


def replcDeid(s):
    """
    replace de-identified elements in the sentence (date, name, address, hospital, phone)
    """
    s = re.sub('\[\*\*\d{4}-\d{2}-\d{2}\*\*\]', 'date', s)
    s = re.sub('\[\*\*.*?Name.*?\*\*\]', 'name', s)
    s = re.sub('\[\*\*.*?(phone|number).*?\*\*\]', 'phone', s)
    s = re.sub('\[\*\*.*?(Hospital|Location|State|Address|Country|Wardname|PO|Company).*?\*\*\]', 'loc', s)
    s = re.sub('\[\*\*.*?\*\*\]', 'deidother', s)
    return s