from datetime import datetime


def get_es_index_name(project, meta):
    """
    Get the name for the output ES index

    :param project: seqr project identifier
    :param meta: index metadata
    :return: index name
    """
    return '{project}__structural_variants__{sample_type}__grch{genome_version}__{datestamp}'.format(
        project=project,
        sample_type=meta['sampleType'],
        genome_version=meta['genomeVersion'],
        datestamp=datetime.today().strftime('%Y%m%d'),
    ).lower()