def extract_medium(medium):
    """
    Convert Medium to simplified dictionary

    :param medium: ILoop medium object
    :return: list of dictionaries of format
            {'id': <compound id (<database>:<id>, f.e. chebi:12345)>, 'concentration': <compound concentration (float)>}
    """
    if medium is None:
        return []
    else:
        return [{
            'id': 'chebi:' + str(compound['compound'].chebi_id),
            'name': compound['compound'].chebi_name,
            'concentration': compound['concentration']
        } for compound in medium.read_contents()]