def get_analysis_types(adapter, total_cases, institute_id=None, slice_query=None):
<EOL>query = {}<EOL>subquery = {}<EOL>if institute_id and slice_query:<EOL><INDENT>subquery = adapter.cases(owner=institute_id, name_query=slice_query,<EOL>yield_query=True)<EOL><DEDENT>elif institute_id:<EOL><INDENT>subquery = adapter.cases(owner=institute_id, yield_query=True)<EOL><DEDENT>elif slice_query:<EOL><INDENT>subquery = adapter.cases(name_query=slice_query, yield_query=True)<EOL><DEDENT>query = {'<STR_LIT>': subquery}<EOL>pipeline = []<EOL>if query:<EOL><INDENT>pipeline.append(query)<EOL><DEDENT>pipeline.append({'<STR_LIT>': '<STR_LIT>'})<EOL>pipeline.append({'<STR_LIT>': {'<STR_LIT>': '<STR_LIT>', '<STR_LIT:count>': {'<STR_LIT>': <NUM_LIT:1>}}})<EOL>analysis_query = adapter.case_collection.aggregate(pipeline)<EOL>analysis_types = [{'<STR_LIT:name>': group['<STR_LIT>'], '<STR_LIT:count>': group['<STR_LIT:count>']} for group in analysis_query]<EOL>return analysis_types<EOL>
Return information about analysis types.
        Group cases based on analysis type for the individuals.
    Args:
        adapter(adapter.MongoAdapter)
        total_cases(int): Total number of cases
        institute_id(str)
        slice_query(str): Query to filter cases to obtain statistics for.
    Returns:
        analysis_types array of hashes with name: analysis_type(str), count: count(int)