def get_deid_field_dict(item):
    """
    Return a dictionary with custom fields from the DeID Upload metadata.

    :param item: the item with data.
    :returns: a dictionary of key-vlaue pairs.
    """
    deid = item.get('meta', {}).get('deidUpload', {})
    if not isinstance(deid, dict):
        deid = {}
    result = {}
    for k, v in deid.items():
        result['CustomField.%s' % k] = str(v).replace('|', ' ')
    return result