def load_panel_app(adapter, panel_id=None, institute='<STR_LIT>'):
base_url = '<STR_LIT>'<EOL>hgnc_map = adapter.genes_by_alias()<EOL>if panel_id:<EOL><INDENT>panel_ids = [panel_id]<EOL><DEDENT>if not panel_id:<EOL><INDENT>LOG.info("<STR_LIT>")<EOL>data = get_request(base_url.format('<STR_LIT>'))<EOL>json_lines = json.loads(data)<EOL>panel_ids = [panel_info['<STR_LIT>'] for panel_info in json_lines['<STR_LIT:result>']]<EOL><DEDENT>for panel_id in panel_ids:<EOL><INDENT>panel_data = get_request(base_url.format('<STR_LIT>') + panel_id)<EOL>parsed_panel = parse_panel_app_panel(<EOL>panel_info = json.loads(panel_data)['<STR_LIT:result>'], <EOL>hgnc_map=hgnc_map,<EOL>institute=institute<EOL>)<EOL>parsed_panel['<STR_LIT>'] = panel_id<EOL>if len(parsed_panel['<STR_LIT>']) == <NUM_LIT:0>:<EOL><INDENT>LOG.warning("<STR_LIT>".format(parsed_panel['<STR_LIT>']))<EOL>continue<EOL><DEDENT>try:<EOL><INDENT>adapter.load_panel(parsed_panel=parsed_panel)<EOL><DEDENT>except Exception as err:<EOL><INDENT>raise err<EOL><DEDENT><DEDENT>
Load PanelApp panels into scout database

    If no panel_id load all PanelApp panels 

    Args:
        adapter(scout.adapter.MongoAdapter)
        panel_id(str): The panel app panel id